/* ============================================================
   SEÑORA MAMADERA — tienda pública
   Sistema "sticker": el mundo del logo (mamadera kawaii, lunares
   pastel, contornos gruesos) llevado a toda la página.
   Tipos: Baloo 2 (display) + Rubik (texto).
   ============================================================ */

:root {
    /* Superficies */
    --leche: #FFFDF8;          /* fondo general, blanco leche */
    --nube: #FFEFF5;           /* rosa suave para superficies */
    --paper: #FFFFFF;

    /* Tinta — contorno oscuro del logo */
    --tinta: #2E2433;
    --tinta-suave: #786B7E;

    /* Colores del logo */
    --frambuesa: #D93A78;      /* rosa profundo — acción principal */
    --chicle: #F9A8CC;         /* rosa chicle — acentos suaves */
    --cielo: #56B8E6;          /* celeste — foco e info */
    --sol: #FFC93C;            /* amarillo — badges */
    --sol-suave: #FFE9A8;

    /* Funcionales */
    --wa: #40D470;             /* verde WhatsApp (con texto tinta) */
    --rojo: #D64545;

    /* Sistema sticker */
    --borde: 2px solid var(--tinta);
    --sombra-sticker: 6px 6px 0 rgba(46, 36, 51, 0.10);
    --sombra-boton: 0 4px 0 var(--tinta);
    --radius: 18px;
    --radius-chip: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Rubik', system-ui, sans-serif;
    color: var(--tinta);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-color: var(--leche);
    /* lunares pastel del logo, casi imperceptibles */
    background-image:
        radial-gradient(rgba(249, 168, 204, 0.20) 2.2px, transparent 2.8px),
        radial-gradient(rgba(86, 184, 230, 0.14) 2.2px, transparent 2.8px);
    background-size: 104px 104px;
    background-position: 0 0, 52px 52px;
}

img { max-width: 100%; display: block; }
a { color: var(--frambuesa); }

:focus-visible {
    outline: 3px solid var(--cielo);
    outline-offset: 2px;
    border-radius: 6px;
}

.search-hidden { display: none !important; }

/* ============ TOPBAR ============ */
.topbar {
    position: sticky;
    top: 0;
    background: var(--leche);
    border-bottom: var(--borde);
    z-index: 60;
}
.topbar-inner {
    max-width: 1300px;
    margin: 0 auto;
    height: 78px;
    padding: 0 14px;
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    align-items: center;
    gap: 8px;
}
.topbar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
}
.topbar-logo img {
    max-height: 62px;
    width: auto;
    object-fit: contain;
    display: block;
}
.topbar-cart,
.topbar-toggle {
    width: 52px;
    height: 52px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tinta);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
}

/* La mamadera-carrito: se llena a medida que sumás productos */
.topbar-cart .bottle { width: 30px; height: 41px; overflow: visible; }
.bottle-milk {
    transform: translateY(calc((1 - var(--milk, 0)) * 25px));
    transition: transform 0.6s cubic-bezier(.34, 1.56, .5, 1);
}
.topbar-cart.bump .bottle { animation: bottle-bump 0.5s ease; }
@keyframes bottle-bump {
    0%   { transform: rotate(0); }
    30%  { transform: rotate(-9deg) scale(1.08); }
    60%  { transform: rotate(7deg); }
    100% { transform: rotate(0); }
}
.topbar-cart .cart-count {
    position: absolute;
    top: 2px;
    right: 0;
    background: var(--sol);
    color: var(--tinta);
    border: var(--borde);
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.topbar-toggle { flex-direction: column; gap: 5px; margin-left: auto; }
.topbar-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    border-radius: 2px;
    background: var(--tinta);
    transition: transform 0.2s ease, opacity 0.15s ease;
}
.topbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.topbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.topbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (min-width: 861px) {
    .topbar-toggle { display: none; }
    .topbar-inner { grid-template-columns: 1fr auto 1fr; }
    .topbar-cart { justify-self: end; }
    .topbar-logo { justify-self: center; }
}
@media (max-width: 600px) {
    .topbar-inner { height: 66px; padding: 0 10px; }
    .topbar-logo img { max-height: 50px; }
}

