:root {
    --main-color: #22577a;
    --second-color: #7de898;
    --third-color: white;
    --body: white;
}

/* تجنب عمل reset عام للبادينج */
*, *::before, *::after {
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    background: var(--body);
}

::-webkit-scrollbar-track {
    background: var(--body);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--second-color), var(--main-color));
    border-radius: 10px;
    border: 2px solid var(--body);
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--main-color);
}

html {
    scroll-behavior: smooth;
}

::selection {
    color: var(--third-color);
    background: var(--main-color);
}

/* ========================================================
   🛡️ كود الحماية وإعادة التعيين لصور تبويب الوصف (الديسكريبشن) 🛡️
   هذا الجزء يضمن بقاء صور الوصف بحجمها الطبيعي والافتراضي 100% دون أي تأثر
   ======================================================== */
#nav-description img, 
#nav-description .description-box img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: initial !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background-color: transparent !important;
    transform: none !important;
    display: inline-block !important;
}

/* --- تنسيقات التقييمات --- */
.custom-product-testimonials {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed #e5e5e5;
    width: 100%;
    clear: both;
    display: block;
}

.custom-product-testimonials .tp-title-section h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.custom-product-testimonials .tp-testimonial-item {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
    height: 100%;
}

.custom-product-testimonials .tp-testimonial-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    font-style: italic;
}

.custom-product-testimonials .tp-testimonial-avater img {
    border-radius: 50%;
    object-fit: cover;
}

.custom-product-testimonials .custom-swiper {
    overflow: hidden;
    width: 100%;
    padding-bottom: 10px;
}

/* --- تنسيقات التوصيل --- */
.custom-delivery-note {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4fdf8;
    color: #1b8a44;
    padding: 12px;
    margin-top: 15px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    border: 1px solid #d1f4e0;
    width: 100%;
}

.custom-delivery-note .delivery-icon {
    margin-left: 10px;
}

/* --- تنسيقات عداد المخزون --- */
.custom-stock-countdown {
    padding: 12px;
    background-color: #fffcfc;
    border-radius: 8px;
    border: 1px dashed #ffcccc;
    margin-top: 15px;
    width: 100%;
    margin-bottom: 29px;
}

.custom-stock-countdown .stock-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.custom-stock-countdown .stock-header svg {
    margin-left: 8px;
}

.custom-stock-countdown .stock-header span {
    color: #e63946;
    font-weight: 700;
    font-size: 14px;
}

.custom-stock-countdown .progress-container {
    width: 100%;
    background-color: #ffe0e0;
    height: 6px;
    border-radius: 4px;
    overflow: hidden;
}

.custom-stock-countdown .stock-bar {
    width: 100%;
    background-color: #e63946;
    height: 100%;
    border-radius: 4px;
    transition: width 1.5s ease-in-out;
}

/* ========================================================
   💳 تنسيقات التقسيط المعزولة تماماً لتبويب طرق التقسيط فقط 💳
   ======================================================== */
#nav-installments .installments-images-container {
    display: flex !important;
    gap: 15px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-top: 20px !important;
    flex-wrap: wrap !important;
}

#nav-installments .installment-img {
    width: calc(33.333% - 10px) !important;
    max-width: 453px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #f2f2f2 !important;
    padding: 3px !important;
    background-color: #ffffff !important;
    transition: transform 0.3s ease !important;
}

#nav-installments .installment-img:hover {
    transform: translateY(-5px) !important;
}

@media (max-width: 768px) {
    #nav-installments .installments-images-container {
        justify-content: center !important;
    }
    #nav-installments .installment-img {
        width: 202px !important;
        max-width: 202px !important;
    }
}

/* --- تنسيقات بوب أب الشحن المجاني --- */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.custom-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-popup-modal {
    background: #fff;
    width: 90%;
    max-width: 420px;
    border-radius: 12px;
    position: relative;
    transform: translateY(-30px);
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.custom-popup-overlay.show .custom-popup-modal {
    transform: translateY(0);
}

.custom-popup-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 24px;
    color: #fff;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.custom-popup-close:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #333;
}

.custom-popup-header {
    background: linear-gradient(135deg, #1b8a44, #21a853);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.custom-popup-header svg {
    margin-bottom: 10px;
}

.custom-popup-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.custom-popup-content {
    padding: 25px 20px;
    text-align: center;
}

.custom-shipping-box {
    background: #f4fdf8;
    border: 2px dashed #1b8a44;
    color: #1b8a44;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    margin: 15px auto;
    width: fit-content;
}

.custom-popup-btn {
    display: inline-block;
    background: #1b8a44;
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    margin-top: 5px;
    transition: background 0.2s ease;
    width: 100%;
    border: none;
    cursor: pointer;
}

.custom-popup-btn:hover {
    background: #146c35;
}