/* ==========================================================
   RINCÓN DE SUEÑO – tienda online
   Identidad tomada del logo: negro cálido sobre crema y blanco,
   con un acento malva. Títulos en Lora (como el logo) y texto en
   Nunito Sans. Mobile first: lo base es celular, los @media suman
   escritorio.
   ========================================================== */
:root {
  --black: #26201d;
  --ink: #26201d;
  --accent: #8b5a6b;
  --accent-dark: #6e4455;
  --accent-soft: #fbf4f6;
  --sage: #4f6149;
  --white: #fff;
  --bg: #f7f2ea;
  --card: #fffdf9;
  --line: #e8dfd3;
  --muted: #6b5f57;
  --ok: #3f6b4a;
  --warn: #8a5a12;
  --bad: #8f2f4a;
  --max: 1180px;
  --head: "Lora", Georgia, "Times New Roman", serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--body); -webkit-font-smoothing: antialiased; }
body.has-bar { padding-bottom: 84px; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin-top: 0; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; letter-spacing: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; }
h2 { margin-bottom: 14px; font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 700; }
.container { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hero :focus-visible, .page-head-dark :focus-visible, .site-footer :focus-visible, .callout :focus-visible, .service-band :focus-visible, .adm-header :focus-visible { outline-color: #fff; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }
.ico { width: 1.2em; height: 1.2em; flex: none; }
.ico-lg { width: 30px; height: 30px; }
.ico-xl { width: 44px; height: 44px; }
.lead { max-width: 560px; color: var(--muted); font-size: 1.05rem; }
.fine { color: var(--muted); font-size: .85rem; }

/* ---------- Botones (táctiles: mínimo 48 px) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 22px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 700 1rem/1 var(--body); text-align: center; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn-red { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-red:hover:not(:disabled) { border-color: var(--accent); background: var(--accent); }
.hero .btn-red, .page-head-dark .btn-red, .callout .btn-red { border-color: var(--accent); background: var(--accent); }
.hero .btn-red:hover:not(:disabled), .page-head-dark .btn-red:hover:not(:disabled), .callout .btn-red:hover:not(:disabled) { border-color: #fff; background: var(--accent-dark); }
.btn-line { background: transparent; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled { border-color: var(--line); background: #ece6dc; color: #7a6f66; cursor: not-allowed; }
.link-btn { min-height: 44px; padding: 6px 0; border: 0; background: none; color: var(--muted); font: 600 .85rem var(--body); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--accent-dark); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; min-height: var(--header-h); background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(60,40,30,.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: calc(var(--header-h) - 1px); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand-mark { width: 40px; height: 36px; flex: none; color: var(--ink); }
.brand-logo { display: block; width: 150px; height: auto; }
.brand-text { font: 700 1.25rem/1.05 var(--head); white-space: nowrap; }
.footer-brand .brand-text { color: var(--black); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.cart-link:hover, .cart-link.is-current { background: var(--bg); }
.cart-link .ico { width: 26px; height: 26px; }
.cart-label { display: none; }
.cart-count { position: absolute; top: 3px; left: 28px; display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 700; line-height: 1; }
.menu-toggle { width: 48px; height: 48px; padding: 0 11px; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.menu-toggle:hover { background: var(--bg); }
.menu-toggle span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-of-type(3) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
.site-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; flex-direction: column; padding: 4px 16px 14px; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px rgba(60,40,30,.15); }
.site-nav.is-open { display: flex; }
.site-nav a { padding: 15px 4px; border-bottom: 1px solid var(--line); font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent-dark); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--black); color: #fff; }
.hero-slash { position: absolute; top: -90px; right: -90px; width: 300px; height: 300px; border-radius: 50%; background: rgba(139,90,107,.38); }
.hero-grid { position: relative; display: grid; gap: 22px; padding: 32px 0 36px; }
.hero h1 { max-width: 560px; margin-bottom: 14px; }
.hero p { max-width: 480px; margin-bottom: 24px; color: #e6dcd0; font-size: 1.05rem; }
.hero .hero-kicker { margin: 0 0 10px; color: #e9b8c6; font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-ghost { border-color: rgba(255,255,255,.45); background: transparent; color: #fff; }
.btn-ghost:hover:not(:disabled) { border-color: #fff; }
.hero-title { display: flex; flex-direction: column; gap: 8px; max-width: none; }
.hero .hero-brand { font: 700 clamp(2.5rem, 11.5vw, 4.8rem)/1 var(--head); }
.hero-sub { max-width: 520px; color: #fff; font: 600 clamp(1.1rem, 4vw, 1.5rem)/1.25 var(--body); }
.hero-sub::before { content: ""; display: block; width: 64px; height: 4px; margin: 6px 0 12px; border-radius: 2px; background: var(--accent); }
.hero-logo-wrap { position: relative; display: grid; order: -1; place-items: center; }
.hero-logo { width: min(240px, 68%); height: auto; border-radius: 18px; background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.45); }

/* ---------- Secciones ---------- */
.section { padding: 40px 0; }
.section-white { background: var(--card); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 4px 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent-dark); font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-tile { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-weight: 600; line-height: 1.2; text-decoration: none; transition: border-color .15s, transform .15s; }
.cat-tile .ico { color: var(--accent); }
.cat-tile span { min-width: 0; overflow-wrap: anywhere; }
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); }