/* ============ NAV DE CATEGORÍAS ============ */
.main-nav {
    position: sticky;
    top: 80px;
    background: var(--leche);
    border-bottom: 1px solid rgba(46, 36, 51, 0.10);
    z-index: 50;
}
.main-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 6px;
    padding: 0 16px;
}

.nav-group { position: relative; }
.nav-direct {
    display: inline-flex;
    align-items: center;
    padding: 14px 16px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    color: var(--tinta);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.nav-direct:hover,
.nav-direct:active { color: var(--frambuesa); }
.nav-group-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 14px 16px;
    background: none;
    border: none;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    color: var(--tinta);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.nav-group-btn:hover,
.nav-group-btn[aria-expanded="true"] { color: var(--frambuesa); }
.nav-caret { width: 11px; height: 7px; transition: transform 0.2s ease; }
.nav-group-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: calc(100% - 4px);
    left: 50%;
    translate: -50% 0;
    min-width: 230px;
    background: var(--paper);
    border: var(--borde);
    border-radius: 14px;
    box-shadow: var(--sombra-sticker);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s linear 0.15s;
    z-index: 60;
}
.nav-group[data-open] .nav-dropdown,
.nav-group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s;
}
.nav-dropdown a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--tinta);
    font-size: 14.5px;
    font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease;
}
.nav-dropdown a:hover {
    background: var(--nube);
    color: var(--frambuesa);
}

@media (max-width: 860px) {
    .main-nav { top: 66px; border-bottom: none; }
    .main-nav-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: var(--leche);
    }
    .main-nav.open .main-nav-inner {
        max-height: calc(100vh - 66px);
        overflow-y: auto;
        border-bottom: var(--borde);
    }
    .nav-group { width: 100%; }
    .nav-group-btn,
    .nav-direct {
        width: 100%;
        justify-content: space-between;
        padding: 15px 22px;
        border-bottom: 1px solid rgba(46, 36, 51, 0.08);
    }
    .nav-dropdown {
        position: static;
        translate: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        background: var(--nube);
        max-height: 0;
        overflow: hidden;
        min-width: 0;
    }
    .nav-group[data-open] .nav-dropdown {
        max-height: 600px;
        padding: 6px 0 10px;
    }
    .nav-group:hover .nav-dropdown {
        max-height: 0;
        padding: 0;
    }
    .nav-group[data-open]:hover .nav-dropdown {
        max-height: 600px;
        padding: 6px 0 10px;
    }
    .nav-dropdown a { padding: 12px 34px; border-radius: 0; }
}

/* ============ HERO — video entero, acotado ============ */
.hero {
    padding: 26px 16px 8px;
    display: flex;
    justify-content: center;
}
.hero-frame {
    width: fit-content;
    max-width: min(860px, 100%);
    border: var(--borde);
    border-radius: 22px;
    overflow: hidden;
    background: var(--nube);
    box-shadow: var(--sombra-sticker);
    line-height: 0;
}
.hero-video {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: min(62vh, 520px);
    object-fit: contain;
}
@media (max-width: 600px) {
    .hero { padding: 16px 12px 4px; }
    .hero-frame { border-radius: 16px; }
    .hero-video { max-height: 56vh; }
}

/* ============ TIRA INFORMATIVA (marquesina) ============ */
.promo-strip { padding: 18px 0 6px; }
.promo-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.promo-marquee:hover .promo-track { animation-play-state: paused; }
.promo-track {
    display: flex;
    width: max-content;
    animation: promo-run 22s linear infinite;
}
@keyframes promo-run {
    to { transform: translateX(-25%); }
}
.promo-group {
    display: flex;
    flex: none;
    gap: 12px;
    padding-right: 12px;
    padding-bottom: 4px;
}
.promo-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--paper);
    border: var(--borde);
    border-radius: var(--radius-chip);
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--tinta);
    box-shadow: 3px 3px 0 rgba(46, 36, 51, 0.08);
    white-space: nowrap;
    flex: none;
}
.promo-chip svg { width: 17px; height: 17px; flex: none; color: var(--frambuesa); }
.promo-chip:nth-child(2) svg { color: var(--cielo); }
.promo-chip:nth-child(3) svg { color: var(--sol); }
@media (max-width: 600px) {
    .promo-track { animation-duration: 16s; }
}

