@keyframes pageLoadAnimation {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/*-- -------------------------- -->
<---        Sold Out            -->
<--- -------------------------- -*/

.disabled-link {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.out-of-stock .cs-picture {
    filter: grayscale(50%) opacity(0.85);
    transition: filter 0.3s ease;
}

.sold-out-banner {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #c62828;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
}

.wishlist-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}


/*-- -------------------------- -->
<---        Collection          -->
<--- -------------------------- -*/
.cs-details {
    text-align: center;

}

#collection-1602 .cs-item {
    border: 1px solid #e8e8e8 !important;
    transition: border 0.2s ease-in-out; !important;
}

/* 2. Remove any hover-specific border adjustments */
#collection-1602 .cs-item:hover {
    border: 1px solid #000000 !important;
}
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {


    #collection-1602 {
        padding: var(--sectionPadding);
        animation: pageLoadAnimation 1s ease-out;

    }
    #collection-1602 .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        /* 48px - 64px */
        gap: clamp(3rem, 6vw, 4rem);
        position: relative;
        z-index: 1;
    }
    #collection-1602 .cs-content {
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    #collection-1602 .cs-title {
        margin: 0;
    }
    #collection-1602 .cs-button-group {
        margin: 0;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        /* 16px - 32px */
        gap: clamp(1rem, 4vw, 2rem);
    }
    #collection-1602 .cs-button {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.2em;
        text-transform: uppercase;
        padding: 0;
        color: var(--bodyTextColor);
        background-color: transparent;
        border: none;
        position: relative;
        transition: color 0.3s;
    }
    #collection-1602 .cs-button:before {
        content: "";
        width: 0;
        height: 1px;
        background: var(--primary);
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        transition: width 0.3s;
    }
    #collection-1602 .cs-button:hover {
        color: var(--primary);
        cursor: pointer;
    }
    #collection-1602 .cs-button:hover:before {
        width: 100%;
    }
    #collection-1602 .cs-button.cs-active {
        color: var(--primary);
    }
    #collection-1602 .cs-button.cs-active:before {
        width: 100%;
    }
    #collection-1602 .cs-listing-wrapper {
        width: 100%;
        position: relative;
        z-index: 1;
    }
    #collection-1602 .cs-listing {
        width: 100%;
        margin: 0;
        padding: 0;
        display: grid;
        justify-items: center;
        grid-auto-flow: row;
        /* 16px - 20px */
        gap: clamp(0.5rem, 1vw, 0.75rem);
        position: relative;
        transform-style: preserve-3d;
        perspective: 700px;
        transition: transform 0.7s, opacity 0.3s, visibility 0.5s, top 0.3s, left 0.3s;
        /* makes the transform scaling origin the top left corner, dictates the direction by which the scale transforms animate towards */
        transform-origin: left top;
    }
    #collection-1602 .cs-listing.cs-hidden {
        /* hidden galleries have a 0 opacity, and we animate the opacity to 1 when they become active */
        opacity: 0;
        /* by using visibility:hidden instead of display:none, we can see the animations from the opacity and transforms, display:none won't render animations. */
        visibility: hidden;
        position: absolute;
        /* this top and left value help control the animation, by setting it to position absolute and left 0, the gallery won't fly off screen to the left, it will stop its position to be at the left edge of the .cs-container (left: 0). Same for the top:0 value, the gallery won't go past that position when it animates */
        top: 0;
        left: 0;
        /* prevents the hidden galleries from overflowing the section, and makes a nice animations to transition to and from */
        transform: scaleY(0) scaleX(0);
        /* prevents the mouse from interacting with it */
        pointer-events: none;
    }
    #collection-1602 .cs-listing.cs-hidden .cs-image {
        opacity: 0;
        /* when gallery is hidden, add these styles to the cs-image to animate from when cs-hidden is removed from the .cs-gallery */
        transform: translateY(2.1875rem) rotateX(90deg);
    }
    #collection-1602 .cs-listing.cs-hidden .cs-item {
        transform: rotateY(180deg);
        opacity: 0;
    }
    #collection-1602 .cs-item {
        width: 80%;
        max-width: 23.4375rem;
        /* overwrites the default 'min-width: auto' value, keeping all grid items the same width no matter what*/
        min-width: 0;
        opacity: 1;
        padding: 0.5rem;
        border: 1px solid #e8e8e8;
        transform: rotateY(0);
        transition: transform 0.7s, opacity 0.3s;
    }
    #collection-1602 .cs-item:nth-of-type(1) {
        transition-delay: 0.1s;
    }
    #collection-1602 .cs-item:nth-of-type(2) {
        transition-delay: 0.2s;
    }
    #collection-1602 .cs-item:nth-of-type(3) {
        transition-delay: 0.3s;
    }
    #collection-1602 .cs-item:nth-of-type(4) {
        transition-delay: 0.4s;
    }
    #collection-1602 .cs-item:nth-of-type(5) {
        transition-delay: 0.5s;
    }
    #collection-1602 .cs-item:nth-of-type(6) {
        transition-delay: 0.6s;
    }
    #collection-1602 .cs-item:nth-of-type(7) {
        transition-delay: 0.7s;
    }
    #collection-1602 .cs-item:nth-of-type(8) {
        transition-delay: 0.8s;
    }
    #collection-1602 .cs-item:nth-of-type(9) {
        transition-delay: 0.1s;
    }
    #collection-1602 .cs-item:nth-of-type(10) {
        transition-delay: 0.1s;
    }
    #collection-1602 .cs-item:nth-of-type(11) {
        transition-delay: 0.1s;
    }
    #collection-1602 .cs-item:nth-of-type(12) {
        transition-delay: 0.1s;
    }
    #collection-1602 .cs-link {
        text-decoration: none;
    }
    #collection-1602 .cs-link:hover .cs-picture img {
        transform: scale(1.2);
    }
    #collection-1602 .cs-picture-group {
        width: auto;
        height: 25rem;
        margin-bottom: 1.25rem;
        position: relative;
    }
    #collection-1602 .cs-picture {
        width: 100%;
        height: 100%;
        overflow: hidden;
        display: block;
    }
    #collection-1602 .cs-picture img {
        width: 100%;
        height: 100%;
        /* using object-fit contain to keep the entirety of the product image in the frame */
        /* feel free to change this to 'cover', or adjust the background-color above if you have consistent backgrounds on your products */
        object-fit: cover;
        transition: transform 0.6s;
    }
    #collection-1602 .cs-offer {
        font-size: 0.8125rem;
        font-weight: 700;
        line-height: 1.2em;
        text-transform: uppercase;
        letter-spacing: 1.3px;
        padding: 0.375rem;
        color: #fff;
        background: #ff4747;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
    }
    #collection-1602 .cs-category {
        font-size: 1rem;
        line-height: 1.5em;
        color: #767676;
    }
    #collection-1602 .cs-name {
        /* 20px - 25px */
        font-size: clamp(1.25rem, 1vw, 1.5625rem);
        font-weight: 700;
        line-height: 1.2em;
        text-overflow: ellipsis;
        white-space: nowrap;
        width: 100%;
        margin: 0;
        color: var(--headerColor);
        overflow: hidden;
    }
    #collection-1602 .cs-actions {
        margin-top: 1.25rem;
        display: flex;
        justify-content: center;
        align-items: center;

    }
    #collection-1602 .cs-price {
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1.2em;
        color: black;

    }
    #collection-1602 .cs-was-price {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.2em;
        text-decoration: line-through;
        color: #767676;
    }
    #collection-1602 .cs-stars {
        margin-top: 0.25rem;
        display: flex;
    }
    #collection-1602 .cs-star {
        width: 1.25rem;
        height: 1.25rem;
    }
    #collection-1602 .cs-buy {
        max-height: 2.5rem;
        padding: 0.5rem;
        background: none;
        border: 2px solid var(--primary);
        border-radius: 0.25rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    #collection-1602 .cs-basket {
        width: 1.5rem;
        height: auto;
    }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
    #collection-1602 .cs-content {
        flex-direction: row;
        justify-content: space-between;
    }
    #collection-1602 .cs-listing {
        grid-template-columns: repeat(4, 1fr);
    }
    #collection-1602 .cs-item {
        max-width: none;
        width: 100%;
    }
    #collection-1602 .cs-picture-group {
        /* 200px - 320px */
        height: clamp(15rem, 23vw, 23rem);
    }
}

