/* === REPASAAS PRO: MASTER CATALOG STYLES === */
/* High-End Aesthetics for PC and Responsive Adapters */

:root {
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(226, 232, 240, 0.8);
    --glass-blur: 12px;
    --navy-deep: #1e293b;
    --slate-soft: #f8fafc;
    --success-green: #22c55e;
}

/* 1. Main Container Logic */
#view-catalog {
    padding: 100px 20px 20px 20px; /* ALIGNED WITH GESTION MODS */
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

/* 2. Premium Search & Filter Hub */
.search-container {
    background: white;
    padding: 12px 12px 12px 24px; /* ALIGN PERFECTION AT RIGHT */
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
    margin-bottom: 25px;
    display: flex;
    flex-direction: row; /* FILTERS LEFT, SEARCH RIGHT */
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--card-border);
    /* STICKY REMOVED AS PER USER REQUEST TO PREVENT OCCLUSION */
}

.control-search {
    margin-left: auto; /* PUSH TO RIGHT */
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--slate-soft);
    padding: 12px 20px;
    border-radius: 16px;
    transition: all 0.2s;
    max-width: 380px;
}

.control-search:focus-within {
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.05);
    border: 1px solid #cbd5e1;
}

.control-search i {
    color: #94a3b8;
    font-size: 1.2rem;
}

.control-search input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy-deep);
    outline: none;
}

/* 3. Filter Pills */
.filters-dropdowns-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

#cat-filter { width: 220px; min-width: 220px; }
#brand-filter { width: 160px; min-width: 160px; }
#model-filter { width: 220px; min-width: 220px; }

.premium-select {
    height: 50px; 
    padding: 0 32px 0 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: var(--navy-deep);
    font-size: 0.8rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    transition: all 0.2s;
}

.view-toggle {
    display: none !important;
}

.premium-select:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.premium-select:focus {
    border-color: var(--navy-deep);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.05);
}

/* 4. Products Grid */
#products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); /* OPTIMIZED FOR 4 CARDS PER ROW */
    gap: 25px;
}

/* 5. The Premium Product Card (PC) */
.product-card {
    background: white;
    border-radius: 28px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
    border-color: rgba(30, 41, 59, 0.1);
}

/* === PREMIUM MASTER DESIGN FOR PRIVATE CATALOG === */

.product-card {
    background: #ffffff;
    border-radius: 32px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.12);
    border-color: var(--primary);
}