/* ============ CABECERA DE TIENDA + BÚSQUEDA ============ */
.page-head { padding: 26px 24px 4px; }
.page-head-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.page-title {
    margin: 0;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    color: var(--tinta);
    line-height: 1.1;
}
.page-title::after {
    content: '';
    display: block;
    width: 58px;
    height: 5px;
    border-radius: 3px;
    background: var(--chicle);
    margin-top: 4px;
}

.page-search {
    flex: 1;
    min-width: 240px;
    max-width: 440px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper);
    border: var(--borde);
    border-radius: var(--radius-chip);
    padding: 11px 18px;
    box-shadow: 3px 3px 0 rgba(46, 36, 51, 0.08);
    transition: box-shadow 0.15s ease;
}
.page-search:focus-within { box-shadow: 3px 3px 0 var(--cielo); }
.page-search-icon { width: 18px; height: 18px; color: var(--tinta-suave); flex: none; }
.page-search input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--tinta);
    outline: none;
}
.page-search input::placeholder { color: var(--tinta-suave); }
.page-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: none;
    color: var(--tinta-suave);
    cursor: pointer;
    flex: none;
    padding: 0;
}
.page-search-clear svg { width: 15px; height: 15px; }
.page-search-clear:hover { color: var(--frambuesa); }

@media (max-width: 600px) {
    .page-head { padding: 18px 16px 0; }
    .page-head-inner { gap: 12px; }
    .page-search { max-width: none; }
}

/* ============ CATÁLOGO ============ */
.catalog {
    max-width: 1300px;
    margin: 0 auto;
    padding: 34px 24px 110px;
}
.category { margin-bottom: 64px; scroll-margin-top: 150px; }
.category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    flex-wrap: wrap;
    margin: 0 0 20px;
}
.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: clamp(23px, 3vw, 30px);
    font-weight: 700;
    color: var(--tinta);
    margin: 0;
    line-height: 1.15;
}
.category-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.carousel-btn {
    width: 38px;
    height: 38px;
    background: var(--paper);
    border: var(--borde);
    border-radius: 50%;
    box-shadow: 0 3px 0 var(--tinta);
    color: var(--tinta);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn:hover { background: var(--nube); }
.carousel-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--tinta); }
.category.expanded .carousel-btn,
.category.no-overflow .carousel-btn { display: none; }
@media (max-width: 860px) {
    .carousel-btn { display: none; }
}
.category-toggle {
    background: var(--sol);
    color: var(--tinta);
    border: var(--borde);
    border-radius: var(--radius-chip);
    box-shadow: 0 3px 0 var(--tinta);
    padding: 8px 18px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.category-toggle:hover { background: #FFD968; }
.category-toggle:active { transform: translateY(3px); box-shadow: 0 0 0 var(--tinta); }
.category-title::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--chicle);
    border: var(--borde);
    flex: none;
}
.category-count {
    font-size: 13px;
    font-weight: 600;
    font-family: 'Rubik', sans-serif;
    color: var(--tinta-suave);
    background: var(--nube);
    border-radius: var(--radius-chip);
    padding: 3px 11px;
    align-self: center;
}

/* Carrusel horizontal por categoría; .expanded lo despliega en grilla */
.grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 248px;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 16px;
    margin: -4px -4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--chicle) transparent;
}
.grid::-webkit-scrollbar { height: 8px; }
.grid::-webkit-scrollbar-thumb { background: var(--chicle); border-radius: 4px; }
.grid::-webkit-scrollbar-track { background: transparent; }
.grid .card { scroll-snap-align: start; }
.category.expanded .grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    overflow: visible;
    scroll-snap-type: none;
}
@media (max-width: 600px) {
    .grid { grid-auto-columns: min(64vw, 220px); gap: 12px; padding-bottom: 12px; }
    .category.expanded .grid { grid-template-columns: repeat(2, 1fr); }
    .catalog { padding: 26px 14px 96px; }
    .category { margin-bottom: 48px; }
}

