/* ==========================================================================
   RASSOIREET PREMIUM SINGLE PRODUCT PAGE
   ========================================================================== */

.rassoireet-premium-single {
    display: block;
    margin: 4rem auto;
    max-width: var(--container-max-width, 1200px);
    padding: 0 20px;
    font-family: var(--font-primary, 'Outfit', sans-serif);
}

.rr-product-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: start;
}

@media(min-width: 992px){
    .rr-product-split {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   LEFT COLUMN - GALLERY
   ========================================================================== */
.rr-gallery-col {
    position: sticky;
    top: 100px;
    z-index: 10;
    min-width: 0; /* Fix Grid blowout */
}
@media(max-width: 991px){
    .rr-gallery-col {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
}

.rr-main-image-container {
    background: #ffffff;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    padding: 1rem;
}

/* ==========================================================================
   PREMIUM CUSTOM GALLERY (Replaces native woo gallery to prevent bugs)
   ========================================================================== */

.rr-premium-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rr-gallery-main {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #fdfdfa; /* Match body bg */
}

.rr-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.rr-gallery-thumbs {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 5px; /* for scrollbar if needed */
}

.rr-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}
.rr-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.rr-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    background: #fdfdfa;
}

.rr-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rr-thumb:hover,
.rr-thumb.active {
    opacity: 1;
    border-color: var(--color-primary-green, #056839);
    transform: translateY(-2px);
}

/* Sale Badge */
.rr-main-image-container .onsale {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background: var(--color-secondary-yellow, #f7b731);
    color: #1a1a1a;
    padding: 6px 20px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(247, 183, 49, 0.3);
}

/* Reset broken legacy floats */
.woocommerce div.product div.images {
    float: none !important;
    width: 100% !important;
}

/* ==========================================================================
   RIGHT COLUMN - DETAILS
   ========================================================================== */
.rr-summary-col {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Fix Grid blowout */
}

/* Breadcrumbs */
.rr-summary-col .woocommerce-breadcrumb {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-transform: capitalize;
}
.rr-summary-col .woocommerce-breadcrumb a {
    color: var(--color-primary-green, #056839);
    text-decoration: none;
    font-weight: 500;
}

/* Title */
.rr-product-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 1rem;
    margin-top: 0;
}

/* Price */
.rr-price-wrapper {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.rr-price-wrapper ins,
.rr-price-wrapper > .amount,
.rr-price-wrapper > .woocommerce-Price-amount,
.rr-price-wrapper > bdi {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1a1a;
    text-decoration: none;
    background: none;
}
.rr-price-wrapper ins .woocommerce-Price-amount,
.rr-price-wrapper > .woocommerce-Price-amount {
    font-size: 1.4rem;
    font-weight: 800;
}
.rr-price-wrapper del {
    font-size: 1.1rem;
    color: #a0a0a0;
    font-weight: 500;
}
.rr-price-wrapper del .woocommerce-Price-amount {
    font-size: 1.1rem;
    color: #a0a0a0;
    font-weight: 500;
}
.rr-price-wrapper .woocommerce-Price-currencySymbol {
    margin-right: 2px;
}

/* Short Description */
.rr-short-desc {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 2rem;
}
.rr-short-desc ul {
    margin-top: 1rem;
    padding-left: 20px;
    list-style-type: disc;
}
.rr-short-desc li {
    margin-bottom: 0.5rem;
}

/* Add to Cart Area */
.rr-add-to-cart-wrapper {
    margin-bottom: 2rem;
}
.rr-add-to-cart-wrapper form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: stretch;
}
.rr-add-to-cart-wrapper .quantity {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    height: 55px;
}
.rr-add-to-cart-wrapper .quantity input {
    width: 60px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
}
.rr-add-to-cart-wrapper .quantity .qty-btn {
    width: 45px;
    background: #f8f8f8;
    border: none;
    font-size: 1.4rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: 0.2s;
}
.rr-add-to-cart-wrapper .quantity .qty-btn:hover {
    background: #eaeaea;
}
.rr-add-to-cart-wrapper button.single_add_to_cart_button {
    flex-grow: 1;
    background: var(--color-primary-green, #056839);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 55px;
}
.rr-add-to-cart-wrapper button.single_add_to_cart_button:hover {
    background: #034523;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 104, 57, 0.2);
}

.rr-add-to-cart-wrapper button.single_buy_now_button {
    flex: 1 1 100%;
    width: 100%;
    background: var(--color-secondary-yellow, #ffc107);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 60px;
    margin-top: 5px;
}
.rr-add-to-cart-wrapper button.single_buy_now_button:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

/* Mobile Responsiveness for Add to Cart */
@media(max-width: 500px) {
    .rr-add-to-cart-wrapper form.cart {
        flex-wrap: wrap;
        gap: 15px;
    }
    .rr-add-to-cart-wrapper .quantity {
        width: 100%;
    }
    .rr-add-to-cart-wrapper button.single_add_to_cart_button,
    .rr-add-to-cart-wrapper button.single_buy_now_button {
        width: 100%;
        flex-grow: 1;
    }
}

/* Stock */
.rr-summary-col .stock {
    color: var(--color-primary-green, #056839);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Meta Data */
.rr-meta-wrapper {
    font-size: 0.95rem;
    color: #777;
    border-top: 1px solid #eaeaea;
    padding-top: 1.5rem;
}
.rr-meta-wrapper .product_meta > span {
    display: block;
    margin-bottom: 0.5rem;
}
.rr-meta-wrapper .product_meta a {
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
}
.rr-meta-wrapper .product_meta a:hover {
    color: var(--color-primary-green, #056839);
}

/* ==========================================================================
   TABS & RELATED PRODUCTS
   ========================================================================== */
.rr-product-tabs {
    margin-top: 5rem;
    background: #ffffff;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}
.rr-product-tabs .wc-tabs {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    border-bottom: 2px solid #f0f0f0;
}
.rr-product-tabs .wc-tabs li {
    padding-bottom: 1rem;
    margin-bottom: -2px;
}
.rr-product-tabs .wc-tabs li a {
    color: #777;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: 0.3s;
}
.rr-product-tabs .wc-tabs li.active {
    border-bottom: 2px solid var(--color-primary-green, #056839);
}
.rr-product-tabs .wc-tabs li.active a {
    color: #1a1a1a;
}

.rr-related-products {
    margin-top: 5rem;
}
.rr-related-products h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

/* Related Products Grid Styling */
.rr-related-products ul.products li.product {
    text-align: center;
    transition: transform 0.3s ease;
    background: #ffffff;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.rr-related-products ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.rr-related-products ul.products li.product img {
    border-radius: 12px;
    margin-bottom: 1.2rem;
    width: 100%;
    height: auto;
}
.rr-related-products ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.rr-related-products ul.products li.product .price {
    color: var(--color-primary-green, #056839);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: block;
}
.rr-related-products ul.products li.product .price del {
    color: #999;
    font-weight: 500;
    font-size: 1rem;
    margin-right: 6px;
}

/* Add to Cart Button for Related Products */
.rr-related-products ul.products li.product .button.add_to_cart_button {
    background-color: var(--color-primary-green, #056839) !important;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 0.5rem;
    border: none;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.rr-related-products ul.products li.product .button.add_to_cart_button:hover {
    background-color: #034523 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(5, 104, 57, 0.2);
}

/* Sale Badge for Related Products */
.rr-related-products ul.products li.product .onsale {
    background-color: var(--color-secondary-yellow, #f7b731) !important;
    color: #1a1a1a !important;
    font-weight: 800;
    border-radius: 20px;
    padding: 6px 14px;
    top: 25px;
    left: 25px;
    right: auto;
    min-width: auto;
    min-height: auto;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(247, 183, 49, 0.3);
}

/* ==========================================================================
   Advanced Product Attributes (Size/Weight below Price)
   ========================================================================== */
.advanced-product-attributes {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.adv-attr-row {
    background: #fdfdfa;
    border: 1px solid #eaeaea;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 1.1rem;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.adv-attr-label {
    font-weight: 500;
    color: #777;
    margin-right: 8px;
}

.adv-attr-value {
    font-weight: 800;
    color: var(--color-primary-green, #056839);
}