.service-band { background: var(--black); color: #fff; }
.service-band .container { display: flex; flex-direction: column; gap: 10px; padding: 26px 0; }
.service-band p { margin: 0; color: #e6dcd0; }
.service-band strong { color: #fff; font-family: var(--head); font-size: 1.4rem; font-weight: 700; }
.service-band .text-link { color: #fff; }

/* ---------- Páginas interiores ---------- */
.page-head { padding: 26px 0 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.page-head p { margin: 0; }
.page-body { padding: 24px 0 48px; }
.page-head-dark { position: relative; overflow: hidden; border-bottom: 0; background: var(--black); color: #fff; }
.page-head-dark .container { position: relative; }
.page-head-dark .lead { color: #e6dcd0; }
.page-head-dark .hero-kicker { margin: 0 0 8px; color: #e9b8c6; font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.page-head-slash { position: absolute; top: -70px; right: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(139,90,107,.38); }
.page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }

/* ---------- Catálogo ---------- */
.toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
.search { position: relative; }
.search .ico { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: var(--muted); }
.search input, .select { width: 100%; height: 48px; padding: 0 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: 500 1rem var(--body); }
.search input { padding-left: 44px; }
.search input:focus, .select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(139,90,107,.2); }
.chips { display: flex; gap: 8px; margin: 0 -16px 14px; padding: 2px 16px 8px; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.chip { flex: none; min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); font: 600 .95rem var(--body); cursor: pointer; white-space: nowrap; }
.chip span { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip.is-active span { color: #d8cfc4; }
.result-count { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.p-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 2px 8px rgba(60,40,30,.05); }
.p-media { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; background: linear-gradient(160deg, #f4ece1, #e8dccb); }
.p-art { width: 70%; height: 70%; filter: drop-shadow(0 8px 8px rgba(60,40,30,.18)); }
.p-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.p-card.is-out .p-media { filter: grayscale(1); opacity: .55; }
.p-body { display: flex; flex: 1; flex-direction: column; padding: 12px; }
.p-cat { margin: 0 0 3px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.p-name { margin-bottom: 4px; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.p-desc { flex: 1; margin-bottom: 10px; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.p-meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.p-price { font: 700 1.35rem/1.1 var(--head); }
.stock { font-size: .78rem; font-weight: 700; }
.stock::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.stock-ok { color: var(--ok); }
.stock-low { color: var(--warn); }
.stock-out { color: var(--bad); }
.p-card .btn { min-height: 46px; padding: 0 10px; font-size: .9rem; }
.empty { grid-column: 1 / -1; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 14px; background: var(--card); text-align: center; }
.empty p { color: var(--muted); }
.empty-lg { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 48px 16px; }
.empty-lg .ico { color: var(--accent); }
.empty-lg h2 { margin: 8px 0 0; }

/* ---------- Colores de producto ---------- */
.p-colors { min-width: 0; margin: 0 0 10px; padding: 0; border: 0; }
.p-colors-legend { padding: 0; margin-bottom: 2px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.p-colors-pick { color: var(--ink); }
.p-colors.is-missing .p-colors-pick { color: var(--bad); }
.p-colors-row { display: flex; flex-wrap: wrap; }
.swatch { position: relative; display: grid; width: 44px; height: 44px; place-items: center; cursor: pointer; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch-dot { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--sw, #ccc); border: 1px solid rgba(38,32,29,.35); transition: box-shadow .15s; }
.swatch-dot.sm { width: 18px; height: 18px; flex: none; }
.swatch:hover .swatch-dot { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--line); }
.swatch input:checked + .swatch-dot { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + .swatch-dot { outline: 3px solid var(--accent); outline-offset: 5px; }
.c-color { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; color: var(--muted); font-size: .85rem; font-weight: 600; }
.ol-color { color: var(--muted); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .swatch-dot { transition: none; } }

/* ---------- Carrito ---------- */
.cart-layout { display: grid; gap: 18px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.cart-table tbody { display: grid; gap: 10px; }
.cart-table tr { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 8px 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.cart-table td { padding: 0; min-width: 0; }
.cart-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.c-prod { grid-column: 1 / -1; }
.c-inner { display: flex; align-items: center; gap: 12px; }
.c-thumb { position: relative; display: grid; flex: none; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 10px; background: linear-gradient(160deg, #f4ece1, #e8dccb); }
.c-thumb .p-art { width: 72%; height: 72%; }
.c-name { margin: 0; font-weight: 700; line-height: 1.25; }
.c-price, .c-sub { font-weight: 600; }
.c-sub { font: 700 1.2rem/1.2 var(--head); }
.c-sub::before { font: 700 .72rem var(--body) !important; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 10px; background: var(--card); }
.stepper button { display: grid; width: 44px; height: 44px; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--bg); color: var(--accent-dark); }
.stepper button:disabled { color: #b8aea3; cursor: not-allowed; }
.stepper output { min-width: 32px; font-weight: 700; text-align: center; }

.summary, .card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.summary h2, .card h2 { font-size: 1.5rem; }
.summary dl { margin: 0 0 8px; }
.summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; }
.summary .total { padding-top: 14px; border: 0; }
.summary .total dt { color: var(--ink); font: 700 1.2rem var(--head); }
.summary .total dd { font: 700 1.8rem/1 var(--head); }
.summary .btn { margin-top: 10px; }
.summary-cta { display: none; }

.sticky-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); box-shadow: 0 -6px 18px rgba(60,40,30,.1); }
.sticky-bar .bar-label { display: block; color: var(--muted); font-size: .75rem; line-height: 1; }
.sticky-bar strong { font: 700 1.5rem/1.1 var(--head); }
.sticky-bar .btn { flex: 1; max-width: 280px; padding: 0 14px; }

.notice { margin-bottom: 14px; padding: 12px 14px; border-left: 4px solid var(--accent); border-radius: 6px; background: var(--card); }
.notice p { margin: 0; font-size: .92rem; }
.notice p + p { margin-top: 4px; }
.notice-warn { background: #fff7e6; border-color: #e8a317; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; gap: 18px; }
.form-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.form-card + .form-card { margin-top: 14px; }
.form-card h2 { font-size: 1.4rem; }
.field { margin-bottom: 14px; }
.field label, .field .label { display: block; margin-bottom: 6px; font-weight: 700; font-size: .95rem; }
.opt { color: var(--muted); font-weight: 500; }
.field input, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 2px solid #d6cbbd; border-radius: 10px; background: #fff; color: var(--ink); font: 500 1rem var(--body); }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(139,90,107,.2); }
.field [aria-invalid="true"] { border-color: var(--bad); background: #fff6f7; }
.field-error { min-height: 0; margin: 4px 0 0; color: var(--bad); font-size: .85rem; font-weight: 700; }
.field-error:empty { display: none; }
.choices { display: grid; gap: 8px; }
.choice { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-box { display: flex; flex-direction: column; gap: 2px; padding: 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s; }
.choice-box small { color: var(--muted); font-size: .84rem; }
.choice:hover .choice-box { border-color: #a89c8f; }
.choice input:checked + .choice-box { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-error { margin: 12px 0 0; color: var(--bad); font-weight: 700; }
.form-error:empty { display: none; }
.pay-note { margin: 0; color: var(--muted); font-size: .92rem; }

.order-lines { margin: 0 0 8px; padding: 0; list-style: none; }
.order-lines li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.ol-qty { color: var(--muted); }
.ol-price { min-width: 78px; font-weight: 700; text-align: right; }
.order-total { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 0 0; }
.order-total span { font: 700 1.2rem var(--head); }
.order-total strong { font: 700 1.8rem/1 var(--head); }
.checkout-aside .btn { margin-top: 14px; display: none; }

/* ---------- Confirmación ---------- */
.done-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.done-head h1 { margin-bottom: 2px; font-size: clamp(1.7rem, 6vw, 2.5rem); }
.done-head p { margin: 0; color: var(--muted); }
.done-head h1:focus { outline: none; }
.done-icon { display: grid; flex: none; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: var(--sage); color: #fff; }
.done-icon .ico { width: 28px; height: 28px; }
.done-grid { display: grid; gap: 14px; margin-bottom: 18px; }
.facts { margin: 0 0 12px; }
.facts div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .8rem; font-weight: 700; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }

/* ---------- Nosotros y contacto ---------- */
.story { margin-bottom: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.story h2 { margin-bottom: 10px; }
.story p { max-width: 70ch; color: var(--muted); }
.story p:last-child { margin-bottom: 0; }
.section-title { margin: 8px 0 14px; }
.service-list { display: grid; gap: 10px; margin-bottom: 22px; }
.service-item { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; background: var(--card); }
.service-item h3 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.service-item p { margin: 0 0 8px; color: var(--muted); }
.service-item .btn { align-self: flex-start; }
.service-ico { width: 32px; height: 32px; color: var(--accent); }
.callout { padding: 18px; border-radius: 14px; background: var(--black); color: #fff; }
.callout p { margin: 0 0 10px; }
.callout a.text-link { color: #fff; }
.contact-grid { display: grid; gap: 10px; }
.contact-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; }
a.contact-card:hover { border-color: var(--accent); }
.contact-card .ico { width: 26px; height: 26px; margin-top: 2px; color: var(--accent); }
.contact-card h2 { margin: 0 0 2px; font-size: 1.15rem; }
.contact-card p { margin: 0; color: var(--muted); }
.contact-card strong { color: var(--ink); }

.local-card { display: grid; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.local-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 42%; }
.local-card-body { padding: 18px; }
.local-card-body h2 { margin-bottom: 6px; font-size: 1.6rem; }
.local-card-body p { color: var(--muted); }
.local-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; background: var(--black); color: #d8cfc4; }
.footer-grid { display: grid; gap: 26px; padding: 36px 0 28px; }
.footer-brand p { max-width: 280px; margin: 12px 0 0; font-size: .92rem; }
.footer-brand .brand { padding: 8px; border-radius: 12px; background: #fff; }
.footer-brand .brand-logo { width: 150px; height: auto; }
.site-footer h2 { margin-bottom: 10px; color: #fff; font-size: 1.15rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; font-size: .95rem; }
.site-footer li .ico { margin-top: 3px; color: #e9b8c6; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links li { display: block; }
.footer-bottom { padding: 16px 0 88px; border-top: 1px solid rgba(255,255,255,.14); color: #b2a79c; font-size: .82rem; }

/* ---------- Avisos y WhatsApp ---------- */
.share-msg { margin: -4px 0 10px; color: var(--ok); font-size: .9rem; font-weight: 700; }
.share-msg:empty { display: none; }
.btn-share { min-height: 46px; padding: 0 18px; font-size: .98rem; }
.toast { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); left: 16px; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 14px; max-width: 460px; margin: 0 auto; padding: 14px 16px; border-radius: 12px; background: var(--black); color: #fff; font-size: .95rem; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,.35); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast a { flex: none; padding: 12px 4px; color: #f0c4d0; font-weight: 700; }
body.has-bar .toast { bottom: 96px; }
.wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 56px; height: 56px; border-radius: 28px; background: #1d7f48; color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px rgba(0,0,0,.28); transition: background .15s; }
.wa-float:hover { background: #156b39; }
.wa-float .ico { width: 26px; height: 26px; }
.wa-float-label { display: none; }
@media (prefers-reduced-motion: reduce) { .toast, .cat-tile, .btn, .wa-float { transition: none; } }

@media (max-width: 380px) { .brand-text { font-size: 1.05rem; } .brand-mark { width: 34px; } .brand { gap: 8px; } }
@media (max-width: 340px) { .brand-mark { display: none; } }
@media (max-width: 599px) {
  .p-name { font-size: 1rem; }
  .p-card .btn { gap: 6px; }
  .btn-more { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ==========================================================
   ≥ 600 px
   ========================================================== */
@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .toolbar { grid-template-columns: 1fr 220px; }
  .service-list, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.2fr; }
  .cart-label { display: inline; }
  .cart-count { left: 30px; }
  .chips { margin: 0 0 14px; padding: 2px 0 8px; flex-wrap: wrap; overflow: visible; }
  .service-band .container { flex-direction: row; align-items: center; justify-content: space-between; }
  .service-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .wa-float { width: auto; padding: 0 20px 0 16px; }
  .wa-float-label { display: inline; }
}
@media (min-width: 760px) {
  .local-card { grid-template-columns: minmax(260px, 340px) 1fr; align-items: stretch; }
  .local-card img { height: 100%; aspect-ratio: auto; }
  .local-card-body { align-self: center; padding: 24px 28px; }
}

/* ==========================================================
   ≥ 900 px (escritorio)
   ========================================================== */
@media (min-width: 900px) {
  :root { --header-h: 84px; }
  body.has-bar { padding-bottom: 0; }
  .brand-mark { width: 50px; height: 46px; }
  .brand-text { font-size: 1.6rem; }
  .menu-toggle { display: none; }
  .header-inner { gap: 24px; }
  .site-nav { position: static; display: flex; flex: 1; flex-direction: row; justify-content: center; gap: 34px; padding: 0; border: 0; box-shadow: none; background: none; }
  .site-nav a { position: relative; padding: 8px 0; border: 0; font-size: 1.05rem; }
  .site-nav a::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
  .site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .site-nav a[aria-current="page"] { color: inherit; }
  .cart-link { padding: 0 16px; background: var(--black); color: #fff; }
  .cart-link:hover, .cart-link.is-current { background: var(--accent); }
  .cart-count { position: static; background: var(--accent); }
  .cart-link:hover .cart-count, .cart-link.is-current .cart-count { background: #fff; color: var(--accent-dark); }

  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 24px; padding: 64px 0; }
  .hero-logo-wrap { order: 0; }
  .hero-logo { width: min(380px, 100%); border-radius: 22px; }
  .hero-slash { top: -140px; right: -100px; width: 520px; height: 520px; }
  .page-head-slash { top: -120px; right: -60px; width: 380px; height: 380px; }
  .section { padding: 56px 0; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .p-name { font-size: 1.12rem; }
  .p-meta { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .page-head { padding: 36px 0 24px; }
  .footer-bottom { padding-bottom: 24px; }

  .cart-layout { grid-template-columns: 1fr 340px; align-items: start; }
  .cart-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .cart-table tbody { display: table-row-group; }
  .cart-table thead th { padding: 0 12px 10px; border-bottom: 2px solid var(--black); color: var(--muted); font-size: .8rem; font-weight: 700; text-align: left; }
  .cart-table tr { display: table-row; border: 0; border-radius: 0; background: none; }
  .cart-table tbody tr { border-bottom: 1px solid var(--line); }
  .cart-table td { display: table-cell; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .cart-table td[data-label]::before { display: none; }
  .c-price, .c-sub { white-space: nowrap; }
  .summary { position: sticky; top: calc(var(--header-h) + 16px); }
  .summary-cta { display: inline-flex; }
  .sticky-bar { display: none !important; }

  .checkout-grid { grid-template-columns: 1fr 380px; align-items: start; }
  .checkout-aside { position: sticky; top: calc(var(--header-h) + 16px); }
  .checkout-aside .btn { display: inline-flex; }
  .choices { grid-template-columns: 1fr 1fr; }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .done-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .toast { left: auto; margin: 0; bottom: 88px; }
  body.has-bar .toast { bottom: 16px; }
}

/* ==========================================================
   Panel de administración (admin.html)
   ========================================================== */
.adm-login { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: var(--black); }
.adm-login-card { width: min(100%, 380px); padding: 26px 22px; border-radius: 14px; background: var(--card); border-top: 4px solid var(--accent); }
.adm-login-card .brand-logo { width: 130px; height: auto; margin-bottom: 10px; }
.adm-login-card h1 { font-size: 1.8rem; }
.adm-login-card .btn { margin: 4px 0 12px; }
.adm-header { background: var(--black); color: #fff; border-bottom: 3px solid var(--accent); }
.adm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.adm-title { font: 700 1.2rem var(--head); }
.adm-actions { display: flex; gap: 8px; }
.adm-actions .btn { min-height: 44px; padding: 0 14px; font-size: .9rem; border-color: #51463f; color: #fff; }
.adm-actions .btn:hover { border-color: #fff; }
.adm-main { padding-top: 18px; padding-bottom: 40px; }
.adm-tabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; border-bottom: 2px solid var(--line); }
.adm-tab { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; margin-bottom: -2px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: 700 1.05rem var(--body); cursor: pointer; }
.adm-tab:hover { color: var(--ink); }
.adm-tab.is-active { border-bottom-color: var(--accent); color: var(--ink); }
.adm-count { display: inline-grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; border-radius: 11px; background: var(--accent); color: #fff; font-size: .78rem; }
.adm-toolbar { display: grid; gap: 10px; margin-bottom: 12px; }
.adm-toolbar-actions { display: flex; gap: 8px; }
.adm-toolbar-actions .btn { flex: 1; padding: 0 14px; }
.adm-cat-help { margin: 0; align-self: center; }
.adm-foot { margin-top: 28px; color: var(--muted); font-size: .85rem; }
@media (max-width: 599px) { .adm-toolbar-actions { flex-direction: column; } }

.adm-list { display: grid; gap: 10px; }
.adm-item { display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.adm-item.is-hidden { opacity: .65; }
.adm-item .c-thumb { grid-row: span 2; }
.adm-name { margin: 0; font-weight: 700; line-height: 1.25; }
.adm-sub { margin: 0; color: var(--muted); font-size: .85rem; }
.adm-num { margin: 0; font-weight: 700; }
.adm-lbl { margin-right: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.adm-item .adm-num, .adm-item .adm-badges, .adm-item .adm-row-actions { grid-column: 1 / -1; }
.adm-item .adm-num { display: inline; }
.adm-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-row-actions { display: flex; gap: 8px; }
.adm-row-actions .btn { flex: 1; min-height: 44px; padding: 0 12px; font-size: .92rem; }
.adm-del { color: var(--bad); }
.adm-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.b-gray { background: #ebe5db; color: #4f4640; }
.b-red { background: #f8e3e8; color: var(--bad); }
.b-amber { background: #fff1d6; color: var(--warn); }
.b-green { background: #e0eedf; color: var(--ok); }
.b-dark { background: var(--black); color: #fff; }

/* Colores en el formulario de producto (panel) */
.color-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.color-add input[type="text"] { flex: 1 1 140px; width: auto; min-width: 0; }
.field .color-add input.color-pick { width: 56px; min-height: 50px; padding: 4px; cursor: pointer; }
.color-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.color-list:empty { display: none; }
.color-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 0 12px; border: 2px solid var(--line); border-radius: 22px; background: #fff; font-weight: 600; }
.color-chip-x { display: grid; width: 44px; height: 44px; margin-right: -2px; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.color-chip-x:hover { background: var(--bg); color: var(--bad); }

/* Categorías (panel) */
.adm-item.adm-cat { grid-template-columns: 48px 1fr; }
.adm-cat-ico { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--bg); color: var(--accent-dark); }
.adm-cat-actions .btn { flex: 1; }
.adm-cat-actions .btn-move { flex: 0 0 48px; padding: 0; font-size: 1.1rem; }
.icon-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.icon-choice { position: relative; display: block; cursor: pointer; }
.icon-choice input { position: absolute; opacity: 0; pointer-events: none; }
.icon-choice-box { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 72px; padding: 10px 6px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-align: center; }
.icon-choice-box small { color: var(--muted); font-size: .74rem; font-weight: 600; }
.icon-choice:hover .icon-choice-box { border-color: #a89c8f; }
.icon-choice input:checked + .icon-choice-box { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); color: var(--accent-dark); }
.icon-choice input:focus-visible + .icon-choice-box { outline: 3px solid var(--accent); outline-offset: 2px; }

.adm-dialog { width: min(100% - 24px, 560px); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 14px; overflow: auto; }
.adm-dialog::backdrop { background: rgba(0,0,0,.6); }
.adm-dialog form { padding: 20px 18px; }
.adm-dialog h2 { font-size: 1.6rem; }
.adm-dialog .select { height: 50px; }
.adm-img { display: flex; align-items: center; gap: 14px; }
.adm-img .c-thumb { width: 84px; height: 84px; }
.adm-file { position: relative; min-height: 44px; margin-bottom: 4px; overflow: hidden; cursor: pointer; }
.adm-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.adm-file:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.adm-checks { display: grid; gap: 4px; margin-bottom: 8px; }
.adm-check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.adm-check input { width: 22px; height: 22px; accent-color: var(--accent); }
.adm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

.adm-order { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.adm-order summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 14px; cursor: pointer; list-style: none; }
.adm-order summary::-webkit-details-marker { display: none; }
.adm-order summary:hover { background: #fbf7f0; }
.adm-o-num { font: 700 1.2rem var(--head); }
.adm-o-who { grid-column: 1 / -1; font-weight: 600; line-height: 1.3; }
.adm-o-who small { display: block; color: var(--muted); font-weight: 400; }
.adm-o-total { font: 700 1.3rem var(--head); text-align: right; grid-row: 1; grid-column: 2; }
.adm-order summary .adm-badge { justify-self: start; }
.adm-o-body { padding: 4px 14px 16px; border-top: 1px solid var(--line); }

@media (min-width: 900px) {
  .adm-toolbar { grid-template-columns: 1fr auto; }
  .adm-toolbar .select { max-width: 340px; }
  .adm-item { grid-template-columns: 64px 2fr 1fr .7fr 1.5fr auto; gap: 14px; }
  .adm-item .c-thumb { grid-row: auto; }
  .adm-item .adm-num, .adm-item .adm-badges, .adm-item .adm-row-actions { grid-column: auto; }
  .adm-item .adm-num { display: block; }
  .adm-lbl { display: block; margin: 0; }
  .adm-row-actions .btn { flex: none; }
  .adm-item.adm-cat { grid-template-columns: 48px 1fr auto; }
  .adm-cat-actions .btn { flex: none; }
  .adm-cat-actions .btn-move { flex: 0 0 48px; }
  .adm-order summary { grid-template-columns: 130px 1fr 130px 190px; }
  .adm-o-who { grid-column: auto; }
  .adm-o-total { grid-column: auto; grid-row: auto; }
  .adm-order summary .adm-badge { justify-self: end; }
  .adm-dialog form { padding: 26px 26px; }
}

/* ---------- Admin: ventas ---------- */
.adm-sales-toolbar { gap: 12px; }
.adm-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adm-filters .field { margin: 0; }
.sale-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
.sale-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); min-width: 0; }
.sale-card span { font-size: .85rem; color: var(--muted); font-weight: 700; }
.sale-card strong { font: 700 1.35rem/1.15 var(--head); overflow-wrap: anywhere; }
.sale-card small { color: var(--muted); font-size: .8rem; }
.adm-order.is-cancelled { opacity: .72; }
.adm-order summary .adm-badges { grid-column: 1 / -1; }
.b-chan { background: #efe3ea; color: var(--accent); }
.sale-add { margin: 12px 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 12px; }
.sale-add legend { padding: 0 6px; font-weight: 700; }
.sale-add .btn { width: 100%; }
.sale-lines li { grid-template-columns: 1fr auto auto; align-items: center; }
.sale-lines .sale-x { grid-column: 1 / -1; justify-self: end; min-height: 44px; padding: 0 14px; }
#panel-ventas .adm-toolbar-actions .btn { min-height: 48px; }
@media (min-width: 600px) {
  .sale-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .adm-filters { grid-template-columns: repeat(2, minmax(160px, 220px)); }
  .adm-order summary .adm-badges { grid-column: auto; justify-self: end; }
  .sale-lines li { grid-template-columns: 1fr auto auto auto; }
  .sale-lines .sale-x { grid-column: auto; }
}
#sale-dialog .order-total { margin-bottom: 16px; }