/* ============ TARJETA DE PRODUCTO (sticker) ============ */
.card {
    background: var(--paper);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: var(--borde);
    border-radius: var(--radius);
    box-shadow: 5px 5px 0 rgba(46, 36, 51, 0.08);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s cubic-bezier(.2, .7, .3, 1.3), box-shadow 0.25s ease;
}
.card:hover {
    transform: translate(-2px, -3px);
    box-shadow: 8px 9px 0 rgba(46, 36, 51, 0.12);
}

.card-image {
    aspect-ratio: 1 / 1;
    background: var(--nube);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: var(--borde);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s cubic-bezier(.2, .7, .3, 1);
}
.card:hover .card-image img { transform: scale(1.05); }
.card-image .no-image {
    font-size: 52px;
    opacity: 0.5;
    filter: grayscale(0.2);
}

.card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--frambuesa);
    margin: 0 0 4px;
}
.card-title {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.22;
    color: var(--tinta);
    margin: 0 0 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.44em;
}
.card-unit {
    font-size: 13px;
    color: var(--tinta-suave);
    margin: 0 0 10px;
}
.card-price {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--tinta);
    margin: 0 0 14px;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-variant-numeric: tabular-nums;
}
.card-price .currency {
    font-size: 16px;
    font-weight: 700;
    color: var(--frambuesa);
}
.card-price.is-empty {
    font-family: 'Rubik', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tinta-suave);
}

/* Botón de juguete: se hunde al presionar */
.card-add {
    margin-top: auto;
    background: var(--frambuesa);
    color: #fff;
    border: var(--borde);
    border-radius: var(--radius-chip);
    box-shadow: 0 3px 0 var(--tinta);
    padding: 10px 16px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.card-add:hover { background: #C22B66; }
.card-add:active { transform: translateY(3px); box-shadow: 0 0 0 var(--tinta); }
.card-add .arrow { display: none; }

@media (max-width: 540px) {
    .card { border-radius: 14px; }
    .card-body { padding: 11px 12px 13px; }
    .card-title { font-size: 15.5px; }
    .card-unit { font-size: 12px; margin-bottom: 8px; }
    .card-price { font-size: 20px; margin-bottom: 11px; }
    .card-price .currency { font-size: 13px; }
    .card-eyebrow { font-size: 10px; }
    .card-add { padding: 9px 12px; font-size: 14px; }
    .card-add-rest { display: none; }
    .card-image .no-image { font-size: 40px; }
}

.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--tinta-suave);
}
.empty-state h2 {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    color: var(--tinta);
    margin: 0 0 6px;
}

/* ============ MODAL DE PRODUCTO ============ */
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.product-modal.open { display: flex; }
.product-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(46, 36, 51, 0.55);
}
.product-modal-panel {
    position: relative;
    background: var(--paper);
    border: var(--borde);
    border-radius: 22px;
    width: min(860px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 10px 10px 0 rgba(46, 36, 51, 0.18);
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.product-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    background: var(--paper);
    border: var(--borde);
    border-radius: 50%;
    font-size: 22px;
    color: var(--tinta);
    cursor: pointer;
    z-index: 3;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.product-modal-close:hover { background: var(--nube); }
.product-modal-image {
    background: var(--nube);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: var(--borde);
}
.product-modal-image img { width: 100%; height: 100%; object-fit: cover; }
.product-modal-image .no-image { font-size: 80px; opacity: 0.45; }
.product-modal-body {
    padding: 46px 34px 32px;
    display: flex;
    flex-direction: column;
}
.product-modal-title {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 27px;
    font-weight: 700;
    color: var(--tinta);
    margin: 0 0 6px;
    line-height: 1.15;
}
.product-modal-price {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--frambuesa);
    margin: 0 0 2px;
    line-height: 1.1;
}
.product-modal-unit {
    color: var(--tinta-suave);
    font-size: 14px;
    margin: 0 0 14px;
}
.product-modal-divider {
    height: 2px;
    border-radius: 1px;
    background: var(--nube);
    margin: 0 0 14px;
}
.product-modal-desc {
    color: var(--tinta);
    font-size: 15px;
    margin: 0 0 20px;
    white-space: pre-line;
}
.product-modal-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--paper);
    border: var(--borde);
    border-radius: var(--radius-chip);
    padding: 4px;
}
.qty-stepper button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--nube);
    color: var(--tinta);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.12s ease;
}
.qty-stepper button:hover { background: var(--chicle); }
.qty-stepper .num {
    min-width: 28px;
    text-align: center;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 17px;
}
.product-modal-add {
    flex: 1;
    min-width: 180px;
    background: var(--frambuesa);
    color: #fff;
    border: var(--borde);
    border-radius: var(--radius-chip);
    box-shadow: 0 4px 0 var(--tinta);
    padding: 13px 22px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.product-modal-add:hover { background: #C22B66; }
.product-modal-add:active { transform: translateY(4px); box-shadow: 0 0 0 var(--tinta); }
.product-modal-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--tinta-suave);
}

