/* ==========================================================
   CLP MOBILE PREMIUM v4 — NYXIVO
   Diseño 10/10 para móviles ≤ 991px
   Filosofía: SOLO el navbar es fijo. Todo lo demás scrollea.
   ========================================================== */

/* ==========================================================
   1. RESET DE POSICIONAMIENTO — nada sticky excepto navbar
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-sortbar,
    body.clp-theme .clp-subcat-strip,
    body.clp-theme .clp-activechips-row {
        position: static !important;
        top: auto !important;
        z-index: 1 !important;
    }
    /* Variables de offset innecesarias en mobile */
    body.clp-theme {
        --sticky-offset: 0px !important;
        --navbar-height: 56px !important;
        --clp-sortbar-height: 0px !important;
    }
}

/* ==========================================================
   2. HERO CINEMATIC — imagen full-bleed, título grande
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-hero {
        height: clamp(260px, 42vh, 320px) !important;
        min-height: unset !important;
        padding: 0 !important;
        overflow: hidden !important;
        margin-bottom: 0 !important;
        position: relative !important;
    }
    body.clp-theme .clp-hero .clp-container {
        padding: 0 !important;
        max-width: none !important;
        height: 100% !important;
        position: relative !important;
    }

    /* Imagen de fondo full-bleed */
    body.clp-theme .clp-hero-img-blur {
        position: absolute !important;
        inset: 0 !important;
        background-size: cover !important;
        background-position: center !important;
        filter: blur(0) !important;
        opacity: 1 !important;
        z-index: 0 !important;
    }
    /* Overlay: oscuro abajo (texto), transparente arriba */
    body.clp-theme .clp-hero-img-blur::after {
        content: '' !important;
        position: absolute !important;
        inset: 0 !important;
        background:
            linear-gradient(180deg,
                rgba(8,13,26,0.45) 0%,
                rgba(8,13,26,0.20) 25%,
                rgba(8,13,26,0.65) 70%,
                rgba(8,13,26,0.97) 100%
            ) !important;
    }
    /* Tint del color de categoría en la base */
    body.clp-theme .clp-hero::before {
        content: '' !important;
        position: absolute !important;
        inset: 0 !important;
        background: radial-gradient(
            130% 90% at 50% 105%,
            rgba(59,130,246,0.30) 0%,
            transparent 65%
        ) !important;
        z-index: 1 !important;
        pointer-events: none !important;
    }
    body.clp-theme .clp-hero::after {
        display: none !important;
    }

    /* Ocultar elementos no necesarios en mobile */
    body.clp-theme .clp-hero-icon,
    body.clp-theme .clp-hero-eyebrow,
    body.clp-theme .clp-hero-sub,
    body.clp-theme .clp-hero-stats,
    body.clp-theme .clp-hero-media {
        display: none !important;
    }

    /* Topbar: breadcrumb + volver flotantes en el hero */
    body.clp-theme .clp-topbar {
        position: absolute !important;
        top: 0.9rem !important;
        left: 1rem !important;
        right: 1rem !important;
        margin: 0 !important;
        z-index: 4 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.55rem !important;
    }
    body.clp-theme .clp-btn-back {
        background: rgba(255,255,255,0.16) !important;
        backdrop-filter: blur(12px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
        border: 1px solid rgba(255,255,255,0.22) !important;
        color: #ffffff !important;
        padding: 0.42rem 0.85rem !important;
        font-size: 0.76rem !important;
        font-weight: 600 !important;
        border-radius: 99px !important;
        min-height: 36px !important;
        flex-shrink: 0 !important;
    }
    body.clp-theme .clp-btn-back i {
        font-size: 0.72rem !important;
    }
    body.clp-theme .clp-breadcrumb {
        font-size: 0.68rem !important;
        color: rgba(255,255,255,0.82) !important;
        background: rgba(8,13,26,0.32) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        padding: 0.38rem 0.75rem !important;
        border-radius: 99px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }
    body.clp-theme .clp-breadcrumb a,
    body.clp-theme .clp-breadcrumb-current {
        color: inherit !important;
        text-decoration: none !important;
    }
    body.clp-theme .clp-breadcrumb-current {
        font-weight: 700 !important;
        color: #ffffff !important;
    }
    body.clp-theme .clp-breadcrumb-sep {
        color: rgba(255,255,255,0.35) !important;
        margin: 0 0.18rem !important;
    }

    /* Hero body: título anclado en la base */
    body.clp-theme .clp-hero-body {
        position: absolute !important;
        inset: 0 !important;
        padding: 0 1.2rem 1.3rem !important;
        margin: 0 !important;
        z-index: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
    }
    body.clp-theme .clp-hero-left,
    body.clp-theme .clp-hero-copy {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.clp-theme .clp-hero-title {
        font-size: clamp(2.2rem, 9vw, 2.8rem) !important;
        font-weight: 800 !important;
        line-height: 1.04 !important;
        letter-spacing: -0.03em !important;
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
        background: none !important;
        margin: 0 !important;
        text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 4px 32px rgba(0,0,0,0.3) !important;
    }
    /* Ola de transición más suave */
    .clp-hero-wave {
        height: 12px !important;
        margin-top: -12px !important;
        background: linear-gradient(to bottom, transparent 0%, #f4f6fb 100%) !important;
    }
}

/* ==========================================================
   3. SORTBAR — blanco limpio, 2 filas, todo visible
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-sortbar {
        background: #ffffff !important;
        border-bottom: 1px solid rgba(15,23,42,0.07) !important;
        box-shadow: none !important;
        padding: 0.85rem 0 0.65rem !important;
    }
    body.clp-theme .clp-sortbar-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.6rem !important;
        padding: 0 1rem !important;
    }

    /* Fila 1: Filtros + Búsqueda */
    body.clp-theme .clp-sortbar-left {
        display: flex !important;
        gap: 0.5rem !important;
        width: 100% !important;
        align-items: center !important;
    }

    /* Botón Filtros */
    body.clp-theme .clp-filter-toggle {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        flex: 0 0 auto !important;
        height: 44px !important;
        padding: 0 1rem !important;
        font-size: 0.84rem !important;
        font-weight: 600 !important;
        color: #ffffff !important;
        background: #0f172a !important;
        border: none !important;
        border-radius: 12px !important;
        cursor: pointer !important;
        transition: opacity 0.15s ease !important;
    }
    body.clp-theme .clp-filter-toggle:active {
        opacity: 0.82 !important;
    }
    body.clp-theme .clp-filter-toggle i {
        font-size: 0.82rem !important;
    }
    body.clp-theme .clp-filter-count {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 18px !important;
        height: 18px !important;
        padding: 0 5px !important;
        background: var(--cat-clr, #3b82f6) !important;
        border-radius: 99px !important;
        font-size: 0.66rem !important;
        font-weight: 800 !important;
        color: #ffffff !important;
    }
    body.clp-theme .clp-filter-count[hidden] {
        display: none !important;
    }

    /* Campo de búsqueda */
    body.clp-theme .clp-search,
    body.clp-theme .clp-search--enhanced {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        position: relative !important;
    }
    body.clp-theme .clp-search--enhanced .clp-search-input,
    body.clp-theme .clp-search-input {
        width: 100% !important;
        height: 44px !important;
        padding: 0 2.2rem 0 2.4rem !important;
        font-size: 0.88rem !important;
        font-weight: 500 !important;
        color: #0f172a !important;
        background: #f1f5f9 !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        transition: background 0.15s, border-color 0.15s !important;
        -webkit-text-fill-color: #0f172a !important;
    }
    body.clp-theme .clp-search--enhanced .clp-search-input::placeholder,
    body.clp-theme .clp-search-input::placeholder {
        color: #94a3b8 !important;
        font-weight: 400 !important;
    }
    body.clp-theme .clp-search--enhanced .clp-search-input:focus,
    body.clp-theme .clp-search-input:focus {
        outline: none !important;
        background: #ffffff !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        box-shadow: 0 0 0 3px rgba(59,130,246,0.18) !important;
        -webkit-text-fill-color: #0f172a !important;
    }
    body.clp-theme .clp-search-ic {
        position: absolute !important;
        left: 0.9rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: #64748b !important;
        font-size: 0.88rem !important;
        pointer-events: none !important;
        z-index: 2 !important;
    }
    body.clp-theme .clp-search-clear,
    body.clp-theme .clp-search-kbd {
        position: absolute !important;
        right: 0.6rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 26px !important;
        height: 26px !important;
        border-radius: 50% !important;
        background: rgba(15,23,42,0.07) !important;
        border: none !important;
        color: #64748b !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.72rem !important;
        cursor: pointer !important;
    }
    body.clp-theme .clp-search-kbd {
        font-size: 0.6rem !important;
        font-weight: 600 !important;
    }

    /* Fila 2: Resultados + Ordenar */
    body.clp-theme .clp-sortbar-right {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
    body.clp-theme .clp-results-count {
        font-size: 0.82rem !important;
        color: #64748b !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.2rem !important;
    }
    body.clp-theme .clp-sort-label {
        display: none !important;
    }
    body.clp-theme .clp-select-wrap {
        flex: 0 0 auto !important;
        position: relative !important;
    }
    body.clp-theme .clp-select-wrap .clp-select,
    body.clp-theme .clp-select {
        appearance: none !important;
        -webkit-appearance: none !important;
        height: 36px !important;
        padding: 0 2rem 0 0.85rem !important;
        font-size: 0.82rem !important;
        font-weight: 600 !important;
        color: #0f172a !important;
        background: #f1f5f9 !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 10px !important;
        cursor: pointer !important;
        -webkit-text-fill-color: #0f172a !important;
    }
    body.clp-theme .clp-select-caret,
    body.clp-theme .clp-select-wrap .clp-select-caret {
        position: absolute !important;
        right: 0.6rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        color: #64748b !important;
        font-size: 0.65rem !important;
        pointer-events: none !important;
    }

    /* Fila 3: Preset chips */
    body.clp-theme .clp-presets-row {
        background: #f8fafc !important;
        border-top: 1px solid rgba(15,23,42,0.05) !important;
        padding: 0.6rem 0 0.5rem !important;
        margin: 0.65rem -1rem -0.65rem !important;
    }
    body.clp-theme .clp-presets {
        display: flex !important;
        gap: 0.45rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1rem !important;
    }
    body.clp-theme .clp-presets::-webkit-scrollbar {
        display: none !important;
    }
    body.clp-theme .clp-preset {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
        flex: 0 0 auto !important;
        height: 34px !important;
        padding: 0 0.85rem !important;
        font-size: 0.77rem !important;
        font-weight: 600 !important;
        color: #334155 !important;
        background: #ffffff !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 99px !important;
        white-space: nowrap !important;
        cursor: pointer !important;
        transition: border-color 0.15s, background 0.15s, color 0.15s !important;
    }
    body.clp-theme .clp-preset i {
        font-size: 0.7rem !important;
        color: var(--cat-clr, #3b82f6) !important;
    }
    body.clp-theme .clp-preset:active {
        background: #f1f5f9 !important;
    }
    body.clp-theme .clp-preset[aria-pressed="true"],
    body.clp-theme .clp-preset.active {
        background: var(--cat-clr, #3b82f6) !important;
        border-color: var(--cat-clr, #3b82f6) !important;
        color: #ffffff !important;
    }
    body.clp-theme .clp-preset[aria-pressed="true"] i,
    body.clp-theme .clp-preset.active i {
        color: #ffffff !important;
    }
}

/* ==========================================================
   4. SUBCAT STRIP — estático, horizontal scroll
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-subcat-strip {
        background: #ffffff !important;
        border-top: none !important;
        border-bottom: 1px solid rgba(15,23,42,0.06) !important;
        padding: 0.65rem 0 !important;
    }
    body.clp-theme .clp-subcat-pills {
        display: flex !important;
        gap: 0.4rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1rem !important;
    }
    body.clp-theme .clp-subcat-pills::-webkit-scrollbar {
        display: none !important;
    }
    body.clp-theme .clp-subcat-pill {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
        flex: 0 0 auto !important;
        height: 34px !important;
        padding: 0 0.85rem !important;
        font-size: 0.78rem !important;
        font-weight: 600 !important;
        color: #475569 !important;
        background: #f1f5f9 !important;
        border: 1.5px solid transparent !important;
        border-radius: 99px !important;
        white-space: nowrap !important;
        cursor: pointer !important;
        transition: all 0.15s ease !important;
    }
    body.clp-theme .clp-subcat-pill.active {
        background: #0f172a !important;
        border-color: #0f172a !important;
        color: #ffffff !important;
    }
    body.clp-theme .clp-subcat-count {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 18px !important;
        height: 18px !important;
        padding: 0 4px !important;
        background: rgba(15,23,42,0.08) !important;
        border-radius: 99px !important;
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        color: inherit !important;
    }
    body.clp-theme .clp-subcat-pill.active .clp-subcat-count {
        background: rgba(255,255,255,0.2) !important;
        color: #ffffff !important;
    }
}

/* ==========================================================
   5. ACTIVE FILTER CHIPS — estático, scroll horizontal
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-activechips-row {
        background: #fff8f0 !important;
        border-bottom: 1px solid rgba(234,179,8,0.15) !important;
        padding: 0.5rem 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        overflow: hidden !important;
    }
    body.clp-theme .clp-activechips-title {
        display: none !important;
    }
    body.clp-theme .clp-activechips {
        display: flex !important;
        gap: 0.4rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1rem !important;
        width: 100% !important;
    }
    body.clp-theme .clp-activechips::-webkit-scrollbar {
        display: none !important;
    }
    body.clp-theme .clp-activechip {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
        flex: 0 0 auto !important;
        height: 30px !important;
        padding: 0 0.65rem !important;
        font-size: 0.74rem !important;
        font-weight: 600 !important;
        color: #92400e !important;
        background: rgba(251,191,36,0.12) !important;
        border: 1px solid rgba(251,191,36,0.35) !important;
        border-radius: 99px !important;
        white-space: nowrap !important;
        cursor: pointer !important;
    }
    body.clp-theme .clp-activechip-clear {
        display: inline-flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        height: 30px !important;
        padding: 0 0.65rem !important;
        font-size: 0.74rem !important;
        font-weight: 600 !important;
        color: #dc2626 !important;
        background: rgba(239,68,68,0.08) !important;
        border: 1px solid rgba(239,68,68,0.2) !important;
        border-radius: 99px !important;
        white-space: nowrap !important;
        cursor: pointer !important;
    }
}

/* ==========================================================
   6. LAYOUT — full-width, fondo gris muy suave
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-layout {
        background: #f4f6fb !important;
        padding: 0 0 max(5.5rem, calc(env(safe-area-inset-bottom) + 5.5rem)) !important;
        margin-top: 0 !important;
    }
    body.clp-theme .clp-layout-inner {
        display: block !important;
        grid-template-columns: unset !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    body.clp-theme .clp-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    body.clp-theme .clp-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    /* Separador de grid */
    body.clp-theme .clp-grid-sep {
        display: none !important;
    }
    /* Chips activos — sin gap extra */
    body.clp-theme .clp-content > .clp-grid:first-of-type,
    body.clp-theme #clpGrid {
        margin-top: 0 !important;
    }
}

/* ==========================================================
   7. PRODUCT GRID — 2 columnas fluidas y bien proporcionadas
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme #clpGrid,
    body.clp-theme .clp-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
        background: #f4f6fb !important;
    }

    /* Card container */
    body.clp-theme .clp-grid .product-card-tech,
    body.clp-theme #clpGrid .product-card-tech {
        display: flex !important;
        flex-direction: column !important;
        background: #ffffff !important;
        border: 1px solid #e8edf4 !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        box-shadow: 0 1px 3px rgba(15,23,42,0.05), 0 4px 12px -4px rgba(15,23,42,0.08) !important;
        transition: transform 0.18s ease, box-shadow 0.18s ease !important;
    }
    body.clp-theme .clp-grid .product-card-tech:active,
    body.clp-theme #clpGrid .product-card-tech:active {
        transform: scale(0.978) !important;
        box-shadow: 0 1px 2px rgba(15,23,42,0.04) !important;
    }

    /* Zona de imagen */
    body.clp-theme .clp-grid .product-card-tech .product-image-wrapper,
    body.clp-theme #clpGrid .product-card-tech .product-image-wrapper {
        aspect-ratio: 1 / 1 !important;
        width: 100% !important;
        padding: 0.85rem !important;
        background: #f8fafc !important;
        border-bottom: 1px solid #f0f4f8 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
    }
    body.clp-theme .clp-grid .product-card-tech .product-image-wrapper img,
    body.clp-theme #clpGrid .product-card-tech .product-image-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    /* Zona de info */
    body.clp-theme .clp-grid .product-card-tech .product-info,
    body.clp-theme #clpGrid .product-card-tech .product-info {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0.7rem 0.75rem 0.75rem !important;
        gap: 0 !important;
    }

    /* Marca */
    body.clp-theme .clp-grid .product-card-tech .product-brand,
    body.clp-theme #clpGrid .product-card-tech .product-brand {
        font-size: 0.6rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
        text-transform: uppercase !important;
        color: var(--cat-clr, #3b82f6) !important;
        margin-bottom: 0.2rem !important;
    }

    /* Nombre del producto */
    body.clp-theme .clp-grid .product-card-tech .product-name,
    body.clp-theme #clpGrid .product-card-tech .product-name {
        font-size: 0.82rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        color: #0f172a !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        margin-bottom: 0.4rem !important;
    }
    /* El <a> dentro del nombre también debe ser oscuro */
    body.clp-theme .clp-grid .product-card-tech .product-name a,
    body.clp-theme #clpGrid .product-card-tech .product-name a {
        color: #0f172a !important;
        text-decoration: none !important;
    }
    /* Imagen sin tinte oscuro */
    body.clp-theme .clp-grid .product-card-tech .product-image-wrapper img,
    body.clp-theme #clpGrid .product-card-tech .product-image-wrapper img {
        background: transparent !important;
        mix-blend-mode: multiply !important;
    }
    /* Estrellas vacías */
    body.clp-theme .clp-grid .product-card-tech .far.fa-star,
    body.clp-theme #clpGrid .product-card-tech .far.fa-star {
        color: #cbd5e1 !important;
    }
    /* "Sin reseñas" */
    body.clp-theme .clp-grid .product-card-tech .product-rating span,
    body.clp-theme #clpGrid .product-card-tech .product-rating span {
        color: #94a3b8 !important;
    }

    /* Precio */
    body.clp-theme .clp-grid .product-card-tech .product-price-current,
    body.clp-theme #clpGrid .product-card-tech .product-price-current {
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        letter-spacing: -0.02em !important;
        margin-top: auto !important;
    }
    body.clp-theme .clp-grid .product-card-tech .product-price-old,
    body.clp-theme #clpGrid .product-card-tech .product-price-old {
        font-size: 0.71rem !important;
        color: #94a3b8 !important;
        text-decoration: line-through !important;
        font-weight: 500 !important;
    }
    body.clp-theme .clp-grid .product-card-tech .product-rating,
    body.clp-theme #clpGrid .product-card-tech .product-rating {
        font-size: 0.7rem !important;
        color: #64748b !important;
        margin-bottom: 0.25rem !important;
    }

    /* Botón carrito */
    body.clp-theme .clp-grid .product-card-tech .btn-add-cart,
    body.clp-theme #clpGrid .product-card-tech .btn-add-cart {
        width: 100% !important;
        min-height: 38px !important;
        margin-top: 0.55rem !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
        background: #0f172a !important;
        color: #ffffff !important;
        border: none !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.35rem !important;
    }
    body.clp-theme .clp-grid .product-card-tech .btn-add-cart:active,
    body.clp-theme #clpGrid .product-card-tech .btn-add-cart:active {
        background: #1e3a5f !important;
    }

    /* Ocultar badges no esenciales */
    body.clp-theme .clp-card .clp-badge--ship,
    body.clp-theme .clp-card .clp-badge--new {
        display: none !important;
    }
}

