/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:    #F5F0EB;
  --brown:    #6B3A2A;
  --brown-lt: #8B5C4A;
  --blue:     #7BA7BC;
  --blue-lt:  #A8C8D8;
  --gold:     #D4956A;
  --gold-lt:  #E8B896;
  --white:    #FFFFFF;
  --gray-100: #F9F6F3;
  --gray-200: #EDE8E3;
  --gray-400: #B0A09A;
  --gray-600: #7A6A64;
  --text:     #3D2B25;
  --shadow:   0 2px 16px rgba(107,58,42,0.10);
  --shadow-hover: 0 8px 32px rgba(107,58,42,0.18);
  --radius:   16px;
  --radius-sm:8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
header {
  background: var(--cream);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(107,58,42,0.07);
}

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

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

/* WA header button */
.wa-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 24px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.wa-header:hover { background: #1EBE58; transform: scale(1.03); }
.wa-header svg { flex-shrink: 0; }

/* ===== HERO BANNER ===== */
.hero {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.hero-banner-img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.hero-badges-bar {
  background: var(--brown);
  padding: 12px 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-badges-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.hero-address {
  width: 100%;
  text-align: center;
  padding: 6px 12px;
  background: rgba(0,0,0,0.15);
  border-radius: 10px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: white;
  white-space: nowrap;
}

/* ===== FILTERS ===== */
.filters-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 90;
}

.filters-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Tipo tabs */
.tipo-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
}

.tipo-tab {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  letter-spacing: 0.02em;
}

.tipo-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--brown);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.tipo-tab.active { color: var(--brown); }
.tipo-tab.active::after { transform: scaleX(1); }
.tipo-tab:hover { color: var(--brown-lt); }

/* Sub-category pills */
.sub-pills {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sub-pills::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-200);
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.pill.active {
  background: var(--brown);
  border-color: var(--brown);
  color: white;
}

.pill:hover:not(.active) {
  border-color: var(--brown-lt);
  color: var(--brown);
}

.pill-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 2px;
  filter: none;
}

.pill.active .pill-icon {
  filter: brightness(0) invert(1);
}

/* ===== SEARCH ===== */
.search-row {
  padding: 0 16px 12px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--gray-400);
  pointer-events: none;
  flex-shrink: 0;
  transition: color 0.18s;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 38px;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-100);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  -webkit-appearance: none;
}

.search-input::placeholder {
  color: var(--gray-400);
  font-size: 0.82rem;
}

.search-input::-webkit-search-cancel-button { display: none; }

.search-input:focus {
  border-color: var(--brown-lt);
  background: var(--white);
}

.search-wrap:focus-within .search-icon {
  color: var(--brown-lt);
}

.search-clear {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--gray-400);
  color: white;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
  line-height: 1;
}

.search-clear:hover { background: var(--brown); }

/* ===== RESULTS COUNT ===== */
.results-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-count {
  font-size: 0.82rem;
  color: var(--gray-600);
}

.results-count span {
  font-weight: 700;
  color: var(--brown);
}

/* ===== PRODUCT GRID ===== */
.catalog {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px 100px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 600px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (min-width: 900px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* ===== PRODUCT CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

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

.card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--gray-100);
  display: block;
}

.card-img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, var(--gray-100), var(--gray-200));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-400);
}

.card-img-placeholder span {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.7;
}

.card-img-wrap { position: relative; }

.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.tag-tipo {
  background: var(--brown);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-tipo.americano { background: var(--blue); }

.tag-sub {
  background: rgba(255,255,255,0.92);
  color: var(--brown);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.card-body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.meta-chip {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 2px 6px;
}

.card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brown);
  margin-top: 6px;
}

.price-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--brown-lt);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.card-price-unit {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: -2px;
}

.modal-price-unit {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: -10px;
  margin-bottom: 16px;
}

.card-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 8px;
  transition: background 0.18s, transform 0.15s;
}
.card-wa:hover { background: #1EBE58; transform: scale(1.02); }

/* ===== ESGOTADO ===== */
.card--esgotado { opacity: 0.75; }

.sold-out-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.sold-out-badge {
  background: #c0392b;
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 4px;
  transform: rotate(-8deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card-wa--esgotado {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  color: var(--gray-400);
  border-radius: 8px;
  padding: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 8px;
  cursor: default;
}

.modal-wa--esgotado {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-200);
  color: var(--gray-400);
  border-radius: 12px;
  padding: 15px;
  font-size: 0.95rem;
  font-weight: 600;
  width: 100%;
  cursor: default;
}

/* ===== EMPTY STATE ===== */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}
.empty svg { margin-bottom: 12px; opacity: 0.4; }
.empty p { font-size: 0.95rem; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,15,10,0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(3px);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding-bottom: env(safe-area-inset-bottom, 20px);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin: 12px auto 0;
}

.modal-img-wrap { position: relative; }

.modal-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.modal-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, var(--gray-100), var(--gray-200));
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal-body { padding: 20px 20px 24px; }

.modal-tipo-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 6px;
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 16px;
}

.modal-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-item {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.detail-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.detail-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.detail-sizes { grid-column: 1 / -1; }

.sizes-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.size-chip {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

/* Tamanhos agrupados por pessoa (Kit Casal / Kit Família) */
.sizes-group { margin-bottom: 8px; }
.sizes-group:last-child { margin-bottom: 0; }
.sizes-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.modal-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  transition: background 0.18s;
}
.modal-wa:hover { background: #1EBE58; }

/* ===== FLOATING WA ===== */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 150;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulse 2.5s infinite;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 28px rgba(37,211,102,0.65), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* ===== FOOTER ===== */
footer {
  background: var(--brown);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 28px 20px;
  font-size: 0.8rem;
  line-height: 1.8;
}

footer strong {
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  display: block;
  margin-bottom: 4px;
}

footer a { color: var(--gold-lt); text-decoration: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