@media (max-width: 720px) {
    .product-modal { padding: 12px; }
    .product-modal-panel { grid-template-columns: 1fr; max-height: 92vh; }
    .product-modal-image { border-right: none; border-bottom: var(--borde); aspect-ratio: 4 / 3; }
    .product-modal-body { padding: 20px 20px 22px; }
    .product-modal-title { font-size: 22px; }
    .product-modal-price { font-size: 26px; }
}

/* ============ BOTONES GENERALES ============ */
.btn-primary {
    background: var(--wa);
    color: var(--tinta);
    border: var(--borde);
    border-radius: var(--radius-chip);
    box-shadow: 0 4px 0 var(--tinta);
    padding: 14px 22px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.btn-primary:hover { background: #2FC562; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 0 0 var(--tinta); }
.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 0 var(--tinta);
}
.btn-primary.full { width: 100%; }

.btn-link {
    background: none;
    border: none;
    color: var(--tinta-suave);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px;
}
.btn-link:hover { color: var(--rojo); }

.icon-btn {
    width: 36px;
    height: 36px;
    background: var(--paper);
    border: var(--borde);
    border-radius: 50%;
    color: var(--tinta);
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--nube); }

/* ============ CARRITO (drawer) ============ */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 130;
    pointer-events: none;
}
.cart-drawer.open { pointer-events: auto; }
.cart-overlay {
    position: absolute;
    inset: 0;
    background: rgba(46, 36, 51, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.cart-drawer.open .cart-overlay { opacity: 1; }
.cart-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 94vw);
    background: var(--leche);
    border-left: var(--borde);
    display: flex;
    flex-direction: column;
    transform: translateX(102%);
    transition: transform 0.3s cubic-bezier(.2, .7, .3, 1);
}
.cart-drawer.open .cart-panel { transform: translateX(0); }
.cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: var(--borde);
    background: var(--nube);
}
.cart-head h2 {
    margin: 0;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--tinta);
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}
.cart-empty {
    text-align: center;
    color: var(--tinta-suave);
    padding: 40px 10px;
}
.cart-empty .small { font-size: 13px; }
.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    background: var(--paper);
    border: var(--borde);
    border-radius: 14px;
    box-shadow: 3px 3px 0 rgba(46, 36, 51, 0.08);
    padding: 12px 14px;
    margin-bottom: 12px;
}
.cart-item .name {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 15.5px;
    color: var(--tinta);
    line-height: 1.25;
}
.cart-item .meta { font-size: 12.5px; color: var(--tinta-suave); grid-column: 1; }
.cart-item .line-price {
    grid-column: 2;
    grid-row: 1;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: var(--tinta);
    justify-self: end;
    font-variant-numeric: tabular-nums;
}
.cart-item .line-price em { font-style: normal; font-size: 12.5px; color: var(--tinta-suave); font-weight: 500; }
.cart-item .qty {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.qty button {
    width: 28px;
    height: 28px;
    border: var(--borde);
    border-radius: 50%;
    background: var(--paper);
    color: var(--tinta);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.12s ease;
}
.qty button:hover { background: var(--chicle); }
.qty .num {
    min-width: 24px;
    text-align: center;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-weight: 700;
}
.cart-item .remove {
    grid-column: 2;
    align-self: end;
    justify-self: end;
    background: none;
    border: none;
    color: var(--tinta-suave);
    font-size: 12.5px;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 0;
}
.cart-item .remove:hover { color: var(--rojo); }

.cart-foot {
    border-top: var(--borde);
    background: var(--paper);
    padding: 16px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 15px;
    color: var(--tinta-suave);
}
.cart-total strong {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--tinta);
    font-variant-numeric: tabular-nums;
}

