/* ===== COLORES Y VARIABLES DE LA MARCA (CLARO Y OSCURO) ===== */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #121212;
  --muted: #5f5f5f;
  --accent: #121212;
  --accent-ink: #ffffff;
  --line: #e3e3e3;
  --stock: #121212;
  --order: #6b6b6b;
  --art-bg: #f8f8f8;
  --qty-bg: #f0f0f0;
  --sh: rgba(0,0,0,.18);
  box-sizing: border-box;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --surface: #1e1e1e;
  --ink: #ffffff;
  --muted: #a0a0a0;
  --accent: #ffffff;
  --accent-ink: #121212;
  --line: #333333;
  --stock: #ffffff;
  --order: #a0a0a0;
  --art-bg: #2a2a2a;
  --qty-bg: #333333;
  --sh: rgba(0,0,0,.6);
}

*,*::before,*::after { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:80px; }
body { margin:0; background:var(--bg); color:var(--ink); font:400 16px/1.5 "DM Sans",system-ui,sans-serif; padding-bottom:90px; transition: background 0.3s, color 0.3s; }
h1,h2,h3 { font-family:"Bricolage Grotesque","DM Sans",system-ui,sans-serif; margin:0; line-height:1.1; }
button,input,select { font:inherit; color:inherit; }
button { cursor:pointer; }
:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }

/* ===== ENCABEZADO Y NAVEGACIÓN ===== */
.promo { background:var(--bg); color:var(--ink); border-bottom:1px solid var(--line); text-align:center; font-size:13px; font-weight:700; padding:8px 12px; transition: background 0.3s; }
header { position:sticky; top:0; z-index:5; background:var(--bg); border-bottom:1px solid var(--line); padding:12px 16px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px 12px; transition: background 0.3s; }
.logo { font:700 22px "Bricolage Grotesque",system-ui,sans-serif; color:var(--accent); display:flex; align-items:center; gap:10px; text-decoration:none; }
.mono { border:1.5px solid var(--accent); padding:2px 9px; letter-spacing:.06em; font-weight:800; }

/* Logo en imagen: se muestra uno u otro según el tema (claro u oscuro) */
.logo img { height:56px; width:auto; display:block; }
.logo .logo-dark { display:none; }
[data-theme="dark"] .logo .logo-light { display:none; }
[data-theme="dark"] .logo .logo-dark { display:block; }

.acts { display:flex; gap:8px; align-items: center; }
.lnk { background:none; border:1px solid var(--line); border-radius:999px; padding:6px 14px; font-size:14px; color:var(--ink); }
.cartbtn b { color:var(--accent); }
.menu { order:3; width:100%; display:flex; gap:20px; overflow-x:auto; }
.menu a { color:var(--ink); text-decoration:none; font-weight:500; padding:6px 0; white-space:nowrap; }

@media (min-width:900px) {
  header { padding:14px max(24px, calc(50% - 600px)); }
  .menu { order:0; width:auto; margin-right:auto; margin-left:24px; }
  header .logo { order:0; }
  .acts { order:2; }
  /* Logo más grande en computadora */
  .logo img { height:80px; }
  html { scroll-padding-top:120px; }
}

