/* =========================================================
   SHOP PAGE
========================================================= */


/* =========================================================
   PAGE HEADER
========================================================= */

.shop-page-header {
    padding: 75px 0 65px;

    background: var(--surface-soft);

    border-bottom: 1px solid var(--border);
}

.shop-page-header-content {
    text-align: center;
}

.shop-page-header h1 {
    margin-bottom: 12px;

    font-size: clamp(40px, 5vw, 62px);
}

.shop-page-header p {
    max-width: 560px;

    margin: 0 auto 25px;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.8;
}

.shop-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    color: var(--text-light);

    font-size: 10px;
}

.shop-breadcrumb a {
    color: var(--primary);
}

.shop-breadcrumb i {
    font-size: 8px;
}


/* =========================================================
   SHOP MAIN
========================================================= */

.shop-main {
    padding: 65px 0 100px;

    background: var(--white);
}


/* =========================================================
   TOOLBAR
========================================================= */

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding-bottom: 20px;

    border-bottom: 1px solid var(--border);
}

.shop-results {
    color: var(--text-light);

    font-size: 11px;
}

.shop-results strong {
    color: var(--primary);
}

.shop-toolbar-actions {
    display: flex;
    align-items: center;

    gap: 25px;
}

.sort-wrapper {
    display: flex;
    align-items: center;

    gap: 10px;
}

.sort-wrapper label {
    color: var(--text-light);

    font-size: 10px;
}

.sort-select {
    min-width: 175px;
    height: 40px;

    padding: 0 32px 0 12px;

    color: var(--primary);

    background-color: var(--white);

    border: 1px solid var(--border);

    outline: none;

    font-size: 11px;

    cursor: pointer;
}

.sort-select:focus {
    border-color: var(--primary);
}

.view-switcher {
    display: flex;

    border: 1px solid var(--border);
}

.view-button {
    width: 39px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--text-light);

    background: var(--white);

    cursor: pointer;

    transition: var(--transition);
}

.view-button + .view-button {
    border-left: 1px solid var(--border);
}

.view-button:hover,
.view-button.active {
    color: var(--white);

    background: var(--primary);
}

.mobile-filter-trigger {
    display: none;

    align-items: center;

    gap: 7px;

    height: 40px;

    padding: 0 14px;

    color: var(--primary);

    background: var(--white);

    border: 1px solid var(--border);

    font-size: 11px;

    cursor: pointer;
}


/* =========================================================
   SHOP LAYOUT
========================================================= */

.shop-layout {
    display: grid;

    grid-template-columns: 245px 1fr;

    gap: 45px;

    padding-top: 35px;
}


/* =========================================================
   FILTER SIDEBAR
========================================================= */

.shop-sidebar {
    position: relative;
}

.sidebar-mobile-header {
    display: none;
}

.filter-group {
    padding: 0 0 22px;

    margin-bottom: 22px;

    border-bottom: 1px solid var(--border);
}

.filter-heading {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;

    padding: 0;

    color: var(--primary);

    background: transparent;

    font-family: var(--font-body);

    font-size: 12px;
    font-weight: 700;

    text-align: left;

    cursor: pointer;
}

.filter-heading i {
    font-size: 10px;

    transition: transform 0.3s ease;
}

.filter-group.closed .filter-heading i {
    transform: rotate(-90deg);
}

.filter-content {
    overflow: hidden;

    max-height: 500px;

    transition:
        max-height 0.3s ease,
        opacity 0.3s ease;
}

.filter-group.closed .filter-content {
    max-height: 0;

    opacity: 0;
}

.filter-checkbox {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 30px;

    gap: 9px;

    color: var(--text-secondary);

    font-size: 11px;

    cursor: pointer;
}

.filter-checkbox input {
    position: absolute;

    width: 0;
    height: 0;

    opacity: 0;
}

.custom-checkbox {
    position: relative;

    width: 15px;
    height: 15px;

    flex-shrink: 0;

    border: 1px solid #ccc;

    transition: var(--transition);
}

.filter-checkbox input:checked + .custom-checkbox {
    background: var(--primary);

    border-color: var(--primary);
}

.filter-checkbox input:checked + .custom-checkbox::after {
    content: "";

    position: absolute;

    top: 3px;
    left: 5px;

    width: 4px;
    height: 7px;

    border-right: 1px solid var(--white);
    border-bottom: 1px solid var(--white);

    transform: rotate(45deg);
}

.filter-checkbox small {
    margin-left: auto;

    color: var(--text-light);

    font-size: 9px;
}


/* =========================================================
   PRICE FILTER
========================================================= */

.price-range-values {
    display: flex;
    justify-content: space-between;

    margin-bottom: 18px;

    color: var(--text-secondary);

    font-size: 10px;
}

