/* =================================================================
   ملف تنسيقات صفحة المنتج (Product Style - Fixed)
   ================================================================= */

/* 1. تقسيم الصفحة */
.product-layout {
    display: grid;
    grid-template-columns: 45% 50%;
    gap: 5%;
    align-items: start;
    margin-bottom: 40px;
    position: relative;
}

/* 2. معرض الصور (Sticky) */
.product-gallery-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    height: fit-content;
    z-index: 5;
}

/* الصورة الرئيسية */
.main-image {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #eee;
}

.main-image img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.03);
}

.zoom-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.main-image:hover .zoom-hint {
    opacity: 1;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-overlay img {
    max-width: 92%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(255,255,255,0.1);
    animation: lightboxIn 0.3s ease;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    transition: 0.2s;
}

.lightbox-close:hover {
    color: #ff4d4f;
    transform: scale(1.2);
}

/* أسهم التنقل في Lightbox */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10000000;
    padding: 0;
}

.lightbox-arrow:hover {
    background: rgba(37, 155, 234, 0.6);
    border-color: #259bea;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-arrow-right {
    right: 20px;
}

.lightbox-arrow-left {
    left: 20px;
}

.lightbox-arrow svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
}

/* إخفاء الأسهم إذا صورة واحدة */
.lightbox-arrow.lightbox-arrow-hidden {
    display: none;
}

/* موبايل */
@media (max-width: 768px) {
    .lightbox-arrow {
        width: 40px;
        height: 40px;
    }

    .lightbox-arrow-right {
        right: 10px;
    }

    .lightbox-arrow-left {
        left: 10px;
    }

    .lightbox-arrow svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 32px;
    }
}

/* سلايدر الصور المصغرة */
.thumbnails-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 5px;
    position: relative;
}

.thumbnails-track {
    display: flex;
    gap: 10px;
    overflow: hidden;
    flex: 1;
    scroll-behavior: smooth;
}

