/* =========================================================
   DALIÉ — ESTILOS BASE
   Mobile-first | WCAG AA | Performance-first
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── SKIP LINK (acessibilidade) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: var(--text-inv);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 9999;
  font-size: 0.875rem;
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
}
.skip-link:focus { top: 0; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* ── TIPOGRAFIA ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  letter-spacing: var(--ls-head);
  line-height: 1.2;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ── UTILITÁRIOS ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1200px) { .container { padding: 0 2rem; } }

/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  gap: 1rem;
}

@media (min-width: 768px) { .header-inner { height: 80px; } }

/* Logo — sempre no centro físico (col 2 do grid) */
.logo-link {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity var(--transition);
  grid-column: 2;
}
.logo-link:hover { opacity: 0.85; }

/* ── Logos SVG (header e footer) ── */
@keyframes logo-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px currentColor);
  }
  50% {
    transform: scale(1.028);
    filter: drop-shadow(0 0 7px currentColor) drop-shadow(0 0 14px currentColor);
  }
}

.logo-svg {
  display: block;
  transform-origin: center;
  animation: logo-pulse 3.5s ease-in-out infinite;
  will-change: transform, filter;
}

.header-logo {
  height: 56px;
  width: calc(56px * 752 / 560); /* viewBox logo.svg = 752×560 */
}
@media (min-width: 768px) {
  .header-logo {
    height: 68px;
    width: calc(68px * 752 / 560);
  }
}

/* Ações — coluna 3 do grid, ancoradas à direita */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  grid-column: 3;
  justify-self: end;
}

.header-conta { display: inline-flex; }
.header-conta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border, #e6e2dc);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  transition: all 0.18s ease;
}
.header-conta-link:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  transition: all var(--transition);
}
.filter-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-toggle-btn .filter-count {
  background: var(--accent);
  color: var(--btn-text);
  border-radius: 999px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
}
.filter-toggle-btn .filter-count:empty { display: none; }

@media (min-width: 1024px) { .filter-toggle-btn { display: none; } }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: all var(--transition);
}
.cart-btn:hover { border-color: var(--accent); color: var(--accent); }

.cart-btn svg { width: 20px; height: 20px; }

.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border-radius: 999px;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
  padding: 0 4px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-count.bump { transform: scale(1.3); }

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  transition: background var(--transition-slow);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) { .hero { padding: 4rem 2rem 3rem; } }

.hero-headline {
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  letter-spacing: var(--ls-head);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: clamp(0.875rem, 2vw, 1rem);
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  opacity: 0.7;
  max-width: 500px;
  margin: 0 auto;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  opacity: 0.65;
}

/* ═══════════════════════════════════════════════
   LAYOUT PRINCIPAL
   ═══════════════════════════════════════════════ */
.main-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
  min-height: 60vh;
}

/* ── PAINEL DE FILTROS (sidebar) ── */
.filters-panel {
  width: 270px;
  flex-shrink: 0;
  background: var(--bg-filter);
  border-right: 1px solid var(--border);
  padding: 1.25rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  transition: transform var(--transition-slow), background var(--transition-slow);
  overscroll-behavior: contain;

  /* Oculto em mobile */
  display: none;
}

@media (min-width: 1024px) {
  .filters-panel { display: block; top: 72px; height: calc(100vh - 72px); }
}

/* Mobile: filtros como drawer */
.filters-panel.open {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 300px;
  height: 100vh;
  z-index: 200;
  animation: slideRight 0.3s ease;
}

@keyframes slideRight {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

.filters-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 199;
  animation: fadeIn 0.25s ease;
}
.filters-overlay.open { display: block; }

/* Cabeçalho do painel de filtros */
.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.filters-title {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.filters-clear {
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
  background: none; border: none;
  cursor: pointer;
  padding: 0;
}
.filters-clear:hover { color: var(--accent-hover); }

.filters-close {
  display: none;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--bg-card);
}
.filters-panel.open .filters-close { display: flex; }

