/* ========== المتغيرات - Variables ========== */
:root {
    /* الألوان الرئيسية - Primary Colors */
    --primary-green: #2ecc71;
    --primary-green-dark: #27ae60;
    --secondary-pink: #e91e63;
    --secondary-pink-dark: #c2185b;

    /* الثيم الصباحي - Light Theme */
    --bg-light: #f8f9fa;
    --bg-light-secondary: #ffffff;
    --text-light: #2c3e50;
    --text-light-secondary: #7f8c8d;
    --border-light: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);

    /* الثيم المسائي - Dark Theme */
    --bg-dark: #1a1a2e;
    --bg-dark-secondary: #16213e;
    --text-dark: #eaeaea;
    --text-dark-secondary: #b0b0b0;
    --border-dark: #2d3748;
    --shadow-dark: rgba(0, 0, 0, 0.3);

    /* الألوان الحالية */
    --bg-primary: var(--bg-light);
    --bg-secondary: var(--bg-light-secondary);
    --text-primary: var(--text-light);
    --text-secondary: var(--text-light-secondary);
    --border-color: var(--border-light);
    --shadow-color: var(--shadow-light);

    /* الخطوط */
    --font-ar: 'Cairo', sans-serif;
    --font-he: 'Heebo', sans-serif;
    --font-en: 'Heebo', sans-serif;

    /* المسافات */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* الانتقالات */
    --transition: all 0.3s ease;
}

/* الثيم المسائي - Dark Theme */
body.dark-theme {
    --bg-primary: var(--bg-dark);
    --bg-secondary: var(--bg-dark-secondary);
    --text-primary: var(--text-dark);
    --text-secondary: var(--text-dark-secondary);
    --border-color: var(--border-dark);
    --shadow-color: var(--shadow-dark);
}

/* ========== إعادة تعيين - Reset ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ar);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

[lang="he"] body {
    font-family: var(--font-he);
}

[lang="en"] body {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ========== شاشة التحميل - Loader ========== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--spacing-md);
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== الحاوية - Container ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* الأزرار */
/* ========== الهيدر - Header ========== */
.header {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
    padding: var(--spacing-lg) 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    /* إزالة sticky من الهيدر */
    position: relative;
    z-index: 50;
}

/* اللوجو */
.header-logo {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.logo-img {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05);
}

/* صورة الترويسة */
.header-banner {
    text-align: center;
    margin-bottom: var(--spacing-md);
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    /* تحديد حجم ثابت للبانر */
    max-width: 100%;
    height: auto;
}

.header-banner-img {
    width: 100%;
    height: auto;
    max-height: 200px; /* تقليل الحجم الأقصى */
    min-height: 150px; /* حد أدنى للارتفاع */
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
    display: block;
    /* zoom out 15% */
    transform: scale(0.85);
    transform-origin: center;
}

.header-banner-img:hover {
    transform: scale(0.87); /* zoom out مع تأثير hover خفيف */
}

/* الأيقونات */
.header-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* الأزرار */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    transition: var(--transition);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.icon-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-color);
    border-color: var(--primary-green);
}

.icon-btn:active {
    transform: translateY(-1px) scale(1.05);
}

/* صور الأيقونات */
.icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    transition: var(--transition);
}

.icon-btn:hover .icon-img {
    transform: scale(1.1);
}

/* مبدل الثيم */
#theme-toggle {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    border-color: #ffa500;
}

#theme-toggle:hover {
    border-color: #ff8c00;
}

.sun-icon, .moon-icon {
    display: none;
}

body:not(.dark-theme) .sun-icon {
    display: inline;
}

.dark-theme .moon-icon {
    display: inline;
}

.dark-theme #theme-toggle {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-color: #60a5fa;
}

/* قائمة اللغات */
.language-dropdown {
    position: relative;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-color);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    overflow: hidden;
}

.lang-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--bg-secondary);
}

.lang-option.active {
    background: var(--primary-green);
    color: white;
}

.lang-option .flag {
    font-size: 1.5rem;
}

