/*
 * ADMAL Reviews — Product Display Integration
 * Owned only by ADMAL Reviews.
 */

.admal-product-rating {
    --admal-review-gold: #e5a900;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 7px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #25332c;
    font: inherit;
    line-height: 1.35;
}

button.admal-product-rating {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: start;
}

button.admal-product-rating:hover .admal-product-rating__count,
button.admal-product-rating:focus-visible .admal-product-rating__count {
    text-decoration: underline;
}

button.admal-product-rating:focus-visible {
    outline: 2px solid #075c35;
    outline-offset: 4px;
    border-radius: 4px;
}

.admal-product-rating__stars {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 5.45em;
    color: #d8dedb;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    white-space: nowrap;
}

.admal-product-rating__stars-base {
    color: #d8dedb;
}

.admal-product-rating__stars-fill {
    position: absolute;
    inset: 0 auto 0 0;
    display: block;
    overflow: hidden;
    color: var(--admal-review-gold);
    white-space: nowrap;
}

[dir="rtl"] .admal-product-rating__stars-fill,
.admal-sp-ar .admal-product-rating__stars-fill {
    inset: 0 0 0 auto;
}

.admal-product-rating__value {
    color: #10261b;
    font-size: 13px;
    font-weight: 800;
}

.admal-product-rating__separator {
    color: #839088;
}

.admal-product-rating__count {
    color: #52665b;
    font-size: 12.5px;
    font-weight: 600;
}

body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single {
    width: fit-content;
    max-width: 100%;
}

.woocommerce ul.products li.product .admal-product-rating--loop,
ul.products li.product .admal-product-rating--loop {
    display: flex;
    width: 100%;
    margin: 5px 0 8px;
}

/*
 * Product information navigator:
 * original controller has four tabs.
 * ADMAL Reviews adds the fifth tab before FAQ.
 */