/* Badge Premium: Arriba a la Izquierda */
.prod-badge-top {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    color: white !important;
    font-size: 0.55rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    z-index: 20;
    background: var(--primary-gradient, var(--primary, rgba(30, 41, 59, 0.9))) !important;
    backdrop-filter: blur(4px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.prod-img-container {
    height: 260px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
    cursor: pointer;
}

.prod-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .prod-img {
    transform: scale(1.1);
}

.prod-body-premium {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-top: 1px solid #f1f5f9;
}

.prod-title {
    font-size: 1.1rem !important; /* REDUCED */
    font-weight: 950 !important;
    color: #1e293b !important;
    margin: 0 0 4px 0 !important;
    letter-spacing: -0.4px !important;
    line-height: 1.2 !important;
}

.prod-desc {
    font-size: 0.75rem !important; /* REDUCED */
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}


/* === PRICING ENGINE STYLES (CLIENT & STAFF) === */

/* 1. Universal Label */
.price-label {
    font-size: 0.65rem !important;
    font-weight: 850 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 2px;
}

/* 2. Client View (Premium Dual-Tone Pill) */
.prod-pricing-pill {
    display: flex !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 28px !important;
    padding: 2px !important; /* Outer container for inner tiles */
    margin: 18px 0 !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.price-column {
    display: flex;
    flex-direction: column;
    flex: 1.2;
    padding: 10px 14px; /* REDUCED PADDING */
    background: #fffafa; 
    position: relative;
}

.price-column::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: #f1f5f9;
}

.price-column.border-left {
    flex: 1;
    background: #ffffff !important;
    text-align: right;
    align-items: flex-end;
}

.price-column.border-left::after { display: none; }

.price-value {
    font-size: 1.5rem !important; /* REDUCED */
    font-weight: 950 !important;
    color: var(--primary, #dc2626) !important;
    line-height: 1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(220, 38, 38, 0.05);
}

.price-bs {
    font-size: 0.95rem !important; /* REDUCED */
    font-weight: 850 !important;
    color: #1e293b !important;
    line-height: 1;
}

/* 3. New Staff/Admin View (Horizontal List - Reference Match) */
.staff-pricing-list {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 22px !important;
    margin: 15px 0 !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.price-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 10px 14px !important;
    transition: background 0.2s;
}

.price-row:hover {
    background: #f8fafc;
}

.price-row.separator-top {
    border-top: 1px dashed #e2e8f0 !important;
}

.price-label {
    font-size: 0.75rem !important;
    font-weight: 850 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
}

.price-label.label-red {
    color: var(--primary, #dc2626) !important;
}

.price-label.label-gray {
    color: #64748b !important;
}

.price-val-group {
    display: flex !important;
    flex-direction: column !important;
    text-align: right !important;
    align-items: flex-end !important;
}

.price-val-main {
    font-size: 1.15rem !important;
    font-weight: 950 !important;
    color: #1e293b !important;
    line-height: 1;
}

.price-val-main.highlight-red {
    color: var(--primary, #dc2626) !important;
}

.price-val-main.highlight-gray {
    color: #475569 !important;
}

.price-val-sub {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #64748b !important;
    margin-top: 3px;
}





/* Footer Premium */
.prod-footer-premium {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    margin-top: auto;
    padding-top: 5px;
}

.prod-meta-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sku-pill {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    color: #64748b !important;
    background: #f1f5f9 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    width: fit-content;
}

.stock-badge-pill {
    display: inline-flex !important;
    width: fit-content !important; /* LOCK WIDTH TO TEXT */
    align-items: center !important;
    gap: 5px !important;
    font-size: 0.62rem !important;
    font-weight: 950 !important;
    padding: 3px 10px !important; /* TIGHTER PADDING */
    border-radius: 6px !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
}

.stock-badge-pill.in { 
    background: #f0fdf4 !important; 
    color: #16a34a !important; 
    border: 1px solid #dcfce7 !important; 
}
.stock-badge-pill.low { 
    background: #fffbeb !important; 
    color: #d97706 !important; 
    border: 1px solid #fef3c7 !important; 
}
.stock-badge-pill.out { 
    background: #fef2f2 !important; 
    color: #dc2626 !important; 
    border: 1px solid #fee2e2 !important; 
}

.stock-badge-pill i {
    font-size: 0.85rem !important;
}

.branch-stock-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 4px 0 10px 0 !important;
    align-items: center !important;
}

.branch-stock-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 0.55rem !important;
    font-weight: 850 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
}

.branch-stock-pill.in {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border: 1px solid #dcfce7 !important;
}

.branch-stock-pill.out {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0 !important;
}

.branch-stock-pill i {
    font-size: 0.7rem !important;
}

.prod-actions-right {
    display: flex;
    gap: 10px;
}

.btn-action-circle {
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    background: white !important;
}

.btn-action-circle.whatsapp {
    border: 2px solid #000 !important;
    color: #25d366 !important;
}

.btn-action-circle.whatsapp:hover {
    background: #f0fdf4 !important;
    transform: translateY(-2px);
}

.btn-action-circle.cart {
    border: 1.5px solid #e2e8f0 !important;
    color: #334155 !important;
}

.btn-action-circle.cart.added {
    border-color: #22c55e !important;
    background-color: #f0fdf4 !important;
    color: #15803d !important;
}

.view-toggle button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-toggle button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--navy-deep);
    transform: translateY(-2px);
}

.view-toggle button.active {
    background: var(--navy-deep);
    color: white;
    border-color: var(--navy-deep);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2);
}


/* List View Overrides (Redesigned) */
#products-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#products-grid.list-view .product-card {
    flex-direction: row;
    height: auto !important; /* Let it grow for 4 prices */
    min-height: 180px;
    align-items: stretch;
}

#products-grid.list-view .prod-img-container {
    width: 200px;
    height: auto;
    min-height: 180px;
    background: #f8fafc;
}

#products-grid.list-view .prod-body-premium {
    padding: 20px 30px;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: 100%;
}

/* Ensure pricing takes appropriate space in list mode */
#products-grid.list-view .staff-pricing-grid,
#products-grid.list-view .prod-pricing-pill {
    margin: 0 !important;
    min-width: 320px;
}

#products-grid.list-view .prod-footer-premium {
    margin-top: 0;
    margin-left: auto;
    padding-left: 20px;
    border-left: 1px solid #f1f5f9;
}