.lang-option span:last-child {
    font-weight: 600;
}

/* أزرار التواصل الاجتماعي */
.whatsapp-btn {
    background: white;
    border-color: #25d366;
}

.whatsapp-btn:hover {
    background: #f0f0f0;
    border-color: #128c7e;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.instagram-btn {
    background: white;
    border-color: #e1306c;
}

.instagram-btn:hover {
    background: #f0f0f0;
    border-color: #bc1888;
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.3);
}

.phone-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-color: #2ecc71;
}

.phone-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-color: #27ae60;
}

/* زر تبديل الثيم (كلاسيكي/عصري) */
#theme-style-toggle {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-color: #9b59b6;
    position: relative;
}

#theme-style-toggle:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
    border-color: #8e44ad;
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

#theme-style-toggle .classic-icon,
#theme-style-toggle .stitch-icon {
    font-size: 1.5rem;
    display: inline-block;
}

/* ========== شريط الفئات - Categories Bar ========== */
.categories-bar {
    background: var(--bg-secondary);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
    /* تثبيت شريط الفئات */
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.categories-scroll {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: var(--spacing-xs);
    scrollbar-width: thin;
}

.categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.category-chip {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    white-space: nowrap;
    transition: var(--transition);
    font-weight: 600;
}

.category-chip:hover {
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.category-chip.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

/* ========== المحتوى الرئيسي - Main Content ========== */
.main-content {
    padding: var(--spacing-xl) 0;
    min-height: 70vh;
}

/* ========== شبكة المنتجات - Products Grid ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 0.5rem;
}

.product-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-secondary);
}

.product-info {
    padding: 1rem;
    background: var(--bg-secondary);
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
    /* استخدام line-clamp لعرض سطرين كحد أقصى */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* إزالة min-height لمنع الفراغات الإضافية */
    word-wrap: break-word;
    word-break: break-word;
    /* ضمان عدم النزول لسطر ثالث */
    max-height: 2.8rem; /* 1.4 line-height × 2 lines */
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-green);
}

/* ========== صفحة المنتج - Product Page ========== */
.back-link {
    display: inline-block;
    margin-bottom: var(--spacing-md);
    color: var(--primary-green);
    font-weight: 600;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    width: 100%;
    height: 500px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumbnails {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--primary-green);
}

.video-thumb {
    width: 80px;
    height: 80px;
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.video-thumb:hover, .video-thumb.active {
    border-color: var(--primary-green);
    background: var(--primary-green);
}

.play-icon {
    font-size: 2rem;
}

.main-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: 12px;
}

.product-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.product-category {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.product-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--spacing-md);
}

.product-dimensions {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: 8px;
    border-right: 4px solid var(--primary-green);
}

.product-dimensions h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-green);
    font-size: 1.1rem;
}

.product-dimensions p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.product-description {
    margin-bottom: var(--spacing-lg);
}

.product-description h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-green);
}

.product-notes {
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: 8px;
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid var(--secondary-pink);
}

/* نموذج الطلب */
.order-form-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--border-color);
}

.order-form-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-green);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
}

.radio-group {
    display: flex;
    gap: var(--spacing-md);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
}

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.btn-large {
    width: 100%;
    padding: var(--spacing-md);
    font-size: 1.1rem;
}

.success-message {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-primary);
    border-radius: 12px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto var(--spacing-md);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.no-products {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: 1.2rem;
}