@media (min-width: 768px) {
    body.single-product
    .admal-sp-content-nav.admal-reviews-nav-integrated
    .admal-sp-content-nav__items {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    body.single-product
    .admal-sp-content-nav.admal-reviews-nav-integrated
    .admal-sp-content-nav__item:nth-child(5)
    > .admal-sp-content-nav__trigger {
        grid-column: 5 !important;
    }
}

body.single-product
.admal-product-reviews-panel {
    width: 100%;
    max-width: 100%;
}

body.single-product
.admal-product-reviews-panel > h3 {
    margin: 0 0 16px !important;
}

body.single-product
.admal-product-reviews-panel
.admal-reviews-summary {
    margin: 0;
    max-width: 100%;
}

body.single-product
.admal-product-reviews-panel
.admal-reviews-summary__score {
    margin-bottom: 18px;
}

/* ADMAL SINGLE PRODUCT STARS RTL ORDER V2 */
body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single-ar
.admal-single-rating__stars {
    flex-direction: row-reverse !important;
}

body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single-ar
.admal-single-rating__star.is-half {
    color: transparent !important;
    background:
        linear-gradient(
            90deg,
            #d9dfdc 0 50%,
            #e5a900 50% 100%
        ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
/* ADMAL SINGLE PRODUCT STARS RTL ORDER V2 END */

@media (max-width: 767px) {
    .admal-product-rating {
        gap: 5px;
    }

    .admal-product-rating__stars {
        font-size: 13px;
    }

    .admal-product-rating__value,
    .admal-product-rating__count {
        font-size: 12px;
    }
}

/* ==========================================================
   ADMAL PRODUCT REVIEWS — SHARED REVIEW CARDS
   Product page owns section layout only.
   Review cards themselves come exclusively from reviews.css.
   ========================================================== */

body.single-product
.admal-product-reviews-flat {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.single-product
.admal-product-reviews-flat__header {
    width: 100%;
    margin: 0 0 24px;
    padding: 0;
    text-align: center;
}

body.single-product
.admal-product-reviews-flat__header h3 {
    margin: 0 0 8px !important;
    padding: 0 !important;
    text-align: center !important;
}

body.single-product
.admal-product-reviews-flat__summary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    width: 100%;
    margin: 10px auto 26px;
    text-align: center;
}

body.single-product
.admal-product-reviews-flat__summary > strong {
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

body.single-product
.admal-product-reviews-flat__summary > span:last-child {
    color: #68766f;
    font-size: 14px;
    font-weight: 500;
}

body.single-product
.admal-product-reviews-flat__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.single-product
.admal-product-reviews-flat__all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    margin: 26px auto 0;
    padding: 8px 14px;
    border: 1px solid #075c35;
    border-radius: 7px;
    background: transparent;
    color: #075c35 !important;
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
}

body.single-product
.admal-product-reviews-flat__all:hover {
    background: #f2f8f4;
}

body.single-product
[data-admal-content-panel="reviews"]
.admal-sp-content-nav__panel-inner {
    width: 80% !important;
    max-width: none !important;
    margin-inline: auto !important;
}

/* Section interface follows page language.
   Review cards themselves keep their own language/direction. */
body.single-product
.admal-product-reviews-flat[data-lang="en"]
.admal-product-reviews-flat__header,
body.single-product
.admal-product-reviews-flat[data-lang="en"]
.admal-product-reviews-flat__summary {
    direction: ltr;
}

body.single-product
.admal-product-reviews-flat[data-lang="ar"]
.admal-product-reviews-flat__header,
body.single-product
.admal-product-reviews-flat[data-lang="ar"]
.admal-product-reviews-flat__summary {
    direction: rtl;
}

body.single-product
.admal-product-reviews-flat[data-lang="en"]
.admal-product-reviews-flat__all {
    direction: ltr;
    font-family: "Poppins", Arial, sans-serif;
}

body.single-product
.admal-product-reviews-flat[data-lang="ar"]
.admal-product-reviews-flat__all {
    direction: rtl;
    font-family: "Cairo", Arial, sans-serif;
}

@media (max-width: 1024px) {
    body.single-product
    [data-admal-content-panel="reviews"]
    .admal-sp-content-nav__panel-inner {
        width: 94% !important;
    }
}

@media (max-width: 767px) {
    body.single-product
    [data-admal-content-panel="reviews"]
    .admal-sp-content-nav__panel-inner {
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    body.single-product
    .admal-product-reviews-flat__list {
        gap: 14px;
    }

    body.single-product
    [data-admal-content-panel="reviews"]
    .admal-sp-content-nav__close {
        margin-top: 14px !important;
    }
}


/* ADMAL SHOP RATING V2 START */

.woocommerce ul.products li.product .admal-product-rating--loop,
ul.products li.product .admal-product-rating--loop {
    display: none !important;
}

.woocommerce ul.products li.product .admal-shop-rating,
ul.products li.product .admal-shop-rating {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    width: 100% !important;
    min-width: 0 !important;

    margin: 8px 0 4px !important;
    padding: 0 !important;

    gap: 5px !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
    white-space: nowrap !important;

    line-height: 1 !important;
    text-align: center !important;
}

.woocommerce ul.products li.product .admal-shop-rating__stars,
ul.products li.product .admal-shop-rating__stars {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;

    gap: 1px !important;

    margin: 0 !important;
    padding: 0 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
    white-space: nowrap !important;

    font-size: 20px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

.admal-shop-rating__star {
    display: inline-block !important;
    position: static !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1 !important;
}

.admal-shop-rating__star.is-filled {
    color: #e5a900 !important;
}

.admal-shop-rating__star.is-empty {
    color: #d7ddda !important;
}

.admal-shop-rating__score {
    display: inline-block !important;
    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #10261b !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
}

.admal-shop-rating__count {
    display: inline-block !important;
    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #969e9a !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
}

@media (max-width: 767px) {
    .woocommerce ul.products li.product .admal-shop-rating,
    ul.products li.product .admal-shop-rating {
        gap: 5px !important;
        margin-top: 7px !important;
    }

    .woocommerce ul.products li.product .admal-shop-rating__stars,
    ul.products li.product .admal-shop-rating__stars {
        font-size: 18px !important;
    }

    .admal-shop-rating__score {
        font-size: 15px !important;
    }

    .admal-shop-rating__count {
        font-size: 13px !important;
    }
}

/* ADMAL SHOP RATING V2 END */


/* ADMAL RELATED PRODUCT RATING START */

/*
 * Rating is already generated by ADMAL Reviews through the normal
 * WooCommerce product loop. This only guarantees that Elementor's
 * Related Products widget does not suppress or collapse it.
 */
.elementor-widget-woocommerce-product-related
ul.products
li.product
.admal-shop-rating {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    height: auto !important;
    min-height: 0 !important;

    overflow: visible !important;

    margin-top: 8px !important;
    margin-bottom: 5px !important;
}

/* Lowest-price output uses the same visual treatment as Woo price. */
.woocommerce ul.products li.product .admal-loop-lowest-price,
ul.products li.product .admal-loop-lowest-price,
.elementor-widget-woocommerce-product-related
ul.products
li.product
.admal-loop-lowest-price {
    display: block;
}

/* ADMAL RELATED PRODUCT RATING END */


/* ADMAL SINGLE PRODUCT RATING V2 START */

body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    width: fit-content !important;
    max-width: 100% !important;

    margin: 10px 0 0 !important;
    padding: 0 !important;

    gap: 8px !important;

    border: 0 !important;
    background: transparent !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
    white-space: nowrap !important;

    line-height: 1 !important;
}

/*
 * Arabic mirrors the visible order:
 *
 * EN: ★★★★☆  3.8  (4)
 * AR: (4)  3.8  ★★★★☆
 */
body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single-ar {
    flex-direction: row-reverse !important;
}

body.single-product
.admal-product-rating--single
.admal-single-rating__stars {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;

    gap: 1px !important;

    margin: 0 !important;
    padding: 0 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
    white-space: nowrap !important;

    font-size: 34px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

body.single-product
.admal-product-rating--single
.admal-single-rating__star {
    display: inline-block !important;
    position: static !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1 !important;
}

body.single-product
.admal-product-rating--single
.admal-single-rating__star.is-filled {
    color: #e5a900 !important;
}

body.single-product
.admal-product-rating--single
.admal-single-rating__star.is-empty {
    color: #d7ddda !important;
}

body.single-product
.admal-product-rating--single
.admal-single-rating__score {
    display: inline-block !important;
    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #10261b !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
}

body.single-product
.admal-product-rating--single
.admal-single-rating__count {
    display: inline-block !important;
    flex: 0 0 auto !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #969e9a !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;

    text-decoration: none !important;
}

body.single-product
.admal-product-rating--single:hover
.admal-single-rating__count,
body.single-product
.admal-product-rating--single:focus-visible
.admal-single-rating__count {
    text-decoration: none !important;
}

@media (max-width: 767px) {

    body.single-product
    .elementor-widget-woocommerce-product-price
    .admal-product-rating--single {
        gap: 7px !important;
        margin-top: 9px !important;
    }

    body.single-product
    .admal-product-rating--single
    .admal-single-rating__stars {
        font-size: 30px !important;
    }

    body.single-product
    .admal-product-rating--single
    .admal-single-rating__score {
        font-size: 16px !important;
    }

    body.single-product
    .admal-product-rating--single
    .admal-single-rating__count {
        font-size: 14px !important;
    }
}

/* ADMAL SINGLE PRODUCT RATING V2 END */

/* ADMAL SINGLE PRODUCT RATING ALIGNMENT V1 START */

/*
 * Keep the compact rating attached to the same visual edge
 * as the main product price on every breakpoint.
 */

body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single {
    display: flex !important;
    width: fit-content !important;
}

/* English: lock to left edge */
body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single-en {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Arabic: lock to right edge */
body.single-product
.elementor-widget-woocommerce-product-price
.admal-product-rating--single-ar {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* ADMAL SINGLE PRODUCT RATING ALIGNMENT V1 END */


/* ADMAL RELATED CUSTOM CAROUSEL V1 START */

/*
 * Visible product-page carousel generated by the existing custom
 * product-display controller.
 *
 * ADMAL Reviews adds only:
 * - lowest visible price consistency
 * - verified aggregate rating
 */

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-price {
    white-space: nowrap !important;
}

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-rating {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    width: 100% !important;

    margin: 7px 0 9px !important;
    padding: 0 !important;

    gap: 5px !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;
    white-space: nowrap !important;

    line-height: 1 !important;
    text-align: center !important;
}

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-rating__stars {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;

    gap: 1px !important;

    margin: 0 !important;
    padding: 0 !important;

    direction: ltr !important;
    unicode-bidi: isolate !important;

    font-size: 18px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-rating__star {
    display: inline-block !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    line-height: 1 !important;
}

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-rating__star.is-filled {
    color: #e5a900 !important;
}

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-rating__star.is-empty {
    color: #d7ddda !important;
}

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-rating__score {
    flex: 0 0 auto !important;

    color: #10261b !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

body.single-product
.admal-products-theme
.admal-fresh-card
.admal-fresh-rating__count {
    flex: 0 0 auto !important;

    color: #969e9a !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
}

@media (max-width: 500px) {

    body.single-product
    .admal-products-theme
    .admal-fresh-card
    .admal-fresh-rating {
        gap: 4px !important;
        margin: 6px 0 8px !important;
    }

    body.single-product
    .admal-products-theme
    .admal-fresh-card
    .admal-fresh-rating__stars {
        font-size: 16px !important;
    }

    body.single-product
    .admal-products-theme
    .admal-fresh-card
    .admal-fresh-rating__score {
        font-size: 14px !important;
    }

    body.single-product
    .admal-products-theme
    .admal-fresh-card
    .admal-fresh-rating__count {
        font-size: 13px !important;
    }
}

/* ADMAL RELATED CUSTOM CAROUSEL V1 END */

/* ADMAL_PRODUCT_HALF_STAR_CORE_V1 */

.admal-single-rating__star,
.admal-shop-rating__star,
.admal-fresh-rating__star {
    display:inline-block;
    flex:0 0 auto;
    line-height:1;
}

.admal-single-rating__star.is-half,
.admal-shop-rating__star.is-half,
.admal-fresh-rating__star.is-half {
    color:transparent !important;
    background:
        linear-gradient(
            90deg,
            #e5a900 0 50%,
            #d9dfdc 50% 100%
        ) !important;
    -webkit-background-clip:text !important;
    background-clip:text !important;
    -webkit-text-fill-color:transparent !important;
}

/* ADMAL SELECTED VARIATION PRICE V1 START */

/*
 * Selected variation price only.
 * Does NOT affect the main Elementor product price above.
 */
body.single-product
.elementor-element-10f28d07
.single_variation
.woocommerce-variation-price
.price,
body.single-product
.elementor-element-10f28d07
.single_variation
.woocommerce-variation-price
.price .woocommerce-Price-amount {
    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    color: #111111 !important;
}

@media (max-width: 767px) {
    body.single-product
    .elementor-element-10f28d07
    .single_variation
    .woocommerce-variation-price
    .price,
    body.single-product
    .elementor-element-10f28d07
    .single_variation
    .woocommerce-variation-price
    .price .woocommerce-Price-amount {
        font-size: 24px !important;
    }
}

/* ADMAL SELECTED VARIATION PRICE V1 END */