.range-slider {
    position: relative;

    height: 25px;
}

.range-slider input[type="range"] {
    position: absolute;

    top: 8px;
    left: 0;

    width: 100%;
    height: 3px;

    padding: 0;

    background: var(--border);

    border: 0;

    appearance: none;

    pointer-events: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;

    background: var(--primary);

    border: 2px solid var(--white);
    border-radius: 50%;

    appearance: none;

    cursor: pointer;

    pointer-events: auto;
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;

    background: var(--primary);

    border: 2px solid var(--white);
    border-radius: 50%;

    cursor: pointer;

    pointer-events: auto;
}

.price-inputs {
    display: flex;
    align-items: flex-end;

    gap: 7px;

    margin-top: 8px;
}

.price-inputs > div {
    flex: 1;
}

.price-inputs span:not(.price-dash) {
    display: block;

    margin-bottom: 5px;

    color: var(--text-light);

    font-size: 8px;

    text-transform: uppercase;
}

.price-inputs input {
    width: 100%;
    height: 35px;

    padding: 0 8px;

    color: var(--primary);

    background: var(--white);

    border: 1px solid var(--border);

    outline: none;

    font-size: 10px;
}

.price-dash {
    padding-bottom: 9px;

    color: var(--text-light);

    font-size: 10px;
}


/* =========================================================
   COLOR FILTER
========================================================= */

.color-options {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 12px 8px;
}

.color-option {
    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--text-secondary);

    font-size: 10px;

    cursor: pointer;
}

.color-option input {
    position: absolute;

    opacity: 0;
}

.color-circle {
    width: 18px;
    height: 18px;

    border: 1px solid #ddd;
    border-radius: 50%;

    transition: var(--transition);
}

.color-option input:checked + .color-circle {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.color-black {
    background: #00409e;
}

.color-white {
    background: #fff;
}

.color-brown {
    background: #76513b;
}

.color-blue {
    background: #385d82;
}


/* =========================================================
   SIZE
========================================================= */

.size-options {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;
}

.size-options label {
    cursor: pointer;
}

.size-options input {
    position: absolute;

    opacity: 0;
}

.size-options span {
    min-width: 38px;
    height: 32px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    color: var(--text-secondary);

    border: 1px solid var(--border);

    font-size: 9px;

    transition: var(--transition);
}

.size-options input:checked + span {
    color: var(--white);

    background: var(--primary);

    border-color: var(--primary);
}


/* =========================================================
   RATING
========================================================= */

.rating-filter {
    display: flex;
    align-items: center;

    gap: 7px;

    min-height: 30px;

    color: var(--text-light);

    font-size: 10px;

    cursor: pointer;
}

.rating-filter input {
    accent-color: var(--primary);
}

.rating-stars {
    color: var(--accent);

    letter-spacing: 1px;
}


/* =========================================================
   CLEAR FILTERS
========================================================= */

.clear-filters {
    width: 100%;

    padding: 0 0 5px;

    color: var(--primary);

    background: transparent;

    border-bottom: 1px solid var(--primary);

    font-size: 10px;
    font-weight: 700;

    cursor: pointer;

    transition: var(--transition);
}

.clear-filters:hover {
    color: var(--accent);

    border-color: var(--accent);
}


/* =========================================================
   ACTIVE FILTERS
========================================================= */

.active-filters {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 20px;
}

.active-filter {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 6px 9px;

    color: var(--primary);

    background: var(--surface-soft);

    border: 1px solid var(--border);

    font-size: 9px;
}

.active-filter button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: var(--text-light);

    background: transparent;

    cursor: pointer;
}

.active-filter button:hover {
    color: var(--primary);
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.shop-product-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 35px 20px;
}

.shop-product-card {
    min-width: 0;
}

.shop-product-image {
    position: relative;

    aspect-ratio: 0.86;

    overflow: hidden;

    background: var(--surface-soft);
}

.shop-product-image > a {
    display: block;

    width: 100%;
    height: 100%;
}

.shop-product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.6s ease;
}

.shop-product-card:hover .shop-product-image img {
    transform: scale(1.045);
}

.shop-product-image .product-label {
    position: absolute;

    top: 13px;
    left: 13px;

    z-index: 2;

    padding: 6px 9px;

    color: var(--white);

    background: var(--primary);

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 0.7px;

    text-transform: uppercase;
}

.product-label.bestseller {
    background: var(--accent);
}

.product-label.sale {
    background: #8c3030;
}

.product-label.out-stock {
    background: #666;
}

.product-wishlist {
    position: absolute;

    top: 11px;
    right: 11px;

    z-index: 3;

    width: 37px;
    height: 37px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);

    background: rgba(255, 255, 255, 0.93);

    border-radius: 50%;

    cursor: pointer;

    transition: var(--transition);
}

