/* ============================================================
   AE Utilidades Marketplace — design system
   Paleta AE (azul #1466b8 / laranja #f5821f / verde #1fa855)
   sobre layout claro estilo marketplace.
   ============================================================ */
:root {
  --blue: #1466b8;
  --blue-dark: #0d4a86;
  --blue-soft: #e8f1fa;
  --orange: #f5821f;
  --orange-dark: #d96a06;
  --orange-soft: #fef1e4;
  --green: #1fa855;
  --green-dark: #178443;
  --green-soft: #e7f6ee;
  --red: #e5484d;
  --ink: #1a1a1a;
  --ink-2: #374151;
  --gray: #6b7280;
  --gray-2: #9ca3af;
  --line: #e5e7eb;
  --bg: #f7f8fa;
  --card: #ffffff;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-full: 999px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 6px 20px rgba(16, 24, 40, .08);
  --shadow-cta: 0 8px 20px rgba(245, 130, 31, .35);
  --max: 1280px;
  --header-h: 76px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ---------- topbar ---------- */
.topbar { background: #f1f3f6; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { color: var(--ink-2); }
.topbar a:hover { color: var(--blue); }
.topbar-left { display: flex; gap: 18px; align-items: center; }

/* ---------- header ---------- */
.header { background: var(--card); position: sticky; top: 0; z-index: 60; box-shadow: var(--shadow); }
.header-in { display: flex; align-items: center; gap: 22px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo img { height: 52px; width: auto; }
.logo-tag { font-size: 11px; letter-spacing: .18em; font-weight: 800; color: var(--orange); white-space: nowrap; }
.search { flex: 1; position: relative; max-width: 620px; }
.search-box { display: flex; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-full); padding: 0 6px 0 20px; height: 46px; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.search-box input { flex: 1; border: 0; outline: 0; background: none; font-size: 14.5px; color: var(--ink); min-width: 0; }
.search-box input::placeholder { color: var(--gray-2); }
.search-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; flex: none; transition: background .15s; }
.search-btn:hover { background: var(--orange-dark); }
.search-sug { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-md); overflow: hidden; z-index: 70; }
.search-sug a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid #f3f4f6; }
.search-sug a:last-child { border-bottom: 0; }
.search-sug a:hover { background: var(--blue-soft); }
.search-sug .thumb { width: 38px; height: 38px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 18px; background: var(--bg); overflow: hidden; }
.search-sug .thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-sug .sug-price { margin-left: auto; font-weight: 700; color: var(--blue-dark); font-size: 13px; white-space: nowrap; }
.search-sug .sug-all { justify-content: center; color: var(--blue); font-weight: 600; }
.hact { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.hicon { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); transition: background .15s, color .15s; }
.hicon:hover { background: var(--blue-soft); color: var(--blue); }
.hicon svg { width: 21px; height: 21px; }
.badge-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-full); background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.hcart { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: var(--r); transition: background .15s; }
.hcart:hover { background: var(--blue-soft); }
.hcart-txt { text-align: left; font-size: 11.5px; color: var(--gray); line-height: 1.25; }
.hcart-txt b { display: block; font-size: 12.5px; color: var(--ink); }
.hwa { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-full); padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: border-color .15s, color .15s; }
.hwa:hover { border-color: var(--green); color: var(--green-dark); }
.hwa svg { width: 17px; height: 17px; color: var(--green); }

