/* Default classes */
.mk-grid {
 max-width: 100%;
 margin: 0px !important;
}
/* Main Container Layout */
.rs-catalog-wrapper{
    display: grid;
    grid-template-columns: 3fr 9fr;
    gap: 30px; 
    max-width: 100%;
    margin-top: 50px;
}

/* Category header */
.rs-cat-header-hero {
    background-color: #f9f9f9; /* Light grey background */
    padding: 30px;
    text-align: center;
    border-radius: 4px;
}
.rs-cat-header-inner {
    max-width: 900px;
    margin: auto
}
.rs-cat-header-image {
    width: 300px;         /* Set your desired width */
    aspect-ratio: 4 / 3;  /* Auto-calculates height based on width */
    
    /* Rest of the styling */
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto 15px auto;
}
.rs-cat-title {
    margin: 0 0 15px 0;
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.rs-cat-desc {
    font-size: 1em;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    min-height: 49px;
}

.rs-cat-desc p {
    margin-bottom: 10px; 
}
/* Sidebar Container */
.rs-filter-sidebar {
    border-top: 1px solid #eee; /* Top Separator */
}
.rs-filter-form {
    margin-left: 25px;
}
.rs-filter-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 0 20px 0;
    width: 100%;
}

.rs-filter-title {
    font-size: 16pt;
    font-weight: 700;
    color: #000;
}

.rs-mobile-toggle {
    display: none; /* Hidden on Desktop */
    background: transparent;
    border: none;
    padding: 10px; /* Touch target size */
    cursor: pointer;
    z-index: 1001;
}
.rs-burger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: block;
}
.rs-burger-icon span {
    display: block;
    position: absolute;
    height: 2px;       /* Line Thickness */
    width: 100%;       /* Line Width */
    background: #000;  /* Line Color */
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: all 0.25s ease-in-out;
}
/* Positioning the lines */
.rs-burger-icon span:nth-child(1) { top: 0px; }
.rs-burger-icon span:nth-child(2) { top: 8px; }
.rs-burger-icon span:nth-child(3) { top: 16px; }

/* Accordion Item */
.rs-accordion-item { border-bottom: 1px solid #eee; }

.rs-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
}

.rs-accordion-header .rs-title { font-weight: 600; }

.rs-arrow {
    width: 8px; height: 8px;
    border-right: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.rs-accordion-item.open .rs-arrow { transform: rotate(225deg); margin-top: 5px; }

.rs-accordion-body {
    display: none; /* Hidden by default (desktop accordion logic) */
    padding-bottom: 20px;
}
.rs-accordion-item.open .rs-accordion-body { display: block; }

/* Category menu */
.rs-cat-link.active {
    font-weight: 700;
    border: 0px;
    color: #434343;
}
/* when the sub-menu is active --> Parent is active */
.rs-category-menu-list > li.rs-cat-open > a.rs-cat-link {
    font-weight: 700; 
    color: #434343;
}
.rs-category-menu-list {
    list-style: none;
    padding: 0;
}
.rs-sub-menu {
    list-style: none;
}
.rs-category-menu-list, .rs-sub-menu {
    margin: 0;
}

/* menu items */
#rs-price-range {
    width: 60%;
    accent-color: #000;
}
.rs-filter-content select {
    padding: 15px 20px;
    width: 100%;
}
/* Tag pill styling Container */
.rs-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rs-tag-cloud li {
    margin: 0; 
}

/* Hide the default checkbox */
.rs-tag-cloud input[type="checkbox"] { 
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.rs-tag-button {
    display: inline-block;
    padding: 6px 14px;
    font-size: 8pt;
    font-weight: 500;
    color: #333;           /* Black Text */
    background-color: transparent;
    border: 1px solid #333; /* Black Outline */
    border-radius: 20px;    /* Rounded "Pill" shape */
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.2;
}
.rs-tag-button:hover {
    background-color: #f5f5f5;
}
.rs-tag-cloud input[type="checkbox"]:checked + .rs-tag-button {
    background-color: #000; 
    color: #fff;            
    border-color: #000;
}



/**
 * 
 *  Products Grid Styling 
 * 
 */
.products-grid-wrapper {
    width: 100%;
    height: auto;
    position: relative; 
    min-height: 300px;
}

.rs-products-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); 
    gap: 20px;
}
.rs-tags {
    font-size: 0.8em;
    color: #545454;
}
/* Product catalog styling @catalog template */