/* Grupo de filtro */
.filter-group {
  margin-bottom: 1.25rem;
}

.filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.filter-label svg {
  width: 14px; height: 14px;
  transition: transform var(--transition);
}
.filter-group.collapsed .filter-label svg { transform: rotate(-90deg); }
.filter-group.collapsed .filter-body { display: none; }

/* Botões de filtro (chips) */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-text);
}

/* Cor chips */
.color-chip {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  padding: 0;
  position: relative;
  transition: all var(--transition);
}
.color-chip:hover, .color-chip.active {
  border-color: var(--accent);
  transform: scale(1.15);
}
.color-chip.active::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 2px solid white;
}

/* Cores predefinidas */
.color-chip[data-cor="Preto"]   { background: #1a1a1a; }
.color-chip[data-cor="Branco"]  { background: #f5f5f5; border-color: #ddd; }
.color-chip[data-cor="Azul"]    { background: #4a6fa5; }
.color-chip[data-cor="Vermelho"]{ background: #c0392b; }
.color-chip[data-cor="Verde"]   { background: #27ae60; }
.color-chip[data-cor="Bege"]    { background: #d4b896; }
.color-chip[data-cor="Cinza"]   { background: #8e8e8e; }
.color-chip[data-cor="Rosa"]    { background: #e8a0b4; }
.color-chip[data-cor="Amarelo"] { background: #f1c40f; }

/* Range slider duplo */
.price-range-wrap {
  padding: 0 0.25rem;
}

.price-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.range-slider {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}

.range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  -webkit-appearance: none;
  pointer-events: none;
  outline: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--btn-bg);
  border: 2px solid var(--bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  pointer-events: all;
  transition: transform var(--transition);
}
.range-slider input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.range-slider input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--btn-bg);
  border: 2px solid var(--bg);
  cursor: pointer;
  pointer-events: all;
}

.range-track {
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
}

.range-fill {
  position: absolute;
  height: 4px;
  background: var(--accent);
  border-radius: 999px;
}

/* Checkbox filtros */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0;
  font-size: 0.82rem;
  color: var(--text);
  transition: color var(--transition);
}
.filter-checkbox:hover { color: var(--accent); }

.filter-checkbox input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Botão aplicar filtros (mobile) */
.filters-apply {
  display: none;
  width: 100%;
  padding: 0.85rem;
  margin-top: 1rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}
.filters-apply:hover { background: var(--btn-hover); }
.filters-panel.open .filters-apply { display: block; }

/* ── ÁREA DE PRODUTOS ── */
.products-area {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1rem;
}

@media (min-width: 768px) { .products-area { padding: 1.5rem; } }

/* Barra de busca + ordenação */
.search-sort-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.4rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color var(--transition);
}
.search-input::placeholder { color: var(--text-light); }
.search-input:focus { border-color: var(--accent); outline: none; }

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 16px; height: 16px;
}

.search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px; height: 16px;
  display: none;
  cursor: pointer;
  background: none; border: none; padding: 0;
}
.search-clear.visible { display: flex; align-items: center; }

.sort-select {
  padding: 0.6rem 2rem 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  transition: border-color var(--transition);
}
.sort-select:focus { border-color: var(--accent); outline: none; }

/* Contagem de resultados */
.results-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

/* ── GRID DE PRODUTOS ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

/* Estado vazio */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 1rem; opacity: 0.3; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.875rem; }

/* ── CARD DE PRODUTO ── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.4s ease both;
}

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

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Imagem do card */
.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-alt);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .card-img { transform: scale(1.04); }