/* ---------- nav ---------- */
.nav { background: var(--card); border-top: 1px solid #f3f4f6; border-bottom: 1px solid var(--line); }
.nav-in { display: flex; gap: 4px; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.nav-in::-webkit-scrollbar { display: none; }
.nav a { padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s; }
.nav a:hover { color: var(--blue); }
.nav a.active { color: var(--blue); font-weight: 700; border-bottom-color: var(--blue); }
.nav a .dot-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- categorias (chips circulares) ---------- */
.catrow { display: flex; gap: 6px; overflow-x: auto; padding: 18px 4px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.catrow::-webkit-scrollbar { display: none; }
.catchip { flex: none; width: 92px; text-align: center; scroll-snap-align: start; }
.catchip .ic { width: 58px; height: 58px; margin: 0 auto 7px; border-radius: 16px; display: grid; place-items: center; font-size: 25px; border: 1px solid transparent; transition: transform .15s, box-shadow .15s; }
.catchip:hover .ic { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.catchip span { font-size: 11.5px; font-weight: 500; color: var(--ink-2); display: block; line-height: 1.25; }
.catchip.active .ic { outline: 2px solid var(--blue); }
.tint-0 { background: var(--blue-soft); }
.tint-1 { background: var(--orange-soft); }
.tint-2 { background: var(--green-soft); }
.tint-3 { background: #f4f0fb; }
.tint-4 { background: #fdeef0; }
.tint-5 { background: #fff8e1; }

/* ---------- hero slider ---------- */
.hero { position: relative; margin: 6px 0 10px; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; scrollbar-width: none; border-radius: var(--r-lg); }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: none; width: 100%; scroll-snap-align: start; border-radius: var(--r-lg); overflow: hidden; position: relative; aspect-ratio: 1280/340; background: linear-gradient(115deg, var(--blue-dark), var(--blue)); }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide .hero-txt { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 7%; color: #fff; max-width: 62%; }
.hero-txt h2 { font-size: clamp(22px, 3.2vw, 40px); font-weight: 800; line-height: 1.12; margin-bottom: 8px; }
.hero-txt p { font-size: clamp(13px, 1.4vw, 17px); opacity: .92; margin-bottom: 18px; }
.hero-txt .btn { align-self: flex-start; }
.hero-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; transition: width .2s, background .2s; }
.hero-dots button.on { width: 22px; border-radius: var(--r-full); background: var(--orange); }
.hero-arr { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-md); display: grid; place-items: center; color: var(--ink); z-index: 5; opacity: 0; transition: opacity .2s; }
.hero:hover .hero-arr { opacity: 1; }
.hero-arr.prev { left: 14px; }
.hero-arr.next { right: 14px; }
.hero-arr svg { width: 20px; height: 20px; }

/* ---------- faixa certificado ---------- */
.certline { display: flex; align-items: center; gap: 18px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 24px; margin: 14px 0 8px; }
.certline .pill { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--green-dark); background: var(--green-soft); border-radius: var(--r-full); padding: 5px 12px; }
.certline p { font-weight: 600; font-size: 15px; }
.certline .logo-mini { margin-left: auto; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; overflow: hidden; }
.certline .logo-mini img { width: 34px; height: 34px; object-fit: contain; }

/* ---------- secciones ---------- */
.sec { margin: 26px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.sec-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.sec-head .sub { color: var(--gray); font-size: 13.5px; margin-top: 2px; }
.sec-head .see-all { font-size: 13.5px; font-weight: 600; color: var(--orange); white-space: nowrap; }
.sec-head .see-all:hover { color: var(--orange-dark); }

/* ---------- product card ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel .pcard { scroll-snap-align: start; }
.pcard { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; position: relative; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pcard-img { position: relative; aspect-ratio: 1/1; background: #fff; display: grid; place-items: center; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pcard-img .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 52px; }
.pcard-badge { position: absolute; top: 10px; right: 10px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; border-radius: var(--r-full); padding: 4px 10px; z-index: 2; }
.pcard-badge.soldout { background: var(--gray); }
.pcard-badge.featured { background: var(--blue); }
.pcard-cond { position: absolute; left: 10px; bottom: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: var(--shadow); z-index: 2; }
.pcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.pcard-name { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard-cat { font-size: 11px; color: var(--gray-2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.pcard-prices { margin-top: auto; padding-top: 8px; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.pcard-old { font-size: 12px; color: var(--gray-2); text-decoration: line-through; }
.pcard-price { font-size: 18px; font-weight: 800; color: var(--blue-dark); line-height: 1.1; }
.pcard-inst { font-size: 11.5px; color: var(--green-dark); font-weight: 500; }
.pcard-fav { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--gray-2); flex: none; transition: color .15s, background .15s; }
.pcard-fav:hover { background: var(--orange-soft); color: var(--orange); }
.pcard-fav.on { color: var(--orange); }
.pcard-fav svg { width: 18px; height: 18px; }
.pcard.is-soldout .pcard-img { opacity: .45; filter: grayscale(.6); }

/* skeleton */
.sk { border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.sk .sk-img { aspect-ratio: 1/1; }
.sk .sk-l { height: 13px; margin: 12px 14px 0; border-radius: 6px; }
.sk .sk-l.short { width: 55%; margin-bottom: 14px; }
.sk-sh { background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 50%, #eef0f3 75%); background-size: 400% 100%; animation: sk 1.3s infinite linear; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- flash / ofertas ---------- */
.flashban { border-radius: var(--r-lg); padding: 34px 38px; color: #fff; position: relative; overflow: hidden; background: linear-gradient(100deg, #e5484d 0%, var(--orange) 65%, var(--orange-dark) 100%); box-shadow: var(--shadow-md); margin-bottom: 20px; }
.flashban .timer-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .28); border-radius: var(--r-full); padding: 7px 16px; font-size: 13px; font-weight: 700; letter-spacing: .04em; margin-bottom: 14px; }
.flashban h2 { font-size: clamp(24px, 3.4vw, 38px); font-weight: 900; font-style: italic; letter-spacing: -.01em; }
.flashban p { opacity: .94; margin-top: 4px; font-size: 15px; }
.flashban .pct { position: absolute; right: -20px; top: -30px; font-size: 190px; font-weight: 900; opacity: .12; transform: rotate(12deg); }
.stockbar { height: 7px; border-radius: var(--r-full); background: #f1f3f6; overflow: hidden; margin-top: 8px; }
.stockbar i { display: block; height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--orange), var(--red)); }
.stockbar-txt { font-size: 11px; color: var(--gray); margin-top: 4px; }

/* ---------- countdown ---------- */
.cd { display: inline-flex; gap: 6px; align-items: center; }
.cd b { background: var(--ink); color: #fff; border-radius: 8px; padding: 5px 8px; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.cd span { font-weight: 800; color: var(--ink); }
.cd.light b { background: rgba(255, 255, 255, .22); }
.cd.light span { color: #fff; }

/* ---------- leilões ---------- */
.aucgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.auc { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.auc-img { aspect-ratio: 4/3; background: #fff; display: grid; place-items: center; overflow: hidden; position: relative; }
.auc-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.auc-img .ph { font-size: 64px; }
.auc-state { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; border-radius: var(--r-full); padding: 5px 12px; }
.auc-state .dot-live { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.auc-state.soon { background: var(--blue); }
.auc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.auc-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.auc-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auc-cell { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.auc-cell small { display: block; font-size: 10.5px; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.auc-cell b { font-size: 15px; color: var(--blue-dark); }
.auc-cell b.bump { animation: bump .5s; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.14); color: var(--green); } 100% { transform: scale(1); } }
.auc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.auc-bids { font-size: 12.5px; color: var(--gray); }
.auc-note { font-size: 11px; color: var(--gray-2); display: flex; gap: 6px; align-items: center; }

/* ---------- lives ---------- */
.livewrap { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.livemain { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/10; background: var(--ink); box-shadow: var(--shadow-md); display: block; }
.livemain img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.livemain .lm-grad { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .82)); }
.livemain .lm-title { position: absolute; left: 24px; right: 24px; bottom: 22px; color: #fff; font-size: clamp(18px, 2.2vw, 26px); font-weight: 800; }
.livemain .lm-viewers { position: absolute; right: 18px; bottom: 22px; color: #e5e7eb; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.badge-live { position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 7px; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .06em; border-radius: var(--r-full); padding: 6px 14px; }
.badge-live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.nextlives h3 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.nl-card { display: flex; gap: 14px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.nl-card .thumb { width: 74px; height: 74px; border-radius: 12px; background: var(--bg); flex: none; overflow: hidden; display: grid; place-items: center; font-size: 30px; }
.nl-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.nl-when { color: var(--red); font-size: 12px; font-weight: 700; }
.nl-title { font-weight: 700; font-size: 14px; line-height: 1.3; margin: 2px 0 3px; }
.nl-desc { font-size: 12.5px; color: var(--gray); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nl-btn { margin-top: 8px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); border-radius: var(--r-full); padding: 6px 14px; color: var(--ink-2); transition: border-color .15s, color .15s; }
.nl-btn:hover { border-color: var(--blue); color: var(--blue); }
.nl-btn.set { border-color: var(--green); color: var(--green-dark); background: var(--green-soft); }
.pastlives { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pl-card { border-radius: var(--r); overflow: hidden; position: relative; aspect-ratio: 16/9; background: #d9dde3; }
.pl-card img { width: 100%; height: 100%; object-fit: cover; }
.pl-card .tag { position: absolute; top: 10px; left: 10px; background: rgba(31, 41, 55, .85); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: var(--r-full); }
.pl-card .pl-t { position: absolute; left: 12px; right: 12px; bottom: 10px; color: #fff; font-size: 13.5px; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }

/* ---------- beneficios ---------- */
.benef { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.benef-i { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 12px; text-align: center; }
.benef-i .ic { width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.benef-i .ic svg { width: 21px; height: 21px; }
.benef-i b { font-size: 12.5px; display: block; }
.benef-i span { font-size: 11px; color: var(--gray); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: var(--r-full); font-weight: 700; font-size: 14.5px; padding: 12px 26px; transition: background .15s, transform .1s, box-shadow .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-soft { background: var(--orange-soft); color: var(--orange-dark); border: 1.5px solid #f8c896; }
.btn-soft:hover { background: #fde4c8; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .28); }
.btn-line { border: 1.5px solid var(--line); color: var(--ink-2); }
.btn-line:hover { border-color: var(--blue); color: var(--blue); }
.btn-wa { background: var(--green); color: #fff; }
.btn-wa:hover { background: var(--green-dark); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

/* ---------- page head ---------- */
.pagehead { padding: 26px 0 4px; }
.pagehead h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.01em; }
.pagehead p { color: var(--gray); margin-top: 4px; font-size: 14.5px; }
.crumbs { font-size: 12.5px; color: var(--gray-2); padding-top: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--blue); }

/* ---------- filtros produtos ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 14px; margin: 14px 0 18px; position: relative; z-index: 10; }
.filterbar select, .filterbar input[type=number] { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; color: var(--ink); background: #fff; outline: none; }
.filterbar select:focus, .filterbar input:focus { border-color: var(--blue); }
.filterbar input[type=number] { width: 92px; }
.filterbar .fdiv { width: 1px; height: 26px; background: var(--line); }
.fchk { display: inline-flex; gap: 7px; align-items: center; font-size: 13.5px; color: var(--ink-2); cursor: pointer; user-select: none; }
.fchk input { accent-color: var(--orange); width: 15px; height: 15px; }
.fcount { margin-left: auto; font-size: 13px; color: var(--gray); }
.fclear { font-size: 12.5px; color: var(--red); font-weight: 600; }
.subrow { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.subrow::-webkit-scrollbar { display: none; }
.subchip { flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-full); padding: 7px 15px; transition: all .15s; cursor: pointer; }
.subchip:hover { border-color: var(--blue); color: var(--blue); }
.subchip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.loadmore { display: block; margin: 26px auto 10px; }
.emptybox { text-align: center; padding: 70px 20px; }
.emptybox .ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: #eef0f3; display: grid; place-items: center; color: var(--gray-2); }
.emptybox .ic svg { width: 28px; height: 28px; }
.emptybox b { font-size: 16px; display: block; margin-bottom: 6px; }
.emptybox p { color: var(--gray); font-size: 14px; max-width: 420px; margin: 0 auto; }

/* ---------- produto detalle ---------- */
.pd { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px; margin-top: 18px; }
.pd-gal { position: relative; }
.pd-main { aspect-ratio: 1/1; border: 1px solid #f3f4f6; border-radius: var(--r); display: grid; place-items: center; overflow: hidden; background: #fff; position: relative; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s; cursor: zoom-in; }
.pd-main:hover img { transform: scale(1.6); }
.pd-main .ph { font-size: 110px; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-thumbs button { width: 64px; height: 64px; border-radius: 12px; border: 2px solid var(--line); overflow: hidden; background: #fff; display: grid; place-items: center; font-size: 26px; }
.pd-thumbs button.on { border-color: var(--orange); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info .old { color: var(--gray-2); text-decoration: line-through; font-size: 14px; }
.pd-price-row { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; }
.pd-price { font-size: 34px; font-weight: 900; color: var(--blue-dark); letter-spacing: -.02em; }
.pd-off { background: var(--orange); color: #fff; font-size: 12.5px; font-weight: 800; border-radius: var(--r-full); padding: 5px 12px; }
.pd-inst { color: var(--green-dark); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.pd h1 { font-size: clamp(19px, 2.2vw, 26px); font-weight: 800; line-height: 1.25; margin-bottom: 12px; }
.pd-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { font-size: 11.5px; font-weight: 700; border-radius: var(--r-full); padding: 5px 13px; background: #f1f3f6; color: var(--ink-2); }
.chip.warn { background: var(--orange-soft); color: var(--orange-dark); border: 1px solid #f8c896; }
.chip.ok { background: var(--green-soft); color: var(--green-dark); }
.chip.out { background: #fdeef0; color: var(--red); }
.pd-actrow { display: flex; gap: 10px; margin-bottom: 16px; }
.pd-actrow .btn-line { padding: 9px 18px; font-size: 13px; }
.qty { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border-radius: var(--r-full); padding: 4px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; font-size: 17px; font-weight: 700; color: var(--ink-2); display: grid; place-items: center; }
.qty button:hover { background: #fff; }
.qty b { min-width: 34px; text-align: center; font-size: 15px; }
.pd-buyrow { display: flex; gap: 12px; margin: 14px 0 20px; flex-wrap: wrap; }
.pd-buyrow .btn { flex: 1; min-width: 190px; padding: 15px 20px; font-size: 15px; }
.pd-box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; display: flex; gap: 14px; }
.pd-box .ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.pd-box .ic.blue { background: var(--blue-soft); color: var(--blue); }
.pd-box .ic.green { background: var(--green-soft); color: var(--green); }
.pd-box .ic svg { width: 19px; height: 19px; }
.pd-box b { display: block; font-size: 14px; }
.pd-box p { font-size: 12.5px; color: var(--gray); }
.pd-desc { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.pd-desc h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.pd-desc p { color: var(--ink-2); font-size: 14px; white-space: pre-line; }

/* ---------- carrito drawer + página ---------- */
.drawer-ov { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .22s; }
.drawer-ov.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(410px, 94vw); background: var(--card); z-index: 95; transform: translateX(105%); transition: transform .26s cubic-bezier(.3, .8, .3, 1); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0, 0, 0, .18); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head b { font-size: 17px; }
.drawer-x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--gray); }
.drawer-x:hover { background: var(--bg); color: var(--ink); }
.drawer-items { flex: 1; overflow-y: auto; padding: 14px 20px; }
.citem { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.citem .thumb { width: 62px; height: 62px; border-radius: 12px; background: var(--bg); flex: none; display: grid; place-items: center; overflow: hidden; font-size: 26px; }
.citem .thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.citem-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.citem-price { font-weight: 800; color: var(--blue-dark); font-size: 14px; margin-top: 3px; }
.citem-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.citem .qty button { width: 26px; height: 26px; font-size: 14px; }
.citem .qty b { min-width: 24px; font-size: 13px; }
.citem-del { color: var(--gray-2); font-size: 12px; }
.citem-del:hover { color: var(--red); }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.drawer-sub { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 12px; }
.drawer-sub b { font-size: 18px; color: var(--blue-dark); }
.drawer-foot .btn { width: 100%; margin-bottom: 8px; }
.cartpage { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; margin-top: 18px; }
.cartlist, .cartside { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; }
.cartside h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.cs-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--ink-2); }
.cs-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-weight: 800; color: var(--ink); font-size: 16px; }
.cs-row.total b { color: var(--blue-dark); font-size: 20px; }
.cartform label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 12px 0 4px; }
.cartform input, .cartform textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none; }
.cartform input:focus, .cartform textarea:focus { border-color: var(--blue); }
.cartside .btn { width: 100%; margin-top: 16px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600; border-radius: var(--r-full); padding: 11px 22px; z-index: 120; opacity: 0; pointer-events: none; transition: all .25s; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.footer { background: var(--card); border-top: 1px solid var(--line); margin-top: 46px; padding: 40px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 30px; }
.footer .logo img { height: 56px; }
.footer-about { font-size: 13.5px; color: var(--gray); margin: 14px 0 16px; max-width: 300px; }
.social { display: flex; gap: 10px; }
.social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: all .15s; }
.social a:hover { border-color: var(--blue); color: var(--blue); }
.social svg { width: 17px; height: 17px; }
.footer h4 { font-size: 14.5px; font-weight: 800; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--ink-2); padding: 5px 0; }
.footer-col a:hover { color: var(--blue); }
.footer-contact { font-size: 13.5px; color: var(--ink-2); }
.fc-row { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.fc-row svg { width: 17px; height: 17px; color: var(--orange); flex: none; margin-top: 2px; }
.fc-row small { display: block; color: var(--gray); font-size: 12px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); font-size: 12.5px; color: var(--gray); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.footer-bottom a { color: var(--gray); }
.footer-bottom a:hover { color: var(--blue); }

/* ---------- tabbar móvil ---------- */
.tabbar { display: none; }

/* ---------- flotante WhatsApp ---------- */
.fab-wa { position: fixed; right: 18px; bottom: 22px; width: 54px; height: 54px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(31, 168, 85, .45); z-index: 80; transition: transform .15s; }
.fab-wa:hover { transform: scale(1.06); }
.fab-wa svg { width: 26px; height: 26px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .carousel { grid-auto-columns: calc((100% - 32px) / 3); }
  .aucgrid { grid-template-columns: repeat(2, 1fr); }
  .benef { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .livewrap { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; padding: 18px; gap: 20px; }
  .cartpage { grid-template-columns: 1fr; }
  .hero-slide { aspect-ratio: 16/9; }
  .hero-txt h2 { font-size: 22px; }
  .hero-slide .hero-txt { max-width: 80%; }
}
@media (max-width: 720px) {
  body { padding-bottom: 68px; font-size: 14px; }
  .wrap { padding: 0 14px; }
  .topbar { display: none; }
  /* header azul con buscador integrado (patrón app) */
  .header { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); box-shadow: none; padding-bottom: 12px; }
  .header-in { height: auto; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .logo img { height: 40px; background: #fff; border-radius: 12px; padding: 3px 8px; }
  .logo-tag { color: #fff; opacity: .9; font-size: 9.5px; }
  .hact { gap: 0; }
  .hicon { color: #fff; }
  .hicon:hover { background: rgba(255, 255, 255, .14); color: #fff; }
  .hcart, .hwa, .hicon.hide-m { display: none; }
  .search { flex-basis: 100%; max-width: none; order: 9; }
  .search-box { height: 42px; border: 0; box-shadow: var(--shadow-md); }
  .nav { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .carousel { grid-auto-columns: calc((100% - 10px) / 2.15); gap: 10px; }
  .catrow { padding-top: 12px; }
  .catchip { width: 78px; }
  .catchip .ic { width: 52px; height: 52px; font-size: 22px; }
  .catchip span { font-size: 10.5px; }
  .sec { margin: 20px 0; }
  .sec-head h2 { font-size: 17.5px; }
  .pcard-name { font-size: 12.5px; }
  .pcard-price { font-size: 16px; }
  .pcard-body { padding: 10px 11px 12px; }
  .certline { padding: 13px 15px; gap: 12px; }
  .certline p { font-size: 13px; }
  .certline .pill { font-size: 9.5px; }
  .aucgrid, .pastlives, .benef { grid-template-columns: 1fr 1fr; }
  .benef-i b { font-size: 11.5px; }
  .benef-i span { display: none; }
  .flashban { padding: 22px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer { margin-top: 30px; }
  .fab-wa { bottom: 82px; right: 14px; width: 48px; height: 48px; }
  .pd-buyrow .btn { min-width: 100%; }
  .pd-main:hover img { transform: none; }
  .filterbar { gap: 8px; padding: 10px; }
  .filterbar select { flex: 1; min-width: 130px; }
  .fcount { flex-basis: 100%; margin-left: 0; }
  /* tabbar */
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); z-index: 85; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); justify-content: space-around; align-items: stretch; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--gray); position: relative; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--blue); }
  .tabbar .tab-cart { margin-top: -22px; }
  .tabbar .tab-cart .tc-circle { width: 52px; height: 52px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-cta); position: relative; }
  .tabbar .tab-cart .tc-circle svg { width: 23px; height: 23px; }
  .tabbar .tab-cart .badge-count { top: -2px; right: -4px; background: var(--blue-dark); }
}
@media (max-width: 400px) {
  .grid { gap: 8px; }
  .pcard-price { font-size: 15px; }
}
/* accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
