@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Poppins:wght@400;500;600;700&family=Oswald:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap");

/* ============================================================
   Catálogo Virtual — Design System + Temas (compartilhado)
   ============================================================ */

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #1d3557;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 30px -8px rgba(0,0,0,.15), 0 6px 12px -6px rgba(0,0,0,.08);
  --radius: 16px;
  --radius-sm: 10px;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --wa: #25D366;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --head-transform: none;
  --head-spacing: normal;
}

/* ---------- TEMAS (10 prontos) ---------- */
/* light = padrão (:root acima) */
[data-theme="dark"] {
  --bg:#0f172a; --surface:#1e293b; --surface-2:#273449;
  --text:#f1f5f9; --text-muted:#94a3b8; --border:#334155;
  --primary:#38bdf8; --primary-dark:#0ea5e9; --secondary:#1e293b;
  --shadow:0 1px 3px rgba(0,0,0,.4); --shadow-lg:0 12px 34px rgba(0,0,0,.55);
}
[data-theme="sunset"] {
  --primary:#f97316; --primary-dark:#ea580c; --secondary:#7c2d12;
  --bg:#fff7ed; --surface:#ffffff; --surface-2:#ffedd5; --border:#fed7aa;
}
[data-theme="ocean"] {
  --primary:#0891b2; --primary-dark:#0e7490; --secondary:#164e63;
  --bg:#ecfeff; --surface:#ffffff; --surface-2:#cffafe; --border:#a5f3fc;
}
[data-theme="forest"] {
  --primary:#16a34a; --primary-dark:#15803d; --secondary:#14532d;
  --bg:#f0fdf4; --surface:#ffffff; --surface-2:#dcfce7; --border:#bbf7d0;
}
[data-theme="candy"] {
  --primary:#ec4899; --primary-dark:#db2777; --secondary:#831843;
  --bg:#fdf2f8; --surface:#ffffff; --surface-2:#fce7f3; --border:#fbcfe8;
}
[data-theme="coffee"] {
  --primary:#92400e; --primary-dark:#78350f; --secondary:#451a03;
  --bg:#faf5f0; --surface:#ffffff; --surface-2:#f0e6da; --border:#e7d7c4;
}
[data-theme="midnight"] {
  --bg:#020617; --surface:#0f172a; --surface-2:#1e293b;
  --text:#e2e8f0; --text-muted:#94a3b8; --border:#1e293b;
  --primary:#6366f1; --primary-dark:#4f46e5; --secondary:#312e81;
  --shadow:0 1px 3px rgba(0,0,0,.5); --shadow-lg:0 12px 34px rgba(0,0,0,.6);
}
[data-theme="mono"] {
  --primary:#404040; --primary-dark:#171717; --secondary:#171717;
  --bg:#fafafa; --surface:#ffffff; --surface-2:#f4f4f5; --border:#e4e4e7;
  --shadow:0 1px 2px rgba(0,0,0,.05); --shadow-lg:0 8px 20px rgba(0,0,0,.08);
}
[data-theme="royal"] {
  --primary:#4f46e5; --primary-dark:#4338ca; --secondary:#312e81;
  --bg:#f5f3ff; --surface:#ffffff; --surface-2:#ede9fe; --border:#ddd6fe;
}

