/* =========================================
   PRODUCTS PAGE: filters, sorting, results
   (loaded on the products page only; the section keeps its black theme)
========================================= */

.shop-page {
    padding: 140px 0 80px;
}

.shop-page .product-section-head {
    margin-bottom: 30px;
}

.shop-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}


/* ---------- Filter sidebar ---------- */

.shop-filters {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    border: 1px solid #262626;
    background: #111111;
    color: #dddddd;
    scrollbar-width: thin;
    scrollbar-color: #333333 transparent;
}

.shop-filters-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid #262626;
    background: #111111;
}

.shop-filters-head strong {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.shop-filters-head strong i {
    margin-right: 6px;
    color: #db5c07;
}

.shop-filters-head a {
    margin-left: auto;
    color: #db5c07;
    font-size: 12px;
}

.shop-filters-head a:hover {
    color: #ff8a3d;
}

.shop-filters-close {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid #333333;
    background: none;
    color: #ffffff;
    cursor: pointer;
}

.shop-filter-group {
    padding: 18px;
    border-bottom: 1px solid #1f1f1f;
}

.shop-filter-group h3 {
    margin: 0 0 12px;
    color: #999999;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Search */
.shop-search {
    display: flex;
    border: 1px solid #333333;
    background: #1a1a1a;
    transition: border-color .2s ease;
}

.shop-search:focus-within {
    border-color: #db5c07;
}

.shop-search input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 12px;
    border: 0;
    outline: none;
    background: transparent;
    color: #ffffff;
    font-size: 13px;
}

.shop-search input::placeholder {
    color: #777777;
}

.shop-search button {
    width: 42px;
    border: 0;
    background: #db5c07;
    color: #ffffff;
    cursor: pointer;
}

/* Checkbox options */
.shop-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    margin: 0 -8px;
    color: #cccccc;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.shop-option:hover {
    background: #1a1a1a;
    color: #ffffff;
}

.shop-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shop-check {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #555555;
    color: transparent;
    font-size: 10px;
    transition: all .15s ease;
}

.shop-option input:checked + .shop-check {
    border-color: #db5c07;
    background: #db5c07;
    color: #ffffff;
}

.shop-option input:checked ~ .shop-option-label {
    color: #ffffff;
    font-weight: 500;
}

.shop-option input:focus-visible + .shop-check {
    box-shadow: 0 0 0 3px rgba(219, 92, 7, .35);
}

.shop-option-label {
    flex: 1;
}

.shop-option em {
    min-width: 24px;
    padding: 1px 7px;
    background: #222222;
    color: #999999;
    font-size: 11px;
    font-style: normal;
    text-align: center;
}

/* Price */
.shop-price {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-price label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    border: 1px solid #333333;
    background: #1a1a1a;
}

.shop-price label:focus-within {
    border-color: #db5c07;
}

.shop-price label span {
    padding-left: 9px;
    color: #777777;
    font-size: 12px;
}

.shop-price input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 6px;
    border: 0;
    outline: none;
    background: transparent;
    color: #ffffff;
    font-size: 13px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.shop-price input::-webkit-outer-spin-button,
.shop-price input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.shop-price input::placeholder {
    color: #666666;
}

.shop-price > i {
    color: #666666;
    font-style: normal;
}

.shop-price button {
    width: 38px;
    height: 40px;
    border: 0;
    background: #db5c07;
    color: #ffffff;
    cursor: pointer;
}

.shop-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.shop-ranges a {
    padding: 5px 10px;
    border: 1px solid #333333;
    color: #bbbbbb;
    font-size: 11px;
    transition: all .15s ease;
}

.shop-ranges a:hover {
    border-color: #db5c07;
    color: #ffffff;
}

.shop-ranges a.active {
    border-color: #db5c07;
    background: #db5c07;
    color: #ffffff;
}

.shop-apply {
    display: none;
}

/* The drawer backdrop only exists on small screens (it must not take a grid column on desktop). */
.shop-filters-backdrop {
    display: none;
}


/* ---------- Toolbar ---------- */

.shop-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #262626;
    background: #111111;
}

.shop-filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #333333;
    background: none;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
}

.shop-filters-toggle em {
    padding: 0 7px;
    background: #db5c07;
    font-size: 11px;
    font-style: normal;
}

