/* =========================================================
   RFU SHOP CSS - READY TO WEAR / PRODUCT ARCHIVES
   Load only on shop, product category, and product tag pages.
   Moved from style.css for performance.
   ========================================================= */

/* =========================================================
   RFU SHOP LAYER 01 - Base archive layout and card reset
   Covers shop/category grid, hidden prices, image/title/swatches/button baseline.
   Keep as the foundation layer for WooCommerce archives.
   ========================================================= */

/* Hide prices on shop/category pages only */
body.woocommerce-shop ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .price {
    display: none !important;
}

/* Hide sidebar / filters on shop and product category pages */
body.woocommerce-shop .widget-area,
body.woocommerce-shop aside,
body.post-type-archive-product .widget-area,
body.post-type-archive-product aside,
body.tax-product_cat .widget-area,
body.tax-product_cat aside {
    display: none !important;
}

/* Main shop content width */
body.woocommerce-shop #primary,
body.post-type-archive-product #primary,
body.tax-product_cat #primary,
body.woocommerce-shop .content-area,
body.post-type-archive-product .content-area,
body.tax-product_cat .content-area {
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    float: none !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

/* Hide breadcrumb, sorting and result count */
body.woocommerce-shop nav.woocommerce-breadcrumb,
body.post-type-archive-product nav.woocommerce-breadcrumb,
body.tax-product_cat nav.woocommerce-breadcrumb,
body.woocommerce-shop .woocommerce-ordering,
body.woocommerce-shop .woocommerce-result-count,
body.post-type-archive-product .woocommerce-ordering,
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_cat .woocommerce-result-count {
    display: none !important;
}

/* Shop heading spacing */
body.woocommerce-shop .woocommerce-products-header,
body.post-type-archive-product .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header {
    margin-top: 35px !important;
    margin-bottom: 34px !important;
}

body.woocommerce-shop .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title {
    color: #111111 !important;
    font-size: 42px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

/* Force clean 4-column shop grid */
body.woocommerce-shop .woocommerce ul.products,
body.post-type-archive-product .woocommerce ul.products,
body.tax-product_cat .woocommerce ul.products,
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 34px 24px !important;
    width: 100% !important;
    max-width: 1180px !important;
    margin: 24px auto 50px !important;
    padding: 0 !important;
}

/* Reset product card */
body.woocommerce-shop .woocommerce ul.products li.product,
body.post-type-archive-product .woocommerce ul.products li.product,
body.tax-product_cat .woocommerce ul.products li.product,
body.woocommerce-shop ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product {
    position: relative !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    box-shadow: none !important;
    border: 0 !important;
    transform: none !important;
    background: transparent !important;
    overflow: visible !important;
}

/* Disable theme hover card effect */
body.woocommerce-shop ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover {
    box-shadow: none !important;
    transform: none !important;
    background: transparent !important;
}

/* Product image box */
body.woocommerce-shop ul.products li.product a img,
body.post-type-archive-product ul.products li.product a img,
body.tax-product_cat ul.products li.product a img {
    width: 100% !important;
    height: 310px !important;
    max-height: 310px !important;
    object-fit: contain !important;
    background: #f7f7f7 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Keep image stable on hover */
body.woocommerce-shop ul.products li.product:hover a img,
body.post-type-archive-product ul.products li.product:hover a img,
body.tax-product_cat ul.products li.product:hover a img {
    transform: none !important;
    opacity: 1 !important;
}

/* Hide category text above product title */
body.woocommerce-shop ul.products li.product .ast-woo-product-category,
body.woocommerce-shop ul.products li.product span.ast-woo-product-category,
body.woocommerce-shop ul.products li.product .posted_in,
body.woocommerce-shop ul.products li.product .product_meta,
body.woocommerce-shop ul.products li.product .astra-shop-summary-wrap > span,
body.post-type-archive-product ul.products li.product .ast-woo-product-category,
body.post-type-archive-product ul.products li.product span.ast-woo-product-category,
body.post-type-archive-product ul.products li.product .posted_in,
body.post-type-archive-product ul.products li.product .product_meta,
body.post-type-archive-product ul.products li.product .astra-shop-summary-wrap > span,
body.tax-product_cat ul.products li.product .ast-woo-product-category,
body.tax-product_cat ul.products li.product span.ast-woo-product-category,
body.tax-product_cat ul.products li.product .posted_in,
body.tax-product_cat ul.products li.product .product_meta,
body.tax-product_cat ul.products li.product .astra-shop-summary-wrap > span {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Product summary wrapper: never hide on hover */
body.woocommerce-shop ul.products li.product .astra-shop-summary-wrap,
body.post-type-archive-product ul.products li.product .astra-shop-summary-wrap,
body.tax-product_cat ul.products li.product .astra-shop-summary-wrap,
body.woocommerce-shop ul.products li.product .woocommerce-card__header,
body.post-type-archive-product ul.products li.product .woocommerce-card__header,
body.tax-product_cat ul.products li.product .woocommerce-card__header {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Product title */
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #111111 !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
}

/* Color swatches */
.rt-shop-color-swatches {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 8px 0 0 !important;
    flex-wrap: wrap !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.rt-shop-color-swatch {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 31, 54, 0.22) !important;
    cursor: pointer !important;
    padding: 0 !important;
    background: #dddddd !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.rt-shop-color-swatch span {
    display: none !important;
}

.rt-shop-color-swatch:hover,
.rt-shop-color-swatch.is-active {
    transform: translateY(-1px) scale(1.08) !important;
    border-color: #E78C07 !important;
    box-shadow: 0 0 0 2px rgba(231, 140, 7, 0.24) !important;
}

/* Main product colors */
.rt-shop-color-swatch.rt-color-navy {
    background: #071b36 !important;
}

.rt-shop-color-swatch.rt-color-black {
    background: #111111 !important;
}

.rt-shop-color-swatch.rt-color-red {
    background: #b00020 !important;
}

.rt-shop-color-swatch.rt-color-beige {
    background: #d8c3a5 !important;
}

.rt-shop-color-swatch.rt-color-charcoal,
.rt-shop-color-swatch.rt-color-charcoal-grey,
.rt-shop-color-swatch.rt-color-charcoal-gray {
    background: #3b3f42 !important;
}

/* Select options button - static, bigger, always visible */
body.woocommerce-shop ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.woocommerce-shop ul.products li.product .add_to_cart_button,
body.post-type-archive-product ul.products li.product .add_to_cart_button,
body.tax-product_cat ul.products li.product .add_to_cart_button {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;

    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 150px !important;
    height: 44px !important;
    min-height: 44px !important;

    margin: 15px 0 0 !important;
    padding: 0 22px !important;

    border-radius: 9px !important;
    border: 1px solid #061725 !important;
    background: #061725 !important;
    color: #ffffff !important;
    box-shadow: none !important;

    font-size: 14px !important;
    line-height: 44px !important;
    font-weight: 850 !important;
    text-align: center !important;
    text-decoration: none !important;
}

/* Keep button stable on hover and non-hover */
body.woocommerce-shop ul.products li.product:hover .button,
body.post-type-archive-product ul.products li.product:hover .button,
body.tax-product_cat ul.products li.product:hover .button,
body.woocommerce-shop ul.products li.product:not(:hover) .button,
body.post-type-archive-product ul.products li.product:not(:hover) .button,
body.tax-product_cat ul.products li.product:not(:hover) .button {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Button hover color */
body.woocommerce-shop ul.products li.product .button:hover,
body.post-type-archive-product ul.products li.product .button:hover,
body.tax-product_cat ul.products li.product .button:hover,
body.woocommerce-shop ul.products li.product .add_to_cart_button:hover,
body.post-type-archive-product ul.products li.product .add_to_cart_button:hover,
body.tax-product_cat ul.products li.product .add_to_cart_button:hover {
    background: #E78C07 !important;
    border-color: #E78C07 !important;
    color: #ffffff !important;
}


/* Tablet: 2 columns */
@media (max-width: 1024px) {
    body.woocommerce-shop .woocommerce ul.products,
    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products,
    body.woocommerce-shop ul.products,
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 32px 22px !important;
    }

    body.woocommerce-shop ul.products li.product a img,
    body.post-type-archive-product ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img {
        height: 340px !important;
        max-height: 340px !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
    body.woocommerce-shop #primary,
    body.post-type-archive-product #primary,
    body.tax-product_cat #primary,
    body.woocommerce-shop .content-area,
    body.post-type-archive-product .content-area,
    body.tax-product_cat .content-area {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.woocommerce-shop .woocommerce-products-header__title,
    body.post-type-archive-product .woocommerce-products-header__title,
    body.tax-product_cat .woocommerce-products-header__title {
        font-size: 34px !important;
        line-height: 1.15 !important;
    }

    body.woocommerce-shop .woocommerce ul.products,
    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products,
    body.woocommerce-shop ul.products,
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: 1fr !important;
        gap: 34px !important;
    }

    body.woocommerce-shop ul.products li.product,
    body.post-type-archive-product ul.products li.product,
    body.tax-product_cat ul.products li.product {
        text-align: center !important;
    }

    body.woocommerce-shop ul.products li.product a img,
    body.post-type-archive-product ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img {
        height: auto !important;
        max-height: 460px !important;
    }

    .rt-shop-color-swatches {
        justify-content: center !important;
    }
}/* =========================================================
   RFU SHOP LAYER 02 - CRITICAL Shoptimizer hover protection
   DO NOT REMOVE without browser hover testing.
   Keeps card titles, swatches, and buttons visible on hover.
   This layer was verified as required after rollback on 2026-06-11.
   ========================================================= */

/* Stop Shoptimizer hover card behavior */
body.woocommerce-shop ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product {
    overflow: visible !important;
}

body.woocommerce-shop ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Keep product summary normal, not hover-overlay */
body.woocommerce-shop ul.products li.product .woocommerce-card__header,
body.woocommerce-shop ul.products li.product .astra-shop-summary-wrap,
body.post-type-archive-product ul.products li.product .woocommerce-card__header,
body.post-type-archive-product ul.products li.product .astra-shop-summary-wrap,
body.tax-product_cat ul.products li.product .woocommerce-card__header,
body.tax-product_cat ul.products li.product .astra-shop-summary-wrap {
    position: static !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Force Select options button to remain in normal flow always */
body.woocommerce-shop ul.products li.product a.button,
body.woocommerce-shop ul.products li.product a.button.product_type_variable,
body.woocommerce-shop ul.products li.product a.add_to_cart_button,
body.post-type-archive-product ul.products li.product a.button,
body.post-type-archive-product ul.products li.product a.button.product_type_variable,
body.post-type-archive-product ul.products li.product a.add_to_cart_button,
body.tax-product_cat ul.products li.product a.button,
body.tax-product_cat ul.products li.product a.button.product_type_variable,
body.tax-product_cat ul.products li.product a.add_to_cart_button {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    clip: auto !important;
    clip-path: none !important;
    pointer-events: auto !important;

    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 150px !important;
    height: 44px !important;
    min-height: 44px !important;

    margin: 15px 0 0 !important;
    padding: 0 22px !important;

    border-radius: 9px !important;
    border: 1px solid #061725 !important;
    background: #061725 !important;
    color: #ffffff !important;

    font-size: 14px !important;
    line-height: 44px !important;
    font-weight: 850 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

/* Repeat on hover with stronger selector */
body.woocommerce-shop ul.products li.product:hover a.button,
body.woocommerce-shop ul.products li.product:hover a.button.product_type_variable,
body.woocommerce-shop ul.products li.product:hover a.add_to_cart_button,
body.post-type-archive-product ul.products li.product:hover a.button,
body.post-type-archive-product ul.products li.product:hover a.button.product_type_variable,
body.post-type-archive-product ul.products li.product:hover a.add_to_cart_button,
body.tax-product_cat ul.products li.product:hover a.button,
body.tax-product_cat ul.products li.product:hover a.button.product_type_variable,
body.tax-product_cat ul.products li.product:hover a.add_to_cart_button {
    position: relative !important;
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    bottom: auto !important;
    margin-top: 15px !important;
}

/* Button hover color only */
body.woocommerce-shop ul.products li.product a.button:hover,
body.post-type-archive-product ul.products li.product a.button:hover,
body.tax-product_cat ul.products li.product a.button:hover {
    background: #E78C07 !important;
    border-color: #E78C07 !important;
    color: #ffffff !important;
}

/* Keep title and swatches visible when card is hovered */
body.woocommerce-shop ul.products li.product:hover .woocommerce-loop-product__title,
body.woocommerce-shop ul.products li.product:hover .rt-shop-color-swatches,
body.post-type-archive-product ul.products li.product:hover .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product:hover .rt-shop-color-swatches,
body.tax-product_cat ul.products li.product:hover .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product:hover .rt-shop-color-swatches {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}/* =========================================================
   RFU SHOP LAYER 03 - Visual polish overrides
   Final desktop card look: spacing, shadows, image height, title sizing, swatches, buttons.
   Edit only after checking Layer 02 hover behavior.
   ========================================================= */

/* Reduce empty space under heading */
body.woocommerce-shop .woocommerce-products-header,
body.post-type-archive-product .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header {
    margin-top: 32px !important;
    margin-bottom: 22px !important;
}

/* Slightly calmer page title */
body.woocommerce-shop .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title {
    font-size: 40px !important;
    line-height: 1.12 !important;
    letter-spacing: -0.8px !important;
}

/* Product grid spacing */
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.woocommerce-shop .woocommerce ul.products,
body.post-type-archive-product .woocommerce ul.products,
body.tax-product_cat .woocommerce ul.products {
    gap: 28px 22px !important;
    margin-top: 18px !important;
}

/* Give every product a soft premium card */
body.woocommerce-shop ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product {
    padding: 12px 12px 16px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid rgba(12, 45, 78, 0.06) !important;
    box-shadow: 0 8px 22px rgba(12, 45, 78, 0.035) !important;
    transition: box-shadow .18s ease, border-color .18s ease !important;
}

/* Keep hover stable but add very light premium feedback */
body.woocommerce-shop ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover {
    border-color: rgba(231, 140, 7, 0.18) !important;
    box-shadow: 0 12px 28px rgba(12, 45, 78, 0.07) !important;
}

/* Image box cleaner */
body.woocommerce-shop ul.products li.product a img,
body.post-type-archive-product ul.products li.product a img,
body.tax-product_cat ul.products li.product a img {
    height: 295px !important;
    max-height: 295px !important;
    margin-bottom: 13px !important;
    border-radius: 10px !important;
    background: #f8f8f8 !important;
}

/* Product title slightly tighter */
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    font-size: 14.5px !important;
    line-height: 1.34 !important;
    margin-bottom: 9px !important;
}

/* Swatches slightly cleaner */
.rt-shop-color-swatches {
    gap: 7px !important;
    margin: 7px 0 0 !important;
}

.rt-shop-color-swatch {
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
}

/* Button less heavy but still clear */
body.woocommerce-shop ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.woocommerce-shop ul.products li.product .add_to_cart_button,
body.post-type-archive-product ul.products li.product .add_to_cart_button,
body.tax-product_cat ul.products li.product .add_to_cart_button {
    min-width: 138px !important;
    height: 40px !important;
    min-height: 40px !important;
    margin-top: 13px !important;
    padding: 0 18px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 40px !important;
    font-weight: 800 !important;
}

/* Mobile */
@media (max-width: 600px) {
    body.woocommerce-shop .woocommerce-products-header__title,
    body.post-type-archive-product .woocommerce-products-header__title,
    body.tax-product_cat .woocommerce-products-header__title {
        font-size: 31px !important;
    }

    body.woocommerce-shop ul.products li.product,
    body.post-type-archive-product ul.products li.product,
    body.tax-product_cat ul.products li.product {
        padding: 12px 12px 16px !important;
    }

    body.woocommerce-shop ul.products li.product a img,
    body.post-type-archive-product ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img {
        height: auto !important;
        max-height: 440px !important;
    }
}/* =========================================================
   RFU SHOP LAYER 04 - Card vertical alignment
   Keeps product titles, swatches, and buttons aligned across uneven product names.
   ========================================================= */

/* Make all product titles reserve the same 2-line height */
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    min-height: 40px !important;
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 8px !important;
}

/* Keep swatches aligned under the reserved title area */
body.woocommerce-shop ul.products li.product .rt-shop-color-swatches,
body.post-type-archive-product ul.products li.product .rt-shop-color-swatches,
body.tax-product_cat ul.products li.product .rt-shop-color-swatches {
    min-height: 24px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Keep button consistently spaced under swatches */
body.woocommerce-shop ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.woocommerce-shop ul.products li.product .add_to_cart_button,
body.post-type-archive-product ul.products li.product .add_to_cart_button,
body.tax-product_cat ul.products li.product .add_to_cart_button {
    margin-top: 14px !important;
}

/* Mobile: no need to force too much title height */
@media (max-width: 600px) {
    body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
        min-height: 0 !important;
        display: block !important;
    }
}/* =========================================================
   RFU SHOP LAYER 05 - Arabic / RTL archive alignment
   Controls Arabic direction, title alignment, swatches direction, and button alignment.
   ========================================================= */

/* Make the whole Arabic shop content behave RTL */
html[lang="ar"] body.woocommerce-shop #primary,
html[lang="ar"] body.post-type-archive-product #primary,
html[lang="ar"] body.tax-product_cat #primary,
body.rtl.woocommerce-shop #primary,
body.rtl.post-type-archive-product #primary,
body.rtl.tax-product_cat #primary {
    direction: rtl !important;
}

/* Header/title area */
html[lang="ar"] body.woocommerce-shop header.woocommerce-products-header,
html[lang="ar"] body.post-type-archive-product header.woocommerce-products-header,
html[lang="ar"] body.tax-product_cat header.woocommerce-products-header,
body.rtl.woocommerce-shop header.woocommerce-products-header,
body.rtl.post-type-archive-product header.woocommerce-products-header,
body.rtl.tax-product_cat header.woocommerce-products-header {
    width: 100% !important;
    direction: rtl !important;
    text-align: right !important;
    display: block !important;
}

/* Page title itself */
html[lang="ar"] body.woocommerce-shop h1.woocommerce-products-header__title,
html[lang="ar"] body.post-type-archive-product h1.woocommerce-products-header__title,
html[lang="ar"] body.tax-product_cat h1.woocommerce-products-header__title,
body.rtl.woocommerce-shop h1.woocommerce-products-header__title,
body.rtl.post-type-archive-product h1.woocommerce-products-header__title,
body.rtl.tax-product_cat h1.woocommerce-products-header__title {
    width: 100% !important;
    direction: rtl !important;
    text-align: right !important;
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* Product grid order starts from the right */
html[lang="ar"] body.woocommerce-shop ul.products,
html[lang="ar"] body.post-type-archive-product ul.products,
html[lang="ar"] body.tax-product_cat ul.products,
html[lang="ar"] body.woocommerce-shop .woocommerce ul.products,
html[lang="ar"] body.post-type-archive-product .woocommerce ul.products,
html[lang="ar"] body.tax-product_cat .woocommerce ul.products,
body.rtl.woocommerce-shop ul.products,
body.rtl.post-type-archive-product ul.products,
body.rtl.tax-product_cat ul.products,
body.rtl.woocommerce-shop .woocommerce ul.products,
body.rtl.post-type-archive-product .woocommerce ul.products,
body.rtl.tax-product_cat .woocommerce ul.products {
    direction: rtl !important;
}

/* Card content alignment */
html[lang="ar"] body.woocommerce-shop ul.products li.product,
html[lang="ar"] body.post-type-archive-product ul.products li.product,
html[lang="ar"] body.tax-product_cat ul.products li.product,
body.rtl.woocommerce-shop ul.products li.product,
body.rtl.post-type-archive-product ul.products li.product,
body.rtl.tax-product_cat ul.products li.product {
    direction: rtl !important;
    text-align: right !important;
}

/* Product title in Arabic cards */
html[lang="ar"] body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
html[lang="ar"] body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
html[lang="ar"] body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.rtl.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.rtl.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.rtl.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    direction: rtl !important;
    text-align: right !important;
    justify-content: flex-start !important;
}

/* Color dots start from the right */
html[lang="ar"] body.woocommerce-shop ul.products li.product .rt-shop-color-swatches,
html[lang="ar"] body.post-type-archive-product ul.products li.product .rt-shop-color-swatches,
html[lang="ar"] body.tax-product_cat ul.products li.product .rt-shop-color-swatches,
body.rtl.woocommerce-shop ul.products li.product .rt-shop-color-swatches,
body.rtl.post-type-archive-product ul.products li.product .rt-shop-color-swatches,
body.rtl.tax-product_cat ul.products li.product .rt-shop-color-swatches {
    direction: rtl !important;
    justify-content: flex-start !important;
}

/* Button aligned right in Arabic cards */
html[lang="ar"] body.woocommerce-shop ul.products li.product .button,
html[lang="ar"] body.post-type-archive-product ul.products li.product .button,
html[lang="ar"] body.tax-product_cat ul.products li.product .button,
body.rtl.woocommerce-shop ul.products li.product .button,
body.rtl.post-type-archive-product ul.products li.product .button,
body.rtl.tax-product_cat ul.products li.product .button {
    margin-right: 0 !important;
    margin-left: auto !important;
}/* =========================================================
   RFU SHOP LAYER 06 - Archive title and intro layout
   Controls archive header, intro text width, and Arabic intro alignment.
   ========================================================= */

/* Stack shop title and page intro vertically */
body.woocommerce-shop header.woocommerce-products-header,
body.post-type-archive-product header.woocommerce-products-header,
body.tax-product_cat header.woocommerce-products-header {
    display: block !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Keep title full width */
body.woocommerce-shop h1.woocommerce-products-header__title,
body.post-type-archive-product h1.woocommerce-products-header__title,
body.tax-product_cat h1.woocommerce-products-header__title {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 14px !important;
    white-space: normal !important;
}

/* Style shop page intro text */
body.woocommerce-shop .term-description,
body.post-type-archive-product .term-description,
body.tax-product_cat .term-description,
body.woocommerce-shop header.woocommerce-products-header p,
body.post-type-archive-product header.woocommerce-products-header p,
body.tax-product_cat header.woocommerce-products-header p {
    max-width: 760px !important;
    color: #3f4750 !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
    margin: 0 0 30px !important;
}

/* Arabic intro alignment */
html[lang="ar"] body.woocommerce-shop header.woocommerce-products-header,
body.rtl.woocommerce-shop header.woocommerce-products-header {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="ar"] body.woocommerce-shop header.woocommerce-products-header p,
body.rtl.woocommerce-shop header.woocommerce-products-header p {
    margin-right: 0 !important;
    margin-left: auto !important;
    text-align: right !important;
    font-size: 17px !important;
    line-height: 1.9 !important;
}

/* Mobile */
@media (max-width: 600px) {
    body.woocommerce-shop h1.woocommerce-products-header__title,
    body.post-type-archive-product h1.woocommerce-products-header__title,
    body.tax-product_cat h1.woocommerce-products-header__title {
        font-size: 31px !important;
    }

    body.woocommerce-shop header.woocommerce-products-header p,
    body.post-type-archive-product header.woocommerce-products-header p,
    body.tax-product_cat header.woocommerce-products-header p {
        font-size: 15px !important;
        line-height: 1.75 !important;
        margin-bottom: 24px !important;
    }
}/* =========================================================
   RFU SHOP LAYER 07 - Compact above-the-fold archive layout
   Tightens archive heading, intro, grid spacing, and desktop card dimensions.
   English + Arabic.
   ========================================================= */

/* Reduce top header area spacing */
body.woocommerce-shop header.woocommerce-products-header,
body.post-type-archive-product header.woocommerce-products-header,
body.tax-product_cat header.woocommerce-products-header {
    margin-top: 24px !important;
    margin-bottom: 16px !important;
}

/* Title slightly smaller and tighter */
body.woocommerce-shop h1.woocommerce-products-header__title,
body.post-type-archive-product h1.woocommerce-products-header__title,
body.tax-product_cat h1.woocommerce-products-header__title {
    font-size: 38px !important;
    line-height: 1.12 !important;
    margin-bottom: 10px !important;
}

/* Intro text: tighter but still readable */
body.woocommerce-shop header.woocommerce-products-header p,
body.post-type-archive-product header.woocommerce-products-header p,
body.tax-product_cat header.woocommerce-products-header p {
    max-width: 720px !important;
    font-size: 15.5px !important;
    line-height: 1.55 !important;
    margin: 0 0 18px !important;
}

/* Arabic title + intro */
html[lang="ar"] body.woocommerce-shop h1.woocommerce-products-header__title,
body.rtl.woocommerce-shop h1.woocommerce-products-header__title {
    font-size: 37px !important;
    line-height: 1.18 !important;
    margin-bottom: 10px !important;
}

html[lang="ar"] body.woocommerce-shop header.woocommerce-products-header p,
body.rtl.woocommerce-shop header.woocommerce-products-header p {
    max-width: 760px !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    margin: 0 0 18px auto !important;
}

/* Bring product grid closer to intro */
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.woocommerce-shop .woocommerce ul.products,
body.post-type-archive-product .woocommerce ul.products,
body.tax-product_cat .woocommerce ul.products {
    margin-top: 10px !important;
    margin-bottom: 34px !important;
    gap: 22px 20px !important;
}

/* More compact cards */
body.woocommerce-shop ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product {
    padding: 10px 10px 14px !important;
    border-radius: 13px !important;
}

/* Reduce image height so full card appears earlier */
body.woocommerce-shop ul.products li.product a img,
body.post-type-archive-product ul.products li.product a img,
body.tax-product_cat ul.products li.product a img {
    height: 260px !important;
    max-height: 260px !important;
    margin-bottom: 11px !important;
    border-radius: 9px !important;
}

/* Product title compact but aligned */
body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    line-height: 1.28 !important;
    min-height: 36px !important;
    margin-bottom: 6px !important;
}

/* Swatches compact */
.rt-shop-color-swatches {
    gap: 7px !important;
    min-height: 22px !important;
    margin: 0 !important;
}

.rt-shop-color-swatch {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
}

/* Button compact but still strong */
body.woocommerce-shop ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.woocommerce-shop ul.products li.product .add_to_cart_button,
body.post-type-archive-product ul.products li.product .add_to_cart_button,
body.tax-product_cat ul.products li.product .add_to_cart_button {
    min-width: 138px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin-top: 11px !important;
    padding: 0 18px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 38px !important;
}

/* Reduce gap before footer feature strip */
body.woocommerce-shop .site-main,
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main {
    margin-bottom: 24px !important;
}

/* Mobile keeps comfortable spacing */
@media (max-width: 600px) {
    body.woocommerce-shop h1.woocommerce-products-header__title,
    body.post-type-archive-product h1.woocommerce-products-header__title,
    body.tax-product_cat h1.woocommerce-products-header__title {
        font-size: 31px !important;
    }

    body.woocommerce-shop header.woocommerce-products-header p,
    body.post-type-archive-product header.woocommerce-products-header p,
    body.tax-product_cat header.woocommerce-products-header p {
        font-size: 15px !important;
        line-height: 1.65 !important;
        margin-bottom: 22px !important;
    }

    body.woocommerce-shop ul.products li.product a img,
    body.post-type-archive-product ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img {
        height: auto !important;
        max-height: 430px !important;
    }

    body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
        min-height: 0 !important;
    }
}/* =========================================================
   RFU SHOP LAYER 08 - Mobile final archive layout
   Final mobile 2-column cards, image height, title, swatches, button sizing.
   English + Arabic.
   ========================================================= */

@media (max-width: 600px) {

    /* Compact page heading area on mobile */
    body.woocommerce-shop header.woocommerce-products-header,
    body.post-type-archive-product header.woocommerce-products-header,
    body.tax-product_cat header.woocommerce-products-header {
        margin-top: 26px !important;
        margin-bottom: 22px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.woocommerce-shop h1.woocommerce-products-header__title,
    body.post-type-archive-product h1.woocommerce-products-header__title,
    body.tax-product_cat h1.woocommerce-products-header__title {
        font-size: 29px !important;
        line-height: 1.12 !important;
        margin-bottom: 12px !important;
    }

    html[lang="ar"] body.woocommerce-shop h1.woocommerce-products-header__title,
    body.rtl.woocommerce-shop h1.woocommerce-products-header__title {
        font-size: 30px !important;
        line-height: 1.25 !important;
        text-align: right !important;
    }

    body.woocommerce-shop header.woocommerce-products-header p,
    body.post-type-archive-product header.woocommerce-products-header p,
    body.tax-product_cat header.woocommerce-products-header p {
        font-size: 14.5px !important;
        line-height: 1.65 !important;
        margin-bottom: 18px !important;
        max-width: 100% !important;
    }

    html[lang="ar"] body.woocommerce-shop header.woocommerce-products-header p,
    body.rtl.woocommerce-shop header.woocommerce-products-header p {
        font-size: 14.5px !important;
        line-height: 1.85 !important;
        text-align: right !important;
    }

    /* Two products per row on mobile */
    body.woocommerce-shop .woocommerce ul.products,
    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products,
    body.woocommerce-shop ul.products,
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px 10px !important;
        margin-top: 12px !important;
        margin-bottom: 28px !important;
    }

    /* Compact mobile cards */
    body.woocommerce-shop ul.products li.product,
    body.post-type-archive-product ul.products li.product,
    body.tax-product_cat ul.products li.product {
        padding: 7px 7px 10px !important;
        border-radius: 12px !important;
        text-align: center !important;
    }

    /* Smaller product image */
    body.woocommerce-shop ul.products li.product a img,
    body.post-type-archive-product ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img {
        height: 215px !important;
        max-height: 215px !important;
        width: 100% !important;
        object-fit: contain !important;
        margin-bottom: 9px !important;
        border-radius: 9px !important;
    }

    /* Compact product title */
    body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
        font-size: 12.5px !important;
        line-height: 1.35 !important;
        min-height: 34px !important;
        margin-bottom: 7px !important;
        text-align: center !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    html[lang="ar"] body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
    body.rtl.woocommerce-shop ul.products li.product .woocommerce-loop-product__title {
        font-size: 12.5px !important;
        line-height: 1.45 !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Center and shrink color dots */
    body.woocommerce-shop ul.products li.product .rt-shop-color-swatches,
    body.post-type-archive-product ul.products li.product .rt-shop-color-swatches,
    body.tax-product_cat ul.products li.product .rt-shop-color-swatches,
    html[lang="ar"] body.woocommerce-shop ul.products li.product .rt-shop-color-swatches,
    body.rtl.woocommerce-shop ul.products li.product .rt-shop-color-swatches {
        justify-content: center !important;
        gap: 5px !important;
        min-height: 20px !important;
        margin: 0 !important;
    }

    .rt-shop-color-swatch {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
    }

    /* Full-width compact button inside each small card */
    body.woocommerce-shop ul.products li.product .button,
    body.post-type-archive-product ul.products li.product .button,
    body.tax-product_cat ul.products li.product .button,
    body.woocommerce-shop ul.products li.product .add_to_cart_button,
    body.post-type-archive-product ul.products li.product .add_to_cart_button,
    body.tax-product_cat ul.products li.product .add_to_cart_button {
        width: 100% !important;
        min-width: 0 !important;
        height: 36px !important;
        min-height: 36px !important;
        margin-top: 10px !important;
        padding: 0 8px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        line-height: 36px !important;
    }

    html[lang="ar"] body.woocommerce-shop ul.products li.product .button,
    body.rtl.woocommerce-shop ul.products li.product .button {
        font-size: 11.5px !important;
    }

    /* Reduce content side padding on mobile */
    body.woocommerce-shop #primary,
    body.post-type-archive-product #primary,
    body.tax-product_cat #primary,
    body.woocommerce-shop .content-area,
    body.post-type-archive-product .content-area,
    body.tax-product_cat .content-area {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* Keep language switcher from covering buttons too much */
    .trp-language-switcher,
    .trp-floating-language-switcher {
        transform: scale(0.86) !important;
        transform-origin: bottom right !important;
    }
}