/* Default classes */

/* Main Container Layout */
.rs-catalog-wrapper {
    display: block; 
    max-width: 100%;
    margin-top: 50px;
}
/* Remove page header */
#mk-page-introduce {
    display: none;
}

/* Category header */
#rs-catalog-header {
    display: grid;
    gap: 30px;
    background-color: #f9f9f9; 
}
.rs-cat-header-hero {
    grid-column: 2 / 3; 
}
.rs-cat-header-hero {
    padding: 20px 30px;
    border-radius: 4px;
    text-align: center; 
}
.rs-header-toggle {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 10pt;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.rs-header-toggle:hover {
    color: #555;
}
.rs-cat-header-image {
    max-width: 200px !important;
}
.rs-cat-title {
    margin: 0; 
    text-transform: uppercase;
}
.rs-header-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-bottom: 4px; 
}
.rs-cat-header-hero.open .rs-header-arrow {
    transform: rotate(225deg);
    margin-bottom: -4px;
}

/* Collapsible Description */
.rs-cat-desc-collapse {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}
.rs-cat-header-hero.open .rs-cat-desc-collapse {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px; 
}
.rs-cat-desc {
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

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

/* Desktop: 2 Columns */
.rs-products-grid-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.rs-tags {
    font-size: 0.8em;
    color: #545454;
}

/* Product catalog styling @catalog template */
.rs-product-wrapper {
    padding: 15px;
}
.rs-product-loop-thumb {
    position: relative;
    display: block; 
    width: 100%;
    aspect-ratio: 4 / 3; 
    overflow: hidden;
}
.rs-new-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #000000;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
}
.product-loop-image {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: opacity 0.3s ease; 
}

.rs-shop-item-detail {
    padding: 10px 0;
}
b.rs-product-brand {
    font-weight: 700 !important;
    font-style: uppercase;
    font-size: 11pt;
    margin: 0px;
}
.rs-product-title {
    display: flex;
    justify-content: space-between; 
    text-overflow: ellipsis;
    align-items: center;
    width: 100%;
    margin: 0 0 10px 0;
}
.rs-product-title a {
    text-align: left;
    margin-right: 10px;             
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}
.rs-product-lowest-cat {
    font-size: 0.8em;
    color: #545454;
}

/* Explanation bubble for the R1/1 badge */
.r1-1-badge {
    display: flex;
    position: relative !important;
    align-items: center;
    flex-shrink: 0;
}
.r1-1-badge img {
    height: 22px;
    width: auto;
    display: block;            
}
.r1-1-badge::after {
    content: attr(data-tooltip); 
    position: absolute;
    bottom: 140%;
    right: 0;
    width: 220px; 
    background-color: #000;
    color: #fff;
    font-size: 12px;
    font-weight: normal;
    text-align: left;
    padding: 10px 12px;
    border-radius: 4px;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease-in-out;
    z-index: 100;
    pointer-events: none;
}
.r1-1-badge::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 12px; 
    border-width: 6px;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease-in-out;
    z-index: 100;
    pointer-events: none;
}
.r1-1-badge:hover::after,
.r1-1-badge:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rs-product-item-desc {
    font-size: 1em;
    color: #666;    
}

/* Price styling */
.rs-catalog-price {
    font-size: 0.8em;
    color: #333;
    text-align: center;
    font-style: italic;
}
.rs-standard-price {
    text-decoration: none;
}
.rs-sale-price {
    text-decoration: none;
    margin-right: 8px;
}
.rs-regular-price {
    opacity: 0.6;
    text-decoration: line-through;
}

/* Buttons */
.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;
}

/* Color Swatches */
.rs-color-swatches {
    display: flex;
    gap: 6px;
    margin: 10px 0;
    flex-wrap: wrap;
    justify-content: center; 
}
.rs-swatch-btn {
    width: 20px;
    height: 20px;
    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: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(2px); 
    z-index: 20; 
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: all;
    transition: opacity 0.25s ease-in-out;
}
.rs-rotating-loader {
    display: block;
    width: 130px;
    animation: rs-spin 1.2s 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;
}
.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) {
    #rs-catalog-header {
        display: block; 
    }
    
    .rs-cat-header-hero {
        grid-column: auto;
        text-align: center; 
    }

    /* Mobile: 1 Column */
    .rs-products-grid-inner {
        display: grid;
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    /* Loader */
    .rs-rotating-loader {
        max-width: unset;
        width: 40%; 
    }

    /* Sizing items */
    .rs-product-title {
        font-size: 14pt;
    }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
