/* =========================================================
   SOPI SPORTS — ORDEN DE CABECERA Y CATÁLOGO (móvil)
   Va DESPUÉS de style.css. No cambia colores ni tipografía.
   ========================================================= */

:root { --nav-h: 60px; }

/* ---------- Logo ---------- */
.brand { display: flex; align-items: center; }
.brand-logo { display: block; height: 56px; width: auto; }
.footer-logo { display: block; height: 64px; width: auto; margin-bottom: 14px; }

/* ---------- Elementos solo móvil (ocultos en escritorio) ---------- */
.nav-toggle,
.nav-drawer,
.nav-overlay { display: none; }

.nav-cart { position: relative; }
.nav-cart-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Estilo del catálogo según deporte ---------- */
body[data-deporte="tenis"] { --accent: var(--tenis); }
body[data-deporte="padel"] { --accent: var(--padel); }

/* =========================================================
   MÓVIL / TABLET (≤ 800px)
   ========================================================= */
@media (max-width: 800px) {

    /* --- Cabecera: ☰  |  logo  |  carrito --- */
    .nav-row {
        min-height: var(--nav-h);
        display: grid;
        grid-template-columns: 44px 1fr 44px;
        align-items: center;
        gap: 8px;
    }

    .nav-sports { display: none !important; }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--black);
        font-size: 22px;
        cursor: pointer;
    }

    .brand { justify-self: center; }
    .brand-logo { height: 44px; }

    .nav-actions { justify-self: end; }
    .nav-cart {
        width: 44px;
        height: 44px;
        justify-content: center;
    }
    .nav-cart-icon { width: 24px; height: 24px; }
    .nav-cart-label { display: none; }
    .nav-cart-count {
        position: absolute;
        top: 2px;
        right: 0;
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }

    /* --- Menú lateral (drawer) --- */
    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 190;
        background: rgba(0, 0, 0, .55);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }

    .nav-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 200;
        width: min(84vw, 320px);
        background: #fff;
        transform: translateX(-100%);
        transition: transform .28s ease;
        overflow-y: auto;
    }

    body.nav-open { overflow: hidden; }
    body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
    body.nav-open .nav-drawer { transform: none; }

    .nav-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: var(--nav-h);
        padding: 0 8px 0 18px;
        border-bottom: 1px solid #e5e5e2;
    }

    .nav-drawer-head .brand-logo { height: 42px; }

    .nav-close {
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        font-size: 22px;
        cursor: pointer;
    }

    .nav-drawer a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 17px 20px;
        border-bottom: 1px solid #efefec;
        color: var(--black);
        font-size: 13px;
        font-weight: 900;
        letter-spacing: .08em;
        text-decoration: none;
        text-transform: uppercase;
    }

    .nav-drawer a.activo { background: var(--cream); }

    .nav-chevron { font-size: 22px; font-weight: 400; line-height: 1; color: var(--gray); }

    .nav-drawer-sub {
        margin-top: auto;
        padding: 10px 0 18px;
        background: var(--cream);
    }

    .nav-drawer-sub a {
        padding: 12px 20px;
        border: 0;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .02em;
        text-transform: none;
    }

    /* --- Catálogo en celular: sin filtros desplegables ni pestañas.
           La navegación por categoría se hace desde el menú ☰ --- */
    .shop-toolbar { display: none; }
    .cat-nav { display: none; }

    /* Sin filtro de categoría se ven todas, una debajo de otra */
    .cat-panel[hidden] { display: block !important; }
    .cat-panel { margin-bottom: 34px; }

    .cat-panel-title { font-size: 1.15rem; }

    /* --- Tarjetas compactas, 2 por fila --- */
    .cat-grid { gap: 22px 10px; }

    .cat-grid .shop-product-image {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .cat-grid .shop-product-image img { padding: 8px; }

    .cat-grid .shop-product-info { padding-top: 10px; }

    .cat-grid .shop-product-brand { font-size: 9px; }

    .cat-grid .shop-product-name {
        min-height: 34px;
        font-size: 13px;
    }

    .cat-grid .shop-product-price { font-size: 14px; }

    .cat-grid .shop-product-bottom { margin-top: 10px; }

    .cat-grid .shop-add {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    /* Botón de WhatsApp más chico para no tapar productos */
    .wa-float {
        width: 52px;
        height: 52px;
        font-size: 28px;
        right: 14px;
        bottom: 14px;
    }
}

/* =========================================================
   CELULAR CHICO (≤ 520px)
   ========================================================= */
@media (max-width: 520px) {

    .sopi-promo-inner {
        min-height: 0;
        padding: 6px 0;
        font-size: 8px;
    }

    .shop-content { padding: 40px 0 90px; }

    .shop-hero,
    .shop-hero-inner { min-height: 300px; }

    .shop-hero-inner { padding-top: 60px; }

    .shop-hero h1 { font-size: 56px; }
}


/* =========================================================
   MENÚ LATERAL — ACORDEÓN DE CATEGORÍAS (≤ 800px)
   ========================================================= */
@media (max-width: 800px) {

    .nav-acc-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 17px 20px;
        border: 0;
        border-bottom: 1px solid #efefec;
        background: #fff;
        color: var(--black);
        font: inherit;
        font-size: 13px;
        font-weight: 900;
        letter-spacing: .08em;
        text-align: left;
        text-transform: uppercase;
        cursor: pointer;
    }

    .nav-acc-btn .nav-chevron { transition: transform .2s ease; }
    .nav-acc-btn[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }
    .nav-acc-btn[aria-expanded="true"] { background: var(--cream); }

    .nav-acc-panel { background: var(--cream); }

    .nav-drawer .nav-acc-panel a {
        padding: 14px 20px 14px 34px;
        border-bottom: 1px solid #e6e6e1;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: .02em;
        text-transform: none;
    }

    .nav-drawer .nav-acc-panel a.nav-acc-all {
        font-weight: 900;
        color: var(--tenis);
    }

    /* Indumentaria: segundo nivel dentro de Tenis / Pádel */
    .nav-sub-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 20px 14px 34px;
        border: 0;
        border-bottom: 1px solid #e6e6e1;
        background: transparent;
        color: var(--black);
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: .02em;
        text-align: left;
        cursor: pointer;
    }
    .nav-sub-btn .nav-chevron { transition: transform .2s ease; }
    .nav-sub-btn[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }
    .nav-sub-btn[aria-expanded="true"] { font-weight: 900; }

    .nav-sub-panel { background: #f3f2ec; }

    .nav-drawer .nav-acc-panel a.nav-sub-genero {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        padding: 14px 20px 10px 48px;
        border-bottom: 0;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .nav-drawer .nav-acc-panel a.nav-sub-genero small {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .02em;
        text-transform: none;
        color: var(--tenis);
    }

    .nav-drawer .nav-acc-panel a.nav-sub-genero.nav-sub-todo {
        padding: 12px 20px 12px 48px;
        border-bottom: 1px solid #e6e6e1;
        font-size: 12px;
        letter-spacing: .02em;
        text-transform: none;
        color: var(--tenis);
    }

    .nav-drawer .nav-acc-panel a.nav-sub-tipo {
        padding: 11px 20px 11px 60px;
        border-bottom: 1px solid #e6e6e1;
        font-weight: 600;
    }
}


/* =========================================================
   BARRA MÓVIL DEL CATÁLOGO: ruta + Filtrar + Ordenar
   ========================================================= */

.mf,
.mf-overlay,
.mf-sheet { display: none; }

@media (max-width: 800px) {

    .mf { display: block; margin-bottom: 18px; }

    .mf-crumbs {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        padding: 4px 0 14px;
        color: var(--gray);
        font-size: 12px;
    }
    .mf-crumbs a { color: var(--gray); text-decoration: none; }
    .mf-crumbs strong { color: var(--black); font-weight: 800; }

    .mf-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mf-btn {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 46px;
        padding: 0 14px;
        border: 1px solid var(--light-gray);
        border-radius: 4px;
        background: #fff;
        color: var(--black);
        font: inherit;
        font-size: 13px;
        font-weight: 800;
        text-align: left;
        cursor: pointer;
    }

    .mf-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        margin-left: 4px;
        border-radius: 50%;
        background: var(--black);
        color: #fff;
        font-size: 10px;
    }

    .mf-sort select {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0 38px 0 14px;
        border: 0;
        background: transparent;
        color: inherit;
        font: inherit;
        font-weight: 800;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }
    .mf-sort svg { margin-left: auto; pointer-events: none; }

    /* --- Panel inferior de filtros --- */
    .mf-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 290;
        background: rgba(0, 0, 0, .55);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }

    .mf-sheet {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 300;
        max-height: 82vh;
        background: #fff;
        border-radius: 14px 14px 0 0;
        transform: translateY(100%);
        transition: transform .28s ease;
    }

    body.mf-abierto { overflow: hidden; }
    body.mf-abierto .mf-overlay { opacity: 1; pointer-events: auto; }
    body.mf-abierto .mf-sheet { transform: none; }

    .mf-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 8px 6px 20px;
        border-bottom: 1px solid #e5e5e2;
        font-size: 15px;
    }
    .mf-sheet-head button {
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        color: var(--black);
        cursor: pointer;
    }

    .mf-sheet-body {
        padding: 6px 20px 10px;
        overflow-y: auto;
    }

    .mf-label {
        margin: 18px 0 10px;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: .12em;
        text-transform: uppercase;
        color: var(--gray);
    }

    .mf-pills { display: flex; flex-wrap: wrap; gap: 8px; }

    .mf-pill {
        padding: 10px 16px;
        border: 1px solid var(--light-gray);
        border-radius: 999px;
        color: var(--black);
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
    }
    .mf-pill.is-on {
        border-color: var(--black);
        background: var(--black);
        color: #fff;
    }

    .mf-sheet-foot {
        padding: 14px 20px 18px;
        border-top: 1px solid #e5e5e2;
        text-align: center;
    }
    .mf-sheet-foot a {
        color: var(--black);
        font-size: 13px;
        font-weight: 800;
        text-decoration: underline;
    }
}
