/**
 * ثيم Sunset Gradient - تصميم أنسيابي مع موجات SVG
 * ألوان متدرجة برتقالية/حمراء مع كاردات عائمة وموجات SVG
 */

/* الألوان المتدرجة البرتقالية/الحمراء */
:root {
    --primary-color: #f97316;
    --secondary-color: #ef4444;
    --accent-color: #ec4899;
    --background-color: #fff7ed;
    --text-color: #7c2d12;
    --border-color: #fed7aa;
    --card-bg: #ffffff;
    --wave-color-1: #f97316;
    --wave-color-2: #ef4444;
    --wave-color-3: #ec4899;
}

body {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    background-attachment: fixed;
    position: relative;
}

/* SVG Wave Divider */
.wave-divider {
    width: 100%;
    height: 120px;
    overflow: hidden;
    position: relative;
    margin: 3rem 0;
}

.wave-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.wave-divider-top {
    margin-bottom: -1px;
}

.wave-divider-bottom {
    margin-top: -1px;
    transform: rotate(180deg);
}

/* الهيدر - متدرج أنسيابي */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    box-shadow: 0 4px 30px rgba(249,115,22,0.3);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23fff7ed' d='M0,96L48,90.7C96,85,192,75,288,69.3C384,64,480,64,576,74.7C672,85,768,107,864,112C960,117,1056,107,1152,96C1248,85,1344,75,1392,69.3L1440,64L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

/* البانر - تصميم مميز مع موجات */
.hero-section {
    padding: 2rem 0;
    margin-bottom: 3rem;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 0;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23fff7ed' d='M0,96L48,90.7C96,85,192,75,288,69.3C384,64,480,64,576,74.7C672,85,768,107,864,112C960,117,1056,107,1152,96C1248,85,1344,75,1392,69.3L1440,64L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
    z-index: 1;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: clamp(300px, 50vw, 480px);
    min-height: 300px;
    overflow: hidden;
    border-radius: clamp(1rem, 3.5vw, 1.75rem);
    box-shadow: 0 25px 70px rgba(249,115,22,0.3);
    background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(236,72,153,0.15));
    backdrop-filter: blur(15px);
    border: clamp(2px, 0.5vw, 3px) solid rgba(249,115,22,0.25);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.08) rotate(1deg);
}

.banner-slide.active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.15) saturate(1.1);
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    padding: 2.5rem;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    max-width: 650px;
    width: 90%;
    box-shadow: 0 25px 70px rgba(249,115,22,0.35);
    border: 3px solid rgba(249,115,22,0.25);
}

.banner-content h2 {
    font-size: clamp(1.75rem, 6vw, 2.8rem);
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: clamp(-0.5px, -0.2vw, -1px);
    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, 2.5rem);
    padding: clamp(1.5rem, 4vw, 3rem) 0;
    position: relative;
}

.products-grid::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 120px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23ffffff' d='M0,96L48,90.7C96,85,192,75,288,69.3C384,64,480,64,576,74.7C672,85,768,107,864,112C960,117,1056,107,1152,96C1248,85,1344,75,1392,69.3L1440,64L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z'%3E%3C/path%3E%3C/svg%3E") no-repeat top;
    background-size: cover;
    z-index: 0;
}

.product-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(249,115,22,0.2);
    border: 3px solid rgba(249,115,22,0.15);
    position: relative;
    z-index: 1;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(249,115,22,0.05), rgba(236,72,153,0.05));
    opacity: 0;
    transition: opacity 0.6s ease;
    border-radius: 24px;
    z-index: -1;
}

.product-card:hover::after {
    opacity: 1;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.6s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.03) rotate(-1deg);
    box-shadow: 0 25px 70px rgba(249,115,22,0.35);
    border-color: var(--primary-color);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.product-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23ffffff' d='M0,96L48,90.7C96,85,192,75,288,69.3C384,64,480,64,576,74.7C672,85,768,107,864,112C960,117,1056,107,1152,96C1248,85,1344,75,1392,69.3L1440,64L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
    z-index: 1;
}

.product-image {
    width: 100%;
    height: clamp(210px, 45vw, 250px);
    object-fit: contain;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    transition: transform 0.6s ease;
    background: transparent;
    position: relative;
    z-index: 0;
}

.product-card:hover .product-image {
    transform: scale(1.15) rotate(-3deg);
}

.product-info {
    padding: 1.75rem;
    background: white;
    position: relative;
}

.product-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.product-name {
    font-size: clamp(1rem, 2.75vw, 1.15rem);
    font-weight: 800;
    margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    color: var(--text-color);
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(249,115,22,0.1);
}

.product-price {
    font-size: clamp(1.3rem, 3.75vw, 1.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
}

.add-to-cart-btn {
    width: 100%;
    padding: clamp(0.875rem, 2vw, 1rem);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: clamp(0.875rem, 2.25vw, 1rem);
    cursor: pointer;
    font-weight: 800;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    transition: all 0.4s ease;
    box-shadow: 0 6px 20px rgba(249,115,22,0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: clamp(0.3px, 0.1vw, 0.5px);
    min-height: var(--touch-target-min);
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.add-to-cart-btn:hover::before {
    width: 400px;
    height: 400px;
}

.add-to-cart-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(249,115,22,0.5);
}

/* النافذة المنبثقة */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(249,115,22,0.85), rgba(236,72,153,0.85));
    backdrop-filter: blur(12px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    border-radius: 28px;
    max-width: 1400px;
    width: 95%;
    max-height: 95vh;
    box-shadow: 0 35px 110px rgba(249,115,22,0.4);
    border: 3px solid rgba(249,115,22,0.25);
    overflow: hidden;
}

.product-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-body {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    padding: 3rem;
    background: white;
    max-height: calc(95vh - 60px);
    overflow-y: auto;
}

/* الفلاتر */
.filters-section {
    background: white;
    border: 3px solid rgba(249,115,22,0.15);
    box-shadow: 0 6px 35px rgba(249,115,22,0.15);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.filters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* 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(300px, 50vw, 320px);
    }
    
    .modal-body {
        flex-direction: column;
        padding: clamp(1rem, 3vw, 1.5rem);
    }
}

/* Medium Phones (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .banner-slider {
        height: clamp(320px, 48vw, 380px);
    }
    
    .banner-content {
        padding: clamp(1.5rem, 3vw, 2rem);
    }
    
    .banner-content h2 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(0.75rem, 2vw, 1rem);
    }
}

/* Tablets and above (769px+) */
@media (min-width: 769px) {
    .modal-body {
        flex-direction: row;
    }
}

