:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --text: #201c17;
  --muted: #6f695f;
  --border: #e6e1d8;
  --accent: #8a3324;
  --accent-dark: #6c2719;
  --sale: #b3261e;
  --success: #35603f;
  --radius: 2px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
svg { max-width: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; margin: 0; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Announcement bar ---------- */
.announce {
  background: linear-gradient(90deg, #44140b 0%, #8a3324 50%, #44140b 100%);
  color: #fff;
  text-align: center;
  font-size: 13px;
  letter-spacing: .03em;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.announce-badge {
  background: #ffdb60;
  color: #52180e;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.announce-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #d42217;
  border-radius: 50%;
  animation: pulseDot 1.4s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
}

/* ---------- Header ---------- */
header.site-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  transition: all .2s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 23px;
  letter-spacing: .14em;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
  transition: opacity .15s;
  flex-shrink: 0;
}
.logo:hover { opacity: 0.85; }
.logo svg { width: 30px; height: 30px; color: var(--accent); flex-shrink: 0; }

.main-nav { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.main-nav a {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
  padding: 6px 0;
  font-weight: 600;
  position: relative;
  transition: color .2s;
  white-space: nowrap;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after { width: 100%; }

.nav-sale-tag {
  background: var(--sale);
  color: #fff !important;
  padding: 3px 9px !important;
  border-radius: 12px;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform .2s, box-shadow .2s !important;
}
.nav-sale-tag::after { display: none !important; }
.nav-sale-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(179,38,30,0.3);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon-btn {
  position: absolute;
  left: 12px;
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.search-icon-btn svg { width: 17px; height: 17px; }
.search-form { flex-shrink: 1; min-width: 0; }
.search-box {
  width: 100%;
  max-width: 170px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 9px 16px 9px 38px;
  font-size: 13px;
  color: var(--text);
  background: #fbf9f5;
  transition: all .25s ease;
  outline: none;
}
.search-box:focus {
  max-width: 230px;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138,51,36,0.12);
}

.menu-btn {
  background: #fbf9f5; border: 1px solid var(--border); border-radius: 50%;
  color: var(--text); align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0; order: -1;
}
.menu-btn svg { width: 20px; height: 20px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-actions button, .header-actions a {
  background: #fbf9f5;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  transition: all .2s ease;
}
.header-actions button:hover, .header-actions a:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.header-actions a.active, .card-wish.active {
  color: var(--sale); border-color: var(--sale);
}
.header-actions a.active svg, .card-wish.active svg { fill: var(--sale); }
.header-actions svg { width: 19px; height: 19px; }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--sale); color: #fff;
  font-size: 10.5px; font-weight: 700;
  border-radius: 10px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 12.5px; color: var(--muted);
  padding: 16px 0 0;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #efe8dd, #e3d6c4);
  padding: 90px 24px;
  text-align: center;
}
.hero h1 { font-size: 40px; margin-bottom: 14px; }
.hero p { color: var(--muted); margin-bottom: 26px; }
.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 13px 30px;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  border: none; border-radius: var(--radius);
}
.btn:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent; color: var(--text); border: 1px solid var(--text);
}
.btn-outline:hover {
  background: var(--text); color: #fff; border-color: var(--text);
}
.btn:disabled, .btn-outline:disabled {
  opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}

/* ---------- Category tiles (home) ---------- */
/* ---------- Category Cards (Home - Panelas, Saleiros, Potes) ---------- */
.section { padding: 50px 0; }
.section-title { text-align: center; font-size: 26px; margin-bottom: 32px; font-weight: 500; }
.category-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.category-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .25s ease, border-color .2s;
  text-decoration: none;
}
.category-card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.08);
  border-color: var(--accent);
}
.cat-img-wrap {
  aspect-ratio: 4 / 3;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease;
}
.category-card-item:hover .cat-img-wrap img {
  transform: scale(1.06);
}
.cat-info {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cat-info h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 6px;
}
.cat-info p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 14px;
  flex: 1;
}
.cat-link-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.category-card-item:hover .cat-link-text {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .category-cards-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

/* ---------- Product grid & card media ---------- */
.product-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px;
}
.card {
  background: var(--surface);
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
}
.card-media {
  position: relative; aspect-ratio: 1;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 16px;
}
.card-media .product-img {
  width: 100%; height: 100%; object-fit: contain;
  transition: opacity .35s ease, transform .4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-media .product-img.secondary {
  position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px);
  opacity: 0;
}
.card:hover .card-media .product-img.primary {
  transform: scale(1.05);
}
.card:hover .card-media .product-img.secondary {
  opacity: 1;
  transform: scale(1.05);
}
.card-media svg { width: 70%; height: 70%; }
.card-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: #fff; border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; padding: 4px 8px; letter-spacing: .02em;
  color: var(--sale); border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.card-wish {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(255,255,255,.95); border: 1px solid var(--border); border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  transition: all .2s; color: var(--text);
}
.card-wish:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: scale(1.08); }
.card-wish svg { width: 16px; height: 16px; }
.card-body { padding: 16px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-brand { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.card-name { font-size: 14px; margin: 6px 0 10px; line-height: 1.4; min-height: 40px; color: var(--text); font-weight: 500; }
.card-price { margin-top: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.card-price .old { text-decoration: line-through; color: var(--muted); font-size: 12px; }
.card-price .new { color: var(--sale); font-weight: 700; font-size: 16px; }
.card-price .tbd { color: var(--muted); font-size: 13px; font-style: italic; }

/* ---------- Custom Luxury Select / Dropdown ---------- */
.custom-select {
  position: relative;
  user-select: none;
  font-size: 13.5px;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.custom-select-trigger:hover {
  border-color: #b8b1a5;
}
.custom-select.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.custom-select-trigger .chevron {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.custom-select.open .custom-select-trigger .chevron {
  transform: rotate(180deg);
  color: var(--accent);
}
.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(0,0,0,.12);
  z-index: 100;
  max-height: 260px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.custom-select.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.custom-select-option {
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text);
  transition: background .15s ease, color .15s ease;
}
.custom-select-option:hover {
  background: #f8f6f2;
}
.custom-select-option.selected {
  background: #f5efe8;
  color: var(--accent);
  font-weight: 600;
}
.custom-select-option .check-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
  display: none;
}
.custom-select-option.selected .check-icon {
  display: block;
}

/* ---------- Category page layout ---------- */
.category-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; padding: 24px 0 70px; }
.filters h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; color: var(--text); font-family: var(--font-sans); font-weight: 600; }
.filters h3:first-child { margin-top: 0; }
.filter-option { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 0; color: var(--muted); cursor: pointer; transition: color .15s; }
.filter-option input { accent-color: var(--accent); cursor: pointer; }
.filter-option:hover { color: var(--text); }
.category-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 14px; }
.result-count { color: var(--muted); font-size: 13px; }

