/**
 * الثيم الأساسي - Mobile-First Design
 * بانر slider وكاردات عادية
 */

/* الألوان الأساسية */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
}

/* البانر - Slider عادي - Mobile First */
.banner-slider {
    position: relative;
    width: 100%;
    height: clamp(220px, 50vw, 400px);
    min-height: 220px;
    overflow: hidden;
    border-radius: clamp(0.75rem, 2vw, 1rem);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: clamp(1rem, 4vw, 2rem);
    max-width: min(600px, 90vw);
    margin: 0 auto;
}

.banner-content h2 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
    line-height: 1.2;
}

/* الكاردات - تصميم عادي - Mobile First */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: clamp(0.75rem, 3vw, 2rem);
}

.product-card {
    background: white;
    border-radius: clamp(0.75rem, 2vw, 1rem);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: clamp(180px, 40vw, 220px);
    object-fit: contain;
    background: #f8f9fa;
    padding: clamp(0.375rem, 1vw, 0.5rem);
}

.product-info {
    padding: clamp(0.75rem, 2vw, 1rem);
}

.product-name {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    font-weight: 600;
    margin-bottom: clamp(0.375rem, 1vw, 0.5rem);
    color: var(--text-color);
    line-height: 1.4;
}

.product-price {
    font-size: clamp(1rem, 3vw, 1.15rem);
    font-weight: 700;
    color: var(--accent-color);
}

.add-to-cart-btn {
    width: 100%;
    padding: clamp(0.625rem, 1.5vw, 0.75rem);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: clamp(0.5rem, 1.5vw, 0.75rem);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: var(--touch-target-min);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.add-to-cart-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* النافذة المنبثقة - تصميم عادي - Mobile First */
.modal-content {
    background: white;
    border-radius: clamp(1rem, 3vw, 1.5rem);
    max-width: min(1200px, 95vw);
    width: 95vw;
    max-height: 95vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 2rem);
}

.product-media-section {
    flex: 1;
    max-width: 100%;
}

.product-details-section {
    flex: 1;
    max-width: 100%;
}

/* Mobile-First Media Queries */
/* Small Phones (320px to 480px) */
@media (min-width: 320px) and (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(0.5rem, 2vw, 0.75rem);
    }
    
    .banner-slider {
        height: clamp(220px, 50vw, 280px);
    }
}

/* Medium Phones (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(0.75rem, 2vw, 1rem);
    }
    
    .modal-body {
        flex-direction: row;
    }
    
    .product-media-section,
    .product-details-section {
        max-width: 50%;
    }
}

/* Tablets and above (769px+) */
@media (min-width: 769px) {
    .modal-body {
        flex-direction: row;
    }
    
    .product-media-section,
    .product-details-section {
        max-width: 50%;
    }
}


