/* ============ المتغيرات الأساسية ============ */
:root {
    --primary-color: #D4AF37;
    --primary-dark: #B8960C;
    --primary-light: #E5C158;
    --accent-color: #FFF9E6;
    --danger-color: #e74c3c;
    --success-color: #27AE60;
    --text-light: #7f8c8d;
    --border-color: #ecf0f1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

/* ============ Header ============ */
header {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo img {
    height: 45px;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon {
    font-size: 24px;
    cursor: pointer;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* ============ Banners ============ */
#topBanner {
    width: 100%;
    background: #f5f5f5;
    display: none;
}

#topBanner img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    display: block;
}

#carouselContainer {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 16px;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#carouselSlides {
    display: flex;
    transition: transform 0.5s ease;
}

#carouselSlides > div {
    min-width: 100%;
}

#carouselSlides img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* ============ Products Section ============ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.section-title {
    font-size: 24px;
    color: var(--primary-color);
    border-right: 4px solid var(--primary-color);
    padding-right: 15px;
}

.nav-arrows {
    display: flex;
    gap: 10px;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: 0.3s;
}

.nav-arrow:hover {
    background: var(--primary-color);
    color: white;
}

.products-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 10px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.products-scroll::-webkit-scrollbar {
    height: 8px;
}

.products-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.products-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* ============ Product Card ============ */
.product-card {
    min-width: 280px;
    max-width: 280px;
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: 0.3s;
    position: relative;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fafafa;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.new-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.new-price img {
    height: 16px;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 5;
}

.color-options {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: 0.3s;
}

.color-btn.selected {
    border: 3px solid var(--primary-color);
    transform: scale(1.1);
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 5px;
    font-weight: bold;
}

.add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Tajawal';
    transition: 0.3s;
    margin-top: 10px;
}

.add-to-cart:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* ============ Categories Sidebar ============ */
.categories-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.categories-sidebar.open {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.category-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: 0.3s;
    font-size: 16px;
}

.category-item:hover {
    background: var(--accent-color);
}

.category-item.active {
    background: var(--primary-color);
    color: white;
}

/* ============ Cart Drawer ============ */
.cart-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.cart-drawer.open {
    left: 0 !important;
}


.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.cart-item-info .price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-color);
    padding: 5px;
    border-radius: 20px;
}

.qty-controls button {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.remove-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
}

.empty-cart {
    text-align: center;
    padding: 50px 20px;
}

.empty-cart .icon {
    font-size: 60px;
    margin-bottom: 20px;
}

/* ============ WhatsApp Float ============ */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 100;
    text-decoration: none;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

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

/* تابلت */
@media (max-width: 1024px) {
    .product-card {
        min-width: 240px;
        max-width: 240px;
    }
    
    .product-image {
        height: 200px;
    }
}