/* ========== الاستجابة - Responsive ========== */
@media (max-width: 768px) {
    .header {
        padding: var(--spacing-md) 0;
    }

    .header-logo {
        margin-bottom: var(--spacing-sm);
    }

    .logo-img {
        height: 60px;
    }

    .header-banner {
        margin-bottom: var(--spacing-sm);
        border-radius: 8px;
    }

    .header-banner-img {
        max-height: 160px;
        min-height: 120px;
    }

    .header-icons {
        gap: var(--spacing-sm);
    }

    .icon-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .product-name {
        font-size: 0.9rem;
        line-height: 1.3;
        max-height: 2.6rem; /* 1.3 line-height × 2 lines */
    }

    .product-price {
        font-size: 1.1rem;
    }

    .product-details {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .product-gallery {
        position: static;
    }

    .main-image {
        height: 300px;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .product-price-large {
        font-size: 1.5rem;
    }

    .product-content {
        padding: var(--spacing-md);
    }

    .image-thumbnails {
        justify-content: center;
    }

    .category-chips {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .header {
        padding: var(--spacing-sm) 0;
    }

    .logo-img {
        height: 50px;
    }

    .header-banner {
        border-radius: 6px;
    }

    .header-banner-img {
        max-height: 140px;
        min-height: 100px;
    }

    .header-icons {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .icon-img {
        width: 24px;
        height: 24px;
    }
}

/* للشاشات الصغيرة جداً (أقل من 350px) */
@media (max-width: 350px) {
    .header {
        padding: 0.5rem 0;
    }

    .container {
        padding: 0 0.5rem;
    }

    .header-banner-img {
        max-height: 120px;
        min-height: 80px;
        transform: scale(0.9);
    }

    .icons-container {
        gap: 0.4rem;
        padding: 0 0.25rem;
    }

    .icon-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .icon-img {
        width: 20px;
        height: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .main-image {
        height: 250px;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .social-links {
        display: flex;
        gap: 0.5rem;
    }
}

/* ========== صفحة المنتج العصرية - Modern Product Page ========== */
.product-details-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* معرض الصور */
.product-gallery-modern {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 10px 40px var(--shadow-color);
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* عرض الصورة كاملة */
    object-position: center; /* توسيط الصورة */
    transition: transform 0.3s;
    cursor: pointer; /* إضافة مؤشر اليد للإشارة إلى إمكانية التكبير */
}

/* إزالة تأثير التكبير التلقائي عند hover */
/* .main-image-container:hover img {
    transform: scale(1.05);
} */

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-video {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 11;
    transition: all 0.3s;
}

.close-video:hover {
    background: white;
    transform: scale(1.1);
}

.thumbnails-slider {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnails-slider::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-slider::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#current-image {
    transition: opacity 0.4s ease-in-out;
}

/* أزرار السلايد شو */
.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(76, 175, 80, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(5px);
    color: #333;
    font-weight: bold;
}

.main-image-container:hover .slideshow-btn {
    opacity: 1;
    pointer-events: all;
}

.slideshow-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
    border-color: var(--primary-green);
}

.slideshow-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.play-pause-btn {
    bottom: 20px;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    font-size: 18px;
    opacity: 0.8;
}

.main-image-container:hover .play-pause-btn {
    opacity: 1;
}

.play-pause-btn:hover {
    transform: translateX(-50%) scale(1.15);
}

.play-pause-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* مؤشر الصور */
.slideshow-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.slideshow-indicator:hover {
    background: linear-gradient(135deg, var(--primary-green), #66bb6a);
    transform: scale(1.05);
}

.slideshow-indicator #current-slide {
    color: var(--primary-green);
    font-size: 18px;
}

.slideshow-indicator:hover #current-slide {
    color: white;
}

/* تحسين الصور المصغرة */
.thumbnail {
    position: relative;
    overflow: hidden;
}

/* دائرة خضراء مع علامة صح */
.thumbnail.active::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.5);
    animation: checkmarkPop 0.3s ease-out;
    border: 2px solid white;
}

/* تأثير overlay أخضر خفيف */
.thumbnail.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    z-index: 1;
    animation: fadeIn 0.3s ease-out;
}

/* تأثير الظهور */
@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* تحسين حاوية الصورة الرئيسية */
.main-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.main-image-container:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.main-image-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* عرض الصورة كاملة */
    object-position: center; /* توسيط الصورة */
}

/* شريط تقدم السلايد شو */
.slideshow-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), #66bb6a);
    width: 0%;
    transition: width 4s linear;
    z-index: 11;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.slideshow-progress::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5));
    animation: shimmer 1s infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* تأثير التحميل */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.main-image-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 5;
    animation: pulse 1.5s infinite;
}