/* ==========================================================
   8. FILTRO MODAL CENTRADO — premium overlay
   ========================================================== */
@media (max-width: 1024px) {
    body.clp-theme .clp-sidebar {
        position: fixed !important;
        inset: 0 !important;
        margin: auto !important;
        width: calc(100vw - 2rem) !important;
        max-width: 440px !important;
        height: max-content !important;
        max-height: calc(100dvh - 3rem) !important;
        padding: 0 !important;
        border-radius: 20px !important;
        background: #ffffff !important;
        box-shadow:
            0 24px 80px -10px rgba(8,13,26,0.5),
            0 8px 24px -6px rgba(8,13,26,0.25) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        border: none !important;
        opacity: 0 !important;
        transform: scale(0.93) translateY(6px) !important;
        transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.34,1.56,0.64,1) !important;
        z-index: 1101 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }
    body.clp-theme .clp-sidebar.is-open {
        opacity: 1 !important;
        transform: scale(1) translateY(0) !important;
        pointer-events: auto !important;
        visibility: visible !important;
    }
    .clp-sheet-backdrop {
        background: rgba(8,13,26,0.65) !important;
        backdrop-filter: blur(8px) saturate(140%) !important;
        -webkit-backdrop-filter: blur(8px) saturate(140%) !important;
        z-index: 1100 !important;
    }
    body.clp-theme .clp-sheet-handle {
        display: none !important;
    }
    body.clp-theme .clp-sheet-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 1.2rem 1.4rem 1rem !important;
        border-bottom: 1px solid #f1f5f9 !important;
        background: #ffffff !important;
        flex-shrink: 0 !important;
        min-height: 62px !important;
    }
    body.clp-theme .clp-sheet-title {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        letter-spacing: -0.01em !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }
    body.clp-theme .clp-sheet-title i {
        color: var(--cat-clr, #3b82f6) !important;
        font-size: 0.95rem !important;
    }
    body.clp-theme .clp-sheet-close {
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
        background: #f1f5f9 !important;
        border: none !important;
        color: #475569 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        transition: background 0.15s !important;
    }
    body.clp-theme .clp-sheet-close:active {
        background: #e2e8f0 !important;
    }
    body.clp-theme .clp-filters {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        padding: 1rem 1.4rem 0.5rem !important;
        -webkit-overflow-scrolling: touch !important;
    }
    body.clp-theme .clp-filter-group {
        padding-bottom: 1rem !important;
        margin-bottom: 1rem !important;
        border-bottom: 1px solid #f1f5f9 !important;
        background: transparent !important;
    }
    body.clp-theme .clp-filter-group:last-of-type {
        border-bottom: none !important;
        margin-bottom: 0 !important;
    }
    body.clp-theme .clp-filter-legend {
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.1em !important;
        text-transform: uppercase !important;
        color: #64748b !important;
        margin-bottom: 0.65rem !important;
    }
    body.clp-theme .clp-check-label {
        color: #1e293b !important;
        font-size: 0.88rem !important;
    }
    body.clp-theme .clp-check-count {
        color: #94a3b8 !important;
        font-size: 0.78rem !important;
    }
    body.clp-theme .clp-price-values strong {
        color: #0f172a !important;
        -webkit-text-fill-color: #0f172a !important;
        background: none !important;
    }
    body.clp-theme .clp-price-inputs input {
        color: #0f172a !important;
        background: #f8fafc !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 8px !important;
    }
    body.clp-theme .clp-storage-chip {
        color: #334155 !important;
        background: #f1f5f9 !important;
        border: 1.5px solid #e2e8f0 !important;
    }
    body.clp-theme .clp-sheet-actions {
        display: flex !important;
        gap: 0.6rem !important;
        padding: 0.85rem 1.25rem max(0.85rem, env(safe-area-inset-bottom)) !important;
        background: #ffffff !important;
        border-top: 1px solid #f1f5f9 !important;
        flex-shrink: 0 !important;
    }
    body.clp-theme .clp-sheet-actions .clp-btn-primary {
        flex: 1 !important;
        min-height: 48px !important;
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        background: #0f172a !important;
        color: #fff !important;
        border: none !important;
        cursor: pointer !important;
    }
    body.clp-theme .clp-sheet-actions .clp-btn-ghost {
        flex: 0 0 auto !important;
        min-height: 48px !important;
        padding: 0 1.1rem !important;
        font-size: 0.88rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        background: #f1f5f9 !important;
        color: #475569 !important;
        border: none !important;
        cursor: pointer !important;
    }
    body.clp-sheet-open {
        overflow: hidden !important;
        touch-action: none !important;
    }
}

