/**
 * Product Compare Templates - Shared CSS
 *
 * Shared styles for the four product-comparison page templates
 * (Air Conditioners, Washers, Dryers, Washer-Dryers).
 *
 * @package Woodmart_Child
 * @since 1.1.0
 */

/* Similar Products Slider */
.similar-products .slick-slider .woocommerce-loop-product__title {
    line-height: 1.3 !important;
    padding: 0 6px !important;
}

.similar-products span.woocommerce-Price-amount.amount {
    display: block;
}

/* Product Image States */
.product-image.covered {
    position: relative;
}

.product-image.covered::after {
    content: '';
    background-color: white;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

/* Discount Badge */
span.discount.sale-preset-1 {
    position: absolute;
    top: 10px;
    right: 0;
    background-color: #d1bf70;
    color: white;
    padding: 3px 5px;
}

/* Shaker Button */
.shaker-btn a {
    background-color: #d0bf6f !important;
    color: #000 !important;
}

/* Similar Products Container */
.similar_products {
    position: relative;
}

/* Loading Spinner */
.with_loader::after {
    background-color: #fff;
    z-index: 999;
    content: "";
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    position: absolute;
    margin: auto;
    border: 6px solid #f3f3f3;
    border-radius: 50%;
    border-top: 6px solid #000;
    width: 60px;
    height: 60px;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

.with_loader>.explore_cat_wrapper {
    background-color: white;
}

.with_loader::before {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    z-index: 99;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg)
    }

    100% {
        -webkit-transform: rotate(360deg)
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

/* Add to Cart Button */
.similar-products a.button.product_type_simple.add-to-cart-loop {
    background-color: var(--btn-accented-bgcolor) !important;
}

/* Utility Classes */
.d-none {
    display: none;
}

/* Category Explorer */
.explore_cat {
    margin-bottom: 50px;
}

body.rtl .explore_cat_en {
    display: none;
}

body:not(.rtl) .explore_cat_ar {
    display: none;
}

/* Category List */
.all_cat {
    display: flex;
    margin-bottom: 30px;
}


/* Header */
header .header_hide {
    display: none;
}

/* Page Wrapper */
.website-wrapper {
    position: relative;
}


.main-page-wrapper>.container {
    z-index: 1;
    position: relative;
}

/* Mobile Attribute Label */
span.attr_mobile {
    color: black;
    font-weight: 700;
}

#highlighted {
    color: var(--wd-primary-color);
}

/* Fixed Header for Comparison */
.products-comparison .attr_header {
    position: fixed;
    top: 0px;
    width: 100%;
    background: #f3f3f3;
    left: 0;
    right: 0;
    max-width: 100%;
    padding: 10px;
    z-index: 999;
    text-align: center;
}

.products-comparison .attr_header p {
    font-size: 15px;
    margin: 0;
    border: 0;
    padding: 6px 0;
    color: black;
}

.products-comparison .attr_header span.attr_val {
    font-weight: 700;
}

/* Modal Popup */
.modal.popup .close {
    position: absolute;
    top: -10px;
    right: -7px;
    background: black;
    color: white;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.modal.popup {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #0000006b;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    max-width: 100%;
}

.modal.popup>.popup_wrapper {
    background: white;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    height: max-content;
    max-width: 300px;
    padding: 10px;
}

.modal.popup p {
    border: 0;
    margin: 0;
}

/* Product Column Layout */
.col0 {
    margin-top: auto;
    margin-bottom: 21px;
}

/* Price Display */
span.regular_price.strikethrough {
    display: block;
    color: red;
    text-decoration: line-through;
}

.product-attributes .Price {
    color: #00716b;
}

.product-attributes .Discount {
    color: #00716b;
    font-size: 14px;
}

/* Products Comparison Grid */
.products-comparison p {
    margin: 0;
}

.products-comparison .product_attr {
    border-bottom: 1px solid #c8c8c8;
    margin: 20px 1px;
}

.col0 p {
    color: black;
    text-align: right;
    font-weight: 700;
}

body.rtl .col0 p {
    text-align: left;
}

.product-attributes {
    padding: 0;
    background-color: white;
    text-align: center;
    border: 1px solid #c8c8c8;
}

.product_attr.Discount,
.product_attr.discount {
    margin: 0;
}

.main-page-wrapper {
    background-color: #f4f4f4;
}

.product-image {
    border: 2px solid #80808070;
}

.products-comparison {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin: 0 10px 30px 10px;
}

.product-column {
    flex: 1 0 25%;
    padding: 20px 0;
    max-width: 30%;
}

.product-column select {
    margin-bottom: 20px;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 0;
    margin: 30px 0;
    padding: 0 60px 0 5px;
    font-weight: 700;
    background-color: white;
    border: 1px solid;
}

/* Character Limit with Read More */
.char_limit {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    height: auto !important;
    padding-right: 55px;
    position: relative;
}

body.rtl .char_limit {
    padding-left: 55px;
    padding-right: 0;
}

.char_limit .read-more {
    position: absolute;
    bottom: 0;
    font-size: 11px;
    right: 0;
    text-decoration: underline;
    color: var(--wd-primary-color);
}

body.rtl .char_limit .read-more {
    right: auto;
    left: 0;
}

.products-comparison>div {
    flex: 1 0;
}

/* WooCommerce Button */
.woocommerce-button.button {
    color: var(--btn-accented-color);
    box-shadow: var(--btn-accented-box-shadow);
    background-color: var(--btn-accented-bgcolor);
    margin-bottom: 30px;
}

.products-comparison .product-title {
    border: 0;
    font-size: 16px;
    margin-bottom: 30px;
}

body.rtl .product-column select {
    padding: 0 5px 0 60px;
}

.attr_header_hide {
    display: none;
}

.product-image img {
    padding: 7px;
    background-color: white;
}

span.onsale.sale-preset-1 {
    display: none;
}

/* Similar Products Grid */
.similar-products .eael-product-grid .woocommerce ul.products {
    display: flex;
}

ul.products button {
    display: none;
}

/* Slick Carousel Arrows */
.similar-products .slick-prev:before,
.similar-products .slick-next:before {
    color: black;
}

.similar-products .slick-slide {
    margin: 5px !important;
}

.similar-products .slick-prev:before {
    content: "\f053";
}

.similar-products .slick-prev {
    left: -20px;
}

.similar-products .slick-next {
    right: -20px;
}

.similar-products .slick-next:before {
    content: "\f054";
}

body.rtl .similar-products .slick-next:before {
    content: "\f053";
}

body.rtl .similar-products .slick-prev:before {
    content: "\f054";
}

body.rtl ul.products.slick-slider {
    direction: ltr;
}

/* Product Price Styling */
ul.products li.product .eael-product-price ins bdi {
    color: #c2161d;
}

ul.products li.product .eael-product-price>del>span {
    font-size: 12px;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .attr_mobile {
        display: none;
    }
}

@media (min-width: 1024px) {
    .main-page-wrapper>.container {
        max-width: 1140px;
    }
}

/* Tablet/Mobile Styles */
@media (max-width: 768px) {
    .similar-products ul.products {
        grid-gap: 5px !important;
    }

    .similar-products a.button.product_type_simple.add_to_cart_button.add-to-cart-loop {
        padding-right: 0px !important;
        background-color: var(--btn-accented-bgcolor) !important;
        font-size: 12px !important;
    }

    button.slick-arrow {
        position: absolute;
    }

    .explore_cat .elementor-col-25 {
        flex: 1 0 49%;
    }

    .explore_cat .elementor-col-25>.elementor-widget-wrap {
        padding: 5px !important;
    }

    .explore_cat_wrapper+section {
        padding: 0 15px;
    }

    .all_cat {
        flex-wrap: wrap;
        justify-content: center;
    }

    .all_cat>.cat {
        flex: 1 0 49%;
        max-width: 49%;
        padding: 5px;
    }

    .products-comparison .product_attr span {
        padding: 20px 0 0 0;
    }

    .products-comparison .product_attr p {
        padding: 0 0 20px 0;
    }

    .products-comparison .product_attr {
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .products-comparison::before,
    .products-comparison::after {
        display: none;
    }

    .col0,
    .col3 {
        display: none;
        margin-bottom: 10px;
    }

    .main-page-wrapper {
        background-color: #ffffff;
    }

    .products-comparison .product-title {
        margin-bottom: 30px;
        position: relative;
    }

    .products-comparison .product-title::after {
        content: "\f129";
        display: block;
        text-align: center;
        color: #00aa59;
        font-size: 25px;
        padding: 10px 0;
        font-family: "woodmart-font";
    }

    .products-comparison .product-title a {
        color: black;
        font-weight: 700;
        text-align: center;
        display: block;
        line-height: 1.4;
    }

    .product-image {
        position: relative;
    }

    .col1 .product-image::after {
        content: '';
        background-image: url(https://shakersa.com/wp-content/uploads/arrows_6270575-1.png);
        position: absolute;
        top: 0;
        width: 25px;
        height: 25px;
        z-index: 9;
        background-size: contain;
        background-repeat: no-repeat;
        bottom: 0;
        left: auto;
        right: -18px;
        margin: auto;
    }

    body.rtl .col1 .product-image::after {
        right: auto;
        left: -18px;
    }

    .products-comparison p {
        font-size: 14px;
        line-height: 1.2;
        border: 0;
        margin: 0;
    }

    .product_attr:nth-child(odd) {
        background-color: #f4f4f4;
    }

    .product-attributes {
        padding: 0;
        border: 1px solid #acacac;
    }

    .products-comparison>div {
        padding: 0;
        flex: 1 0 49%;
        max-width: 49%;
    }

    .product-column select {
        font-size: 13px;
        padding: 0 25px 0 5px;
    }

    .products-comparison {
        gap: unset;
    }

    .product-column {
        flex: 1 1 calc(50% - 20px);
    }

    .product-column:nth-child(3) {
        display: none;
    }

    .product-column h2 {
        font-size: 20px;
    }
}

/* Small Mobile Breakpoints */
@media (max-width: 560px) {
    .similar-products>.elementor-container {
        max-width: 560px !important;
    }
}

@media (max-width: 520px) {
    .similar-products>.elementor-container {
        max-width: 520px !important;
    }
}

@media (max-width: 480px) {
    .similar-products>.elementor-container {
        max-width: 480px !important;
    }

    .product-column {
        flex: 1 1 50%;
        max-width: 49%;
        padding: 13px;
    }
}

@media (max-width: 380px) {
    .similar-products>.elementor-container {
        max-width: 380px !important;
    }

    .similar-products>.elementor-container>.elementor-column>.elementor-widget-wrap {
        padding: 0 30px 0 25px;
    }

    body.rtl .similar-products>.elementor-container>.elementor-column>.elementor-widget-wrap {
        padding: 0 25px 0 30px;
    }
}

/* =============================================================================
   Audit H4: previously inlined PHP-templated rules
   =============================================================================
   Originally lived as ~50 PHP-interleaved lines inside each of the 4
   product-compare-*.php template <style> blocks. Moved here using:
     - CSS custom properties (set per-template inline in <head>) for
       i18n labels and the arrow image URL
     - body.rtl selector for the left↔right inversion that the legacy
       code did via `$shaker_compare_align_x` and `<?php if is_english ?>`
   ========================================================================== */

/* Compare / Products labels (desktop only). The two CSS vars are set
   per-template in a tiny <style> block emitted from the page template so
   gettext-translated strings reach the page without re-introducing the
   inline <style> bulk. */
@media (min-width: 768px) {
    .products-comparison::before {
        content: var(--shaker-compare-label, 'COMPARE');
        left: 10px;
        color: black;
        font-weight: 900;
        position: absolute;
        top: 140px;
        bottom: auto;
        margin: auto;
        height: max-content;
        font-size: 26px;
    }

    body.rtl .products-comparison::before {
        left: auto;
        right: 10px;
    }

    .products-comparison::after {
        content: var(--shaker-products-label, 'PRODUCTS');
        left: 10px;
        color: black;
        font-weight: 900;
        position: absolute;
        top: 164px;
        bottom: auto;
        margin: auto;
        height: max-content;
        font-size: 40px;
    }

    body.rtl .products-comparison::after {
        left: auto;
        right: 10px;
    }
}

/* Side overrides on similar-products button cell (was three orphan
   rules at the end of the inline <style>). */
.similar-products a.button.product_type_simple.add_to_cart_button.add-to-cart-loop {
    padding-right: 0 !important;
    background-color: #fff;
}

/* Product-image column gradients. Default is LTR (English): col1 left
   border fades from green-on-left, col2 fades right-to-left. RTL flips. */
.col1 .product-image {
    border-image: linear-gradient(to right, #f0f9f6, #00da80) 1;
}

.col2 .product-image {
    border-image: linear-gradient(to left, #f0f9f6, #00da80) 1;
}

body.rtl .col1 .product-image {
    border-image: linear-gradient(to left, #f0f9f6, #00da80) 1;
}

body.rtl .col2 .product-image {
    border-image: linear-gradient(to right, #f0f9f6, #00da80) 1;
}

/* Comparison arrow icon — URL is environment-specific (uploads dir),
   so it's set as a CSS var per-template. */
.col1 .product-image::after {
    background-image: var(--shaker-compare-arrow-url);
}

/* Elementor-specific add-to-cart container alignment — was repeated 4
   times in each template's inline block (likely a copy-paste artifact);
   collapsed to a single rule here. */
.elementor-143025 .elementor-element.elementor-element-7c9b0f0 > .elementor-container,
.elementor-143025 .elementor-element.elementor-element-7c9b0f0 > .elementor-container a.button.product_type_simple.add_to_cart_button.add-to-cart-loop {
    margin: auto;
}
