/* =========================================
   DIMENSION HM — Diseño Móvil Compartido
   ========================================= */

/* ── STICKY HEADER + NAV (todas las pantallas) ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Carrito siempre al extremo derecho del nav */
.nav-cart {
    margin-left: auto;
    cursor: pointer;
    list-style: none;
}
nav {
    position: sticky;
    top: 0;
    z-index: 99;
}

/* ── ETIQUETAS DE TARJETA ── */
.badge {
    position: absolute;
    font-family: 'Dongle', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 3px 10px;
    z-index: 10;
    pointer-events: none;
}
.badge-nuevo {
    top: 10px;
    left: 10px;
    background-color: #1c1c1c;
    color: #ffffff;
}
.badge-disponible {
    top: 10px;
    right: 10px;
    background-color: #ffffff;
    color: #1c1c1c;
    border: 1px solid #d6d6d6;
}
.badge-agotado {
    top: 10px;
    right: 10px;
    background-color: #8a8a8a;
    color: #ffffff;
}

/* ── BOTÓN VOLVER ARRIBA ── */
#btn-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background-color: #1c1c1c;
    color: #ffffff;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s, background-color 0.2s;
    pointer-events: none;
}
#btn-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
#btn-top:hover {
    background-color: #3a3a3a;
}

/* ── WHATSAPP FLOTANTE ── */
#wa-float {
    position: fixed;
    bottom: 88px;
    right: 32px;
    width: 52px;
    height: 52px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 799;
    transition: background-color 0.3s, transform 0.2s;
}
#wa-float:hover {
    background-color: #1ebe5d;
    transform: scale(1.08);
}

/* ── BUSCADOR ── */
#buscador-wrap {
    position: relative;
    margin-bottom: 28px;
    max-width: 400px;
}
#buscador {
    width: 100%;
    padding: 12px 44px 12px 16px;
    font-family: 'Dongle', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border: 1px solid #d6d6d6;
    background-color: #fff;
    color: #1c1c1c;
    outline: none;
    transition: border-color 0.2s;
}
#buscador:focus { border-color: #1c1c1c; }
#buscador::placeholder { color: #aaa; }
#buscador-icono {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1rem;
    pointer-events: none;
}

/* ── AVISO COOKIES ── */
#cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background-color: #1c1c1c;
    color: #ccc;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 1100;
    font-family: 'Dongle', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: transform 0.4s ease;
    flex-wrap: wrap;
}
#cookie-banner a {
    color: #fff;
    text-decoration: underline;
}
#cookie-aceptar {
    background-color: #fff;
    color: #1c1c1c;
    border: none;
    padding: 8px 24px;
    font-family: 'Dongle', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}
#cookie-aceptar:hover { background-color: #e8e8e8; }

