/* =============================================================
   TIENDA ALPACA LINK — hoja única (index + privacidad)
   Mundo: el de la marca (rojo #BF1120, oliva #595646, Montserrat + Inter).
   La calidez la ponen las fotos y el texto; la interfaz se aparta.
   ============================================================= */

:root {
    /* color */
    --rojo: #BF1120;
    --rojo-hondo: #9E0E1A;
    --rojo-tinte: #FBEEEF;     /* fondo de lo elegido */
    --ladrillo: #A62C21;       /* rojo ladrillo de la paleta de marca: blanco encima 7.0:1 */
    --tinta: #262520;          /* titulares */
    --texto: #45433A;          /* cuerpo: 9.6:1 sobre blanco */
    --texto-suave: #66634F;    /* secundario: 5.9:1 sobre blanco, 5.2:1 sobre --fondo */
    --fondo: #F2F2F2;          /* neutro de marca */
    --superficie: #FFFFFF;
    --linea: #DEDDD7;
    --linea-fuerte: #B9B7AC;
    --verde: #15803D;          /* WhatsApp accesible: 5.0:1 con blanco */
    --verde-hondo: #116932;

    /* tipo */
    --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    --cuerpo: 'Inter', 'Segoe UI', system-ui, sans-serif;

    /* espacio (base 4) */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
    --gutter: clamp(16px, 4vw, 32px);

    /* forma y profundidad */
    --r-s: 10px; --r: 14px; --r-l: 22px;
    --sombra: 0 1px 2px rgba(38, 37, 32, .06), 0 10px 30px rgba(38, 37, 32, .10);

    /* capas (los <dialog> van en la capa superior del navegador) */
    --z-header: 10;
    --z-fab: 20;
    --z-toast: 30;
    --z-skip: 50;

    --ease: cubic-bezier(.16, 1, .3, 1); /* ease-out expo */
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(dialog[open]) { overflow: hidden; }
body {
    margin: 0;
    font-family: var(--cuerpo);
    font-size: 16px;
    line-height: 1.6;
    color: var(--texto);
    background: var(--fondo);
    accent-color: var(--rojo);
    caret-color: var(--rojo);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); color: var(--tinta); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
::selection { background: var(--rojo); color: #fff; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
    position: absolute; left: var(--s4); top: -100px; z-index: var(--z-skip);
    background: var(--tinta); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-s); text-decoration: none;
}
.skip:focus { top: var(--s3); }

/* ---------- botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    min-height: 52px; padding: 0 var(--s5);
    border: 0; border-radius: 999px;
    font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
    transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--primario { background: var(--rojo); color: #fff; }
.btn--primario:hover { background: var(--rojo-hondo); }
.btn--whatsapp { background: var(--verde); color: #fff; }
.btn--whatsapp:hover { background: var(--verde-hondo); }
.btn--suave { background: var(--superficie); color: var(--tinta); box-shadow: inset 0 0 0 1px var(--linea-fuerte); }
.btn--suave:hover { box-shadow: inset 0 0 0 2px var(--tinta); }
.btn--bloque { width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.link-button {
    background: none; border: 0; padding: 0 var(--s2); min-height: 44px; cursor: pointer;
    color: var(--texto-suave); text-decoration: underline; font-size: .9375rem;
}
.link-button:hover { color: var(--tinta); }

.icon-button {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--tinta);
}
.icon-button:hover { background: var(--fondo); }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: var(--z-header);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--linea);
}
@supports (backdrop-filter: blur(8px)) {
    .site-header { background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px) saturate(1.2); }
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { display: inline-flex; padding: var(--s1) 0; }
.brand img { height: 40px; width: auto; }
.cart-button {
    position: relative; display: inline-flex; align-items: center; gap: var(--s2);
    min-height: 44px; padding: 0 var(--s4) 0 var(--s3);
    border: 1px solid var(--linea); border-radius: 999px; background: var(--superficie);
    color: var(--tinta); font-weight: 600; font-size: .9375rem; cursor: pointer;
}
.cart-button:hover { border-color: var(--tinta); }
.count-badge {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: var(--rojo); color: #fff;
    font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.count-badge[hidden] { display: none; }
.count-badge.is-bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- hero ---------- */
.hero { background: var(--superficie); }
.hero__grid { display: grid; gap: var(--s4); padding-block: 0 var(--s5); }
.hero__photo { margin: 0 calc(var(--gutter) * -1); order: -1; }
.hero__photo img { width: 100%; aspect-ratio: 2 / 1; max-height: 40vh; object-fit: cover; object-position: 38% 40%; }
.hero__copy h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 700; letter-spacing: -.02em; max-width: 16ch; }
.hero__copy .acento { color: var(--rojo); }
.hero__copy p { margin-top: var(--s4); font-size: 1.0625rem; max-width: 46ch; color: var(--texto); }
.hero__copy h1 { max-width: 22ch; }
.hero__sub { display: block; margin-top: var(--s2); font-size: .6em; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--tinta); }