/* نافذة تكبير الصورة - Image Lightbox */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 95%;
    height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* لإخفاء الأجزاء الخارجة عند التكبير */
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: grab; /* مؤشر السحب */
}

.lightbox-content img.dragging {
    cursor: grabbing; /* مؤشر السحب أثناء السحب */
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* أزرار التحكم بالزوم */
.zoom-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-level {
    color: white;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 0 15px;
    min-width: 60px;
    justify-content: center;
}

/* تحسين للشاشات الصغيرة */
@media (max-width: 768px) {
    .slideshow-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .slideshow-indicator {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .zoom-controls {
        bottom: 20px;
        padding: 8px 12px;
        gap: 8px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .zoom-level {
        font-size: 12px;
        min-width: 50px;
        padding: 0 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 35px;
    }
}

.video-thumb {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.video-thumb:hover,
.video-thumb.active {
    border-color: var(--primary-green);
    transform: translateY(-3px);
}

.play-icon {
    font-size: 24px;
    color: white;
}

.video-label {
    font-size: 10px;
    color: white;
    margin-top: 4px;
}

/* معلومات المنتج */
.product-info-modern {
    padding: 1rem 0;
}

/* ملاحظة الفئات */
.product-categories-note {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(76, 175, 80, 0.05);
    border-left: 3px solid var(--primary-green);
    border-radius: 6px;
    animation: fadeInDown 0.6s ease;
}

.categories-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.35rem;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.category-tag {
    font-size: 0.85rem;
    color: var(--primary-green);
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
}

.category-separator {
    color: var(--text-secondary);
    font-size: 0.7rem;
    opacity: 0.5;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-title-modern {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-price-section {
    margin-bottom: 1.5rem;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
}

.old-price {
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.sale-badge {
    background: var(--secondary-pink);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-description-modern {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.product-description-modern p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* نموذج الطلب العصري */
.order-form-section-modern {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px var(--shadow-color);
}

.order-form-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label-modern {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group-modern input[type="text"],
.form-group-modern input[type="tel"],
.form-group-modern input[type="number"],
.form-group-modern textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-group-modern input:focus,
.form-group-modern textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* خيارات الألوان */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-option {
    cursor: pointer;
}

.color-option input[type="radio"] {
    display: none;
}

.color-name {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s;
}

.color-option input[type="radio"]:checked + .color-name {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    transform: scale(1.05);
}

.color-option:hover .color-name {
    border-color: var(--primary-green);
}

/* محدد الكمية */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: fit-content;
}

.qty-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--primary-green);
    background: white;
    color: var(--primary-green);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: scale(1.1);
}

.quantity-selector input {
    width: 80px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}

/* طرق التواصل - تصميم عصري */
.contact-methods-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-method-card {
    position: relative;
    cursor: pointer;
    display: block;
}

.contact-method-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.method-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.contact-method-card:hover .method-content {
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.method-icon-svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.whatsapp-icon {
    color: #25D366;
}

.phone-icon {
    color: #4CAF50;
}

.method-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.method-checkmark {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-method-card input[type="radio"]:checked ~ .method-content {
    background: linear-gradient(135deg, #f1f8f4 0%, #e8f5e9 100%);
    border-color: var(--primary-green);
    border-width: 2px;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
}

.contact-method-card input[type="radio"]:checked ~ .method-content .method-icon-svg {
    transform: scale(1.1);
}

.contact-method-card input[type="radio"]:checked ~ .method-content .method-name {
    color: var(--primary-green);
    font-weight: 700;
}

.contact-method-card input[type="radio"]:checked ~ .method-checkmark {
    opacity: 1;
    transform: scale(1);
    animation: pulse-check 0.4s ease-out;
}

/* تأثير النبض عند التحديد */
@keyframes pulse-check {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* قسم الكوبون */
.coupon-section {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border: 2px dashed #ff6b6b;
    border-radius: 12px;
}

.dark-theme .coupon-section {
    background: linear-gradient(135deg, #2d1f1f 0%, #3d2626 100%);
    border-color: #ff6b6b;
}

.coupon-input-wrapper {
    display: flex;
    gap: 10px;
}

.coupon-input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: white;
    color: #333;
    transition: all 0.3s;
}

.dark-theme .coupon-input-wrapper input {
    background: #1a1a2e;
    color: #eaeaea;
    border-color: #ff6b6b;
}

.coupon-input-wrapper input:focus {
    outline: none;
    border-color: #ff5252;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.btn-apply-coupon {
    padding: 12px 25px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-apply-coupon:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-apply-coupon:active {
    transform: translateY(0);
}

.coupon-message {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
}

.coupon-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dark-theme .coupon-message.success {
    background: #1e4620;
    color: #7dd87d;
    border-color: #2d5a2f;
}

.coupon-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dark-theme .coupon-message.error {
    background: #4a1f23;
    color: #f8a5aa;
    border-color: #6b2c31;
}

/* تجاوب قسم الكوبون على الموبايل */
@media (max-width: 768px) {
    .coupon-section {
        padding: 12px;
    }

    .coupon-input-wrapper {
        flex-direction: column;
    }

    .btn-apply-coupon {
        width: 100%;
    }
}

/* ملاحظة قبل زر الطلب */
.order-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.04) 100%);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    animation: fadeIn 0.5s ease;
}

.note-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-green);
    flex-shrink: 0;
}

.order-note span {
    flex: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* زر الطلب */
.btn-order-now {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-order-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.btn-order-now:active {
    transform: translateY(0);
}

/* ملاحظة التوصيل */
.delivery-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #0c4a6e;
}

.dark-theme .delivery-note {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a7b 100%);
    border-color: #3b82f6;
    color: #93c5fd;
}

.delivery-note-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    animation: deliveryTruck 2s ease-in-out infinite;
}

@keyframes deliveryTruck {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.delivery-note-content {
    flex: 1;
}

.delivery-note-title {
    font-weight: 600;
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #0369a1;
}

.dark-theme .delivery-note-title {
    color: #7dd3fc;
}

.delivery-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.delivery-price-item {
    color: #0c4a6e;
}

.dark-theme .delivery-price-item {
    color: #bae6fd;
}

.delivery-price-item strong {
    color: var(--primary-green);
    font-weight: 700;
}

.delivery-price-separator {
    color: #0ea5e9;
    font-weight: bold;
}

.dark-theme .delivery-price-separator {
    color: #38bdf8;
}

/* تجاوب ملاحظة التوصيل على الموبايل */
@media (max-width: 768px) {
    .delivery-note {
        padding: 12px;
        font-size: 0.8rem;
    }

    .delivery-note-icon {
        font-size: 1.25rem;
    }

    .delivery-note-title {
        font-size: 0.85rem;
    }

    .delivery-prices {
        font-size: 0.75rem;
        gap: 6px;
    }

    .delivery-price-separator {
        display: none;
    }

    .delivery-price-item {
        display: block;
        width: 100%;
        margin-bottom: 4px;
    }
}

/* رسالة النجاح */
.success-message-modern {
    text-align: center;
    padding: 3rem 2rem;
}

.success-message-modern .success-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-message-modern h3 {
    color: var(--primary-green);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.success-message-modern p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* نافذة التحويل لواتساب المنبثقة */
.whatsapp-redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.whatsapp-redirect-modal {
    background: white;
    border-radius: 25px;
    padding: 3rem 2.5rem;
    max-width: 550px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-green), #1ea854);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 1.5rem;
    animation: successPulse 1s ease infinite;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.redirect-title {
    color: var(--primary-green);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.redirect-message {
    margin-bottom: 2rem;
}

.redirect-main-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.redirect-sub-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.whatsapp-icon-container {
    margin: 2rem 0;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

.whatsapp-redirect-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 5px 15px rgba(37, 211, 102, 0.4));
}

.loader-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto;
}

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

.redirect-countdown {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 1rem;
}

/* استجابة للموبايل */
@media (max-width: 768px) {
    .whatsapp-redirect-modal {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }

    .success-icon-large {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    .redirect-title {
        font-size: 1.5rem;
    }

    .redirect-main-text {
        font-size: 1.1rem;
    }

    .redirect-sub-text {
        font-size: 1rem;
    }

    .whatsapp-redirect-icon {
        width: 60px;
        height: 60px;
    }

    .loader-spinner-large {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .whatsapp-redirect-modal {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .success-icon-large {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }

    .redirect-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .redirect-main-text {
        font-size: 1rem;
    }

    .redirect-sub-text {
        font-size: 0.95rem;
    }

    .whatsapp-redirect-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 350px) {
    .whatsapp-redirect-modal {
        padding: 1.25rem 0.875rem;
    }

    .success-icon-large {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .redirect-title {
        font-size: 1.15rem;
    }

    .redirect-main-text {
        font-size: 0.95rem;
    }

    .redirect-sub-text {
        font-size: 0.875rem;
    }

    .whatsapp-icon-container {
        margin: 1.5rem 0;
    }

    .whatsapp-redirect-icon {
        width: 45px;
        height: 45px;
    }

    .loader-spinner-large {
        width: 35px;
        height: 35px;
        border-width: 3px;
    }
}

/* استجابة الموبايل */
@media (max-width: 768px) {
    .product-details-modern {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery-modern {
        position: static;
    }

    .product-categories-note {
        padding: 0.4rem 0.6rem;
    }

    .categories-label {
        font-size: 0.7rem;
    }

    .category-tag {
        font-size: 0.8rem;
        padding: 0.1rem 0.4rem;
    }

    .product-title-modern {
        font-size: 1.5rem;
    }

    .current-price {
        font-size: 1.5rem;
    }

    .old-price {
        font-size: 1.125rem;
    }

    .contact-methods-modern {
        grid-template-columns: 1fr;
    }

    .method-content {
        padding: 1rem 1.25rem;
    }

    .method-icon-svg {
        width: 28px;
        height: 28px;
    }

    .method-name {
        font-size: 0.95rem;
    }

    .order-form-section-modern {
        padding: 1.5rem;
    }

    .product-dimensions {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .product-dimensions h3 {
        font-size: 1rem;
    }

    .product-dimensions p {
        font-size: 0.9rem;
    }
}

/* ========== البانرات الإعلانية - Banners ========== */
.banners-section {
    margin: 2rem 0;
}

.banners-slideshow,
.single-banner {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.slideshow-container {
    position: relative;
    width: 100%;
}

.banner-slide {
    display: none;
    animation: fadeInBanner 0.5s ease;
}

.banner-slide.active {
    display: block;
}

@keyframes fadeInBanner {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.banner-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.banner-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.banner-link:hover {
    transform: scale(1.02);
}

/* أزرار التنقل */
.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
}

.slideshow-prev:hover,
.slideshow-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slideshow-prev {
    left: 1rem;
}

.slideshow-next {
    right: 1rem;
}

/* نقاط التنقل */
.slideshow-dots {
    text-align: center;
    padding: 1rem 0;
}

.slideshow-dots .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dots .dot.active,
.slideshow-dots .dot:hover {
    background: var(--primary-green);
    transform: scale(1.2);
}

/* Responsive للبانرات */
@media (max-width: 768px) {
    .banner-image-wrapper {
        height: 250px;
    }

    .banner-text-overlay {
        font-size: 1.1rem;
        padding: 1.5rem;
    }

    .slideshow-prev,
    .slideshow-next {
        padding: 0.75rem 1rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .banner-image-wrapper {
        height: 200px;
    }

    .banner-text-overlay {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .slideshow-prev,
    .slideshow-next {
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
    }

    .slideshow-prev {
        left: 0.5rem;
    }

    .slideshow-next {
        right: 0.5rem;
    }
}

/* ========== زر العودة للأعلى - Scroll to Top ========== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green) 0%, #66bb6a 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #66bb6a 0%, var(--primary-green) 100%);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.scroll-to-top span {
    font-weight: bold;
    line-height: 1;
}

/* للموبايل */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