/* ===== جوال كبير (768px وأقل) ===== */
@media (max-width: 768px) {
    
    /* --- الهيدر --- */
    header {
        padding: 8px 10px !important;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .logo img {
        height: 30px !important;
    }
    
    .header-actions {
        gap: 5px !important;
        flex-wrap: wrap;
    }
    
    .header-actions button,
    .header-actions .cart-icon {
        font-size: 18px !important;
        padding: 5px !important;
    }
    
    .cart-badge {
        width: 16px !important;
        height: 16px !important;
        font-size: 10px !important;
        top: -5px !important;
        right: -5px !important;
    }
    
    /* إخفاء البحث على الجوال */
    .search-container {
        display: none !important;
    }
    
    /* --- القائمة الجانبية --- */
    .categories-sidebar {
        width: 85% !important;
        max-width: 300px !important;
        right: -100% !important;
        transition: right 0.3s ease !important;
        padding: 15px !important;
        z-index: 1000 !important;
    }
    
    .categories-sidebar.open {
        right: 0 !important;
    }
    
    .category-item {
        padding: 12px 15px !important;
        font-size: 14px !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .sidebar-overlay {
        z-index: 999 !important;
    }
    
    /* --- السلة الجانبية --- */
    .cart-drawer {
        width: 90% !important;
        max-width: 350px !important;
        left: -100% !important;
        transition: left 0.3s ease !important;
        padding: 15px !important;
    }
    
    .cart-drawer.open {
        left: 0 !important;
    }
    
    /* --- المنتجات: تمرير أفقي على الجوال --- */
    .products-scroll {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 12px !important;
        padding: 10px !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox */
    }
    
    .products-scroll::-webkit-scrollbar {
        display: none !important; /* Chrome/Safari */
    }
    
    .product-card {
        min-width: 160px !important;
        max-width: 160px !important;
        flex-shrink: 0 !important;
        padding: 10px !important;
        margin: 0 !important;
    }
    
    .product-image {
        height: 140px !important;
        width: 100% !important;
    }
    
    .product-title {
        font-size: 12px !important;
        line-height: 1.3 !important;
        height: 32px !important;
        margin-bottom: 5px !important;
    }
    
    .new-price {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    
    .old-price {
        font-size: 12px !important;
    }
    
    .color-options {
        gap: 4px !important;
        margin: 5px 0 !important;
    }
    
    .color-btn {
        width: 20px !important;
        height: 20px !important;
    }
    
    .qty-selector {
        gap: 4px !important;
        margin: 8px 0 !important;
    }
    
    .qty-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 13px !important;
    }
    
    .qty-input {
        width: 35px !important;
        font-size: 12px !important;
    }
    
    .add-to-cart {
        padding: 8px !important;
        font-size: 12px !important;
        margin-top: 8px !important;
    }
    
    /* --- العناوين --- */
    .section-title {
        font-size: 18px !important;
        padding-right: 10px !important;
    }
    
    .section-header {
        padding: 0 10px !important;
        margin-bottom: 15px !important;
    }
    
    .nav-arrows {
        display: none !important;
    }
    
    /* --- البنر والسلايدر --- */
    #carouselSlides img {
        height: 180px !important;
    }
    
    #topBanner img {
        max-height: 80px !important;
    }
    
    /* --- شارات الثقة --- */
    .trust-badges {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 15px !important;
        margin: 20px 10px !important;
    }
    
    .trust-badge {
        padding: 10px !important;
    }
    
    .trust-icon {
        font-size: 24px !important;
    }
    
    .trust-text strong {
        font-size: 13px !important;
    }
    
    .trust-text small {
        font-size: 11px !important;
    }
    
    /* --- شهادات العملاء --- */
    .testimonials-container {
        grid-template-columns: 1fr !important;
        padding: 0 15px !important;
    }
    
    .testimonial-card {
        padding: 15px !important;
    }
    
    /* --- الفوتر --- */
    footer > div > div {
        text-align: center !important;
    }
    
    /* --- زر واتساب --- */
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
    
    /* --- الإشعارات --- */
    #liveNotifications {
        bottom: 80px !important;
        left: 10px !important;
    }
    
    #liveNotifications > div {
        max-width: 250px !important;
        font-size: 12px !important;
        padding: 10px !important;
    }
    
    /* --- نافذة الترحيب --- */
    #welcomeModal > div {
        margin: 20px !important;
        padding: 25px 20px !important;
    }
    
    #welcomeModal h2 {
        font-size: 22px !important;
    }
    
    #welcomeModal p {
        font-size: 16px !important;
    }
    
    .discount-code {
        font-size: 24px !important;
    }
    
    /* --- نافذة المقارنة --- */
    #compareModal > div {
        margin: 10px !important;
        padding: 20px 15px !important;
    }
    
    /* --- أزرار المفضلة والمقارنة --- */
    .product-card > div[style*="position:absolute; top:10px; left:10px"] {
        top: 5px !important;
        left: 5px !important;
    }
    
    .product-card > div[style*="position:absolute; top:10px; left:10px"] button {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }
    
    /* --- شارات المنتج --- */
    .product-card > div[style*="position:absolute; top:10px; right:10px"] {
        top: 5px !important;
        right: 5px !important;
        padding: 3px 8px !important;
        font-size: 10px !important;
    }
    
    .product-card > div[style*="position:absolute; top:50px; right:10px"] {
        top: 35px !important;
        right: 5px !important;
        padding: 2px 6px !important;
        font-size: 10px !important;
    }
}

