html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Libre Baskerville', serif;
}

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #97614d;
}

#inicio {
    scroll-margin-top: 72px;
}

/* ===== HERO BANNER ===== */
#hero {
    position: relative;
    width: 100%;
    height: calc(100vh - 72px);
    height: calc(100svh - 72px);
    min-height: 440px;
    background: #f8f1e8;
    overflow: hidden;
}

.hero-slides { position: absolute; inset: 0; }

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.hero-slide picture { display: block; width: 100%; height: 100%; }

.hero-controls button:focus-visible { outline: 3px solid #97614d; outline-offset: 4px; }

.hero-controls { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-controls[hidden] { display: none; }
.hero-controls button { pointer-events: auto; }
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.86);
    color: #744b38;
    font-size: 2rem;
    line-height: 1;
}
.hero-prev { left: clamp(12px, 3vw, 48px); }
.hero-next { right: clamp(12px, 3vw, 48px); }
.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: #97614d55; }
.hero-dot[aria-current="true"] { background: #97614d; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
}

.low-stock {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #b45f06; /* tom quente discreto */
}

.hidden {
    display: none;
}

/* ===== MOBILE ===== */
@media (max-width: 767px) {
    #hero {
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 5;
    }

    .hero-slide img {
        object-fit: contain;
        object-position: center;
    }

    #inicio {
        scroll-margin-top: 64px;
    }
}

/* 🔥 MODO PROMOÇÃO GLOBAL */
.promo-mode {
    background-color: #0f0f0f;
    color: #ffffff;
  }
  
  /* Header */
  .promo-mode header {
    background-color: rgba(0,0,0,0.9);
    border-bottom: 1px solid #222;
  }
  
  /* Textos */
  .promo-mode p,
  .promo-mode span,
  .promo-mode h1,
  .promo-mode h2 {
    color: #ffffff;
  }
  
  /* Cards */
  .promo-mode .bg-gray-100 {
    background-color: #1a1a1a !important;
  }
  
  /* Botões */
  .promo-mode a.bg-secondary {
    background: linear-gradient(90deg, #ff3b3b, #ff7a18);
    color: white;
  }
  
  /* Preço riscado */
  .promo-mode .line-through {
    color: #888;
  }

  /* 🔥 CORES DINÂMICAS */
.promo-mode .bg-secondary {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)) !important;
}

.promo-mode .text-secondary {
    color: var(--color-accent) !important;
}