.rs-product-wrapper {
    padding: 15px;
}
.rs-product-card {

}
.rs-product-loop-thumb {
    width: 100%;
    /* Modern way to lock ratio */
    aspect-ratio: 4 / 3; 
    
    /* Fallback for very old browsers (optional): height: 0; padding-bottom: 75%; */
    
    overflow: hidden;
    position: relative;
    display: block; /* Ensure it takes width */
}

.product-loop-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 'cover' fills the box (cropping edges), 'contain' shows full image (letterboxing) */
    transition: opacity 0.3s ease; /* Optional: smooth fade effect */
}
.rs-shop-item-detail {
    margin-top: 15px;
    padding: 10px 0;
}
.rs-product-title {
    color:black;
    font-size: 1.4em;
}
.rs-product-item-desc {
    font-size: 1em;
    color: #666;    
}
.rs-catalog-price {
    font-size: 0.8em;
    color: #333;
    text-align: center;
}
.rs-small-grey-button-wrapper {
    text-align:center
}
.rs-small-grey-button {
    display: inline-block;
    padding: 5px 20px;
    background-color: transparent;
    border: 1px solid #333;
    color: #333;
    text-decoration: none;
    font-size: 0.6em;
    font-weight: 600;
    transition: all 0.3s ease;
}
.rs-small-grey-button:hover {
    background-color: #333;
    color: #fff;
    transition:cubic-bezier(0.075, 0.82, 0.165, 1);
}
.rs-small-grey-button-title {
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* 1. Center the Swatches */
.rs-color-swatches {
    display: flex;
    gap: 6px;
    margin: 10px 0;
    flex-wrap: wrap;
    justify-content: center; /* This centers the items horizontally */
}

/* Swatch Buttons */
.rs-swatch-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #e1e1e1;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.rs-swatch-btn:hover, .rs-swatch-btn.active {
    transform: scale(1.2);
    border-color: #333;
}



/* rs loader */
#rs-loader {
position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* The "Dead Center" trick */
    z-index: 10;
    width: auto;
}
.rs-rotating-loader {
    display: block;
    width: 100px; 
    height: 100px;
    animation: rs-spin 1.5s linear infinite;
}

@keyframes rs-spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Pagination */

.rs-pagination-container {
    margin: 20px 0px 40px 0px;
    display: flex;
    justify-content: center;
    width: 100%;
    clear: both;
}

/* Load More Button */
.rs-load-more-btn {
    background-color: transparent;
    color: #333;
    border: 2px solid #333;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rs-load-more-btn:hover {
    background-color: #333;
    color: #fff;
}
/* Responsive Media Query for Mobile/Tablet */
@media (max-width: 768px) {
    /* Mobile filter menu */
    .rs-mobile-toggle {
        display: block;
    }

    /* B. Hide the Filter Content (Accordions) by Default */
    .rs-filter-sidebar {
        display: none;
        padding-top: 10px;
        
    }

    /* C. OPEN STATE: Show Filters */
    /* When JS adds .active to the form, we show the sidebar */
    .rs-filter-form.active .rs-filter-sidebar {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
        padding: 20px;
    }

    /* D. OPEN STATE: Animate Burger to X */
    .rs-filter-form.active .rs-burger-icon span:nth-child(1) {
        top: 8px;
        transform: rotate(135deg);
    }

    .rs-filter-form.active .rs-burger-icon span:nth-child(2) {
        opacity: 0;
        left: -60px; /* Slide out to the left */
    }

    .rs-filter-form.active .rs-burger-icon span:nth-child(3) {
        top: 8px;
        transform: rotate(-135deg);
    }
    /* Mobile catalog */
    .rs-catalog-wrapper {
        grid-template-columns: 1fr; 
    }

    .rs-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .rs-desktop-header {
        display: none;
    }

    /* Sizing items */
    
    .rs-title {
        font-size: 14pt;
    }
    .rs-cat-link {
        font-size: 14pt;
    }
    .rs-tag-button {
        font-size: 10pt;
    }
    .rs-filter-content select {
        font-size: 11pt;
    }
    #rs-price-range {
        width: 70%;
    }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}