/* ============ MODAL DE CHECKOUT ============ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal.open { display: flex; }
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(46, 36, 51, 0.55);
}
.modal-panel {
    position: relative;
    background: var(--leche);
    border: var(--borde);
    border-radius: 22px;
    box-shadow: 10px 10px 0 rgba(46, 36, 51, 0.18);
    width: min(480px, 100%);
    max-height: 92vh;
    overflow-y: auto;
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: var(--borde);
    background: var(--nube);
    border-radius: 20px 20px 0 0;
}
.modal-head h2 {
    margin: 0;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 21px;
    font-weight: 800;
    color: var(--tinta);
}
#checkout-form {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
#checkout-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tinta);
}
#checkout-form input,
#checkout-form textarea {
    font: inherit;
    font-size: 15px;
    color: var(--tinta);
    background: var(--paper);
    border: 2px solid rgba(46, 36, 51, 0.25);
    border-radius: 12px;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#checkout-form input:focus,
#checkout-form textarea:focus {
    border-color: var(--cielo);
    box-shadow: 0 0 0 3px rgba(86, 184, 230, 0.25);
}
#checkout-form textarea { resize: vertical; }
#checkout-form fieldset {
    border: 2px solid rgba(46, 36, 51, 0.18);
    border-radius: 14px;
    padding: 10px 14px 12px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#checkout-form fieldset legend {
    padding: 0 8px;
    font-weight: 700;
    font-size: 13px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    color: var(--tinta);
}
.radio {
    flex-direction: row !important;
    align-items: center;
    font-weight: 400 !important;
    padding: 4px 0;
    gap: 9px !important;
    font-size: 14.5px !important;
}
.radio input { accent-color: var(--frambuesa); width: 17px; height: 17px; }
.form-error {
    margin: 0;
    background: #FDECEC;
    border: 2px solid var(--rojo);
    border-radius: 12px;
    color: #A32B2B;
    font-size: 14px;
    padding: 10px 14px;
}
.muted { color: var(--tinta-suave); }
.muted.small { font-size: 12.5px; margin: 0; text-align: center; }

/* ============ FOOTER ============ */
.site-footer {
    background: var(--tinta);
    color: #EFE7F0;
    margin-top: 30px;
    border-top: var(--borde);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 52px 24px 26px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr 1fr;
    gap: 36px;
    align-items: start;
}
.footer-col--brand {
    text-align: center;
    order: 0;
}
.footer-title {
    margin: 0 0 14px;
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}
.footer-title::after {
    content: '';
    display: block;
    width: 34px;
    height: 4px;
    border-radius: 2px;
    background: var(--chicle);
    margin-top: 6px;
}
.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    line-height: 1.45;
    color: #D9CFE0;
}
.footer-bullet { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--chicle); }
.footer-list a {
    color: #fff;
    text-decoration: none;
}
.footer-list a:hover { color: var(--chicle); text-decoration: underline; }
.footer-meta {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: #A99BB3;
}
.footer-logo { display: inline-block; }
.footer-logo img {
    width: 130px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50%;
    border: 3px solid var(--chicle);
    padding: 4px;
}
.footer-tagline {
    margin: 14px auto 16px;
    font-size: 14px;
    color: #D9CFE0;
    max-width: 240px;
}
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.footer-socials a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #fff;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.footer-socials a svg { width: 17px; height: 17px; }
.footer-socials a:hover {
    background: var(--chicle);
    border-color: var(--chicle);
    color: var(--tinta);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #A99BB3;
}
.footer-admin {
    color: #A99BB3;
    text-decoration: none;
}
.footer-admin:hover { color: var(--chicle); text-decoration: underline; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-col--brand { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 540px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-inner { padding: 40px 20px 22px; }
    .footer-bottom { justify-content: center; text-align: center; }
}

/* ============ CRÉDITO ECOSOFT ============ */
.ecosoft-section {
    background: #241B29;
    text-align: center;
    padding: 22px 16px 26px;
}
.ecosoft-label {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8E7F99;
}
.ecosoft-label span {
    opacity: 0;
    display: inline-block;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.ecosoft-label span.show { opacity: 1; transform: translateY(0); }
.ecosoft-link {
    display: inline-block;
    position: relative;
    text-decoration: none;
}
.ecosoft-text {
    font-family: 'Baloo 2', 'Rubik', sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 1px;
}
.ecosoft-bolt { width: 16px; height: 16px; }
.ecosoft-underline {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    border-radius: 1px;
    background: var(--sol);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.ecosoft-link:hover .ecosoft-underline { transform: scaleX(1); }

/* ============ FLOTANTES ============ */
.back-to-top {
    position: absolute;
    right: 22px;
    top: -24px;
    width: 46px;
    height: 46px;
    background: var(--sol);
    border: var(--borde);
    border-radius: 50%;
    box-shadow: 0 4px 0 var(--tinta);
    color: var(--tinta);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.back-to-top:active { transform: translateY(4px); box-shadow: 0 0 0 var(--tinta); }
.back-to-top svg { width: 19px; height: 19px; }
.site-footer { position: relative; }

.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100;
    width: 58px;
    height: 58px;
    background: var(--wa);
    border: var(--borde);
    border-radius: 50%;
    box-shadow: 0 4px 0 var(--tinta), 0 10px 24px rgba(46, 36, 51, 0.25);
    color: var(--tinta);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover { transform: translateY(-3px); }
.whatsapp-float:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tinta); }

/* ============ RESPUESTA AL TOQUE ============ */
button, a {
    -webkit-tap-highlight-color: transparent;
}
button {
    touch-action: manipulation;
}

/* Todo lo tocable reacciona al presionar */
.topbar-cart:active .bottle { transform: scale(0.88); }
.topbar-cart .bottle { transition: transform 0.12s ease; }
.topbar-toggle:active span { background: var(--frambuesa); }
.topbar-logo:active { transform: scale(0.96); }
.topbar-logo { transition: transform 0.12s ease; }

.nav-group-btn:active { color: var(--frambuesa); transform: scale(0.96); }
.nav-dropdown a:active { background: var(--chicle); color: var(--tinta); }

.card:active {
    transform: translate(2px, 2px) scale(0.99);
    box-shadow: 2px 2px 0 rgba(46, 36, 51, 0.10);
}
.page-search-clear:active { color: var(--frambuesa); transform: scale(0.85); }
.page-search-clear { transition: transform 0.1s ease, color 0.15s ease; }

.qty-stepper button:active,
.qty button:active { background: var(--chicle); transform: scale(0.88); }
.qty-stepper button,
.qty button { transition: background 0.12s ease, transform 0.1s ease; }

.icon-btn:active { background: var(--chicle); transform: scale(0.9); }
.icon-btn { transition: background 0.15s ease, transform 0.1s ease; }

.product-modal-close:active { background: var(--chicle); transform: scale(0.9); }
.btn-link:active,
.cart-item .remove:active { color: var(--rojo); }

.footer-socials a:active {
    background: var(--chicle);
    border-color: var(--chicle);
    color: var(--tinta);
    transform: scale(0.9);
}
.footer-socials a { transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease; }
.footer-admin:active,
.footer-list a:active { color: var(--chicle); }
.ecosoft-link:active .ecosoft-text { color: var(--sol); }

/* En pantallas táctiles el hover queda "pegado": lo anulamos ahí */
@media (hover: none) {
    .card:hover { transform: none; box-shadow: 5px 5px 0 rgba(46, 36, 51, 0.08); }
    .card:hover .card-image img { transform: none; }
    .card:active {
        transform: translate(2px, 2px) scale(0.99);
        box-shadow: 2px 2px 0 rgba(46, 36, 51, 0.10);
    }
    .whatsapp-float:hover { transform: none; }
}

/* ============ MOVIMIENTO REDUCIDO ============ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