.thumbnails-track .thumb-img {
    min-width: calc(25% - 8px);
    max-width: calc(25% - 8px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    outline: 3px solid transparent;
    outline-offset: -3px;
    border: none;
    transition: outline-color 0.2s, transform 0.2s;
    box-sizing: border-box;
}

.thumbnails-track .thumb-img:hover {
    outline-color: #259bea;
}

.thumbnails-track .thumb-img.active {
    outline: 3px solid #259bea;
    outline-offset: -3px;
}

/* الأسهم */
.thumb-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.thumb-arrow:hover {
    background: rgba(37, 155, 234, 0.15);
    color: #259bea;
    box-shadow: 0 2px 12px rgba(37, 155, 234, 0.25);
}

.thumb-arrow:active {
    transform: scale(0.92);
}

/* إخفاء الأسهم إن لم تكن مطلوبة */
.thumb-arrow.hidden-arrow {
    opacity: 0;
    pointer-events: none;
}

/* 3. العناوين والعلامة */
.product-title-large {
    font-size: 24px;
    margin-bottom: 10px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

@keyframes flash-gold {
    0%, 80% { background-color: #ffd700; color: #3e2723; }
    90% { background-color: #fffacd; color: #000; box-shadow: 0 0 10px #ffd700; }
    100% { background-color: #ffd700; color: #3e2723; }
}

.original-tag {
    animation: flash-gold 2s infinite;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 800;
}

/* 4. الأسعار */
.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.current-price {
    color: #259bea;
    font-size: 32px;
    font-weight: 800;
}

.old-price {
    color: #ff0000;
    font-size: 24px;
    text-decoration: line-through;
    margin-right: 5px;
}

/* الوصف القصير - مشترك */
.short-desc,
.mobile-short-desc {
    margin-bottom: 15px;
    padding: 15px 18px;
    background: #f8fafb;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    line-height: 2;
    color: #555;
    text-align: right;
}

.short-desc h1, .short-desc h2, .short-desc h3,
.short-desc h4, .short-desc h5, .short-desc h6,
.mobile-short-desc h1, .mobile-short-desc h2, .mobile-short-desc h3,
.mobile-short-desc h4, .mobile-short-desc h5, .mobile-short-desc h6 {
    margin: 0;
    padding: 0;
    line-height: 2.2;
    white-space: pre-line;
}

@media (max-width: 768px) {
    .mobile-short-desc h1 { font-size: 18px; }
    .mobile-short-desc h2 { font-size: 16px; }
    .mobile-short-desc h3 { font-size: 15px; }
    .mobile-short-desc h4, 
    .mobile-short-desc h5, 
    .mobile-short-desc h6 { font-size: 14px; }

    .mobile-short-desc h1, .mobile-short-desc h2, 
    .mobile-short-desc h3, .mobile-short-desc h4, 
    .mobile-short-desc h5, .mobile-short-desc h6 {
        line-height: 1.8;
    }
}

.short-desc p,
.mobile-short-desc p {
    display: block;
    margin: 0 0 8px 0;
    line-height: 2;
}

.short-desc p:last-child,
.mobile-short-desc p:last-child {
    margin-bottom: 0;
}

/* القوائم */
.short-desc ul, .short-desc ol,
.mobile-short-desc ul, .mobile-short-desc ol {
    margin: 8px 20px 8px 0;
    padding: 0;
}

.short-desc li,
.mobile-short-desc li {
    margin-bottom: 5px;
    line-height: 1.8;
}

/* النص العريض */
.short-desc strong, .short-desc b,
.mobile-short-desc strong, .mobile-short-desc b {
    color: #333;
    font-weight: 800;
}

.short-desc br,
.mobile-short-desc br {
    display: block;
    content: "";
    margin-bottom: 8px;
    line-height: 2;
}



/* الإيموجي */
.short-desc img.emoji,
.mobile-short-desc img.emoji {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 4px;
}

/* وصف قصير للموبايل */
.mobile-short-desc {
    display: none;
}

@media (max-width: 768px) {
    .mobile-short-desc {
        display: block;
        font-size: 13px;
        line-height: 1.9;
        padding: 12px 15px;
    }

    .desktop-header-info .short-desc {
        display: none;
    }
}


/* 5. الكرونومتر */
.countdown-wrapper.slim-timer {
    width: 100%;
    margin: 15px 0;
    background: #fff5f5;
    border: 1px dashed #ffcccc;
    padding: 8px 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.timer-title {
    font-weight: bold;
    color: #d32f2f;
    font-size: 15px;
    margin: 0;
}

.timer-container {
    display: flex;
    align-items: center;
    gap: 5px;
    direction: ltr;
}

.timer-box {
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-width: 40px;
    text-align: center;
    line-height: 1;
}

.timer-box span {
    display: block;
    font-weight: 800;
    font-size: 18px;
    color: #333;
}

.colon {
    color: #d32f2f;
    font-weight: bold;
    font-size: 16px;
    margin-top: -8px;
}

/* 6. تنسيق الفورم */
.cod-form-wrapper {
    background: #ffffff;
    border: 3px solid #259bea;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.form-header h3 {
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
}

.form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
}

.form-row-dual {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row-dual .form-group {
    width: 100%;
    flex: 1;
}

.cod-form input,
.cod-form select {
    height: 42px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    background: #fdfdfd;
    color: #333;
    text-align: right;
    direction: rtl;
}

.cod-form input::placeholder,
.cod-form select option[disabled] {
    color: #999;
    opacity: 0.6;
    font-weight: 400;
}

.cod-form input:focus,
.cod-form select:focus {
    border-color: #259bea;
    outline: none;
    background: #fff;
}

/* أزرار التوصيل */
.delivery-options {
    display: flex;
    gap: 5px;
    height: 42px;
}

.radio-box-compact {
    flex: 1;
    cursor: pointer;
    height: 100%;
}

.radio-box-compact input {
    display: none;
}

.radio-box-compact .box-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f9f9f9;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    transition: 0.3s;
}

.radio-box-compact input:checked + .box-content {
    border-color: #ffd700;
    background-color: rgba(37, 155, 234, 0.1);
    color: #259bea;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* الكمية وزر التأكيد */
.action-row {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    height: 48px;
}

.qty-controller {
    flex: 0 0 30%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #bce0f7;
    border-radius: 6px;
    background: #fff;
    font-weight: bold;
    padding: 0 5px;
}

.qty-btn {
    cursor: pointer;
    color: #259bea;
    font-size: 20px;
    padding: 0 10px;
    user-select: none;
}

#qty-display {
    font-size: 18px;
}

#nrwooconfirm {
    flex: 1;
    background: #259bea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

#nrwooconfirm:hover {
    background: #1a7eb8;
}

/* 7. ملخص الطلب */
.order-summary-box {
    background: #fff;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0 0 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
    color: #333;
    font-weight: 700;
}

.summary-line span:last-child {
    font-size: 18px;
    color: #000;
}

.summary-line.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.highlight-gold {
    background: rgba(255, 215, 0, 0.15);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ffd700;
    color: #000;
    font-weight: 900;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@keyframes signal-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.urgent-note {
    color: #d32f2f;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    animation: signal-flash 1.5s infinite ease-in-out;
}

.urgent-note i {
    margin-left: 5px;
}

/* 8. الوصف والمراجعات */
.product-long-desc,
.reviews-modern {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: right;
}

.product-long-desc h3,
.reviews-modern h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 30px;
    font-weight: 900;
    color: #000;
    display: inline-block;
    border-bottom: 5px solid #7dd3fc;
    padding-bottom: 5px;
    margin-bottom: 25px;
    background: none;
    border-right: none;
    padding-right: 0;
    padding-left: 0;
    box-shadow: none;
}

.desc-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
    font-size: 15px;
}

/* 9. المراجعات - تصميم محسّن */
.reviews-modern {
    background: #fafafa;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #eee;
}

/* نجوم المراجعات */
.reviews-modern p.stars {
    display: inline-flex;
    flex-direction: row;
    gap: 4px;
    margin-top: 15px;
    margin-bottom: 10px;
    overflow: visible;
}

.reviews-modern p.stars a {
    display: inline-block;
    font-size: 28px;
    color: #f5a623;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.15s, text-shadow 0.15s;
    line-height: 1;
}

/* منع CSS الافتراضي من WooCommerce */
.reviews-modern p.stars a::before {
    color: inherit !important;
}

.reviews-modern p.stars a:hover::before {
    color: inherit !important;
}

.reviews-modern p.stars.selected a.active::before,
.reviews-modern p.stars:not(.selected) a:hover::before {
    color: inherit !important;
}

/* النجوم المعروضة في المراجعات الموجودة */
.reviews-modern .star-rating {
    color: #f5a623;
    font-size: 14px;
}

.reviews-modern .star-rating::before {
    color: #ddd;
}

.reviews-modern .star-rating span::before {
    color: #f5a623;
}

/* قائمة المراجعات */
.reviews-modern .commentlist,
.reviews-modern ol.commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reviews-modern .commentlist li {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.reviews-modern .commentlist li:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.reviews-modern .comment-text .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.reviews-modern .comment-text .meta strong {
    font-size: 15px;
    color: #333;
}

.reviews-modern .comment-text .meta time {
    font-size: 12px;
    color: #999;
}

.reviews-modern .comment-text .description p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* لا توجد مراجعات */
.reviews-modern .woocommerce-noreviews {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* 10. أنيميشن الزر */
@keyframes shake-btn {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.shake-animation {
    animation: shake-btn 1.5s infinite ease-in-out;
}

/* إخفاء العنوان العلوي في الكمبيوتر */
.mobile-header-info {
    display: none;
}

/* =========================================
   11. التجاوب - الموبايل (مُوحَّد)
   ========================================= */
@media (max-width: 768px) {

    /* الشبكة */
    .product-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-gallery-wrapper {
        position: static;
    }

    /* العنوان */
    .mobile-header-info {
        display: block;
        margin-bottom: 15px;
    }

    .desktop-header-info {
        display: none;
    }

    .mobile-header-info .product-title-large {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .mobile-header-info .price-container {
        margin-bottom: 10px;
    }

    /* حقول الفورم */
    .cod-form input,
    .cod-form select {
        font-size: 12px;
        padding: 0 8px;
        height: 40px;
    }

    .cod-form input::placeholder {
        font-size: 11px;
        letter-spacing: 0;
    }

    .form-group label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .radio-box-compact .box-content {
        font-size: 11px;
    }

    .urgent-note {
        font-size: 11px;
        line-height: 1.4;
        padding: 8px;
        margin-top: 8px;
        padding-top: 8px;
    }

    /* ملخص الطلب */
    .order-summary-box {
        padding: 12px;
        margin-top: 15px;
        border-width: 1px;
    }

    .summary-line {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .summary-line span:last-child {
        font-size: 14px;
        font-weight: 700;
    }

    .summary-line.total {
        margin-top: 10px;
        padding-top: 10px;
    }

    .highlight-gold {
        padding: 8px 12px;
        font-size: 15px;
        border-radius: 4px;
    }

    .highlight-gold span:last-child {
        font-size: 17px;
    }

}

/* =========================================
   رسائل التحقق (Validation Messages)
   ========================================= */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* تأثير اهتزاز للحقل الخاطئ */
@keyframes shake-field {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.field-error {
    border-color: #ff4d4f !important;
    animation: shake-field 0.4s ease;
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.15);
}

/* إزالة التأثير عند الكتابة */
.cod-form input:focus.field-error,
.cod-form select:focus.field-error {
    border-color: #259bea !important;
    box-shadow: none;
    animation: none;
}

/* =========================================
   حظر VPN / خارج الجزائر
   ========================================= */
#vpn-block-overlay {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.vpn-block-box {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border: 3px solid #ff4d4f;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 77, 79, 0.15);
}

.vpn-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.vpn-block-box h3 {
    font-size: 24px;
    color: #d32f2f;
    margin-bottom: 10px;
    font-weight: 900;
}

.vpn-block-box p {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

.vpn-warning {
    background: #d32f2f;
    color: #fff;
    display: inline-block;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 15px;
    animation: vpn-pulse 1.5s infinite ease-in-out;
}

.vpn-warning i {
    margin-left: 8px;
}

@keyframes vpn-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 20px rgba(211, 47, 47, 0.3); }
}

.vpn-sub {
    font-size: 13px !important;
    color: #888 !important;
}

.vpn-retry-btn {
    margin-top: 15px;
    background: #d32f2f;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: 0.3s;
}

.vpn-retry-btn:hover {
    background: #b71c1c;
}

.vpn-retry-btn i {
    margin-left: 8px;
}

/* عندما يكون الفورم محظور */
.cod-form-wrapper.blocked {
    display: none !important;
}

/* =========================================
   حظر الطلب المتكرر (24 ساعة)
   ========================================= */
.limit-box {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
    border-color: #ff8f00 !important;
}

.limit-box h3 {
    color: #e65100 !important;
}

.limit-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    direction: ltr;
}

.limit-timer-box {
    background: #fff;
    border: 2px solid #ff8f00;
    border-radius: 10px;
    padding: 12px 18px;
    text-align: center;
    min-width: 70px;
    box-shadow: 0 3px 10px rgba(255, 143, 0, 0.15);
}

.limit-timer-box span {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: #e65100;
    line-height: 1;
}

.limit-timer-box small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    font-weight: 700;
}

.limit-colon {
    font-size: 28px;
    font-weight: 900;
    color: #e65100;
}

@media (max-width: 768px) {
    .limit-timer-box {
        padding: 8px 12px;
        min-width: 55px;
    }

    .limit-timer-box span {
        font-size: 22px;
    }

    .limit-colon {
        font-size: 22px;
    }
}

/* =========================================
   مراجعة - بطاقة التعليق
   ========================================= */
.review-item-card {
    list-style: none;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.review-item-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.star-rating-display {
    display: inline-flex;
    gap: 1px;
    direction: ltr;
}

/* =========================================
   فورم المراجعات المخصص - Sahali
   ========================================= */
.sahali-review-respond {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.sahali-review-title {
    font-size: 13px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 800;
    display: inline-block;
    border-bottom: 2px solid #259bea;
    padding-bottom: 3px;
    line-height: 1.4;
}

h3.sahali-review-title {
    font-size: 13px !important;
    margin: 0 0 12px 0;
}

.sahali-field-label {
    font-size: 13px;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.sahali-rating-select {
    margin-bottom: 15px;
}

.sahali-stars-row {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 6px;
    margin: 8px 0 5px 0;
    direction: ltr;
}

.sahali-star {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
    user-select: none;
}

.sahali-star:hover {
    transform: scale(1.2);
}

.sahali-star.lit {
    color: #f5a623 !important;
}

.sahali-review-field {
    margin-bottom: 12px;
}

.sahali-review-field input[type="text"] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sahali-review-field textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sahali-review-field input[type="text"]:focus,
.sahali-review-field textarea:focus {
    border-color: #259bea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 155, 234, 0.1);
}

.sahali-review-btn {
    width: auto;
    min-width: 180px;
    background: #259bea;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: 0.3s;
    display: block;
    margin: 15px auto 0;
}

.sahali-review-btn:hover {
    background: #1a7eb8;
    box-shadow: 0 4px 15px rgba(37, 155, 234, 0.3);
}

.sahali-review-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* رسالة لا توجد مراجعات */
.sahali-no-reviews-msg {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 25px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed #ddd;
    margin-top: 15px;
}

.sahali-no-reviews-msg p {
    margin: 0;
    line-height: 1.8;
}

/* =========================================
   خانة العروض - Offers Box
   ========================================= */
.sahali-offers-box {
    margin: 15px 0;
    border: 2px solid #ffd700;
    border-radius: 12px;
    padding: 0;
    background: #fff;
    overflow: hidden;
    animation: offers-glow 3s infinite ease-in-out;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

@keyframes offers-glow {
    0%, 100% { border-color: #ffd700; box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15); }
    50% { border-color: #ffb300; box-shadow: 0 4px 25px rgba(255, 179, 0, 0.25); }
}

.offers-box-header {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    padding: 10px 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid #ffe082;
}

.offers-box-title {
    font-size: 15px;
    font-weight: 800;
    color: #e65100;
}

.offers-box-icon {
    font-size: 16px;
}

.sahali-offers-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* بطاقة العرض */
.sahali-offer-card {
    position: relative;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
}

.sahali-offer-card:hover {
    border-color: #259bea;
    background: #f0f7ff;
}

.sahali-offer-card.selected {
    border-color: #259bea;
    background: rgba(37, 155, 234, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 155, 234, 0.12);
}

/* الراديو */
.offer-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sahali-offer-card.selected .offer-radio {
    border-color: #259bea;
    background: #259bea;
}

.sahali-offer-card.selected .offer-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* محتوى العرض */
.offer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.offer-main-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.offer-qty-text {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.offer-free-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.offer-price {
    font-size: 17px;
    font-weight: 900;
    color: #259bea;
    white-space: nowrap;
}

.offer-sub-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.offer-label {
    font-size: 12px;
    font-weight: 700;
    color: #e65100;
    background: #fff3e0;
    padding: 2px 8px;
    border-radius: 20px;
}

.offer-saving {
    font-size: 11px;
    color: #4caf50;
    font-weight: 700;
}

.offer-unit-price {
    font-size: 11px;
    color: #999;
}

/* =========================================
   خانة البرومو كود - Promo Box
   ========================================= */
.sahali-promo-box {
    margin: 0 0 10px 0;
    border: 1px dashed #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    transition: border-color 0.3s;
}

.sahali-promo-box:hover {
    border-color: #259bea;
}

.promo-toggle {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    user-select: none;
}

.promo-toggle:hover {
    background: #f0f0f0;
}

.promo-toggle-icon {
    font-size: 16px;
}

.promo-toggle-text {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    flex: 1;
}

.promo-toggle-arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.3s;
}

.promo-toggle-arrow.open {
    transform: rotate(180deg);
}

.promo-input-area {
    padding: 0 15px 12px 15px;
}

.promo-input-row {
    display: flex;
    gap: 8px;
}

.promo-input-row input {
    flex: 1;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    direction: ltr;
    text-align: center;
}

.promo-input-row input:focus {
    border-color: #259bea;
    outline: none;
}

.promo-apply-btn {
    height: 38px;
    padding: 0 18px;
    background: #259bea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
}

.promo-apply-btn:hover {
    background: #1a7eb8;
}

.promo-apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.promo-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.promo-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.promo-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.promo-applied {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8f5e9;
    gap: 10px;
}

.promo-applied-text {
    font-size: 13px;
    font-weight: 700;
    color: #2e7d32;
}

.promo-remove-btn {
    background: none;
    border: 1px solid #c62828;
    color: #c62828;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Cairo', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.promo-remove-btn:hover {
    background: #c62828;
    color: #fff;
}

/* =========================================
   تعديل ملخص الطلب - إضافة سطر الخصم
   ========================================= */
.summary-line.discount-line {
    color: #2e7d32;
    background: #e8f5e9;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.summary-line.discount-line span:last-child {
    color: #2e7d32;
    font-size: 16px;
}

/* إخفاء أزرار الكمية عند وجود عروض */
.qty-controller.hidden-by-offers {
    opacity: 0.3;
    pointer-events: none;
}

/* =========================================
   موبايل - العروض والبرومو
   ========================================= */
@media (max-width: 768px) {
    .sahali-offers-box {
        margin: 12px 0;
    }

    .offers-box-header {
        padding: 8px 12px;
    }

    .offers-box-title {
        font-size: 14px;
    }

    .sahali-offers-list {
        padding: 10px;
        gap: 6px;
    }

    .sahali-offer-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .offer-qty-text {
        font-size: 13px;
    }

    .offer-price {
        font-size: 15px;
    }

    .offer-label, .offer-saving, .offer-unit-price {
        font-size: 10px;
    }

    .promo-input-row input {
        font-size: 12px;
    }

    .promo-apply-btn {
        font-size: 12px;
        padding: 0 12px;
    }
}

/* =========================================
   توصيل مجاني + سعر قديم في العروض
   ========================================= */
.offer-free-shipping-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.offer-price-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.offer-old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    font-weight: 600;
}

/* تعديل عرض التوصيل المجاني في الملخص */
.shipping-free-text {
    color: #2e7d32;
    font-weight: 800;
}