/* Filters */
.search-panel-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100% - 70px);
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: none;
}

.search-panel {
    background: white;
    width: 300px;
    height: 100%;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 10000;
}

.close-btn {
    align-self: flex-end;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 1rem;
}

.search-input {
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

.filter-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.filter-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid black;
    padding: 8px 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.filter-badge {
    background: black;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.filter-toggle-wrapper {
    position: relative;
}

.filter-dropdowns {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    padding: 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    width: 250px;
}

.filter-dropdowns form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-dropdowns label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.filter-dropdowns select,
.filter-dropdowns input[type="number"] {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}


input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 32px;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: all;
    z-index: 3;
}

.price-inputs {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.clear-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: transparent;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.clear-btn:hover {
    background-color: #f0f0f0;
}

.apply-btn {
    background: black;
    color: white;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.result-count {
    font-size: 14px;
    color: #555;
}

@media (max-width: 768px) {
    .filter-bar {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .filter-inner {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .result-count {
        margin: 0;
        order: 3;
    }
}

.sort-wrapper {
    position: relative;
    text-align: right;
    margin: 20px 0;
}

.sort-toggle {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
}

.sort-dropdown {
    position: absolute;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    padding: 12px;
    width: 240px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sort-option {
    display: flex;
    align-items: center;
    font-size: 15px;
    margin-bottom: 8px;
    cursor: pointer;
}

.sort-option input[type="radio"] {
    margin-right: 8px;
    accent-color: black;
}

/* Paginator Styling */
.paginator {
    text-align: center;
    margin-top: 2rem;
    font-family: 'Reddit Sans', sans-serif;
}

.paginator ul.pagination {
    list-style: none;
    padding: 0;
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.paginator ul.pagination li {
    display: inline;
}

.paginator ul.pagination a,
.paginator ul.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.paginator ul.pagination .current {
    background-color: #ff6a3e;
    color: #fff;
    border-color: #ff6a3e;
    font-weight: bold;
}

.paginator ul.pagination a:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.paginator .pagination-info {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #555;
}
.stock-status {
    margin-top: 5px;
    font-size: 13px;
}

.stock {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12.5px;
}

.stock.in-stock {
    background-color: #e8f5e9; /* light green */
    color: #2e7d32; /* dark green */
}

.stock.low-stock {
    background-color: #fff3e0; /* light orange */
    color: #ef6c00; /* orange */
}

.stock.out-of-stock {
    background-color: #ffebee; /* light red */
    color: #c62828; /* red */
}

.wishlist-heart {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2rem;
    color: #ccc;
    transition: color 0.3s;
}

.wishlist-heart:hover {
    color: #ff0000;
}

.wishlist-heart.liked {
    color: #ff0000;
}