/* ===== جوال صغير (480px وأقل) ===== */
@media (max-width: 480px) {
    
    header {
        padding: 6px 8px !important;
    }
    
    .logo img {
        height: 25px !important;
    }
    
    .header-actions button,
    .header-actions .cart-icon {
        font-size: 16px !important;
    }
    
    .product-card {
        min-width: 145px !important;
        max-width: 145px !important;
        padding: 8px !important;
    }
    
    .product-image {
        height: 120px !important;
    }
    
    .product-title {
        font-size: 11px !important;
        height: 28px !important;
    }
    
    .new-price {
        font-size: 14px !important;
    }
    
    .add-to-cart {
        padding: 7px !important;
        font-size: 11px !important;
    }
    
    .section-title {
        font-size: 16px !important;
    }
    
    .trust-badges {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .qty-btn {
        width: 24px !important;
        height: 24px !important;
    }
}

/* ===== تحسينات عامة للجوال ===== */
@media (max-width: 768px) {
    
    body {
        overflow-x: hidden !important;
    }
    
    button, a, .product-card {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    body {
        font-size: 14px !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    table {
        font-size: 12px !important;
    }
    
    input, select, textarea {
        font-size: 14px !important;
        padding: 10px !important;
    }
}

/* ===== تابلت ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-card {
        min-width: 220px !important;
        max-width: 220px !important;
    }
}

/* ===== شاشات كبيرة ===== */
@media (min-width: 1025px) {
    .products-scroll {
        display: flex !important;
        overflow-x: auto !important;
    }
    
    .product-card {
        min-width: 250px !important;
        max-width: 250px !important;
    }
}

/* ============ Loading & Animations ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.5s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-drawer.open {
    animation: slideIn 0.3s ease;
}
/* ============ شريط البحث الذكي ============ */
.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-container input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #eee;
    border-radius: 25px;
    font-family: 'Tajawal';
    font-size: 14px;
    transition: 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 10px;
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 1px solid #eee;
}

.search-result-item:hover {
    background: var(--accent-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* ============ شارات الثقة ============ */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    transition: 0.3s;
}

.trust-badge:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.trust-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.trust-text strong {
    display: block;
    color: #333;
    font-size: 16px;
    margin-bottom: 3px;
}

.trust-text small {
    color: #666;
    font-size: 13px;
}

/* ============ Animations ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============ Responsive للتحسينات ============ */
@media (max-width: 768px) {
    .search-container {
        display: none; /* إخفاء البحث على الجوال */
    }
    
    .trust-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 20px 15px;
    }
    
    .trust-badge {
        padding: 10px;
    }
    
    .trust-icon {
        font-size: 28px;
    }
    
    .trust-text strong {
        font-size: 14px;
    }
    
    .trust-text small {
        font-size: 11px;
    }
    
    #welcomeModal > div {
        margin: 20px;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .trust-badges {
        grid-template-columns: 1fr;
    }
}
/* ============ الوضع الداكن ============ */
body.dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode header,
body.dark-mode .product-card,
body.dark-mode .cart-drawer,
body.dark-mode .categories-sidebar,
body.dark-mode .trust-badges,
body.dark-mode .search-results,
body.dark-mode .search-result-item,
body.dark-mode footer {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

body.dark-mode .product-title,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #e0e0e0 !important;
}

body.dark-mode .cart-item,
body.dark-mode .item-row {
    background: #3d3d3d !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #3d3d3d !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

/* ============ شهادات العملاء ============ */
.testimonials-section {
    background: linear-gradient(135deg, var(--accent-color) 0%, #fff 100%);
    padding: 60px 20px;
    margin: 40px 0;
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: 0.3s;
    border-top: 4px solid var(--primary-color);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.testimonial-card .stars {
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial-card p {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.testimonial-author strong {
    display: block;
    color: #333;
    font-size: 15px;
}

.testimonial-author small {
    color: #999;
    font-size: 12px;
}

/* ============ Responsive للشهادات ============ */
@media (max-width: 768px) {
    .testimonials-container {
        grid-template-columns: 1fr;
    }
    
    .testimonials-section {
        padding: 40px 15px;
    }
}

/* ============ تحسينات الأزرار العائمة ============ */
.wishlist-btn-active,
.compare-btn-active {
    transform: scale(1.1);
}

/* ============ تحسينات للوضع الداكن على الجوال ============ */
@media (max-width: 768px) {
    body.dark-mode .product-card {
        min-width: 170px !important;
        max-width: 170px !important;
    }
}
/* ============================================
    إصلاح شريط الصور المتحركة (Carousel)
   ============================================ */

#carouselContainer {
    position: relative !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 20px auto !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    display: none !important; /* يبدأ مخفي حتى تُحمّل الصور */
}

#carouselContainer[style*="display: block"],
#carouselContainer.show {
    display: block !important;
}

#carouselSlides {
    display: flex !important;
    transition: transform 0.5s ease !important;
    width: 100% !important;
}

#carouselSlides > div {
    min-width: 100% !important;
    position: relative !important;
}

#carouselSlides img {
    width: 100% !important;
    height: 400px !important;
    object-fit: cover !important;
    display: block !important;
}

/* أزرار التنقل */
#carouselContainer button[onclick*="moveSlide"] {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255,255,255,0.9) !important;
    border: none !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 24px !important;
    color: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    z-index: 10 !important;
}

/* النقاط السفلية */
#carouselDots {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 8px !important;
    z-index: 10 !important;
}

#carouselDots button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    transition: 0.3s !important;
}

/* ===== على الجوال ===== */
@media (max-width: 768px) {
    #carouselContainer {
        margin: 10px !important;
        border-radius: 12px !important;
    }
    
    #carouselSlides img {
        height: 200px !important;
    }
    
    #carouselContainer button[onclick*="moveSlide"] {
        width: 35px !important;
        height: 35px !important;
        font-size: 18px !important;
    }
    
    #carouselDots button {
        width: 10px !important;
        height: 10px !important;
    }
}

@media (max-width: 480px) {
    #carouselSlides img {
        height: 150px !important;
    }
}
/* ============ إصلاح حجم شعار العملة على الجوال ============ */
.new-price img,
.old-price img,
.cart-item-info .price img,
#cartTotal img,
#cartSubtotal img,
#discountAmount img {
    max-width: 20px !important;
    width: auto !important;
    height: auto !important;
    max-height: 16px !important;
}

/* على الجوال الصغير */
@media (max-width: 768px) {
    .new-price img,
    .old-price img {
        max-width: 14px !important;
        max-height: 12px !important;
    }
    
    .cart-item-info .price img {
        max-width: 16px !important;
        max-height: 14px !important;
    }
    
    #cartTotal img,
    #cartSubtotal img,
    #discountAmount img {
        max-width: 20px !important;
        max-height: 18px !important;
    }
}