/* ---------- proyecto ---------- */
.proyecto { background: var(--fondo); padding-block: var(--s7); }
.proyecto h2 { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); font-weight: 700; letter-spacing: -.01em; }
.proyecto p { margin-top: var(--s3); max-width: 62ch; font-size: 1.0625rem; line-height: 1.6; color: var(--texto); text-wrap: pretty; }
.proyecto__link { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s3); color: var(--rojo-hondo); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.proyecto__link:hover { color: var(--tinta); }
@media (min-width: 900px) {
    .proyecto__grid { display: grid; grid-template-columns: 1fr 2.2fr; gap: var(--s8); align-items: start; }
    .proyecto p { margin-top: 0; }
}

@media (min-width: 900px) {
    .hero__grid { grid-template-columns: 1fr 1.2fr; align-items: center; gap: var(--s8); padding-block: var(--s7); }
    .hero__photo { order: 0; margin: 0; }
    .hero__photo img { aspect-ratio: 4 / 3; max-height: none; border-radius: var(--r-l); box-shadow: var(--sombra); }
    .hero__copy p { font-size: 1.125rem; }
}

/* ---------- colección ---------- */
.coleccion { padding-block: var(--s6) var(--s8); }
.coleccion__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); }
.coleccion__head h2 { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); font-weight: 700; letter-spacing: -.01em; }
.coleccion__count { color: var(--texto-suave); font-size: .9375rem; font-variant-numeric: tabular-nums; }

