/* =========================================================
   PRODUCT PAGE – Arhasoft Style
   RTL / LTR SAFE – FINAL (CLEAN)
========================================================= */

/* ---------- Page ---------- */
.product-page {
    width: 100%;
    background: var(--background, #fff);
}

/* ---------- Hero ---------- */
.product-hero {
    padding: 24px 0 40px;
    position: relative;
    z-index: 1;
}

.product-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =========================================================
   DESKTOP LAYOUT (GRID)
========================================================= */
.product-hero-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: flex-start;
}

/* RTL → image right / content left */
[dir="rtl"] .product-hero-grid {
    grid-template-areas: "media summary";
}

[dir="rtl"] .hero-media {
    grid-area: media;
}

[dir="rtl"] .hero-summary {
    grid-area: summary;
}

/* LTR → content left / image right */
[dir="ltr"] .product-hero-grid {
    grid-template-areas: "summary media";
}

[dir="ltr"] .hero-summary {
    grid-area: summary;
}

[dir="ltr"] .hero-media {
    grid-area: media;
}

/* ---------- Media ---------- */
.hero-media {
    text-align: center;
}

.hero-media img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

/* ---------- Summary ---------- */
.hero-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* neutralize matjari.css flex:1 */
.product-hero .hero-summary {
    flex: unset;
}

/* ---------- Title / Badge ---------- */
.product-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.product-badge {
    width: fit-content;
}


/* ---------- Price ---------- */
.product-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    margin: 4px 0 8px;
}

/* ---------- Short description ---------- */
.product-short-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 8px 0 0;
}

/* =========================================================
   ORDER BOX
========================================================= */
.order-box {
    background: #f8fbff;
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 20px;
    margin-top: 12px;
    font-family: inherit;
        transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.order-box-title {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* ---------- Fields ---------- */
.order-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-icon {
    position: relative;
}

.field-icon i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 16px;
}

/* icon position by direction */
[dir="rtl"] .field-icon i {
    right: 12px;
}

[dir="ltr"] .field-icon i {
    left: 12px;
}

.field-icon input,
.field-icon select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dce6f2;
    border-radius: 8px !important;
    font-size: 14px;
    background: #fff;
    font-family: inherit;
}

/* padding for icons */
[dir="rtl"] .field-icon input,
[dir="rtl"] .field-icon select {
    padding-right: 36px;
}

[dir="ltr"] .field-icon input,
[dir="ltr"] .field-icon select {
    padding-left: 36px;
}

.field-icon input:focus,
.field-icon select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ---------- Quantity ---------- */
.order-qty {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.order-qty button {
    width: 36px;
    height: 36px;
    border: 1px solid #dce6f2;
    background: #fff;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    font-family: inherit;
}

.order-qty input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 16px;
    background: transparent;
    font-family: inherit;
}