.shop-count {
    flex: 1;
    margin: 0;
    color: #999999;
    font-size: 13px;
}

.shop-count strong {
    color: #ffffff;
    font-weight: 600;
}

.shop-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #999999;
    font-size: 13px;
    white-space: nowrap;
}

.shop-sort select {
    height: 40px;
    padding: 0 34px 0 12px;
    border: 1px solid #333333;
    border-radius: 0;
    outline: none;
    background: #1a1a1a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23db5c07' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.shop-sort select:focus {
    border-color: #db5c07;
}

/* Active filter chips */
.shop-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.shop-chips a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #db5c07;
    background: rgba(219, 92, 7, .12);
    color: #ffffff;
    font-size: 12px;
    transition: background .15s ease;
}

.shop-chips a i {
    color: #ff8a3d;
    font-size: 10px;
}

.shop-chips a:hover {
    background: #db5c07;
}

.shop-chips a:hover i {
    color: #ffffff;
}

.shop-chips .shop-chips-clear {
    border-color: transparent;
    background: none;
    color: #999999;
    text-decoration: underline !important;
}

.shop-chips .shop-chips-clear:hover {
    background: none;
    color: #ffffff;
}

/* 3 cards per row next to the sidebar (4 on very wide screens) */
@media (min-width: 992px) {
    .shop-results .product-grid > .col-lg-3 {
        width: 33.3333%;
    }
}

@media (min-width: 1400px) {
    .shop-results .product-grid > .col-lg-3 {
        width: 25%;
    }
}

/* Empty state */
.shop-empty {
    padding: 60px 20px;
    border: 1px dashed #333333;
    color: #999999;
    text-align: center;
}

.shop-empty > i {
    margin-bottom: 14px;
    color: #db5c07;
    font-size: 40px;
}

.shop-empty h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 18px;
}

.shop-empty p {
    margin: 0 0 20px;
    font-size: 14px;
}

.shop-empty a {
    display: inline-block;
    padding: 10px 20px;
    background: #db5c07;
    color: #ffffff;
    font-size: 13px;
}

/* Pagination (Bootstrap markup, dark theme) */
.shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.shop-pagination nav > div:first-child {
    display: none !important;
}

.shop-pagination .pagination {
    margin: 0;
    gap: 6px;
}

.shop-pagination .page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333333;
    border-radius: 0 !important;
    background: #111111;
    color: #ffffff;
    font-size: 13px;
    box-shadow: none !important;
}

.shop-pagination .page-link:hover {
    border-color: #db5c07;
    background: #1a1a1a;
    color: #ffffff;
}

.shop-pagination .page-item.active .page-link {
    border-color: #db5c07;
    background: #db5c07;
}

.shop-pagination .page-item.disabled .page-link {
    border-color: #222222;
    background: #0a0a0a;
    color: #555555;
}

.shop-pagination .small.text-muted {
    display: none;
}


/* ---------- Mobile / tablet: filters in a slide-in drawer ---------- */

@media (max-width: 991px) {
    .shop-page {
        padding-top: 120px;
    }

    .shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .shop-filters {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1070;
        width: min(340px, 88vw);
        max-height: none;
        transform: translateX(-100%);
        transition: transform .3s ease;
    }

    body.filters-open {
        overflow: hidden;
    }

    body.filters-open .shop-filters {
        transform: translateX(0);
        box-shadow: 20px 0 60px rgba(0, 0, 0, .5);
    }

    .shop-filters-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1065;
        background: rgba(0, 0, 0, .6);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s ease;
    }

    body.filters-open .shop-filters-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .shop-filters-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .shop-apply {
        position: sticky;
        bottom: 0;
        display: block;
        width: 100%;
        height: 52px;
        border: 0;
        background: #db5c07;
        color: #ffffff;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .shop-filters-toggle {
        display: inline-flex;
    }

    .shop-toolbar {
        flex-wrap: wrap;
    }

    .shop-count {
        order: 3;
        flex-basis: 100%;
    }
}

@media (max-width: 575px) {
    .shop-toolbar {
        padding: 10px;
        gap: 10px;
    }

    .shop-sort span {
        display: none;
    }

    .shop-sort {
        flex: 1;
    }

    .shop-sort select {
        width: 100%;
    }
}