/* Badges */
.card-badges {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.badge-sale {
  background: var(--sale);
  color: #fff;
}

.badge-new {
  background: var(--new-bg);
  color: var(--new-text);
}

/* Ações rápidas (hover) */
.card-quick-actions {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
  display: flex;
  gap: 0.4rem;
  transform: translateY(100%);
  transition: transform var(--transition);
  z-index: 2;
}
.product-card:hover .card-quick-actions { transform: translateY(0); }

.btn-quick {
  flex: 1;
  padding: 0.5rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-add-quick {
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-add-quick:hover { background: var(--btn-hover); }

.btn-view-quick {
  background: rgba(255,255,255,0.9);
  color: #1a1a1a;
}
.btn-view-quick:hover { background: #fff; }

/* Conteúdo do card */
.card-body {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.card-name {
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  letter-spacing: var(--ls-head);
  line-height: 1.3;
  color: var(--text);
}

/* Tamanhos */
.card-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.1rem;
}

.size-dot {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.3rem;
}

/* Rating */
.card-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
}

.stars {
  color: var(--star);
  letter-spacing: -1px;
  font-size: 0.75rem;
}

.rating-count {
  color: var(--text-light);
  font-size: 0.68rem;
}

/* Preços */
.card-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.price-current {
  font-size: 1rem;
  font-weight: 600;
  color: var(--price);
}

.price-current.sale { color: var(--price-sale); }

.price-old {
  font-size: 0.78rem;
  color: var(--price-old);
  text-decoration: line-through;
}

/* Botão adicionar ao carrinho (dentro do card) */
.btn-card-add {
  width: 100%;
  padding: 0.55rem;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--btn-border);
  background: var(--btn2-bg);
  color: var(--btn2-text);
  transition: all var(--transition);
}
.btn-card-add:hover {
  background: var(--btn2-hover);
  color: var(--btn2-hover-t);
}

/* ── SIZE PICKER POPUP ── */
.size-picker {
  position: fixed;
  z-index: 300;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  min-width: 200px;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.size-picker-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.size-picker-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.size-option {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.size-option:hover, .size-option.selected {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-text);
}

.size-picker-confirm {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background var(--transition);
}
.size-picker-confirm:hover { background: var(--btn-hover); }

/* ── RECOMENDAÇÕES ── */
.recommendations {
  padding: 2rem 1rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  transition: background var(--transition-slow);
}

@media (min-width: 768px) { .recommendations { padding: 2.5rem 1.5rem; } }

.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 480px) { .rec-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .rec-grid { grid-template-columns: repeat(4, 1fr); } }

/* ═══════════════════════════════════════════════
   CARRINHO DRAWER
   ═══════════════════════════════════════════════ */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 400;
  animation: fadeIn 0.25s ease;
}
.cart-overlay.open { display: block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 401;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

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

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: var(--fw-head);
  letter-spacing: var(--ls-head);
}

.cart-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text);
  transition: all var(--transition);
}
.cart-close:hover { border-color: var(--accent); color: var(--accent); }

/* Mensagem desconto */
.cart-discount-msg {
  padding: 0.7rem 1.25rem;
  background: var(--sale-bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--sale);
  font-weight: 500;
  text-align: center;
  display: none;
  transition: background var(--transition-slow);
}
.cart-discount-msg.visible { display: block; }

/* Itens do carrinho */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem;
  overscroll-behavior: contain;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.cart-empty svg { margin: 0 auto 1rem; opacity: 0.3; }
.cart-empty p { font-size: 0.9rem; }

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
  animation: fadeUp 0.3s ease;
}