/* Animations */
/* 6. Stories Rail (Premium Hub) */
.stories-rail {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0 25px 0;
    scrollbar-width: none;
}

.story-item {
    flex-shrink: 0;
    width: 105px; /* INSTAGRAM SIZE INCREASE */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.story-item:hover {
    transform: scale(1.1);
}

.story-ring {
    width: 92px; /* INSTAGRAM SIZE INCREASE */
    height: 92px; /* INSTAGRAM SIZE INCREASE */
    border-radius: 50%;
    padding: 3.5px;
    background: linear-gradient(45deg, var(--primary, #dc2626) 0%, #94a3b8 100%); /* BRAND: RED TO GRAY */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.story-img-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    padding: 2px;
    overflow: hidden;
}

.story-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.story-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--navy-deep);
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.3px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 7. BCV Rate Card (Fintech Structured Identity) */
.bcv-rate-container {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-start;
}

.bcv-rate-card,
.bcv-rate-pill {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 16px;
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    position: relative;
    transition: all 0.2s ease;
    width: fit-content;
}

.bcv-rate-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px -3px rgba(15, 23, 42, 0.08);
}

.bcv-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #475569;
}

.bcv-card-header i {
    font-size: 1.05rem;
    color: #64748b;
}

.bcv-rate-date {
    font-size: 0.8rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.bcv-horizontal-divider {
    width: 100%;
    height: 1px;
    background: #f1f5f9;
    margin: 0;
}

.bcv-rates-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bcv-vertical-separator {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    flex-shrink: 0;
}

.bcv-rate-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bcv-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1;
}

.bcv-badge.usd {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.bcv-badge.usd i {
    font-size: 0.85rem;
    color: #059669;
}

.bcv-badge.eur {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.bcv-badge.eur i {
    font-size: 0.85rem;
    color: #2563eb;
}

.bcv-rate-value {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.4px;
    white-space: nowrap;
}

.bcv-rate-value.euro-val {
    color: #1e293b;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .bcv-rate-card {
        width: 100%;
        box-sizing: border-box;
        padding: 9px 12px;
    }
    .bcv-rates-row {
        gap: 10px;
        justify-content: space-between;
    }
    .bcv-rate-value {
        font-size: 0.88rem;
    }
}

@media (max-width: 1024px) {
    #products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

/* Responsive (Handled in Step 2) */
@media (max-width: 768px) {
    #view-catalog {
        padding-top: 75px !important;
    }

    #view-catalog .stories-rail {
        margin-bottom: 4px !important;
        padding-bottom: 4px !important;
    }

    #view-catalog #catalog-rate-container {
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }

    #view-catalog .search-container {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 !important;
        gap: 8px !important;
        margin-top: 0 !important;
        margin-bottom: 12px !important;
        height: auto !important;
        min-height: 0 !important;
    }
    
    #view-catalog .control-search {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        order: -1 !important; /* Place search bar at the top */
        height: 44px !important;
        min-height: 44px !important;
        flex: none !important;
        padding: 8px 16px !important;
        box-sizing: border-box !important;
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 50px !important;
        display: flex !important;
        align-items: center !important;
    }

    #view-catalog .control-search input {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: 100% !important;
        margin: 0 !important;
    }

    #view-catalog .filters-dropdowns-group {
        width: 100% !important;
        display: flex !important;
        gap: 6px !important;
        margin: 0 !important;
    }

    #view-catalog .filters-dropdowns-group select.premium-select {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        height: 40px !important;
        font-size: 0.72rem !important;
        font-weight: 850 !important;
        padding: 0 18px 0 8px !important;
        background-position: right 6px center !important;
        background-size: 10px !important;
        border-radius: 10px !important;
        margin: 0 !important;
    }
    
    #products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

/* 8. Smart Pricing Grid (Staff View) */
.m-staff-price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}

.m-price-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.m-price-box.mayor {
    border-left: 1px dashed #cbd5e1;
    padding-left: 12px;
}