.filtros { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s4) 0 var(--s5); }
.filtro {
    min-height: 44px; padding: 0 var(--s4);
    border: 1px solid var(--linea-fuerte); border-radius: 999px; background: transparent;
    color: var(--tinta); font-weight: 500; font-size: .9375rem; cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.filtro:hover { border-color: var(--tinta); }
.filtro[aria-pressed="true"] { background: var(--rojo); border-color: var(--rojo); color: #fff; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s3); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s5); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid > li[hidden] { display: none; }

.card__link { display: flex; flex-direction: column; gap: var(--s1); text-decoration: none; color: inherit; border-radius: var(--r); }
.card__link:focus-visible { outline-offset: 4px; }
.card__media { display: block; overflow: hidden; border-radius: var(--r); background: #E9E7E1; margin-bottom: var(--s2); }
.card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s var(--ease); }
@media (hover: hover) {
    .card__link:hover .card__media img { transform: scale(1.035); }
    .card__link:hover .card__name { color: var(--rojo); }
}
.card__name { transition: color .2s var(--ease); }
.card__name { font-family: var(--display); font-weight: 600; font-size: clamp(.9375rem, .9rem + .2vw, 1.0625rem); color: var(--tinta); line-height: 1.3; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: .875rem; color: var(--texto-suave); }
.card__price { font-size: .875rem; color: var(--texto-suave); }
.card__price--valor { font-weight: 600; color: var(--tinta); font-size: 1rem; font-variant-numeric: tabular-nums; }
.dots { display: inline-flex; gap: 5px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(38, 37, 32, .22); }
.noscript { padding: var(--s5); background: var(--superficie); border-radius: var(--r); }

/* ---------- así se hace su pedido (zona de color) ---------- */
.como { background: var(--ladrillo); color: #fff; padding-block: var(--s8); }
.como h2 { color: #fff; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem); font-weight: 700; letter-spacing: -.015em; max-width: 14ch; }
.como__pasos { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; gap: var(--s5); counter-reset: paso; }
.como__pasos li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s4); align-items: center; counter-increment: paso; font-size: 1.0625rem; line-height: 1.5; text-wrap: pretty; }
.como__pasos li::before {
    content: counter(paso); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: #fff; color: var(--ladrillo); font-family: var(--display); font-weight: 700; font-size: 1.125rem;
}
.como__nota { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .9); font-size: .9375rem; }
@media (min-width: 900px) {
    .como__grid { display: grid; grid-template-columns: 1fr 2.2fr; gap: var(--s8); align-items: start; }
    .como__pasos { grid-template-columns: repeat(3, 1fr); margin-top: 0; gap: var(--s6); }
    .como__pasos li { grid-template-columns: 1fr; align-items: start; align-content: start; gap: var(--s3); }
}
.como ::selection { background: #fff; color: var(--ladrillo); }
.como :focus-visible { outline-color: #fff; }
.como__pago { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid rgba(255, 255, 255, .28); }
.como__pago h3 { color: #fff; font-size: 1.125rem; font-weight: 700; }
.como__pago ul { margin: var(--s3) 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); }
.como__pago li { padding: var(--s2) var(--s4); border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; color: #fff; font-size: .9375rem; }
.como__pago p { margin-top: var(--s3); color: #fff; font-size: .9375rem; }

/* ---------- hoja (producto y pedido) ---------- */
.sheet {
    border: 0; padding: 0; color: var(--texto); background: var(--superficie);
    width: 100%; max-width: 100%; max-height: 92dvh;
    margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0;
    box-shadow: 0 -10px 40px rgba(38, 37, 32, .18);
}
.sheet::backdrop { background: rgba(38, 37, 32, .5); }
.sheet[open] { animation: sube .42s var(--ease); }
.sheet[open]::backdrop { animation: aparece .3s ease-out; }
@keyframes sube { from { transform: translateY(100%); } }
@keyframes aparece { from { opacity: 0; } }
.sheet__inner { position: relative; display: flex; flex-direction: column; max-height: 92dvh; }

/* producto */
.producto { display: grid; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 96px; scrollbar-width: thin; scrollbar-color: var(--linea-fuerte) transparent; }
.producto__close { position: absolute; top: var(--s3); right: var(--s3); z-index: 2; background: rgba(255, 255, 255, .92); box-shadow: var(--sombra); }
.producto__media { background: #E9E7E1; }
.producto__media img { width: 100%; aspect-ratio: 4 / 5; max-height: 52dvh; object-fit: cover; }
.producto__info { padding: var(--s5) var(--gutter) var(--s4); display: grid; gap: var(--s5); align-content: start; }
.producto__title h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); font-weight: 700; letter-spacing: -.01em; }
.producto__title p { margin-top: var(--s2); }
.producto__price { margin-top: var(--s3); font-weight: 600; color: var(--tinta); font-variant-numeric: tabular-nums; }
.producto__price--consulta { font-weight: 500; color: var(--texto-suave); }

.opcion { border: 0; margin: 0; padding: 0; min-width: 0; }
.opcion legend { padding: 0; margin-bottom: var(--s2); font-weight: 600; color: var(--tinta); font-size: .9375rem; }
.opcion legend span { font-weight: 400; color: var(--texto-suave); }
.opcion__list { display: flex; flex-wrap: wrap; gap: var(--s2); }
.opcion__nota { margin-top: var(--s2); font-size: .8125rem; color: var(--texto-suave); }
.opcion__error { margin-top: var(--s2); font-size: .875rem; font-weight: 500; color: var(--rojo); }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip > span {
    display: inline-flex; align-items: center; gap: var(--s2);
    min-height: 44px; min-width: 52px; justify-content: center; padding: 0 var(--s4);
    border-radius: 999px; box-shadow: inset 0 0 0 1px var(--linea-fuerte);
    font-weight: 500; font-size: .9375rem; color: var(--tinta); background: var(--superficie);
    transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.chip input:hover + span { box-shadow: inset 0 0 0 1px var(--tinta); }
.chip > span:has(.dot) { padding-left: var(--s3); }
.chip input:checked + span { box-shadow: inset 0 0 0 2px var(--rojo); background: var(--rojo-tinte); color: var(--rojo-hondo); }
.chip input:focus-visible + span { outline: 3px solid var(--rojo); outline-offset: 2px; }
.chip .dot { width: 18px; height: 18px; }
.talla-unica { font-size: .9375rem; }

.guia { border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.guia summary {
    display: flex; align-items: center; gap: var(--s2); min-height: 48px; cursor: pointer;
    list-style: none; font-weight: 600; color: var(--tinta); font-size: .9375rem;
}
.guia summary::-webkit-details-marker { display: none; }
.guia summary .icon:last-child { margin-left: auto; transition: transform .25s var(--ease); }
.guia[open] summary .icon:last-child { transform: rotate(180deg); }
.guia__cuerpo { padding-bottom: var(--s4); }
.guia table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.guia th, .guia td { padding: var(--s2) var(--s2); text-align: center; border-bottom: 1px solid var(--linea); }
.guia thead th { font-weight: 600; color: var(--tinta); }
.guia tbody th { text-align: left; font-weight: 400; color: var(--texto); padding-left: 0; }
.guia__nota { margin-top: var(--s3); font-size: .8125rem; color: var(--texto-suave); }

.ficha { display: grid; gap: var(--s3); margin: 0; font-size: .9375rem; }
.ficha div { display: grid; gap: 2px; }
.ficha dt { font-weight: 600; color: var(--tinta); }
.ficha dd { margin: 0; }

.producto__acciones {
    position: sticky; bottom: 0; z-index: 1;
    display: flex; gap: var(--s3); align-items: center;
    padding: var(--s3) var(--gutter) calc(var(--s3) + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--linea);
}
.producto__acciones .btn { flex: 1; padding-inline: var(--s4); white-space: nowrap; }
.nota-pedido { font-size: .875rem; color: var(--texto-suave); }

.stepper { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--linea-fuerte); background: var(--superficie); }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 50%; cursor: pointer; color: var(--tinta); }
.stepper button:hover:not(:disabled) { background: var(--fondo); }
.stepper button:disabled { color: var(--linea-fuerte); cursor: default; }
.stepper output { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tinta); }
.stepper .icon { width: 18px; height: 18px; }

@media (min-width: 900px) {
    .sheet:not(.sheet--drawer) {
        width: min(1000px, 94vw); height: min(720px, 90dvh); max-height: none; margin: auto;
        border-radius: var(--r-l); box-shadow: 0 30px 80px rgba(38, 37, 32, .28);
    }
    .sheet:not(.sheet--drawer)[open] { animation: acerca .4s var(--ease); }
    .sheet:not(.sheet--drawer) .sheet__inner { height: 100%; max-height: none; }
    .producto { grid-template-columns: 1fr 1fr; grid-template-rows: 100%; overflow: hidden; }
    .producto__media { position: relative; }
    .producto__media img { height: 100%; max-height: none; aspect-ratio: auto; }
    .producto__scroll { overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 96px; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--linea-fuerte) transparent; }
    .producto__info { padding: var(--s7) var(--s6) var(--s5); }
    .producto__acciones { padding-inline: var(--s6); }
}
@keyframes acerca { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* pedido */
.sheet--drawer .sheet__inner { min-height: 0; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--gutter) var(--s3); border-bottom: 1px solid var(--linea); }
.drawer__head h2 { font-size: 1.25rem; font-weight: 700; }
.drawer__body { overflow-y: auto; overscroll-behavior: contain; padding: var(--s4) var(--gutter) calc(var(--s5) + env(safe-area-inset-bottom)); display: grid; gap: var(--s5); align-content: start; scrollbar-width: thin; scrollbar-color: var(--linea-fuerte) transparent; }
@media (min-width: 900px) {
    .sheet--drawer {
        width: 440px; max-width: 100vw; height: 100dvh; max-height: 100dvh;
        margin: 0 0 0 auto; border-radius: var(--r-l) 0 0 var(--r-l);
        box-shadow: -20px 0 60px rgba(38, 37, 32, .2);
    }
    .sheet--drawer[open] { animation: entra .42s var(--ease); }
    .sheet--drawer .sheet__inner { height: 100%; max-height: none; }
    .drawer__head, .drawer__body { padding-inline: var(--s5); }
}
@keyframes entra { from { transform: translateX(100%); } }

.vacio { display: grid; gap: var(--s4); justify-items: start; padding-block: var(--s4); }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.item { display: grid; grid-template-columns: 72px 1fr; gap: var(--s3); }
.item img { width: 72px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-s); background: #E9E7E1; }
.item__nombre { font-family: var(--display); font-weight: 600; color: var(--tinta); font-size: .9375rem; line-height: 1.3; }
.item__detalle { font-size: .875rem; color: var(--texto-suave); }
.item__fila { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s2); }
.item__precio { font-weight: 600; color: var(--tinta); font-variant-numeric: tabular-nums; font-size: .9375rem; }

.resumen { display: flex; justify-content: space-between; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--linea); font-size: .9375rem; }
.resumen strong { color: var(--tinta); font-variant-numeric: tabular-nums; }