/* ==========================================================
   9. FAB FLOTANTE — único elemento fijo además del navbar
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-mobile-fab {
        position: fixed !important;
        bottom: max(1.25rem, env(safe-area-inset-bottom, 1.25rem)) !important;
        right: 1.1rem !important;
        z-index: 200 !important;
        height: 50px !important;
        padding: 0 1.1rem !important;
        border-radius: 99px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        color: #fff !important;
        background: #0f172a !important;
        border: none !important;
        box-shadow:
            0 4px 20px -4px rgba(15,23,42,0.5),
            0 0 0 1.5px rgba(255,255,255,0.08) !important;
        cursor: pointer !important;
        transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1) !important;
    }
    body.clp-theme .clp-mobile-fab:active {
        transform: scale(0.93) !important;
    }
    body.clp-theme .clp-mobile-fab i {
        font-size: 0.85rem !important;
        color: #fff !important;
    }
}

/* ==========================================================
   10. TOPSTRIP (TOP 3) — scroll horizontal compacto
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-topstrip {
        background: #ffffff !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border-bottom: 1px solid rgba(15,23,42,0.06) !important;
        padding: 1rem 0 !important;
        margin-bottom: 0 !important;
    }
    body.clp-theme .clp-topstrip-head {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 1rem 0.7rem !important;
    }
    body.clp-theme .clp-topstrip-title {
        font-size: 0.86rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        letter-spacing: -0.01em !important;
    }
    body.clp-theme .clp-topstrip-title i {
        color: var(--cat-clr, #3b82f6) !important;
        font-size: 0.8rem !important;
    }
    body.clp-theme .clp-topstrip-hint {
        font-size: 0.72rem !important;
        color: #94a3b8 !important;
    }
    body.clp-theme .clp-topstrip-grid {
        display: flex !important;
        gap: 0.6rem !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1rem 0.25rem !important;
    }
    body.clp-theme .clp-topstrip-grid::-webkit-scrollbar {
        display: none !important;
    }
    body.clp-theme .clp-topstrip-card {
        flex: 0 0 210px !important;
        background: #f8fafc !important;
        border: 1px solid #e8edf4 !important;
        border-radius: 14px !important;
        padding: 0.7rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.6rem !important;
        position: relative !important;
        overflow: hidden !important;
        transition: transform 0.15s ease !important;
    }
    body.clp-theme .clp-topstrip-card:active {
        transform: scale(0.97) !important;
    }
    body.clp-theme .clp-topstrip-rank {
        position: absolute !important;
        top: 0.5rem !important;
        left: 0.5rem !important;
        width: 20px !important;
        height: 20px !important;
        border-radius: 6px !important;
        background: var(--cat-clr, #3b82f6) !important;
        color: #fff !important;
        font-size: 0.6rem !important;
        font-weight: 800 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1 !important;
    }
    body.clp-theme .clp-topstrip-img {
        flex: 0 0 56px !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        background: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid #f0f4f8 !important;
    }
    body.clp-theme .clp-topstrip-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    body.clp-theme .clp-topstrip-body {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    body.clp-theme .clp-topstrip-brand {
        font-size: 0.58rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
        text-transform: uppercase !important;
        color: var(--cat-clr, #3b82f6) !important;
    }
    body.clp-theme .clp-topstrip-name {
        font-size: 0.76rem !important;
        font-weight: 600 !important;
        color: #0f172a !important;
        line-height: 1.25 !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        margin: 0.15rem 0 !important;
    }
    body.clp-theme .clp-topstrip-price {
        font-size: 0.82rem !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        letter-spacing: -0.01em !important;
    }
    body.clp-theme .clp-topstrip-rating i {
        color: #f59e0b !important;
        font-size: 0.6rem !important;
    }
    body.clp-theme .clp-topstrip-cta {
        display: none !important;
    }
}

/* ==========================================================
   11. LOAD MORE — full width, touch-friendly
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-btn-loadmore {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: calc(100% - 2rem) !important;
        margin: 0.75rem 1rem 1rem !important;
        min-height: 50px !important;
        font-size: 0.88rem !important;
        font-weight: 700 !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        border: 1.5px solid #e2e8f0 !important;
        color: #0f172a !important;
        cursor: pointer !important;
        transition: background 0.15s, border-color 0.15s !important;
    }
    body.clp-theme .clp-btn-loadmore:active {
        background: #f1f5f9 !important;
        border-color: var(--cat-clr, #3b82f6) !important;
    }
}

/* ==========================================================
   12. OTRAS CATEGORÍAS (fam-cards)
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-other-cats {
        background: #f4f6fb !important;
        border-top: 1px solid rgba(15,23,42,0.06) !important;
        padding: 1.2rem 0 2rem !important;
    }
    body.clp-theme .clp-other-cats h2,
    body.clp-theme .clp-other-cats-title {
        font-size: 0.86rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin: 0 0 0.75rem !important;
        padding: 0 1rem !important;
    }
    body.clp-theme .clp-fam-grid,
    body.clp-theme .clp-other-cats .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0.65rem !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1rem 0.5rem !important;
    }
    body.clp-theme .clp-fam-grid::-webkit-scrollbar,
    body.clp-theme .clp-other-cats .row::-webkit-scrollbar {
        display: none !important;
    }
    body.clp-theme .fam-card {
        flex: 0 0 140px !important;
        height: 90px !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(15,23,42,0.1) !important;
    }
}

/* ==========================================================
   13. EMPTY STATE
   ========================================================== */