.cart-item-img {
  width: 72px; height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.cart-item-info { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }

.cart-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-size {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.cart-item-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--price);
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.qty-btn {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }

.qty-num {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  align-self: start;
  padding: 0.25rem;
  color: var(--text-light);
  transition: color var(--transition);
  background: none; border: none;
}
.cart-item-remove:hover { color: var(--sale); }

/* Rodapé do carrinho */
.cart-footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cart-row.discount { color: var(--sale); }

.cart-row.total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.btn-checkout {
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-checkout:hover { background: var(--btn-hover); }

.btn-continue {
  width: 100%;
  padding: 0.65rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-continue:hover { color: var(--text); border-color: var(--text); }

/* ═══════════════════════════════════════════════
   MODAL DE PRODUTO
   ═══════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 500;
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
  padding: 1rem;
}
.modal-overlay.open { display: flex; align-items: center; justify-content: center; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 840px;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .modal { grid-template-columns: 1fr 1fr; max-height: 85vh; overflow: visible; }
}

.modal-img-wrap {
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  overflow: hidden;
}
.modal-img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.modal-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  z-index: 10;
  transition: all var(--transition);
}
.modal-close:hover { border-color: var(--sale); color: var(--sale); }

.modal-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--accent);
}

.modal-name {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: var(--fw-head);
  letter-spacing: var(--ls-head);
  line-height: 1.2;
}

.modal-rating { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }

.modal-price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.modal-price-current {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--price);
}
.modal-price-current.sale { color: var(--price-sale); }

.modal-price-old {
  font-size: 1rem;
  color: var(--price-old);
  text-decoration: line-through;
}

.modal-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.modal-size-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.modal-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-size-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.modal-size-btn:hover { border-color: var(--accent); }
.modal-size-btn.selected { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }

.btn-modal-add {
  width: 100%;
  padding: 0.9rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background var(--transition);
}
.btn-modal-add:hover { background: var(--btn-hover); }

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
  width: 90%;
  max-width: 360px;
}

.toast {
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  line-height: 1.4;
  pointer-events: all;
}

.toast.out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1rem 1.5rem;
  text-align: center;
  transition: background var(--transition-slow);
}

.footer-logo {
  height: 40px;
  width: calc(40px * 500 / 300);
  margin: 0 auto 1rem;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
}
.footer-admin {
  color: var(--text-light);
  opacity: 0.35;
  text-decoration: none;
  margin-left: 8px;
  font-size: 0.85em;
}
.footer-admin:hover { opacity: 0.75; }

/* ── BOTÃO VOLTAR AO TOPO ── */
.back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(12px) scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease, background 0.2s ease;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.28);
  transform: translateY(-2px) scale(1.06);
}

.back-to-top:active {
  transform: translateY(0) scale(0.96);
}

/* ── LOADER ── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }

.loader-logo { height: 60px; animation: pulse 1.5s ease infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── MISC ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

/* Animação delay para grid de produtos */
.products-grid .product-card:nth-child(1)  { animation-delay: 0.05s; }
.products-grid .product-card:nth-child(2)  { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(3)  { animation-delay: 0.15s; }
.products-grid .product-card:nth-child(4)  { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(5)  { animation-delay: 0.05s; }
.products-grid .product-card:nth-child(6)  { animation-delay: 0.1s; }
.products-grid .product-card:nth-child(7)  { animation-delay: 0.15s; }
.products-grid .product-card:nth-child(8)  { animation-delay: 0.2s; }
.products-grid .product-card:nth-child(n+9) { animation-delay: 0.05s; }

/* ── MODAL PIX ── */
.pix-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pix-modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pix-modal h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text);
}

.pix-modal h3 {
  font-size: 0.95rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.pix-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.pix-modal-close:hover {
  color: var(--text);
}

.pix-qrcode-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.pix-qrcode {
  max-width: 280px;
  width: 100%;
  height: auto;
}

.pix-expire {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0 0;
}

.pix-separator {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.pix-separator::before,
.pix-separator::after {
  flex: 1;
  height: 1px;
  background: var(--border);
  content: '';
}

.pix-separator::before {
  margin-right: 0.75rem;
}

.pix-separator::after {
  margin-left: 0.75rem;
}

.pix-copy-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pix-copy-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-light);
  color: var(--text);
  font-family: monospace;
  font-size: 0.75rem;
  resize: none;
  height: 80px;
  transition: border-color 0.2s ease;
}

.pix-copy-input:focus {
  outline: none;
  border-color: var(--accent);
}

.pix-copy-btn {
  padding: 0.75rem 1.25rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}

.pix-copy-btn:hover {
  opacity: 0.9;
}

.pix-copy-btn:active {
  transform: scale(0.95);
}

.pix-status {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1rem 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.pix-modal .btn-primary {
  width: 100%;
  padding: 0.875rem;
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* Media: preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