/* ---------- Summary ---------- */
.order-summary {
    background: #eef6ff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.summary-row.total {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

/* ===============================
   STICKY PRODUCT INFO (REAL HEADER)
================================ */

/* مخفي افتراضيًا */
.header-product-info {
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    white-space: nowrap;
}

/* يظهر فقط في صفحة المنتج عند التمرير */
.product-page .site-header.scrolled .header-product-info {
    display: flex;
}

/* إخفاء عناصر الهيدر الأصلية (منتج فقط) */
.product-page .site-header.scrolled .header-nav,
.product-page .site-header.scrolled .header-cta {

    display: none;
}

/* اسم المنتج */
.header-product-name {
    font-weight: 700;
    font-size: 20px;           /* كِبر الاسم */
    line-height: 1.2;
    max-width: none;           /* ❗ أزل التقييد */
    white-space: normal;       /* اسم كامل */
    overflow: visible;
}

/* شارة */

/* السعر */
.header-product-price {
    font-weight: 700;
    color: var(--primary-color);
}

/* ---------- Actions ---------- */
.btn-confirm {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;

    background-color: var(--primary-color);
    background-image: url("/themes/matjari/assets/img/button-bg.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    color: #fff;
    border: none;
    border-radius: 10px;

    transition: background-color .25s ease;
}

.btn-confirm:hover {
    background-color: var(--danger-color, #e22222);
    color: #fff;
}


/* ---------- WhatsApp Button ---------- */
.btn-whatsapp {
    display: block;
    text-align: center;
    margin-top: 10px;
    Font-family: inherit;
    background-color: #25d366;
    background-image: url("/themes/matjari/assets/img/button-bg.svg");
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    text-decoration: none;
    font-family: inherit;

    transition:
        background-color .25s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


@media (hover: hover) and (pointer: fine) {
    .btn-whatsapp:hover {
        background-color: #1ebe5d;
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
        color: #fff;
    }
}


/* =========================================================
   MOBILE / TABLET – FINAL FIX
   (THIS SOLVES THE IMAGE BUG)
========================================================= */
@media (max-width: 992px) {

    /* force vertical stacking */
    .product-hero-grid {
        display: flex;
        flex-direction: column;
    }

    /* image first */
    .hero-media {
        width: 100%;
        order: 1;
    }

    .hero-media img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* content second */
    .hero-summary {
        order: 2;
        width: 100%;
        margin-top: 20px;
    }

    .order-fields {
        grid-template-columns: 1fr;
    }

    .product-title {
        font-size: 22px;
    }

    .product-price {
        font-size: 22px;
    }
}
/* =========================================================
   FIX: RTL ALIGNMENT (SAFE – NO SHRINK)
========================================================= */
[dir="rtl"] .hero-summary {
    /* IMPORTANT: keep default stretch */
    text-align: right;
}

/* align only title row */
[dir="rtl"] .product-title-row {
    justify-content: flex-end;
}

/* align only price row */
[dir="rtl"] .product-price {
    justify-content: flex-end;
}

/* =========================================================
   PRICE STYLE (OLD / NEW)
========================================================= */
.price-old {
    font-size: 15px;
    color: #9aa3af;
    text-decoration: line-through;
}

.price-new {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.price-current {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
}

/* =========================================================
   IMAGE ZOOM BASE (JS CONTROLLED)
========================================================= */
.hero-media {
    position: relative;
    /* overflow: hidden — أُزيل لأن thumbs column خارج product-image-zoom */
}

.hero-media img {
    transition: transform 0.15s ease;
    transform-origin: center center;
    will-change: transform;
}
/* container خاص بالزوم */
.product-image-zoom {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

/* الصورة */
.product-image-zoom img {
    width: 100%;
    display: block;
    transition: transform 0.15s ease;
    transform-origin: center center;
}

/* الوصف */
.product-description {
    margin-top: 16px;
    padding: 14px;
    background: #fafafa;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}
.product-variants {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ================================
   VARIANTS – Beautiful Selection UI
================================ */

.product-variants {
    margin: 10px 0 4px;
}

.variant-group {
    margin-bottom: 10px;
    display: block;
}

.variant-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.variant-label-selected { display:none !important; }

.variant-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* ── SIZE BUTTONS ── */
.variant-item,
.variant-size {
    position: relative;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    aspect-ratio: 1 / 1 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 44px !important;
    border: 1.5px solid rgba(148,163,184,.34);
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .18s, transform .18s, box-shadow .18s, color .18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    line-height: 1;
    box-shadow: none;
}

.variant-item:hover:not(.variant-unavailable),
.variant-size:hover:not(.variant-unavailable) {
    border-color: var(--primary-color, #3b82f6);
    color: var(--primary-color, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.variant-item.active,
.variant-size.active {
    border-color: var(--primary-color, #3b82f6);
    background: #fff;
    color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color, #3b82f6) 14%, transparent);
    transform: none;
}

/* Out-of-stock size: hidden */
.variant-item.variant-unavailable,
.variant-size.variant-unavailable {
    display: none !important;
}

/* ── COLOR SWATCHES ── */
.variant-color-wrap {
    display: inline-flex;
    margin:0;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.variant-color {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid #fff;
    outline: 1px solid rgba(148,163,184,.45);
    cursor: pointer;
    transition: outline-color .18s, transform .18s, box-shadow .18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    flex-shrink: 0;
    background: #eee;
    box-shadow: none;
}

.variant-color:hover:not(.variant-unavailable) {
    outline-color: var(--primary-color, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
}

.variant-color.active {
    outline-color: var(--primary-color, #3b82f6);
    outline-width: 3px;
    transform: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #3b82f6) 14%, transparent);
}

.variant-color.active::after { content:none; }

/* Color names hidden intentionally */
.vc-name { display:none !important; }

/* Out-of-stock color */
.variant-color.variant-unavailable {
    display: none !important;
}
.variant-color-wrap:has(.variant-color.variant-unavailable) {
    display: none !important;
}

/* ── REQUIRED highlight (missing selection) ── */
.variant-required .variant-label { color: #dc3545 !important; }
.variant-required .variant-options { outline: 2px solid #dc3545; border-radius: 10px; padding: 4px; }
/* ================================
   ORDER BOX – HOVER EFFECT
================================ */


/* Hover (desktop only) */
@media (hover: hover) and (pointer: fine) {
    .order-box:hover {
        transform: scale(1.02);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
    }
}
/* =========================
   Reviews Section
========================= */

.product-reviews {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.reviews-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}


/* ===== Stars ===== */

.review-stars::before {
    content: "★★★★★";
    letter-spacing: 2px;
    color: #ddd;
}

.review-stars[data-rating="1"]::before { color: #f5b301; content: "★☆☆☆☆"; }
.review-stars[data-rating="2"]::before { color: #f5b301; content: "★★☆☆☆"; }
.review-stars[data-rating="3"]::before { color: #f5b301; content: "★★★☆☆"; }
.review-stars[data-rating="4"]::before { color: #f5b301; content: "★★★★☆"; }
.review-stars[data-rating="5"]::before { color: #f5b301; content: "★★★★★"; }


.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}


/* ===== Rating Input ===== */

.rating-input {
    display: flex;
    gap: 6px;
    font-size: 24px;
    cursor: pointer;
    margin: 10px 0;
}

.rating-input span {
    color: #ddd;
    transition: color .2s ease;
}

.rating-input span.active {
    color: #f5b301;
}

/* ===== Upload ===== */

.review-upload {
    margin: 10px 0;
}

.review-upload input {
    display: none;
}

.review-upload span {
    font-size: 13px;
    cursor: pointer;
    color: var(--primary-color);
}

/* ===== Submit ===== */

.btn-review-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    Font-family: inherit;
    cursor: pointer;
    transition: background-color .25s ease;
}

.btn-review-submit:hover {
    background-color: var(--danger-color, #e22222);
}

/* ===== Responsive ===== */

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   PRODUCT HEADER – STICKY CONTENT
========================================= */

.product-page .header-product-info {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* يظهر فقط عند التمرير */
.product-page .site-header.scrolled .header-product-info {
    display: flex;
}

/* إخفاء عناصر الهيدر العادية */
.product-page .site-header.scrolled .header-nav,
.product-page .site-header.scrolled .header-cta {
    display: none;
}

/* ===== Right (Title + badge + stars) ===== */
.header-product-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 65%;
}

.header-product-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}
.header-product-stars::before {
    content: "★★★★★";
    color: #f5b301;
    letter-spacing: 2px;
    font-size: 14px;
}

/* ===== Left (Price) ===== */
.header-product-left {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}
/* الوضع الطبيعي: لا يؤثر على الهيدر */
.header-product-info {
    display: none;
}

/* فقط عند التمرير في صفحة المنتج */
.product-page .site-header.scrolled .header-product-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1; /* ← هذا مهم */
}

/* عند التمرير فقط نخفي nav */
.product-page .site-header.scrolled .header-nav {
    display: none;
}
.header-product-stars {
    display: block;
    margin-top: 4px;
}

.header-product-stars::before {
    content: "★★★★★";
    color: #f5b301;
    letter-spacing: 2px;
    font-size: 14px;
}
.header-product-left {
    display: flex;
    align-items: center;
}

.header-product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}
.header-product-stars {
    display: block;
    line-height: 1;
}
/* NAME + BADGE ROW */
.header-product-title-row {
    display:flex;
    align-items:flex-start;
    gap:8px;
    flex-wrap:wrap;
}
.header-product-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 65%;
}

.header-product-name {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-product-badge {
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.header-product-stars::before {
    content: "★★★★★";
    font-size: 14px;
    letter-spacing: 2px;
    color: #f5b301;
}
.header-product-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
@media (max-width: 768px) {

    .header-product-info {
        align-items: flex-start;
        gap: 12px;
    }

}
@media (max-width: 768px) {

    .header-product-right {
        max-width: calc(100% - 90px);
        gap: 2px;
    }

}
@media (max-width: 768px) {

    .header-product-name {
        font-size: 15px;
        line-height: 1.3;

        -webkit-line-clamp: 2;
    }

}
@media (max-width: 768px) {

    .header-product-title-row {
        gap: 6px;
    }

    .header-product-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

}
@media (max-width: 768px) {

    .header-product-stars::before {
        font-size: 13px;
        letter-spacing: 1.5px;
    }

}
@media (max-width: 768px) {

    .header-product-price {
        font-size: 15px;
        white-space: nowrap;
    }

}
@media (max-width: 768px) {

    .site-header {
        min-height: 56px;
    }

}
/* ===============================
   MOBILE STICKY HEADER – Arhasoft
================================ */

@media (max-width: 768px) {

    /* إخفاء اللوجو عند التمرير في صفحة المنتج */
    .product-page .site-header.scrolled .header-logo {
        display: none;
    }

    /* توسيط محتوى المنتج */
    .product-page .site-header.scrolled .header-product-info {
        margin: 0 auto;
        text-align: center;
        justify-content: center;
    }

}
@media (max-width: 768px) {

    .header-product-info {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .header-product-name {
        font-size: 15px;
        font-weight: 700;
        line-height: 1.3;
        max-width: 90vw;
        text-align: center;
    }

    .header-product-badge {
        margin-inline-start: 6px;
        font-size: 11px;
    }

    .header-product-stars {
        margin-top: 2px;
    }

    .header-product-price {
        margin-top: 4px;
        font-size: 16px;
        font-weight: 800;
    }
}
@media (min-width: 992px) {

    /* حاوية الصورة */
    .product-media[data-sticky-image] {
        position: sticky;
        top: calc(var(--top-bar-height, 0px) + 80px);
        align-self: flex-start;
    }

}
/* =========================================================
   PRODUCT REVIEW FORM – ALIGNED WITH PRODUCT COLUMNS
========================================================= */

.product-review-form {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 0 16px;
}

/* الصندوق */
.product-review-form form {
    background: #f8fbff;
    border: 1px solid #e6eef8;
    border-radius: 14px;
    padding: 24px;
}

/* الحقول */
.product-review-form input,
.product-review-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    font-family: inherit;
    font-size: 14px;
}

/* فوكس صحيح */
.product-review-form input:focus,
.product-review-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}

/* صف الاسم + الإيميل */
.product-review-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

/* النجوم */
.product-review-form .rating-input {
    font-size: 26px;
    margin: 14px 0;
}

/* زر الإرسال */
.product-review-form .review-btn {
    display: inline-block;
    width: 30%;
    margin-top: 16px;
    Font-family: inherit;
    padding: 12px 0;
    background-color: var(--primary-color);
    background-image: url("/themes/matjari/assets/img/button-bg.svg");
    background-size: cover;
    background-position: center;

    color: #fff !important;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;

    transition: background-color .25s ease;
}

.product-review-form .review-btn:hover {
    background-color: var(--danger-color, #e22222);
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
    .product-review-form .form-row {
        grid-template-columns: 1fr;
    }

    .product-review-form .review-btn {
        width: 100%;
    }
}

.review-btn {
    display: block;
    width: 50%;
    padding: 12px 0;
    text-align: center;

    background-color: var(--primary-color);
    background-image: url("/themes/matjari/assets/img/button-bg.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none;

    border: none;
    border-radius: 6px;

    transition: background-color .25s ease;
}
.review-btn:hover {
    background-color: var(--danger-color, #e22222);
    color: #ffffff !important;
}
/* =========================================================
   REVIEWS – Arhasoft CARDS (REAL FINAL FIX)
========================================================= */

.product-reviews .products-row-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ================= DEFAULT GRID (≤4) ================= */
.product-reviews .products-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ================= CARD ================= */
.review-card-arhasoft {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 14px;
    overflow: hidden;

    transition: transform .25s ease, box-shadow .25s ease;
}

.review-card-arhasoft:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 32px rgba(0,0,0,.12);
}

/* IMAGE */
.review-card-arhasoft .product-thumb {
    height: 200px;
    overflow: hidden;
}

.review-card-arhasoft .product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BODY */
.review-card-arhasoft .product-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.review-card-arhasoft .review-comment {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================= SLIDER MODE (>4) ================= */
.product-reviews .products-cards-grid.is-slider {
    display: flex;
    gap: 20px;

    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
}

.product-reviews .products-cards-grid.is-slider::-webkit-scrollbar {
    display: none;
}

.product-reviews .products-cards-grid.is-slider .review-card-arhasoft {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

/* ================= ARROWS ================= */
.product-reviews .reviews-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;

    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;

    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.2);

    font-size: 22px;
    cursor: pointer;
}

[dir="rtl"] .reviews-arrow-prev { right: -20px; }
[dir="rtl"] .reviews-arrow-next { left: -20px; }

[dir="ltr"] .reviews-arrow-prev { left: -20px; }
[dir="ltr"] .reviews-arrow-next { right: -20px; }

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {

    .product-reviews .products-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-reviews .products-cards-grid.is-slider .review-card-arhasoft {
        flex: 0 0 240px;
    }
}

@media (max-width: 576px) {

    .product-reviews .products-cards-grid {
        grid-template-columns: 1fr;
    }

    .product-reviews .products-cards-grid.is-slider .review-card-arhasoft {
        flex: 0 0 98%;
    }

    .product-reviews .reviews-arrow {
        display: none;
    }
}
.product-reviews .products-cards-grid.is-slider {
    scroll-behavior: smooth;
}
.product-reviews,
.product-reviews .products-row-wrapper {
    overflow: visible !important;
}
.product-reviews .products-cards-grid.is-slider {
    overflow-x: auto !important;
    overflow-y: hidden;
    display: flex;
    flex-wrap: nowrap;
}
/* ===============================
   PRODUCT STICKY BAR
================================ */

.product-sticky-bar {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 999;

    display: flex;
    justify-content: center; /* الزر في الوسط */
    align-items: center;

    padding: 12px 16px;

    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -6px 20px rgba(0,0,0,.08);

    transform: translateY(100%);
    transition: transform .35s ease;
}

/* ===============================
   PRODUCT STICKY BAR
================================ */

.product-sticky-bar {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 999;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 12px 16px;

    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -6px 20px rgba(0,0,0,.08);

    transform: translateY(100%);
    transition: transform .35s ease;
}

/* يظهر فقط عند الوصول للمراجعات */
.product-sticky-bar.is-visible {
    transform: translateY(0);
}

/* ===============================
   STICKY BUY BUTTON (LIKE REVIEW BTN)
================================ */

.product-sticky-bar .sticky-buy {
    display: inline-block;
    width: 50%;
    max-width: 420px;
    
    padding: 12px 0;

    background-color: var(--primary-color);
    background-image: url("/themes/matjari/assets/img/button-bg.svg");
    background-size: cover;
    background-position: center;
Font-family: inherit;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;

    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;

    transition: background-color .25s ease;
}

.product-sticky-bar .sticky-buy:hover {
    background-color: var(--danger-color, #e22222);
}

/* تعويض الارتفاع حتى لا يغطي المحتوى */
body.has-sticky-bar {
    padding-bottom: 80px;
}

/* ===============================
   FLOATING WHATSAPP ICON
================================ */

.floating-whatsapp {
    position: fixed;
    left: 16px;
    bottom: 90px; /* فوق شريط الشراء */
    z-index: 9999;

    width: 52px;
    height: 52px;
    border-radius: 50%;

    background: #25d366;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);

    transition: transform .25s ease, box-shadow .25s ease;
}

.floating-whatsapp:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 26px rgba(0,0,0,.35);
}
/* =========================================================
   PRODUCT COUNTDOWN – OPTION A (FINAL / DB-DRIVEN)
   Themed + RTL Safe + Clean UI
========================================================= */

.product-countdown {
    position: relative;
    margin: 12px 0;
    font-family: inherit;
}

/* ===============================
   Desktop positioning
   (Left side in RTL / Right in LTR)
================================ */
@media (min-width: 992px) {
    .product-countdown {
        position: absolute;
        top: 70px;
        inset-inline-end: 117px;   /* ← نقل العداد لليسار */
        max-width: 440px;
        z-index: 3;
    }
}

/* ===============================
   Container
================================ */
.product-countdown .countdown-inner {
    background: color-mix(in srgb, var(--primary) 10%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--primary) 35%, #ffffff);
    border-radius: 16px;
    padding: 22px 22px;
    box-shadow:
        0 8px 22px rgba(0,0,0,.08),
        inset 0 1px 0 rgba(255,255,255,.6);
    backdrop-filter: blur(2px);
}

/* ===============================
   Label
================================ */
.product-countdown .countdown-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 10px;
    letter-spacing: .2px;
}

/* ===============================
   Timer layout
================================ */
.product-countdown .countdown-timer {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===============================
   Time box
================================ */
.product-countdown .time-box {
    min-width: 58px;
    padding: 10px 6px;
    background: #ffffff;
    border-radius: 12px;
    text-align: center;
    border: 1px solid color-mix(in srgb, var(--primary) 30%, #ffffff);
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    transition: transform .15s ease, box-shadow .15s ease;
}

.product-countdown .time-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

/* ===============================
   Number
================================ */
.product-countdown .time-box .num {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.15;
}

/* ===============================
   Unit label
================================ */
.product-countdown .time-box small {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}

/* ===============================
   LAST 24 HOURS (AUTO)
================================ */
.product-countdown.is-ending .countdown-inner {
    background: #ffffff;
    border-color: var(--primary);
}

.product-countdown.is-ending .time-box {
    border-color: var(--primary);
}

.product-countdown.is-ending .num {
    color: var(--primary);
}

/* ===============================
   Mobile
================================ */
@media (max-width: 991px) {
    .product-countdown {
        position: static;
        margin: 16px 0;
    }

    .product-countdown .countdown-timer {
        justify-content: space-between;
    }
}


/* ===============================
   Editor.js landing content
=============================== */
.product-landing-content{
    margin-top: 22px;
    padding: 18px 16px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    background: #fff;
}
.product-landing-content h2,
.product-landing-content h3,
.product-landing-content h4{
    margin: 14px 0 10px;
}
.product-landing-content p{
    margin: 0 0 10px;
    line-height: 1.9;
}
.product-landing-content ul,
.product-landing-content ol{
    padding-inline-start: 20px;
    margin: 0 0 12px;
}
.product-landing-content hr{
    border: 0;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin: 16px 0;
}
.product-landing-content figure.editorjs-image{
    margin: 14px 0;
}
.product-landing-content figure.editorjs-image img{
    width: 100%;
    border-radius: 14px;
    display: block;
}
.product-landing-content figure.editorjs-image figcaption{
    font-size: 13px;
    opacity: .7;
    margin-top: 6px;
}


/* ═══════════════════════════════════════════════════
   THUMBNAILS STRIP — أفقي تحت الصورة الرئيسية
═══════════════════════════════════════════════════ */

/* الصورة الرئيسية + الـ thumbnails في عمود */
.hero-media {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.product-image-zoom {
    width: 100%;
}

/* الشريط كله: سهم + صور + سهم — في صف أفقي */
.gal-thumbs-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* يخفي الصور الزائدة */
.gal-thumbs-track-outer {
    flex: 1 1 0 !important;
    overflow: hidden !important;
    min-width: 0 !important;
}

/* صف الصور الأفقي */
.gal-thumbs-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    transition: transform 0.3s ease;
}

/* كل صورة مصغرة */
.gal-thumb {
    flex: 0 0 70px !important;
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    padding: 0;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.gal-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.gal-thumb.is-active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13,110,253,0.3);
}

.gal-thumb:hover:not(.is-active) {
    border-color: #aaa;
}

/* سهم يسار ويمين */
.thumb-arrow {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 18px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    color: #444;
    padding: 0;
    line-height: 1;
    user-select: none;
    transition: background 0.15s;
}

.thumb-arrow:hover {
    background: #f0f0f0;
}
/* ── Scoped HTML description: prevent user-defined fonts from leaking ── */
.product-desc-html * {
    all: revert;
}
.product-desc-html {
    font-family: inherit;
    color: inherit;
    line-height: 1.7;
}


.product-title-row{display:flex;flex-direction:column;align-items:flex-start;gap:8px;}
.product-price{margin:0;}
.product-variants{margin:2px 0 0;}
.product-short-description{margin:4px 0 0;}
.header-product-badge{display:inline-flex;align-items:center;gap:6px;font-weight:800;}
.header-product-badge .badge-emoji{font-size:13px;line-height:1;}
.offer-tiers-head > div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