@media (max-width: 991px) {
    body.clp-theme .clp-empty {
        margin: 1.25rem 1rem !important;
        padding: 2.5rem 1.25rem !important;
        border-radius: 18px !important;
        background: #ffffff !important;
        text-align: center !important;
        border: 1px solid #e8edf4 !important;
    }
    body.clp-theme .clp-empty-icon {
        font-size: 2.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    body.clp-theme .clp-empty h3 {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin-bottom: 0.45rem !important;
    }
    body.clp-theme .clp-empty p {
        font-size: 0.86rem !important;
        color: #64748b !important;
        margin-bottom: 1.1rem !important;
    }
}

/* ==========================================================
   14. PHONE PEQUEÑO (≤ 380px)
   ========================================================== */
@media (max-width: 380px) {
    body.clp-theme .clp-sidebar {
        max-width: calc(100vw - 1rem) !important;
    }
    body.clp-theme #clpGrid,
    body.clp-theme .clp-grid {
        gap: 0.55rem !important;
        padding: 0.75rem !important;
    }
}

/* ==========================================================
   15. REDUCED MOTION
   ========================================================== */
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
    body.clp-theme .clp-sidebar {
        transition: opacity 0.15s ease !important;
        transform: none !important;
    }
    body.clp-theme .clp-sidebar.is-open {
        transform: none !important;
    }
    .clp-sheet-backdrop {
        transition: opacity 0.15s ease !important;
    }
}