/* 🔥 ANIMAÇÃO SUAVE NOS CARDS */
.group {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  .group:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  }
  
  /* 🔥 ANIMAÇÃO NO BADGE */
  @keyframes pulse-soft {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  .promo-mode .promo-badge {
    animation: pulse-soft 2s infinite;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .product-item {
    min-width: 0;
  }

/* Catálogo: composição dos cards */
#productGrid { gap: 30px 12px; }
.product-card { min-width: 0; }
.product-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f6f3ee;
}
.product-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.product-image-secondary { opacity: 0; transition: opacity .45s ease; }
@media (hover: hover) {
  .product-item.show-second-image .product-image-secondary { opacity: 1; }
}
.product-stock {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 6px 8px;
  background: rgba(255,255,255,.92);
  color: #79523e;
  font-size: .63rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.product-discount {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 6px 8px;
  background: rgba(121,82,62,.92);
  color: #fff;
  font-size: .63rem;
  letter-spacing: .06em;
}
.product-sold-out {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.7);
  color: #584a40;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
}
.product-name {
  margin-top: 13px;
  color: #4f4037;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .025em;
}
.product-price { margin-top: 4px; color: #97614d; font-size: .82rem; line-height: 1.5; }
.product-price-original { display: block; color: #8b817a; font-size: .72rem; text-decoration: line-through; }
.product-price-current { color: #97614d; font-weight: 600; }
.product-item:focus-visible { outline: 2px solid #97614d; outline-offset: 5px; }
@media (min-width: 768px) {
  #productGrid { gap: 46px 22px; }
  .product-name { font-size: .88rem; }
  .product-price { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .product-image-secondary { transition: none; }
}

/* Controles da coleção */
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; padding: 14px 0; border-top: 1px solid #e9e2db; border-bottom: 1px solid #e9e2db; }
.catalog-count { color: #746960; font-size: .78rem; letter-spacing: .02em; }
.catalog-quick-sizes { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin: -3px 0 28px; }
.catalog-quick-sizes p { color: #584a40; font-size: .78rem; font-weight: 500; letter-spacing: .02em; }
.catalog-quick-options { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-quick-options button { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 7px; border: 1px solid #d9d0c8; color: #584a40; background: #fff; font-size: .78rem; transition: color .2s, background-color .2s, border-color .2s; }
.catalog-quick-options button:hover { border-color: #97614d; }
.catalog-quick-options button[aria-pressed="true"] { border-color: #97614d; background: #97614d; color: #fff; }
.catalog-quick-options button:focus-visible { outline: 2px solid #97614d; outline-offset: 3px; }
.catalog-actions { display: flex; align-items: center; gap: 10px; }
.catalog-control, .catalog-desktop-sort { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 17px; border: 1px solid #d7cbc1; background: white; color: #584a40; font-size: .78rem; letter-spacing: .035em; cursor: pointer; transition: border-color .2s, background-color .2s; }
.catalog-control:hover, .catalog-control.is-active { border-color: #97614d; background: #fbf7f3; }
.catalog-filter-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 50%; background: #97614d; color: white; font-size: .65rem; }
.catalog-desktop-sort { position: relative; padding: 0; border: 0; }
.catalog-desktop-sort .catalog-control { min-width: 225px; justify-content: space-between; }
.catalog-sort-menu { position: absolute; z-index: 20; top: calc(100% + 7px); right: 0; width: 225px; padding: 6px; border: 1px solid #e3d9d0; border-radius: 8px; background: #fff; box-shadow: 0 14px 32px rgba(58,42,32,.12); animation: catalogFadeIn .18s ease-out; }
.catalog-sort-menu[hidden] { display: none; }
.catalog-sort-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 9px 11px; border-radius: 5px; color: #584a40; font-size: .78rem; text-align: left; }
.catalog-sort-menu button:hover, .catalog-sort-menu button[aria-pressed="true"] { background: #f8f2ed; color: #79523e; }
.catalog-sort-check { visibility: hidden; color: #97614d; font-size: 1rem; font-weight: 600; }
.catalog-sort-menu button[aria-pressed="true"] .catalog-sort-check, .catalog-sort-choice input:checked ~ .catalog-sort-check { visibility: visible; }
.catalog-mobile-sort { display: none; }
.catalog-active { display: flex; align-items: center; gap: 14px; width: 100%; color: #79523e; font-size: .76rem; }
.catalog-active[hidden], .catalog-empty[hidden], .catalog-backdrop[hidden], .catalog-panel[hidden], .catalog-panel-content[hidden], .catalog-panel-footer[hidden], .catalog-filter-count[hidden] { display: none !important; }
.catalog-active button, .catalog-clear { color: #79523e; text-decoration: underline; text-underline-offset: 3px; }
.catalog-empty { padding: 48px 16px; text-align: center; color: #746960; font-size: .9rem; }
.catalog-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(29,23,20,.38); animation: catalogFadeIn .22s ease-out; }
.catalog-panel { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column; background: #fff; box-shadow: -10px 0 30px rgba(30,20,15,.1); animation: catalogSlideIn .25s ease-out; }
@keyframes catalogFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes catalogSlideIn { from { transform: translateX(16px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.catalog-panel-header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 12px 24px; border-bottom: 1px solid #e9e2db; }
.catalog-panel-header h3 { font: 1.3rem 'Libre Baskerville', serif; color: #4f4037; }
.catalog-close { width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; color: #584a40; }
.catalog-panel-content { flex: 1; overflow-y: auto; padding: 10px 24px 24px; overscroll-behavior: contain; }
.catalog-fieldset { padding: 22px 0; border-bottom: 1px solid #eee8e2; }
.catalog-fieldset legend { width: 100%; padding-top: 22px; color: #4f4037; font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.catalog-options { display: flex; flex-wrap: wrap; gap: 9px; }
.catalog-choice { min-width: 46px; min-height: 44px; padding: 8px 12px; border: 1px solid #d9d0c8; color: #584a40; font-size: .78rem; transition: background-color .2s, color .2s, border-color .2s; }
.catalog-choice[aria-pressed="true"] { background: #97614d; color: white; border-color: #97614d; }
.catalog-price-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.catalog-price-fields label { display: grid; gap: 7px; color: #746960; font-size: .76rem; }
.catalog-price-fields input { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid #d9d0c8; color: #4f4037; }
.catalog-availability { display: flex; align-items: center; gap: 12px; min-height: 52px; color: #4f4037; font-size: .82rem; }
.catalog-availability input, .catalog-sort-choice input { accent-color: #97614d; }
.catalog-panel-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid #e9e2db; }
.catalog-apply { min-height: 46px; padding: 0 20px; background: #97614d; color: white; font-size: .78rem; }
.catalog-sort-options { display: grid; }
.catalog-sort-choice { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 10px; border-bottom: 1px solid #eee8e2; color: #4f4037; font-size: .86rem; cursor: pointer; }
.catalog-sort-choice:has(input:checked) { background: #f8f2ed; color: #79523e; }
.catalog-sort-choice .catalog-sort-check { margin-left: auto; }
.catalog-sort-choice input { width: 17px; height: 17px; }
.catalog-control:focus-visible, .catalog-sort-menu button:focus-visible, .catalog-panel button:focus-visible, .catalog-panel input:focus-visible, .catalog-active button:focus-visible { outline: 2px solid #97614d; outline-offset: 2px; }
@media (max-width: 767px) {
  .catalog-toolbar { gap: 13px; margin-bottom: 22px; }
  .catalog-quick-sizes { display: block; margin: 0 0 24px; }
  .catalog-quick-sizes p { margin-bottom: 11px; }
  .catalog-quick-options { gap: 8px; }
  .catalog-count { width: 100%; }
  .catalog-actions { width: 100%; gap: 8px; }
  .catalog-actions .catalog-control { flex: 1; }
  .catalog-mobile-sort { display: inline-flex; }
  .catalog-desktop-sort { display: none; }
  .catalog-panel { top: auto; width: 100%; height: min(88dvh, 760px); border-radius: 18px 18px 0 0; }
  .catalog-panel-header { min-height: 66px; }
  @keyframes catalogSlideIn { from { transform: translateY(16px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-control, .catalog-choice, .catalog-quick-options button { transition: none; }
  .catalog-backdrop, .catalog-panel, .catalog-sort-menu { animation: none; }
}

/* Detalhes: estilos independentes dos controles do catálogo. */
#productDetail { padding-top: 32px; padding-bottom: 64px; color: #584a40; }
#productDetail > .grid { gap: 32px; }
#productDetail #carousel { border-radius: 0; background: #f8f5f1; overflow: hidden; }
#productDetail #carousel button { width: 44px; height: 44px; font-size: 1.6rem; z-index: 2; }
#productDetail #carousel button[hidden] { display: none; }
#detailName { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.4; color: #79523e; margin-bottom: 18px; }
#detailPrice { display: flex; flex-direction: column; gap: 4px; }
.detail-original-price { font-size: .9rem; color: #82766e; text-decoration: line-through; }
.detail-final-price { font-size: 1.65rem; font-weight: 500; color: #97614d; }
#detailInstallments { margin-top: 7px; font-size: .83rem; }
#sizeSelector button { min-width: 46px; min-height: 46px; padding: 8px 12px; border: 1px solid #d9d0c8; background: white; color: #584a40; font-size: .85rem; }
#sizeSelector button[aria-pressed="true"] { background: #97614d; border-color: #97614d; color: white; }
#sizeSelector button:focus-visible, #detailWhatsapp:focus-visible, #detailShare:focus-visible, #carousel button:focus-visible { outline: 2px solid #97614d; outline-offset: 3px; }
#sizeError { color: #a1392d; font-size: .8rem; margin-top: 12px; }
#sizeError[hidden] { display: none; }
#detailWhatsapp, #detailShare { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 50px; padding: 12px 16px; border: 1px solid #97614d; border-radius: 3px; font-size: .85rem; text-align: center; cursor: pointer; }
#detailWhatsapp { background: #97614d; color: #fff; }
#detailShare { margin-top: 12px; background: white; color: #97614d; }
#detailDescription { font-size: .9rem; line-height: 1.85; white-space: pre-line; }
#couponMessage { font-size: .82rem; line-height: 1.5; color: #79523e; }
#productDetail #low-stock-warning { color: #79523e; font-size: .8rem; }
.detail-sold-out { position: absolute; inset: 0; align-items: center; justify-content: center; background: #ffffffb3; letter-spacing: .12em; pointer-events: none; }
@media (min-width: 768px) {
  #productDetail { padding-top: 44px; }
  #productDetail > .grid { gap: 56px; }
  #productDetail #carousel { position: sticky; top: 96px; }
}