.product-wishlist:hover,
.product-wishlist.active {
    color: var(--white);

    background: var(--accent);
}

.product-quick-actions {
    position: absolute;

    right: 12px;
    bottom: 12px;
    left: 12px;

    z-index: 4;

    opacity: 0;

    transform: translateY(8px);

    transition: var(--transition);
}

.shop-product-card:hover .product-quick-actions {
    opacity: 1;

    transform: translateY(0);
}

.quick-view {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 42px;

    color: var(--primary);

    background: var(--white);

    font-size: 10px;
    font-weight: 700;
}

.quick-view:hover {
    color: var(--white);

    background: var(--primary);
}

.shop-product-info {
    padding-top: 15px;
}

.shop-product-info .product-category {
    margin-bottom: 5px;

    color: var(--text-light);

    font-size: 8px;
    font-weight: 600;

    letter-spacing: 1px;

    text-transform: uppercase;
}

.shop-product-info h3 {
    margin-bottom: 7px;

    font-family: var(--font-body);

    font-size: 13px;
    font-weight: 600;
}

.shop-product-info h3 a {
    transition: var(--transition);
}

.shop-product-info h3 a:hover {
    color: var(--accent);
}

.product-rating {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-bottom: 7px;

    color: var(--text-light);

    font-size: 9px;
}

.stars {
    color: var(--accent);

    letter-spacing: 1px;
}

.product-price {
    display: flex;
    align-items: center;

    gap: 8px;
}

.product-price > span {
    color: var(--primary);

    font-size: 13px;
    font-weight: 700;
}

.product-price del {
    color: var(--text-light);

    font-size: 11px;
}


/* =========================================================
   LIST VIEW
========================================================= */

.shop-product-grid.list-view {
    grid-template-columns: 1fr;
}

.shop-product-grid.list-view .shop-product-card {
    display: grid;

    grid-template-columns: 220px 1fr;

    gap: 25px;

    padding-bottom: 25px;

    border-bottom: 1px solid var(--border);
}

.shop-product-grid.list-view .shop-product-image {
    aspect-ratio: 1;
}

.shop-product-grid.list-view .shop-product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 20px 0;
}

.shop-product-grid.list-view .shop-product-info h3 {
    font-size: 18px;
}

.shop-product-grid.list-view .product-rating {
    margin-top: 5px;
}

.shop-product-grid.list-view .product-price {
    margin-top: 5px;
}


/* =========================================================
   NO PRODUCTS
========================================================= */

.no-products {
    padding: 90px 20px;

    text-align: center;

    background: var(--surface-soft);

    border: 1px solid var(--border);
}

.no-products-icon {
    width: 65px;
    height: 65px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    color: var(--primary);

    background: var(--white);

    border-radius: 50%;

    font-size: 22px;
}

.no-products h3 {
    margin-bottom: 8px;

    font-size: 24px;
}

.no-products p {
    margin-bottom: 25px;

    color: var(--text-secondary);

    font-size: 12px;
}


/* =========================================================
   PAGINATION
========================================================= */

.shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    margin-top: 65px;
}

.pagination-button {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--text-secondary);

    background: var(--white);

    border: 1px solid var(--border);

    font-size: 10px;

    cursor: pointer;

    transition: var(--transition);
}

.pagination-button:hover:not(:disabled),
.pagination-button.active {
    color: var(--white);

    background: var(--primary);

    border-color: var(--primary);
}

.pagination-button:disabled {
    color: #ccc;

    cursor: not-allowed;
}

.pagination-dots {
    padding: 0 4px;

    color: var(--text-light);

    font-size: 11px;
}


/* =========================================================
   SEARCH OVERLAY
========================================================= */

.search-overlay {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding: 15vh 20px;

    background: rgba(0, 0, 0, 0.82);

    opacity: 0;
    visibility: hidden;

    transition: var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    position: relative;

    width: min(850px, 100%);

    padding: 50px;

    background: var(--white);

    transform: translateY(-20px);

    transition: transform 0.3s ease;
}

.search-overlay.active .search-overlay-inner {
    transform: translateY(0);
}

.search-close {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 35px;
    height: 35px;

    color: var(--primary);

    background: var(--surface-soft);

    border-radius: 50%;

    cursor: pointer;
}