/* --- Botón hamburguesa --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1c1c1c;
    transition: all 0.3s ease;
    transform-origin: center;
}
.hamburger.abierto span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.abierto span:nth-child(2) { opacity: 0; }
.hamburger.abierto span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Overlay menú --- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 98;
}
.nav-overlay.visible { display: block; }

@media (max-width: 768px) {

    /* ── HEADER ── */
    header {
        padding: 10px 18px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
        background-color: #f4f4f4 !important;
    }
    header .logo-img { height: 50px !important; }
    .header-right {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-left: auto;
    }
    /* Carrito clonado en header móvil */
    .header-right .cart-icon-wrap {
        display: flex !important;
        align-items: center;
        position: relative;
        padding: 4px;
        cursor: pointer;
    }
    .header-right .cart-icon-wrap svg {
        width: 24px !important;
        height: 24px !important;
        stroke: #1c1c1c !important;
    }
    .header-right .cart-badge {
        position: absolute !important;
        top: -4px !important; right: -4px !important;
        background: #1c1c1c !important;
        color: #fff !important;
        width: 16px !important; height: 16px !important;
        border-radius: 50%;
        font-size: 0.65rem !important;
        font-weight: 700;
        display: none;
        align-items: center;
        justify-content: center;
    }
    .hamburger { display: flex !important; }
    .hamburger span { background-color: #1c1c1c; }

    /* Ocultar carrito del nav en móvil */
    .nav-cart { display: none !important; }

    /* ── NAV LATERAL ── */
    nav {
        position: fixed !important;
        top: 0 !important; left: -100% !important;
        width: 78vw !important;
        max-width: 290px !important;
        height: 100vh !important;
        background-color: #1c1c1c !important;
        padding: 70px 0 40px !important;
        z-index: 999 !important;
        transition: left 0.32s ease !important;
        box-shadow: 4px 0 24px rgba(0,0,0,0.35) !important;
        overflow-y: auto !important;
    }
    nav.abierto { left: 0 !important; }
    nav ul { flex-direction: column !important; }
    nav ul li a {
        padding: 15px 28px !important;
        font-size: 1.15rem !important;
        letter-spacing: 2.5px !important;
        border-bottom: 1px solid #2a2a2a !important;
        color: #bbb !important;
        display: block !important;
    }
    nav ul li a:hover,
    nav ul li a.active {
        color: #fff !important;
        background-color: #2e2e2e !important;
        border-bottom: 1px solid #2a2a2a !important;
    }

    /* ── HERO CON IMAGEN ── */
    .hero {
        padding: 50px 20px 44px !important;
        min-height: unset !important;
    }
    .hero h2 {
        font-size: 2.2rem !important;
        letter-spacing: 1.5px !important;
        line-height: 1.1 !important;
    }
    .hero span { font-size: 0.8rem !important; letter-spacing: 4px !important; }
    .hero p { font-size: 0.95rem !important; margin-bottom: 24px !important; }
    .hero a {
        padding: 10px 28px !important;
        font-size: 0.85rem !important;
        letter-spacing: 2px !important;
    }

    /* ── HEROES DE OTRAS PÁGINAS ── */
    .hero-nosotros, .hero-contacto, .hero-cat, .hero-prod, .hero-ofertas {
        padding: 44px 20px !important;
    }
    .hero-nosotros h1, .hero-contacto h1,
    .hero-cat h1, .hero-prod h1, .hero-ofertas h1 {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
    }

    /* ── SECCIÓN PRODUCTOS ── */
    .productos { padding: 24px 16px 48px !important; }
    .productos > h2 { font-size: 1.8rem !important; margin-bottom: 16px !important; }
    .productos > h3 { font-size: 0.8rem !important; }

    /* ── BUSCADOR ── */
    #buscador-wrap { max-width: 100% !important; margin-bottom: 20px !important; }
    #buscador { font-size: 1rem !important; padding: 10px 40px 10px 14px !important; }

    /* ── FILTROS ── */
    .filtros {
        gap: 4px !important;
        margin-bottom: 24px !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px !important;
    }
    .filtros button {
        padding: 8px 14px !important;
        font-size: 0.82rem !important;
        letter-spacing: 1.5px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* ── GRID DE TARJETAS ── */
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .card .img-wrap { height: 160px !important; }
    .card-info { padding: 8px 10px !important; }
    .card-info p {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
        margin-bottom: 4px !important;
    }
    .precio { font-size: 0.95rem !important; }
    .talla { font-size: 0.75rem !important; }
    .badge { font-size: 0.65rem !important; padding: 2px 7px !important; }
    .categoria-titulo { font-size: 1.4rem !important; }
    .categoria { margin-bottom: 36px !important; }

    /* ── DETALLE PRODUCTO ── */
    .breadcrumb { padding: 12px 18px !important; font-size: 0.8rem !important; }
    .detalle {
        grid-template-columns: 1fr !important;
        padding: 16px 16px 50px !important;
        gap: 20px !important;
    }
    .img-principal { aspect-ratio: 4/3 !important; }
    .thumb { width: 64px !important; height: 64px !important; }
    .info h1 { font-size: 1.5rem !important; }
    .info .precio { font-size: 1.4rem !important; }
    .info .descripcion { font-size: 1rem !important; }
    .btn-agregar, .btn-whatsapp, .btn-regresar {
        font-size: 0.9rem !important;
        padding: 13px 20px !important;
        letter-spacing: 2px !important;
    }

    /* ── CARRITO DRAWER ── */
    #cart-drawer {
        width: 100% !important;
        max-width: 100vw !important;
        right: -100% !important;
    }
    #cart-drawer.open { right: 0 !important; }
    .cart-item-img { width: 60px !important; height: 75px !important; }
    .cart-item-nombre { font-size: 0.9rem !important; }

    /* ── NOSOTROS ── */
    .historia { padding: 36px 18px !important; }
    .historia h2 { font-size: 1.8rem !important; }
    .historia p { font-size: 1.05rem !important; }
    .valores { padding: 36px 18px !important; }
    .valores h2 { font-size: 1.8rem !important; }
    .valores-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
    .cifras { padding: 40px 18px !important; gap: 28px !important; flex-wrap: wrap !important; }
    .cifra .numero { font-size: 2.2rem !important; }
    .cifra .label { font-size: 0.7rem !important; }

    /* ── CONTACTO ── */
    .contacto-grid {
        grid-template-columns: 1fr !important;
        padding: 36px 18px !important;
        gap: 36px !important;
    }
    .contacto-info {
        padding-right: 0 !important;
        border-right: none !important;
        border-bottom: 1px solid #d6d6d6;
        padding-bottom: 36px !important;
    }
    .horarios { padding-left: 0 !important; }
    .horario-fila .hora { font-size: 0.95rem !important; }
    .horario-fila .dia { font-size: 0.95rem !important; }
    .redes { padding: 36px 18px !important; }
    .redes h2 { font-size: 1.8rem !important; }
    .redes-btns { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
    .red-btn { justify-content: center !important; padding: 13px 20px !important; }
    .cta-wa { padding: 36px 18px !important; }
    .cta-wa h2 { font-size: 1.8rem !important; }
    .btn-wa { width: 100% !important; justify-content: center !important; }

    /* ── CATEGORÍAS ── */
    .categorias-wrap { padding: 36px 18px !important; }
    .cat-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .cat-card .cat-img { height: 140px !important; }
    .cat-card .cat-info { padding: 14px !important; }
    .cat-card .cat-info h3 { font-size: 1.2rem !important; }
    .cat-card .cat-info .ver { opacity: 1 !important; transform: none !important; font-size: 0.75rem !important; }
    .cat-card .cat-info .num { font-size: 0.7rem !important; }

    /* ── OFERTAS ── */
    .sin-ofertas { padding: 50px 20px !important; }
    .sin-ofertas h2 { font-size: 1.6rem !important; }
    .notificacion { padding: 36px 18px !important; }

    /* ── BOTONES FLOTANTES ── */
    #wa-float { bottom: 76px !important; right: 18px !important; width: 48px !important; height: 48px !important; }
    #btn-top { bottom: 20px !important; right: 18px !important; width: 40px !important; height: 40px !important; font-size: 1.3rem !important; }

    /* ── COOKIES ── */
    #cookie-banner {
        padding: 14px 18px !important;
        gap: 12px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    #cookie-aceptar { width: 100% !important; padding: 10px !important; text-align: center !important; }

    /* ── FOOTER ── */
    footer { font-size: 0.75rem !important; padding: 16px 18px !important; letter-spacing: 1px !important; }
}
