/**
 * Desktop Shop & Catalog Overhaul - Tech Glass Commerce
 * Fixed Grid Canvas, Sticky Floating Sidebar, Active Chips & Dynamic Pagination
 */

@media screen and (min-width: 1024px) {
    
    /* MAIN DESKTOP GRID CONTAINER */
    .tech-shop-main-layout {
        max-width: 1440px;
        margin: 30px auto 80px auto;
        padding: 0 30px;
        display: grid;
        grid-template-columns: 290px minmax(0, 1fr); /* Strictly locks canvas width */
        gap: 40px;
        align-items: start;
        width: 100%;
        box-sizing: border-box;
    }

    /* --- LEFT GLASS FILTER SIDEBAR (STICKY FLOATING) --- */
    .tech-shop-sidebar-glass {
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(16px);
        border-radius: 24px;
        padding: 28px;
        border: 1px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
        position: sticky;
        top: 90px; /* Sticks comfortably under top header */
        align-self: start;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        scrollbar-width: thin;
        box-sizing: border-box;
        z-index: 20;
    }

    .tech-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 1px solid #f1f5f9;
    }

    .tech-sidebar-title {
        font-size: 18px;
        font-weight: 700;
        color: #1a1a1a;
        margin: 0;
    }

    .tech-btn-reset-filters {
        background: none;
        border: none;
        color: #ebc1c0;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .tech-filter-group {
        margin-bottom: 26px;
    }

    .tech-filter-group-title {
        font-size: 13px;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .tech-dept-label {
        font-size: 12px;
        font-weight: 700;
        color: #94a3b8;
        margin-bottom: 6px;
    }

    .tech-cat-accordion-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .tech-cat-accordion-item label {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        color: #475569;
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .tech-cat-accordion-item label:hover { color: #ebc1c0; }

    .tech-cat-checkbox {
        accent-color: #ebc1c0;
        width: 16px;
        height: 16px;
        border-radius: 4px;
    }

    .facet-count {
        font-size: 11px;
        color: #cbd5e1;
        margin-left: auto;
    }

    /* Interlocking Facet States */
    [data-facet].facet-disabled {
        opacity: 0.35 !important;
        pointer-events: none !important;
        filter: grayscale(1);
    }

    [data-facet].facet-hidden {
        display: none !important;
    }

    /* Price Inputs */
    .tech-price-inputs-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .tech-price-field {
        width: 100%;
        height: 40px;
        border-radius: 10px;
        border: 1.5px solid #e2e8f0;
        padding: 0 12px;
        font-size: 13px;
        font-weight: 600;
        background: #ffffff;
        box-sizing: border-box;
    }

    /* Stock Switch */
    .tech-toggle-switch-wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .tech-switch {
        position: relative;
        display: inline-block;
        width: 44px;
        height: 24px;
    }

    .tech-switch input { opacity: 0; width: 0; height: 0; }

    .tech-slider {
        position: absolute;
        cursor: pointer;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: #cbd5e1;
        transition: .3s;
        border-radius: 24px;
    }

    .tech-slider:before {
        position: absolute;
        content: "";
        height: 18px; width: 18px;
        left: 3px; bottom: 3px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
    }

    input:checked + .tech-slider { background-color: #ebc1c0; }
    input:checked + .tech-slider:before { transform: translateX(20px); }

    /* Ratings List */
    .tech-ratings-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .tech-rating-option {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        font-size: 13px;
        color: #475569;
    }

    .tech-rating-option input { accent-color: #ebc1c0; }

    /* Attribute & Tag Pills */
    .tech-attr-pills-wrap,
    .tech-tags-cloud {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .tech-attr-pill,
    .tech-tag-pill {
        padding: 6px 14px;
        border-radius: 20px;
        background: #f1f5f9;
        color: #475569;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        user-select: none;
    }

    .tech-attr-pill.active,
    .tech-tag-pill.active,
    .tech-attr-pill:hover,
    .tech-tag-pill:hover {
        background: #ebc1c0;
        color: #ffffff;
    }

    /* --- RIGHT CONTENT AREA --- */
    .tech-shop-content-area {
        display: flex;
        flex-direction: column;
        gap: 25px;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Top Controls Bar */
    .tech-shop-top-control-bar {
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(12px);
        border-radius: 20px;
        padding: 18px 28px;
        border: 1px solid rgba(255, 255, 255, 0.9);
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    }

    .tech-active-filters-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .tech-count-badge {
        font-size: 13px;
        font-weight: 700;
        color: #1a1a1a;
        background: #f1f5f9;
        padding: 6px 14px;
        border-radius: 30px;
    }

    .active-filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #fff4f0;
        border: 1px solid #ffe0d4;
        color: #ebc1c0;
        padding: 5px 12px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
    }

    .active-filter-chip .remove-chip {
        cursor: pointer;
        font-weight: 700;
        font-size: 14px;
        margin-left: 2px;
    }

    .tech-view-grid-switchers {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .tech-grid-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        border: 1.5px solid #e2e8f0;
        background: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .tech-grid-btn.active,
    .tech-grid-btn:hover {
        border-color: #ebc1c0;
        color: #ebc1c0;
    }

    /* LOCKED PRODUCT GRID CONTROLS */
    .tech-product-grid-container {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 25px;
        transition: all 0.3s ease;
        width: 100%;
        box-sizing: border-box;
    }

    .tech-product-grid-container.grid-4-col {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Enhanced Product Card with Dual Image Hover */
    .tech-shop-card {
        background: #ffffff;
        border-radius: 20px;
        overflow: hidden;
        border: 1px solid #f1f5f9;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        position: relative;
    }

    .tech-shop-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
        border-color: rgba(255, 79, 0, 0.2);
    }

    .tech-card-media-wrap {
        position: relative;
        width: 100%;
        height: 310px;
        overflow: hidden;
        background: #f8fafc;
    }

    .tech-card-img-primary,
    .tech-card-img-secondary {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .tech-card-img-secondary {
        position: absolute;
        top: 0; left: 0;
        opacity: 0;
    }

    .tech-shop-card:hover .tech-card-img-secondary {
        opacity: 1;
        transform: scale(1.05);
    }

    .tech-shop-card:hover .tech-card-img-primary { opacity: 0; }

    .tech-card-quick-add-btn {
        position: absolute;
        bottom: -50px;
        left: 15px;
        right: 15px;
        height: 44px;
        border-radius: 12px;
        background: rgba(26, 26, 26, 0.9);
        backdrop-filter: blur(8px);
        color: #ffffff;
        border: none;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .tech-shop-card:hover .tech-card-quick-add-btn { bottom: 15px; }
    .tech-card-quick-add-btn:hover { background: #ebc1c0; }

    .tech-card-info-wrap { padding: 20px; }

    .tech-card-cat-title {
        font-size: 11px;
        font-weight: 700;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
    }

    .tech-card-title-link {
        font-size: 16px;
        font-weight: 700;
        color: #1a1a1a;
        text-decoration: none;
        display: block;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .tech-card-title-link:hover { color: #ebc1c0; }

    .tech-card-price {
        font-size: 17px;
        font-weight: 700;
        color: #ebc1c0;
    }

    /* DYNAMIC AJAX PAGINATION NAV */
    .tech-pagination-wrapper {
        margin-top: 40px;
        text-align: center;
    }

    .tech-pagination-wrapper ul.page-numbers {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .tech-pagination-wrapper ul.page-numbers li a,
    .tech-pagination-wrapper ul.page-numbers li span {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        border-radius: 12px;
        background: #ffffff;
        border: 1.5px solid #e2e8f0;
        color: #1a1a1a;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .tech-pagination-wrapper ul.page-numbers li span.current,
    .tech-pagination-wrapper ul.page-numbers li a:hover {
        background: #ebc1c0;
        border-color: #ebc1c0;
        color: #ffffff;
    }

    .tech-grid-skeleton {
        opacity: 0.4;
        pointer-events: none;
        filter: blur(2px);
    }
}