.search-eyebrow {
    display: block;

    margin-bottom: 15px;

    color: var(--text-light);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.search-form {
    display: flex;

    gap: 10px;
}

.search-input-wrapper {
    position: relative;

    flex: 1;
}

.search-input-wrapper i {
    position: absolute;

    top: 50%;
    left: 17px;

    color: var(--text-light);

    transform: translateY(-50%);
}

.search-input-wrapper input {
    width: 100%;
    height: 52px;

    padding: 0 18px 0 48px;

    color: var(--primary);

    border: 1px solid var(--border);

    outline: none;

    font-size: 12px;
}

.search-input-wrapper input:focus {
    border-color: var(--primary);
}

.search-suggestions {
    margin-top: 25px;
}

.search-suggestions > span {
    display: block;

    margin-bottom: 12px;

    color: var(--text-light);

    font-size: 9px;
    font-weight: 700;

    text-transform: uppercase;
}

.search-suggestions > div {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;
}

.search-suggestions button {
    padding: 7px 12px;

    color: var(--text-secondary);

    background: var(--surface-soft);

    border: 1px solid var(--border);

    font-size: 9px;

    cursor: pointer;
}

.search-suggestions button:hover {
    color: var(--white);

    background: var(--primary);

    border-color: var(--primary);
}


/* =========================================================
   MOBILE FILTER BACKDROP
========================================================= */

.filter-backdrop {
    position: fixed;

    inset: 0;

    z-index: 9997;

    background: rgba(0, 0, 0, 0.55);

    opacity: 0;
    visibility: hidden;

    transition: var(--transition);
}

.filter-backdrop.active {
    opacity: 1;
    visibility: visible;
}


/* =========================================================
   RESPONSIVE — 1199
========================================================= */

@media (max-width: 1199px) {

    .shop-layout {
        grid-template-columns: 220px 1fr;

        gap: 30px;
    }

    .shop-product-grid {
        gap: 30px 16px;
    }

}


/* =========================================================
   RESPONSIVE — 991
========================================================= */

@media (max-width: 991px) {

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: fixed;

        top: 0;
        bottom: 0;
        left: 0;

        z-index: 9998;

        width: min(350px, 90vw);

        padding: 0 25px 30px;

        overflow-y: auto;

        background: var(--white);

        transform: translateX(-100%);

        transition: transform 0.35s ease;
    }

    .shop-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-mobile-header {
        position: sticky;

        top: 0;

        z-index: 2;

        display: flex;
        align-items: center;
        justify-content: space-between;

        padding: 20px 0;

        margin-bottom: 25px;

        background: var(--white);

        border-bottom: 1px solid var(--border);
    }

    .sidebar-mobile-header button {
        width: 35px;
        height: 35px;

        color: var(--primary);

        background: var(--surface-soft);

        border-radius: 50%;

        cursor: pointer;
    }

    .mobile-filter-trigger {
        display: inline-flex;
    }

    .shop-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}


/* =========================================================
   RESPONSIVE — 767
========================================================= */

@media (max-width: 767px) {

    .shop-page-header {
        padding: 55px 0 50px;
    }

    .shop-main {
        padding: 45px 0 70px;
    }

    .shop-toolbar {
        align-items: flex-start;
    }

    .shop-toolbar-actions {
        gap: 8px;
    }

    .sort-wrapper label,
    .view-switcher {
        display: none;
    }

    .sort-select {
        min-width: 145px;
    }

    .shop-product-grid {
        grid-template-columns: repeat(2, 1fr);

        gap: 30px 12px;
    }

    .product-quick-actions {
        display: none;
    }

    .shop-product-grid.list-view .shop-product-card {
        grid-template-columns: 145px 1fr;

        gap: 15px;
    }

    .shop-product-grid.list-view .shop-product-info h3 {
        font-size: 14px;
    }

    .search-overlay {
        padding-top: 10vh;
    }

    .search-overlay-inner {
        padding: 40px 20px 25px;
    }

    .search-form {
        flex-direction: column;
    }

}


/* =========================================================
   RESPONSIVE — 480
========================================================= */

@media (max-width: 480px) {

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-toolbar-actions {
        justify-content: space-between;
    }

    .shop-product-grid {
        gap: 28px 9px;
    }

    .shop-product-image {
        aspect-ratio: 0.84;
    }

    .shop-product-image .product-label {
        top: 8px;
        left: 8px;

        padding: 5px 7px;

        font-size: 7px;
    }

    .product-wishlist {
        top: 7px;
        right: 7px;

        width: 32px;
        height: 32px;
    }

    .shop-product-info {
        padding-top: 11px;
    }

    .shop-product-info h3 {
        font-size: 12px;
    }

    .product-rating {
        font-size: 8px;
    }

    .product-price > span {
        font-size: 12px;
    }

    .product-price del {
        font-size: 9px;
    }

    .shop-product-grid.list-view .shop-product-card {
        grid-template-columns: 110px 1fr;
    }

    .shop-product-grid.list-view .shop-product-info {
        padding: 5px 0;
    }

}