/* ---------- TEMAS POR SEGMENTO (5 novos) ---------- */
/* Perfumaria — luxo: marfim, dourado champanhe, tipografia serifada, cantos retos */
[data-theme="perfume"] {
  --primary:#b8975a; --primary-dark:#9c7d43; --secondary:#1f1b16;
  --bg:#faf7f2; --surface:#ffffff; --surface-2:#f3ece2;
  --text:#2b2620; --text-muted:#8a7f70; --border:#e8ddcd;
  --radius:4px; --radius-sm:3px;
  --font-head:"Playfair Display", Georgia, serif;
  --shadow:0 1px 3px rgba(60,45,20,.08); --shadow-lg:0 16px 40px -12px rgba(60,45,20,.22);
}
/* Moda — editorial preto e branco, cantos vivos, títulos condensados em caixa alta */
[data-theme="fashion"] {
  --primary:#141414; --primary-dark:#000000; --secondary:#141414;
  --bg:#f7f7f5; --surface:#ffffff; --surface-2:#efefee;
  --text:#111111; --text-muted:#7a7a7a; --border:#e4e4e2;
  --radius:0px; --radius-sm:0px;
  --font-head:"Oswald", Impact, sans-serif;
  --head-transform:uppercase; --head-spacing:.06em;
  --shadow:0 1px 2px rgba(0,0,0,.06); --shadow-lg:0 14px 30px -10px rgba(0,0,0,.16);
}
/* Minimalista — branco puro, preto quase absoluto, bordas finíssimas, cantos discretos */
[data-theme="minimal"] {
  --primary:#18181b; --primary-dark:#000000; --secondary:#18181b;
  --bg:#ffffff; --surface:#ffffff; --surface-2:#f6f6f6;
  --text:#18181b; --text-muted:#a1a1aa; --border:#ededed;
  --radius:3px; --radius-sm:3px;
  --font-head:"Inter", system-ui, sans-serif; --font:"Inter", system-ui, sans-serif;
  --shadow:0 1px 2px rgba(0,0,0,.04); --shadow-lg:0 8px 24px -12px rgba(0,0,0,.12);
}
/* Varejo — vibrante, azul forte, cantos bem arredondados, tipografia amigável */
[data-theme="retail"] {
  --primary:#2563eb; --primary-dark:#1d4ed8; --secondary:#1e3a8a;
  --bg:#f0f6ff; --surface:#ffffff; --surface-2:#e2edff;
  --text:#0f1b2d; --text-muted:#5b6b82; --border:#cddffb;
  --radius:22px; --radius-sm:14px;
  --font-head:"Poppins", system-ui, sans-serif; --font:"Poppins", system-ui, sans-serif;
  --shadow:0 2px 6px rgba(37,99,235,.10); --shadow-lg:0 16px 34px -10px rgba(37,99,235,.28);
}
/* Tech — escuro moderno, acento ciano, tipografia geométrica */
[data-theme="tech"] {
  --primary:#06b6d4; --primary-dark:#0891b2; --secondary:#111827;
  --bg:#0b0f17; --surface:#131926; --surface-2:#1c2434;
  --text:#e6edf7; --text-muted:#8896ab; --border:#263041;
  --radius:12px; --radius-sm:8px;
  --font-head:"Space Grotesk", system-ui, sans-serif; --font:"Space Grotesk", system-ui, sans-serif;
  --shadow:0 1px 3px rgba(0,0,0,.5); --shadow-lg:0 16px 40px -8px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
h1,h2,h3 { line-height: 1.2; }

/* Tipografia de títulos controlada por tema (--font-head) */
.site-brand__name, .hero__title, .showcase__title, .product-detail__title, .pcard__title, .page-title {
  font-family: var(--font-head);
}
.hero__title, .showcase__title, .product-detail__title {
  text-transform: var(--head-transform); letter-spacing: var(--head-spacing);
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.fade-in { animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }
.mobile-only { display: none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ---------- Botões ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:11px 18px; border-radius:var(--radius-sm); font-weight:600; font-size:15px; background:var(--surface-2); color:var(--text); transition:transform .12s, filter .15s, background .15s; white-space:nowrap; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.97); }
.btn--primary { background:var(--primary); color:#fff; }
.btn--primary:hover { background:var(--primary-dark); filter:none; }
.btn--wa { background:var(--wa); color:#fff; }
.btn--wa:hover { background:#1da851; filter:none; }
.btn--ghost { background:transparent; border:1px solid var(--border); }
.btn--danger { background:var(--danger); color:#fff; }
.btn--block { width:100%; }
.btn--lg { padding:14px 24px; font-size:16px; }
.btn--sm { padding:8px 13px; font-size:13px; }

/* ---------- Ícones/botões redondos ---------- */
.icon-btn { display:inline-grid; place-items:center; width:40px; height:40px; border-radius:10px; color:var(--text); background:transparent; transition:background .15s; position:relative; }
.icon-btn:hover { background:var(--surface-2); }
.icon-btn--pill { border-radius:999px; }
.icon-btn--sm { width:32px; height:32px; border-radius:8px; }
.icon-btn--danger:hover { background:#fee2e2; color:var(--danger); }
.icon-btn .dot { position:absolute; top:8px; right:8px; width:7px; height:7px; border-radius:50%; background:var(--danger); }

.logo-box { width:44px; height:44px; border-radius:12px; background:var(--primary); color:#fff; display:grid; place-items:center; font-weight:800; font-size:20px; flex-shrink:0; overflow:hidden; }
.logo-box--lg { width:60px; height:60px; font-size:26px; }

/* ============================================================
   HEADER PÚBLICO
   ============================================================ */
.site-body { display:flex; flex-direction:column; min-height:100vh; }
.site-main { flex:1; }
.site-header { position:sticky; top:0; z-index:50; background:var(--surface); box-shadow:var(--shadow); border-bottom:1px solid var(--border); }
.site-header__inner { display:flex; align-items:center; gap:16px; padding:12px 0; }
.site-brand { display:flex; align-items:center; gap:10px; min-width:0; }
.site-brand__logo { width:44px; height:44px; border-radius:12px; object-fit:cover; }
.site-brand__name { font-weight:800; font-size:18px; white-space:nowrap; }
.site-header__actions { display:flex; align-items:center; gap:6px; margin-left:auto; }

.site-search { flex:1; position:relative; max-width:520px; display:flex; align-items:center; }
.site-search svg { position:absolute; left:14px; color:var(--text-muted); pointer-events:none; }
.site-search input { width:100%; padding:11px 16px 11px 42px; border-radius:999px; border:1px solid var(--border); background:var(--surface-2); color:var(--text); font-size:15px; outline:none; }
.site-search input:focus { border-color:var(--primary); background:var(--surface); }
.fav-count { position:absolute; top:4px; right:4px; min-width:18px; height:18px; padding:0 4px; border-radius:999px; background:var(--primary); color:#fff; font-size:11px; font-weight:700; display:grid; place-items:center; }

/* Sugestões de busca */
.search-suggest { position:absolute; top:calc(100% + 8px); left:0; right:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-lg); overflow:hidden; display:none; z-index:60; }
.search-suggest.open { display:block; }
.suggest-item { display:flex; align-items:center; gap:12px; padding:10px 14px; transition:background .12s; }
.suggest-item:hover { background:var(--surface-2); }
.suggest-item img { width:44px; height:44px; border-radius:8px; object-fit:cover; background:var(--surface-2); }
.suggest-item__info { display:flex; flex-direction:column; }
.suggest-item__info small { color:var(--text-muted); font-size:12px; }
.suggest-empty { padding:16px; text-align:center; color:var(--text-muted); font-size:14px; }

/* Nav */
.site-nav { border-top:1px solid var(--border); overflow-x:auto; scrollbar-width:none; }
.site-nav::-webkit-scrollbar { display:none; }
.site-nav__inner { display:flex; gap:4px; padding:4px 16px; }
.site-nav__link { padding:10px 14px; font-size:14px; font-weight:600; color:var(--text-muted); border-radius:8px; white-space:nowrap; transition:all .15s; }
.site-nav__link:hover { color:var(--text); background:var(--surface-2); }
.site-nav__link.active { color:var(--primary); }

/* ============================================================
   HERO
   ============================================================ */
.hero { background:var(--secondary); color:#fff; }
.hero--image { background-size:cover; background-position:center; }
.hero__inner { padding:48px 16px; max-width:1200px; margin:0 auto; }
.hero__title { font-size:2rem; font-weight:800; }
.hero__sub { margin-top:8px; opacity:.9; max-width:560px; }
.hero__cats { display:flex; flex-wrap:wrap; gap:8px; margin-top:20px; }
.hero__chip { padding:8px 16px; border-radius:999px; background:rgba(255,255,255,.15); font-size:14px; font-weight:600; transition:background .15s; }
.hero__chip:hover { background:rgba(255,255,255,.28); }

/* ============================================================
   SHOWCASE (seções da vitrine)
   ============================================================ */
.showcase { margin:32px 0; }
.showcase__head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.showcase__title { font-size:1.35rem; font-weight:800; display:flex; align-items:center; gap:8px; }
.showcase__title svg { color:var(--primary); }
.showcase__link { display:inline-flex; align-items:center; gap:4px; font-size:14px; color:var(--primary); font-weight:600; }

/* Scroll horizontal (destaques) */
.product-scroll { display:flex; gap:16px; overflow-x:auto; padding-bottom:8px; scrollbar-width:none; }
.product-scroll::-webkit-scrollbar { display:none; }
.product-scroll__item { width:230px; flex-shrink:0; }

/* ============================================================
   GRADE E CARDS DE PRODUTO
   ============================================================ */
.product-grid { display:grid; gap:16px; grid-template-columns:repeat(2,1fr); }
@media (min-width:640px){ .product-grid{ grid-template-columns:repeat(3,1fr);} }
@media (min-width:920px){ .product-grid--public{ grid-template-columns:repeat(4,1fr);} }

.pcard { background:var(--surface); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); border:1px solid var(--border); display:flex; flex-direction:column; transition:transform .15s, box-shadow .2s; height:100%; }
.pcard:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }
.pcard__media { position:relative; aspect-ratio:1; overflow:hidden; background:var(--surface-2); display:block; }
.pcard__media img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.pcard:hover .pcard__media img { transform:scale(1.06); }
.pcard__tags { position:absolute; top:10px; left:10px; display:flex; flex-direction:column; gap:6px; }
.pcard__fav { position:absolute; top:10px; right:10px; width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,.92); display:grid; place-items:center; color:#64748b; box-shadow:var(--shadow); transition:color .15s, transform .12s; }
.pcard__fav:hover { transform:scale(1.1); }
.pcard__fav.is-active { color:var(--danger); }
.pcard__fav.is-active svg { fill:currentColor; }
.pcard__body { padding:12px 14px; display:flex; flex-direction:column; gap:6px; flex:1; }
.pcard__title { font-weight:700; font-size:15px; line-height:1.25; }
.pcard__desc { font-size:12.5px; color:var(--text-muted); }
.pcard__foot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding-top:6px; }
.pcard__price { display:flex; flex-direction:column; }
.pcard__wa { width:38px; height:38px; border-radius:10px; background:var(--wa); color:#fff; display:grid; place-items:center; flex-shrink:0; transition:transform .12s; }
.pcard__wa:hover { transform:scale(1.06); }

.chip { display:inline-flex; align-items:center; gap:4px; padding:4px 10px; border-radius:999px; font-size:11px; font-weight:700; color:#fff; width:fit-content; }
.chip--new { background:var(--success); }
.chip--promo { background:var(--danger); }
.chip--star { background:var(--warning); }
.chip--ok { background:var(--success); }
.chip--muted { background:var(--surface-2); color:var(--text-muted); }
.chip--sm { padding:2px 8px; font-size:10px; }

.price-now { font-weight:800; font-size:17px; color:var(--primary); }
.price-old { font-size:13px; color:var(--text-muted); text-decoration:line-through; }
.price-none { font-size:13.5px; font-weight:700; color:var(--secondary); }
.price-now--lg { font-size:30px; }
.price-old--lg { font-size:18px; }
.price-none--lg { font-size:18px; }

/* ============================================================
   PÁGINA DO PRODUTO
   ============================================================ */
.crumbs { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13px; color:var(--text-muted); margin:20px 0; }
.crumbs a:hover { color:var(--primary); }
.product-detail { display:grid; gap:28px; margin:8px 0 40px; }
@media (min-width:860px){ .product-detail{ grid-template-columns:1fr 1fr; align-items:start;} }
.product-gallery__main { width:100%; aspect-ratio:1; border-radius:var(--radius); overflow:hidden; object-fit:cover; background:var(--surface-2); box-shadow:var(--shadow); }
.product-gallery__thumbs { display:flex; gap:10px; margin-top:12px; overflow-x:auto; scrollbar-width:none; }
.product-gallery__thumbs::-webkit-scrollbar { display:none; }
.gthumb { width:74px; height:74px; border-radius:10px; overflow:hidden; flex-shrink:0; border:2px solid transparent; }
.gthumb.active { border-color:var(--primary); }
.gthumb img { width:100%; height:100%; object-fit:cover; }
.product-detail__cat { color:var(--primary); font-weight:700; font-size:13px; text-transform:uppercase; letter-spacing:.04em; }
.product-detail__title { font-size:1.8rem; font-weight:800; margin:6px 0; }
.product-detail__code { color:var(--text-muted); font-size:13px; }
.product-detail__price { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:16px 0; }
.product-detail__lead { color:var(--text-muted); margin-bottom:20px; }
.product-detail__actions { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:24px; }
.product-detail__desc h2 { font-size:1.1rem; margin-bottom:8px; }
.rich-text { color:var(--text-muted); line-height:1.7; }

/* ============================================================
   RODAPÉ
   ============================================================ */
.site-footer { background:var(--secondary); color:#fff; margin-top:40px; }
.site-footer__inner { display:flex; flex-wrap:wrap; gap:24px; justify-content:space-between; align-items:flex-start; padding:36px 16px; max-width:1200px; margin:0 auto; }
.site-footer__brand { max-width:420px; }
.site-footer__brand p { opacity:.8; margin-top:8px; font-size:14px; }
.site-footer__social { display:flex; gap:12px; }
.site-footer__social a { width:42px; height:42px; border-radius:50%; background:rgba(255,255,255,.12); display:grid; place-items:center; transition:background .15s; }
.site-footer__social a:hover { background:rgba(255,255,255,.28); }
.site-footer__bar { border-top:1px solid rgba(255,255,255,.12); padding:16px; text-align:center; font-size:13px; opacity:.8; }
.site-footer__bar a { color:#fff; text-decoration:underline; }

/* WhatsApp flutuante */
.wa-float { position:fixed; bottom:20px; z-index:90; width:58px; height:58px; border-radius:50%; display:grid; place-items:center; color:#fff; box-shadow:var(--shadow-lg); animation:waPulse 2.5s infinite; }
.wa-float--right { right:20px; }
.wa-float--left { left:20px; }
@keyframes waPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }

/* ---------- Estados vazios ---------- */
.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:8px; padding:56px 20px; color:var(--text-muted); }
.empty-state h3 { color:var(--text); }
.badge-icon { display:grid; place-items:center; width:64px; height:64px; border-radius:50%; background:var(--surface-2); color:var(--primary); margin-bottom:8px; }

/* ---------- Flash ---------- */
.flash { position:fixed; top:16px; left:50%; transform:translateX(-50%); z-index:200; width:min(92%,440px); display:flex; flex-direction:column; gap:8px; }
.alert { padding:13px 16px; border-radius:var(--radius-sm); font-size:14px; font-weight:500; box-shadow:var(--shadow-lg); animation:slideDown .3s; }
.alert-success { background:#dcfce7; color:#166534; }
.alert-error { background:#fee2e2; color:#991b1b; }
.alert-info { background:#dbeafe; color:#1e40af; }
@keyframes slideDown { from { opacity:0; transform:translateY(-10px);} }

/* ---------- Responsivo público ---------- */
@media (max-width:768px){
  .mobile-only { display:inline-grid; }
  .site-brand__name { display:none; }
  .site-nav { display:none; }
  .site-nav.open { display:block; position:absolute; left:0; right:0; background:var(--surface); box-shadow:var(--shadow-lg); }
  .site-nav.open .site-nav__inner { flex-direction:column; }
  .hero__title { font-size:1.5rem; }
}