/* ---------- Product detail page ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.15fr) 460px; gap: 48px; padding: 30px 0 60px; }
.pdp-gallery { display: flex; flex-direction: column; gap: 16px; }
.pdp-gallery-main {
  aspect-ratio: 1; background: #ffffff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  position: relative; border-radius: 4px; padding: 24px;
}
.pdp-gallery-main img { width: 100%; height: 100%; max-height: 480px; object-fit: contain; transition: transform .3s ease; }
.pdp-gallery-main svg { width: 60%; height: 60%; }
.pdp-thumbs { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.pdp-thumb {
  width: 76px; height: 76px; border: 2px solid var(--border); border-radius: 4px;
  background: #ffffff; cursor: pointer; padding: 6px; flex-shrink: 0;
  transition: all .2s ease; display: flex; align-items: center; justify-content: center;
}
.pdp-thumb.active, .pdp-thumb:hover { border-color: var(--accent); box-shadow: 0 4px 10px rgba(138,51,36,0.15); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-badge { display: inline-block; background: #fff; border: 1px solid var(--border); font-size: 11px; padding: 4px 10px; margin-bottom: 14px; font-weight: 700; color: var(--sale); border-radius: 2px; }
.pdp-brand { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; font-weight: 700; }
.pdp-title { font-size: 28px; margin-bottom: 14px; line-height: 1.3; font-family: var(--font-serif); }
.pdp-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.pdp-price .old { text-decoration: line-through; color: var(--muted); font-size: 15px; }
.pdp-price .new { color: var(--sale); font-size: 30px; font-weight: 700; }
.pdp-installments { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.pdp-select-row { display: flex; gap: 14px; margin: 24px 0 16px; align-items: stretch; }
.stepper { display: flex; border: 1px solid var(--border); border-radius: 4px; height: 44px; background: var(--surface); }
.stepper button { border: none; background: transparent; width: 38px; height: 100%; font-size: 18px; color: var(--text); transition: background .15s; }
.stepper button:hover { background: #f5f2eb; }
.stepper span { width: 38px; height: 100%; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-weight: 600; }
.pdp-size-select { flex: 1; }
.pdp-addcart { width: 100%; padding: 15px; font-size: 13.5px; margin-bottom: 10px; font-weight: 600; letter-spacing: .06em; transition: all .2s; }
.pdp-addcart:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(138,51,36,.25); }
.pdp-rating { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.stars { color: #d4a017; letter-spacing: 1.5px; }

.accordion { border-top: 1px solid var(--border); margin-top: 26px; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-header {
  width: 100%; background: none; border: none; text-align: left;
  padding: 16px 4px; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; font-weight: 500;
}
.accordion-header .chevron { transition: transform .15s; }
.accordion-item.open .chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 4px 18px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.accordion-item.open .accordion-body { display: block; }
.accordion-body ul { padding-left: 18px; list-style: disc; }

.related { padding: 50px 0 70px; }

/* ---------- Value props ---------- */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 40px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.values svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 10px; }
.values div { font-size: 13.5px; color: var(--muted); }
.values strong { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 4px; font-family: var(--font-serif); }