/* ===== PORTADA (si falta banner.jpg se ve el gris de respaldo) ===== */
.hero { padding: 56px 16px; text-align: center; background-color: #1b1b1b; background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(img/banner.jpg); background-size: cover; background-position: center; background-repeat: no-repeat; border-bottom: 1px solid var(--line); }
.hero h1 { color: #ffffff; font-size: clamp(34px, 8vw, 56px); font-weight: 800; max-width: none; margin: 0 auto; }
.hero h1 em { color: #ffffff; }
.hero p { color: rgba(255,255,255,0.8); max-width: 44ch; margin: 16px auto 0; font-size: 17px; }
.eyebrow { text-transform:uppercase; letter-spacing:.14em; font-size:12px; color: #ffffff; font-weight:700; margin:0 0 10px; }
.hero .cta-link { display: inline-block; margin-top: 24px; background: #ffffff; color: #121212; text-decoration: none; font-weight: 700; padding: 13px 28px; border-radius: 999px; }
.featbox .eyebrow { color: var(--muted); }

/* ===== SECCIONES ===== */
.sec { max-width:1200px; margin:0 auto; padding:32px 16px 12px; }
.sech { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:16px; }
.sech h2 { font-size:26px; }
.sech span { color:var(--muted); font-size:13px; }
.scroller { display:flex; gap:16px; overflow-x:auto; padding-bottom:12px; scroll-snap-type:x mandatory; }
.scroller .card { flex:0 0 220px; scroll-snap-align:start; }
.note { color:var(--muted); font-size:13px; }

/* ===== FILTROS ===== */
.filters { display:grid; gap:12px; margin-bottom:20px; }
.sort-row { display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.sort-select { padding:10px 14px; border-radius:10px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font-size:14px; font-weight:500; cursor:pointer; flex:1; min-width:200px; }
.sort-select option { background:var(--surface); color:var(--ink); }
.chips { display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; }
.chip { flex:none; border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:8px 16px; font-weight:500; color:var(--ink); }
.chip[aria-pressed="true"] { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }

/* ===== CATÁLOGO / TARJETAS ===== */
.grid { display:grid; grid-template-columns:repeat(2, 1fr); gap:16px; }
@media (min-width:640px) { .grid { grid-template-columns:repeat(3, 1fr); } }
@media (min-width:960px) { .grid { grid-template-columns:repeat(4, 1fr); gap:20px; } }

.card { background:var(--surface); border:1px solid var(--line); border-radius:14px; overflow:hidden; display:flex; flex-direction:column; position:relative; }
.art { aspect-ratio:1/1; display:flex; align-items:flex-end; padding:10px; background:var(--art-bg); color:var(--ink); font:700 15px "Bricolage Grotesque",system-ui,sans-serif; position:relative; overflow:hidden; }
.art img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:transparent; }
.badge { position:absolute; top:10px; left:10px; background:var(--accent); color:var(--accent-ink); font:700 11px "DM Sans",sans-serif; padding:4px 10px; border-radius:999px; z-index:2; }

.info { padding:14px; display:flex; flex-direction:column; gap:6px; flex:1; }
.brand { font-family:"Bricolage Grotesque",system-ui,sans-serif; font-size:12px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:-2px; }
.info h3 { font-size:16px; line-height:1.2; }
.sub { margin:0; color:var(--muted); font-size:13px; }
.tag { font-size:12.5px; font-weight:700; margin-bottom:4px; }
.tag.in { color:var(--stock); }
.tag.out { color:var(--order); }
.price-row { display:flex; justify-content:space-between; align-items:baseline; margin-top:auto; padding-top:6px; margin-bottom:8px; }
.price-row b { font-size:20px; }
.old { color:var(--muted); font-size:13px; font-weight:400; }
.actions-box { display:flex; flex-direction:column; gap:8px; width:100%; }
.qty-control { display:flex; align-items:center; justify-content:space-between; border:1px solid var(--line); border-radius:8px; padding:4px 8px; width:100%; background:var(--bg); }
.qty-control button { width:28px; height:28px; border-radius:6px; border:0; background:var(--qty-bg); font-weight:700; display:flex; align-items:center; justify-content:center; color:var(--ink); }
.qty-control span { font-weight:700; font-size:14px; }
.add { width:100%; background:var(--accent); color:var(--accent-ink); border:0; border-radius:10px; padding:10px; font-weight:700; font-size:14px; text-align:center; transition:background .2s; }
.add:hover { opacity:.9; }
/* Botón "Consultar disponibilidad" (perfumes agotados) */
.ask { display:block; width:100%; text-align:center; border:1px solid var(--accent); border-radius:10px; padding:10px; font-weight:700; font-size:14px; color:var(--ink); text-decoration:none; }
.ask:hover { background:var(--qty-bg); }

/* ===== PAGINACIÓN ===== */
.pagination { display:flex; justify-content:center; align-items:center; gap:8px; margin:32px 0 16px; flex-wrap:wrap; }
.page-btn { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:8px; width:40px; height:40px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; }
.page-btn.active { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.page-btn:disabled { opacity:.4; cursor:not-allowed; }

/* ===== DESTACADO Y CONTACTO ===== */
.featbox { display:grid; gap:20px; border:1px solid var(--accent); border-radius:16px; padding:20px; background:var(--surface); }
@media (min-width:640px) { .featbox { grid-template-columns:1fr 1fr; align-items:center; } }
.featart { aspect-ratio:1/1; border-radius:12px; display:flex; align-items:flex-end; padding:14px; font:700 22px "Bricolage Grotesque",system-ui,sans-serif; background:var(--art-bg); color:var(--ink); position:relative; overflow:hidden; }
.featart img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:transparent; }
.featbox h2 { font-size:28px; margin-bottom:6px; }
.fp { font-size:26px; margin:8px 0; }
.fbtns { display:flex; flex-direction:column; gap:12px; margin-top:16px; max-width:320px; }
.contact { padding-bottom:32px; }
.contact p { margin:4px 0; color:var(--muted); }
.subs { display:flex; gap:8px; margin-top:16px; max-width:480px; }
.subs .in-t { margin:0; }
.in-t { width:100%; padding:12px; border-radius:10px; border:1px solid var(--line); background:var(--bg); margin:4px 0; color:var(--ink); }
footer { border-top:1px solid var(--line); padding:24px 16px 32px; text-align:center; color:var(--muted); font-size:13px; }
footer nav { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; margin-bottom:12px; }
footer button { background:none; border:0; padding:0; font:inherit; color:var(--muted); text-decoration:underline; }

/* ===== FLOTANTES, CARRITO Y AVISOS ===== */
.wa { position:fixed; right:16px; bottom:calc(82px + env(safe-area-inset-bottom,0px)); z-index:7; background:var(--accent); color:var(--accent-ink); font-weight:700; text-decoration:none; padding:12px 20px; border-radius:999px; box-shadow:0 4px 14px var(--sh); }
.toast { position:fixed; left:50%; bottom:90px; transform:translate(-50%,20px); background:var(--accent); color:var(--accent-ink); padding:10px 18px; border-radius:12px; font-weight:700; font-size:14px; opacity:0; pointer-events:none; transition:.25s; z-index:20; max-width:90%; text-align:center; }
.toast.on { opacity:1; transform:translate(-50%,0); }
.bar { position:fixed; left:0; right:0; bottom:0; z-index:6; padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px)); background:var(--bg); border-top:1px solid var(--line); }
.bar button { width:100%; max-width:1200px; display:block; margin:0 auto; background:var(--accent); color:var(--accent-ink); border:0; border-radius:14px; padding:14px; font-weight:700; }
.shade { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:8; display:none; }
.sheet { position:fixed; left:0; right:0; bottom:0; z-index:9; max-height:92%; overflow-y:auto; background:var(--surface); border-radius:20px 20px 0 0; padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px)); box-shadow:0 -10px 40px var(--sh); display:none; }
.sheet.open { display:block; }
.sheet .top { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.x { background:none; border:1px solid var(--line); border-radius:999px; padding:6px 12px; }
.line { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
.line small { display:block; color:var(--muted); }
.qty { display:flex; align-items:center; gap:8px; }
.qty button { width:30px; height:30px; border-radius:50%; border:1px solid var(--line); background:var(--bg); color:var(--ink); }
.sum { padding:12px 0; display:grid; gap:4px; }
.sum div { display:flex; justify-content:space-between; }
.sum .big { font:700 19px "Bricolage Grotesque",system-ui,sans-serif; padding-top:6px; }
fieldset { border:1px solid var(--line); border-radius:12px; margin:10px 0; padding:10px 12px; }
legend { font-weight:700; padding:0 6px; }
label.opt { display:flex; gap:8px; align-items:flex-start; padding:4px 0; }
.cta { width:100%; background:var(--accent); color:var(--accent-ink); border:0; border-radius:14px; padding:14px; font-weight:700; margin-top:8px; }
.err { color:var(--ink); font-size:14px; min-height:20px; font-weight:700; }
.empty { color:var(--muted); padding:18px 0; }

/* ===== POLÍTICAS (PANEL LATERAL) ===== */
.policy { position:fixed; inset:0; z-index:12; background:rgba(0,0,0,.5); display:none; justify-content:flex-end; }
.policy.open { display:flex; }
.ppanel { background:var(--surface); width:100%; max-width:560px; height:100%; display:flex; flex-direction:column; padding-top:env(safe-area-inset-top,0px); }
.phead { display:flex; justify-content:space-between; align-items:center; padding:16px; border-bottom:1px solid var(--line); }
.phead h2 { font-size:22px; }
.ptabs { display:flex; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); }
.ptabs button { flex:1; border:1px solid var(--line); background:var(--surface); border-radius:10px; padding:10px 6px; font-weight:700; font-size:14px; color:var(--ink); }
.ptabs button[aria-pressed="true"] { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.pbody { flex:1; overflow-y:auto; padding:16px 16px calc(24px + env(safe-area-inset-bottom,0px)); }
.resumen { background:var(--art-bg); border-left:4px solid var(--accent); border-radius:8px; padding:12px 14px; margin:0 0 12px; font-weight:500; }
.pol details { border-bottom:1px solid var(--line); padding:12px 0; }
.pol summary { cursor:pointer; font-weight:700; list-style:none; }
.pol summary::-webkit-details-marker { display:none; }
.pol summary::after { content:"+"; float:right; font-weight:400; }
.pol details[open] summary::after { content:"\2013"; }
.pol details p { color:var(--muted); margin:8px 0 0; }
.pdate { color:var(--muted); font-size:13px; margin-top:16px; }
.lk { background:none; border:0; padding:0; font:inherit; color:inherit; text-decoration:underline; }

/* ===== AJUSTES FINOS ===== */
/* Buscador y "Ordenar por" lado a lado */
.sort-row .in-t { flex:2; width:auto; min-width:220px; margin:0; }
/* Encabezado en celulares angostos: logo un poco más pequeño para que quepa todo en una línea */
@media (max-width:480px) {
  .logo { font-size:18px; gap:6px; }
  .logo img { height:50px; }
  .mono { padding:1px 7px; }
  .promo { font-size:12px; }
}