.pasos { padding: var(--s4); display: grid; gap: var(--s2); background: #F7F6F2; border-radius: var(--r); font-size: .9375rem; }
.pasos h3 { font-size: .9375rem; font-weight: 700; font-family: var(--cuerpo); }
.pasos ol { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); counter-reset: paso; }
.pasos li { display: grid; grid-template-columns: 24px 1fr; gap: var(--s2); counter-increment: paso; }
.pasos li::before { content: counter(paso); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--rojo); font-size: .75rem; font-weight: 700; color: #fff; }
.pasos__horario { font-size: .8125rem; color: var(--texto-suave); margin-top: var(--s1); }

.acciones-pedido { display: grid; gap: var(--s2); }
.acciones-pedido--fija {
    position: sticky; bottom: calc((var(--s5) + env(safe-area-inset-bottom)) * -1); z-index: 1;
    margin-inline: calc(var(--gutter) * -1); padding: var(--s3) var(--gutter) calc(var(--s5) + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--linea);
}
@media (min-width: 900px) { .acciones-pedido--fija { margin-inline: calc(var(--s5) * -1); padding-inline: var(--s5); } }
#cart-titulo:focus { outline: none; }
.confirmacion { display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--r); background: #EEF7F1; }
.confirmacion:focus { outline: none; }
.confirmacion p { color: var(--tinta); }
.confirmacion__fila { display: flex; flex-wrap: wrap; gap: var(--s2); }
.confirmar-vaciar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: .9375rem; }