/* ---------- Footer ---------- */
footer.site-footer { background: #211d18; color: #cfc9bd; margin-top: 40px; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 56px 24px 30px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; min-width: 0; }
.footer-inner > div { min-width: 0; }
.footer-inner h2 { font-size: 13px; font-family: var(--font-sans); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; margin-bottom: 14px; }
.footer-inner li { margin-bottom: 9px; font-size: 13px; }
.footer-inner a:hover { color: #fff; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-serif); font-size: 19px; letter-spacing: .1em; color: #fff; margin-bottom: 14px; }
.footer-logo svg { width: 24px; height: 24px; color: var(--accent); }
.footer-bottom { border-top: 1px solid #3a352c; text-align: center; padding: 18px; font-size: 12px; color: #8a8478; }

/* ---------- Cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; display: none; }
.overlay.open { display: block; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 92vw; height: 100%;
  background: var(--surface); z-index: 100; transition: right .25s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-drawer-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-drawer-header h3 { font-size: 18px; }
.cart-items { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 20px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item-media { width: 64px; height: 64px; background: #fdfdfd; border: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--radius); }
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-media svg { width: 70%; height: 70%; }
.cart-item-info { flex: 1; }
.cart-item-info .name { font-size: 13px; margin-bottom: 4px; }
.cart-item-info .price { font-size: 13px; color: var(--sale); font-weight: 600; }
.cart-item-remove { background: none; border: none; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 0; margin-top: 6px; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 13.5px; }
.cart-footer { border-top: 1px solid var(--border); padding: 18px 20px; }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 14px; }
.icon-btn-close { background: none; border: none; }
.icon-btn-close svg { width: 20px; height: 20px; }

/* ---------- Pagination styling ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 36px; }
.page-btn {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 14px; font-size: 13.5px; color: var(--text); min-width: 38px; text-align: center;
  transition: all .2s;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Help Modal ---------- */
.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: 600px;
  max-width: 92vw;
  max-height: 85vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-dialog.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
/* .modal-dialog só tem max-height (não height), então sem esse wrapper sendo
   ele mesmo um flex column com min-height:0, o navegador nunca encolhe .modal-body
   pra caber — o conteúdo mais longo (política de trocas, etc.) simplesmente
   estourava pra fora da caixa em vez de rolar internamente. */
.modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fdfbf7;
  border-radius: 6px 6px 0 0;
  flex-shrink: 0;
}
.modal-header h3 {
  font-size: 21px;
  font-family: var(--font-serif);
}
.modal-body {
  padding: 26px 28px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.7;
}
.modal-body h4 {
  font-size: 18px;
  font-family: var(--font-serif);
  margin-bottom: 12px;
  color: var(--accent);
}
.help-box {
  background: #fbf9f5;
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 0 4px 4px 0;
}
.help-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 15px;
}
.help-box p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- Mobile menu button + slide-out nav drawer ---------- */
.menu-btn { display: none; }
.mobile-nav-drawer {
  position: fixed; top: 0; left: -320px; width: 300px; max-width: 86vw; height: 100%;
  background: var(--surface); z-index: 100; transition: left .25s ease;
  display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-nav-drawer.open { left: 0; }
.mobile-nav-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.mobile-nav-header .logo { font-size: 18px; }
.mobile-nav-links { display: flex; flex-direction: column; padding: 8px 0; }
.mobile-nav-links a {
  padding: 15px 20px; font-size: 14.5px; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .04em;
}
.mobile-nav-links a.nav-sale-tag { color: var(--sale) !important; background: none !important; border-radius: 0; }
.mobile-nav-search { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.mobile-nav-search .search-form { width: 100%; }
.mobile-nav-search .search-box { width: 100%; }
.mobile-nav-actions { padding: 12px 20px; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-actions a { display: flex; align-items: center; gap: 10px; padding: 13px 0; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-nav-actions svg { width: 19px; height: 19px; color: var(--muted); }

/* ---------- Mobile filter drawer (category page) ---------- */
.mobile-filter-btn { display: none; }
.filters-drawer-header { display: none; }

@media (max-width: 1120px) {
  .main-nav, .header-inner > .search-form { display: none; }
  .menu-btn { display: flex; }
  .header-inner { gap: 10px; padding: 12px 16px; justify-content: flex-start; }
  .header-actions { gap: 8px; margin-left: auto; }
  .tiles, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-cards-3 { grid-template-columns: 1fr; }
  .category-layout, .pdp { grid-template-columns: minmax(0, 1fr); }

  .filters {
    display: block;
    position: fixed; top: 0; left: -320px; width: 300px; max-width: 86vw; height: 100%;
    background: var(--surface); z-index: 100; transition: left .25s ease;
    overflow-y: auto; padding: 0 20px 20px;
  }
  .filters.open { left: 0; }
  .filters-drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 0; margin-bottom: 4px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--surface);
  }
  .filters-drawer-header h3 { margin: 0; font-size: 15px; text-transform: none; }
  .mobile-filter-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
    padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--text);
  }
  .mobile-filter-btn svg { width: 16px; height: 16px; }
  .category-toolbar { flex-direction: column; align-items: stretch; }
  .category-toolbar > div:last-child { justify-content: space-between; width: 100%; }
  .category-toolbar .custom-select { flex: 1; min-width: 0 !important; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .header-inner .logo span { display: none; }
  .header-inner { gap: 8px; }
  .header-actions button, .header-actions a, .menu-btn { width: 36px; height: 36px; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .hero { padding: 60px 20px; }
  .hero h1 { font-size: 30px; }
  .tiles, .product-grid { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .pdp-select-row { flex-direction: column; align-items: stretch; }
  .pdp-title { font-size: 22px; }
  .pdp-price .new { font-size: 24px; }
}

/* ---------- Generic empty state ---------- */
.empty-state {
  text-align: center; padding: 90px 24px; color: var(--muted);
}
.empty-state svg { width: 56px; height: 56px; color: var(--border); margin-bottom: 18px; }
.empty-state h2 { font-size: 20px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 22px; }

/* ---------- Account page ---------- */
.account-page { max-width: 420px; margin: 50px auto 90px; padding: 0 24px; }
.account-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.account-tab {
  flex: 1; text-align: center; padding: 14px 0; font-size: 13.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; border-top: none; border-left: none; border-right: none;
}
.account-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.field-group { margin-bottom: 16px; }
.field-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field-group input {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 14px; font-family: inherit; color: var(--text); background: var(--surface); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138,51,36,.1); }
.field-group input.invalid { border-color: var(--sale); }
.field-group input.valid { border-color: var(--success); }
.field-error { display: block; font-size: 12px; color: var(--sale); margin-top: 5px; min-height: 1px; }
.field-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; min-height: 1px; }
.field-hint.loading { color: var(--accent); }
.field-hint.found { color: var(--success); }
.field-hint.error { color: var(--sale); }
.account-submit { width: 100%; padding: 15px; font-size: 13.5px; font-weight: 600; letter-spacing: .05em; margin-top: 6px; }
.account-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; line-height: 1.6; }
.account-panel { display: none; }
.account-panel.active { display: block; }
.proto-banner {
  background: #fdf6ea; border: 1px solid #ecdcb0; color: #7a5a17; font-size: 12.5px;
  padding: 10px 14px; border-radius: 4px; margin-bottom: 22px; line-height: 1.5;
}

/* ---------- Checkout page ---------- */
.checkout-page { max-width: 1080px; margin: 30px auto 90px; padding: 0 24px; }
.checkout-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.checkout-steps .step.active { color: var(--accent); }
.checkout-steps .sep { color: var(--border); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.panel-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 26px; }
.panel-card + .panel-card { margin-top: 20px; }
.panel-card h2 { font-size: 16px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.full { grid-template-columns: 1fr; }

.pay-methods { display: flex; gap: 10px; margin-bottom: 20px; }
.pay-method-btn {
  flex: 1; border: 1px solid var(--border); border-radius: 4px; padding: 12px; background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pay-method-btn svg { width: 20px; height: 20px; color: var(--muted); }
.pay-method-btn.selected { border-color: var(--accent); color: var(--accent); background: #fbf3ef; }
.pay-method-btn.selected svg { color: var(--accent); }
.pay-method-btn:disabled { opacity: .5; cursor: not-allowed; background: var(--bg); }

.secure-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success);
  background: #eef4ee; padding: 5px 10px; border-radius: 12px; margin-bottom: 16px; font-weight: 600;
}
.proto-flag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  color: #7a5a17; background: #fdf6ea; border: 1px solid #ecdcb0; padding: 4px 10px; border-radius: 12px;
  margin-bottom: 16px; letter-spacing: .02em; text-transform: uppercase;
}
.qr-wrap {
  width: 180px; height: 180px; margin: 0 auto 20px; background: #fff; border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.qr-wrap svg { width: 140px; height: 140px; }
.pix-steps { list-style: none; padding: 0; margin: 0 0 18px; counter-reset: step; }
.pix-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 6px 0; color: var(--text); }
.pix-steps .num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.pix-code-block {
  border: 1px dashed var(--border); border-radius: 4px; padding: 12px 14px; background: var(--bg);
  font-size: 11.5px; color: var(--muted); word-break: break-all; margin-bottom: 12px; line-height: 1.5;
  position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: all;
  transition: border-color .18s ease, background-color .18s ease, transform .12s ease;
}
.pix-code-block:hover { border-color: var(--accent); background: #fff; }
.pix-code-block:active { transform: scale(0.99); }
.pix-code-block.copied { border-color: var(--success); border-style: solid; background: #f3fbf4; }
.pix-code-block .copy-flash {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(243, 251, 244, .82); color: var(--success); font-size: 13px; font-weight: 700;
  border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .28s ease;
}
.pix-code-block .copy-flash.show { opacity: 1; }

.pix-copy-btn {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .15s ease;
}
.pix-copy-btn.copied {
  background: var(--success); border-color: var(--success); color: #fff; transform: scale(1.01);
}
.pix-copy-btn.copied svg { animation: pix-check-in .3s ease; }
@keyframes pix-check-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; position: relative; flex-shrink: 0;
}
.pulse-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit;
  animation: pulse-dot-ring 1.6s ease-out infinite;
}
@keyframes pulse-dot-ring {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(2.6); opacity: 0; }
}
.checkout-summary .product-row { display: flex; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.checkout-summary .product-thumb { width: 56px; height: 56px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #fff; }
.checkout-summary .product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.summary-line { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); padding: 5px 0; }
.summary-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--border); }
.summary-note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.order-success { text-align: center; padding: 56px 24px 44px; max-width: 460px; margin: 0 auto; }
.order-success-icon {
  width: 60px; height: 60px; border-radius: 50%; background: #e8f0ea;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.order-success-icon svg { width: 28px; height: 28px; color: var(--success); }
.order-success h2 { font-family: var(--font-serif); font-weight: 400; font-size: 25px; margin-bottom: 10px; }
.order-success > p { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.order-id-chip {
  display: inline-block; font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px 10px;
}
.order-next-card { margin: 0 0 26px; padding: 20px 22px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; text-align: left; }
.order-next-card .head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); font-size: 13px; margin-bottom: 10px; }
.order-next-card .head svg { width: 16px; height: 16px; flex-shrink: 0; }
.order-next-card p { color: var(--text); opacity: .82; font-size: 12.5px; line-height: 1.6; margin: 0; }
.order-next-card p strong { opacity: 1; }
.order-success-actions { display: flex; flex-direction: column; gap: 10px; max-width: 280px; margin: 0 auto; }
.order-success-actions .btn-outline.subtle { border-color: transparent; }

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .form-row { grid-template-columns: minmax(0, 1fr); }

  /* Tighter spacing on the identification/address panels only — payment
     and order summary stay as-is (already reviewed and approved). */
  .checkout-lead-panel { padding: 16px 18px; }
  .checkout-lead-panel + .checkout-lead-panel { margin-top: 12px; }
  .checkout-lead-panel h2 { margin-bottom: 12px; font-size: 15px; }
  .checkout-lead-panel .form-row { gap: 10px; margin-bottom: 0; }
  .checkout-lead-panel .field-group { margin-bottom: 10px; }
  .checkout-lead-panel .field-group label { margin-bottom: 4px; }
  .checkout-lead-panel .field-group input { height: 42px; }
}

/* ---------- Loading skeletons ---------- */
/* Rendered in the raw HTML (no JS needed) so the page has real, correctly-sized
   content on first paint instead of an empty container — JS swaps these for
   the real cards once data.js loads, avoiding the empty-to-full layout jump. */
.skel { background: linear-gradient(90deg, #ece8e0 25%, #f4f1ea 37%, #ece8e0 63%); background-size: 400% 100%; animation: skel-loading 1.6s ease infinite; border-radius: 3px; }
@keyframes skel-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.skel-card .skel-media { aspect-ratio: 1; }
.skel-card .skel-body { padding: 16px 14px 14px; }
.skel-card .skel-line { height: 11px; margin-bottom: 10px; }
.skel-card .skel-line.w60 { width: 60%; }
.skel-card .skel-line.w90 { width: 90%; }
.skel-card .skel-line.w40 { width: 40%; height: 16px; margin-bottom: 0; }
.skel-pdp-gallery { aspect-ratio: 1; border-radius: 4px; }
.skel-pdp-line { height: 14px; margin-bottom: 14px; }

