:root {
  --blue-900: #0e2a70;
  --blue-700: #123080;
  --blue-500: #1a3fae;
  --blue-400: #2a5ce0;
  --orange-500: #ff7a1a;
  --orange-400: #ff9838;
  --orange-300: #ffb02e;
  --gray-50: #f7f8fb;
  --gray-100: #eef0f6;
  --gray-200: #e2e5ee;
  --gray-500: #6b7180;
  --gray-700: #3a3f4b;
  --gray-900: #1c1f26;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(18, 48, 128, 0.08);
  --shadow-lg: 0 12px 32px rgba(18, 48, 128, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(120deg, var(--blue-500), var(--orange-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tagline {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
}

.cart-btn {
  position: relative;
  background: var(--blue-700);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .2s ease;
}

.cart-btn:hover { background: var(--blue-500); transform: translateY(-1px); }

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--orange-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
}

/* Busca */
.search-bar-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 12px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 34px;
  color: var(--gray-500);
  pointer-events: none;
}

.search-input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 999px;
  padding: 10px 40px 10px 40px;
  font-size: 13.5px;
  color: var(--gray-900);
  transition: border-color .15s ease, background .15s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--blue-400);
  background: var(--white);
}

.search-clear {
  position: absolute;
  right: 34px;
  border: none;
  background: var(--gray-200);
  color: var(--gray-700);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-empty {
  text-align: center;
  color: var(--gray-500);
  padding: 40px 20px;
  font-size: 14px;
}

/* Banner Carousel */
.banner-carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 1;
  max-height: 420px;
  background: var(--blue-900);
}

@media (min-width: 561px) {
  .banner-carousel { width: 100%; }
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform .5s ease;
}

.banner-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(6, 12, 34, .45);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .2s ease;
}

.banner-nav:hover { background: rgba(6, 12, 34, .75); }
.banner-prev { left: 14px; }
.banner-next { right: 14px; }

.banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.banner-dot.active {
  background: var(--orange-500);
  transform: scale(1.2);
}

.banner-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  background: var(--orange-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.banner-badge.pulse {
  animation: bannerPulse 1.6s ease-in-out infinite;
}

@keyframes bannerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (max-width: 560px) {
  .banner-carousel { aspect-ratio: 2 / 1; max-height: 320px; }
  .banner-nav { width: 30px; height: 30px; font-size: 18px; }
  .banner-badge { font-size: 9.5px; padding: 4px 8px; top: 8px; left: 8px; }
}

/* Promo strip */
.promo-strip {
  background: linear-gradient(120deg, var(--orange-500), var(--orange-400));
  color: var(--white);
  text-align: center;
  padding: 9px 14px;
}

.promo-strip-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1px;
}

.promo-strip-text strong { font-weight: 800; }

@media (max-width: 560px) {
  .promo-strip-text { font-size: 11.5px; }
}

/* Category bar */
.category-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: var(--header-h, 120px);
  z-index: 30;
}

.category-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.category-chip {
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-700);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}

.category-chip.active {
  background: linear-gradient(120deg, var(--blue-500), var(--blue-700));
  color: var(--white);
  border-color: transparent;
}

/* Main container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--blue-900);
}

.section-count {
  font-size: 13px;
  color: var(--gray-500);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.product-image-wrap {
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gray-900);
  min-height: 36px;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue-700);
  margin-top: auto;
}

.product-actions {
  display: flex;
  gap: 6px;
}

.btn {
  border: none;
  border-radius: 9px;
  padding: 9px 8px;
  font-size: 12.5px;
  font-weight: 700;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: filter .15s ease, transform .1s ease;
}

.btn:active { transform: scale(.97); }

.btn-add {
  background: var(--gray-100);
  color: var(--blue-700);
  border: 1.5px solid var(--blue-500);
}

.btn-add:hover { background: var(--blue-500); color: var(--white); }

.btn-buy {
  background: linear-gradient(120deg, var(--orange-400), var(--orange-500));
  color: var(--white);
}

.btn-buy:hover { filter: brightness(1.05); }

/* Footer */
.site-footer {
  background: var(--blue-900);
  color: var(--white);
  margin-top: 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}

.footer-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 10px;
  background: var(--white);
}

.footer-col h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--orange-300);
  margin: 0 0 10px;
}

.footer-col p {
  font-size: 13.5px;
  color: #cdd6f0;
  margin: 0 0 6px;
  line-height: 1.5;
}

.footer-col a { color: var(--orange-300); font-weight: 700; }

.footer-bottom {
  text-align: center;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  color: #9fb0da;
}

/* Cart */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 20, 40, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 50;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: var(--white);
  box-shadow: -8px 0 30px rgba(0,0,0,.15);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.cart-header h2 { margin: 0; font-size: 18px; color: var(--blue-900); }

.cart-close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--gray-500);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-empty {
  text-align: center;
  color: var(--gray-500);
  margin-top: 60px;
  font-size: 14px;
  line-height: 1.6;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.cart-item img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--gray-100);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price {
  font-size: 12.5px;
  color: var(--gray-500);
  margin-top: 3px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--blue-700);
}

.qty-value { font-size: 13px; font-weight: 700; min-width: 16px; text-align: center; }

.cart-item-remove {
  background: none;
  border: none;
  color: #c94040;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  margin-left: 4px;
}

.cart-footer {
  padding: 16px 20px 22px;
  border-top: 1px solid var(--gray-200);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 12px;
}

.btn-whatsapp-checkout {
  width: 100%;
  background: linear-gradient(120deg, #25D366, #1ebe57);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-whatsapp-checkout:hover { filter: brightness(1.05); }

/* Modal de detalhes do produto */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 20, 40, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.product-modal {
  background: var(--white);
  border-radius: 18px;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.product-modal-overlay.open .product-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.product-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(28,31,38,.55);
  color: var(--white);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.product-modal-image-wrap {
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.product-modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal-info {
  padding: 26px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-badge {
  background: var(--gray-100);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 5px 10px;
  border-radius: 999px;
}

.product-modal-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.35;
}

.product-modal-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-700);
}

.product-modal-details {
  font-size: 13.5px;
  color: var(--gray-700);
  line-height: 1.7;
  border-top: 1px solid var(--gray-200);
  padding-top: 12px;
}

.product-modal-details div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.product-modal-details span:first-child {
  color: var(--gray-500);
  font-weight: 600;
}

.product-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

@media (max-width: 640px) {
  .product-modal {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  .product-modal-image-wrap { min-height: 220px; }
  .product-modal-info { padding: 20px 20px 22px; }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 80;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 560px) {
  .brand-tagline { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .product-name { font-size: 12.5px; min-height: 32px; }
  .btn { font-size: 11.5px; padding: 8px 6px; }
  .search-bar-wrap { padding: 0 14px 12px; }
}