/* ---------- botón flotante ---------- */
.fab {
    position: fixed; right: max(var(--s4), env(safe-area-inset-right)); bottom: calc(var(--s4) + env(safe-area-inset-bottom)); z-index: var(--z-fab);
    display: inline-flex; align-items: center; gap: var(--s2);
    min-width: 56px; height: 56px; padding: 0 17px; border-radius: 999px;
    background: var(--verde); color: #fff; text-decoration: none; font-weight: 600;
    box-shadow: 0 6px 20px rgba(21, 128, 61, .35);
    transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.fab:hover { background: var(--verde-hondo); }
.fab--pedido { background: var(--tinta); box-shadow: 0 6px 20px rgba(38, 37, 32, .3); }
.fab--pedido:hover { background: #000; }
.fab .icon { width: 24px; height: 24px; }
.fab__label:empty { display: none; }

/* ---------- aviso ---------- */
.toast {
    position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: var(--z-toast);
    width: max-content; max-width: calc(100vw - 32px);
    display: flex; align-items: center; gap: var(--s3);
    padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: 999px;
    background: var(--tinta); color: #fff; font-size: .9375rem; box-shadow: var(--sombra);
    opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 12px);
    transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s linear .35s;
}
.toast.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); transition-delay: 0s; }
.toast:empty { display: none; }
.toast .btn { min-height: 40px; padding: 0 var(--s4); background: #fff; color: var(--tinta); font-size: .875rem; white-space: nowrap; flex: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--superficie); border-top: 1px solid var(--linea); padding-block: var(--s7); font-size: .9375rem; }
body:has(.fab) .site-footer { padding-bottom: calc(var(--s7) + 72px + env(safe-area-inset-bottom)); } /* aire para el botón flotante */
.site-footer__grid { display: grid; gap: var(--s5); }
.site-footer__grid img { height: 40px; width: auto; margin-bottom: var(--s3); }
.site-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-footer__contact a { display: inline-block; padding-block: 2px; }
.site-footer__legal { color: var(--texto-suave); font-size: .875rem; }
@media (min-width: 900px) {
    .site-footer__grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
    .site-footer__legal { grid-column: 1 / -1; padding-top: var(--s5); border-top: 1px solid var(--linea); }
}

/* ---------- páginas legales ---------- */
.legal { background: var(--superficie); padding-block: var(--s7) var(--s8); }
.legal__cuerpo { max-width: 38rem; }
.legal h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; }
.legal .fecha { margin-top: var(--s2); color: var(--texto-suave); font-size: .9375rem; }
.legal section { margin-top: var(--s6); }
.legal h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--s2); }
.legal p + p { margin-top: var(--s3); }
.legal ul { margin: var(--s2) 0 0; padding-left: 1.25rem; display: grid; gap: var(--s2); }
.legal a { color: var(--rojo); }
.volver { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border-radius: 999px; border: 1px solid var(--linea); font-weight: 600; font-size: .9375rem; text-decoration: none; color: var(--tinta); white-space: nowrap; }
.volver:hover { border-color: var(--tinta); }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.como__pago + .como__nota { margin-top: var(--s4); padding-top: 0; border-top: 0; }