.m-lbl {
    font-size: 0.6rem;
    font-weight: 850;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m-val {
    font-size: 1.1rem;
    font-weight: 950;
    color: var(--navy-deep);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.m-bs {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    font-style: italic;
}

/* Client View Primary Row */
.m-client-price-row {
    padding: 10px 0;
}

.m-p-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.m-usd {
    font-size: 1.8rem;
    font-weight: 950;
    color: var(--primary, #dc2626);
    letter-spacing: -1px;
}

/* Footer Actions */
.m-footer-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
}

.m-btn-share {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    padding: 12px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
}

.m-btn-add {
    background: var(--navy-deep);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2);
    text-transform: uppercase;
}
/* Responsive Staff Pricing */
@media (max-width: 768px) {
    .staff-pricing-grid {
        gap: 12px 20px !important;
        padding: 18px !important;
        border-radius: 20px !important;
    }
    .price-val-staff {
        font-size: 1.25rem !important;
    }
    .price-val-small {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 400px) {
    .staff-pricing-grid {
        gap: 10px 10px !important;
        padding: 15px !important;
    }
    .price-val-staff {
        font-size: 1.15rem !important;
    }
    .price-label {
        font-size: 0.6rem !important;
        letter-spacing: 0.5px !important;
    }
}

/* --- Story Viewer Glass Overlay --- */
.story-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 999999; /* ABOVE EVERYTHING */
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease-out;
}

.story-progress-container {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 100;
}

.story-view-header {
    position: fixed;
    top: 30px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 90;
}

.story-header-logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid white;
    padding: 2px;
    background: white;
    overflow: hidden;
    flex-shrink: 0;
}

.story-header-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.story-header-info {
    display: flex;
    flex-direction: column;
    color: white;
}

.story-header-title {
    font-size: 1rem;
    font-weight: 850;
    margin: 0;
    letter-spacing: -0.5px;
}

.story-header-subtitle {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.story-view-close {
    position: fixed;
    top: 30px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 1000001; /* Above progress bars */
    transition: all 0.2s;
}

.story-view-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.story-view-img-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    position: relative;
}

.story-view-img {
    max-width: 90%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
}

.story-view-action-bar {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.btn-story-add {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border: none;
    padding: 14px 45px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-story-add:active {
    transform: scale(0.95);
}

.story-progress-bar {
    height: 3px;
    flex: 1;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-bar.active .story-progress-fill,
.story-progress-bar.seen {
    background: rgba(255,255,255,0.9);
}

.story-progress-fill {
    height: 100%;
    width: 0;
    background: rgba(255,255,255,0.9);
    animation: fillStory linear forwards;
}

.story-nav-area {
    position: fixed;
    top: 80px;
    width: 30%;
    height: 70%;
    z-index: 50;
    cursor: pointer;
}

.story-nav-area.left { left: 0; }
.story-nav-area.right { right: 0; width: 70%; }

.story-watermark {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 100px;
    height: auto;
    opacity: 0.6;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3)) grayscale(1) invert(1);
    z-index: 20;
    pointer-events: none;
}

/* Consolidated above */

.story-view-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 30px 40px 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: white;
    pointer-events: none;
}

.story-view-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.story-view-price {
    font-size: 1.8rem;
    font-weight: 950;
    color: #ef4444;
    margin-top: 5px;
}

.inv-nav-tabs {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
    gap: 24px;
    width: 100%;
}

/* ========================================================= */
/* INVENTORY TOOLBAR - MOBILE SPECIFIC ONLY (<= 768px)       */
/* ========================================================= */
@media (max-width: 768px) {
    .inv-nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        gap: 16px;
        padding-bottom: 4px;
        margin-bottom: 16px;
    }
    .inv-nav-tabs::-webkit-scrollbar {
        display: none;
    }
    .inv-nav-tabs button {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.9rem !important;
        padding: 8px 2px !important;
    }

    .inv-row-1 {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .inv-row-2 {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 18px !important;
    }

    /* Make each functional group scroll horizontally without breaking on mobile */
    .inv-group-import-export,
    .inv-group-filters,
    .inv-group-tools {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px !important;
        width: 100% !important;
        padding: 2px 2px 6px 2px !important;
    }

    .inv-group-import-export::-webkit-scrollbar,
    .inv-group-filters::-webkit-scrollbar,
    .inv-group-tools::-webkit-scrollbar {
        display: none;
    }

    .inv-group-import-export button,
    .inv-group-filters button,
    .inv-group-tools button {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        height: 38px !important;
        padding: 0 14px !important;
        font-size: 0.82rem !important;
    }

    .inv-row-2 .control-search {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        background: #ffffff;
        border: 1.5px solid #e2e8f0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    }
}
