/* ملف css/main.css */

.hero {
    min-height: 100vh;
    padding: 120px 5% 0; /* مساحة علوية بسبب الشريط العائم */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* مساحة غير متساوية للاتماثل */
    gap: 64px;
    align-items: center;
}

.hero-text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* المحاذاة لليمين (بداية النص العربي) */
    gap: 24px;
}

/* بطاقة العرض الفاخرة المائلة لليسار */
.hero-visual-col {
    transform: translateY(40px); /* إنزال العنصر لكسر التوازي */
}

.premium-card {
    background: var(--surface-container-lowest);
    padding: 32px; /* مساحة تنفس واسعة كالمتاحف */
    border-radius: 24px;
    box-shadow: var(--shadow-ambient);
    transition: background 0.4s ease;
}

.premium-card:hover {
    background: var(--surface-bright); /* إضاءة خفيفة عند المرور */
}
/* --- إعدادات الأقسام لتطبيق قاعدة No-Line --- */
.section-padding {
    padding: 120px 5%;
}

/* استخدام لون خلفية مختلف للفصل بين الأقسام بدل الخطوط */
.bg-low {
    background: var(--surface-container-low);
}

.section-header {
    max-width: 1200px;
    margin: 0 auto 64px auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* شبكة المنتجات (عدم التناظر والمسافات الواسعة) */
.curated-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px; /* مسافة كبيرة للتنفس */
}

/* --- تأثيرات الظهور (Animations) بتوجيه الـ JS --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.revealed {
    opacity: 1;
    transform: translateY(0);
}
/* --- Bento Grid Section --- */
.bento-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 24px;
}

.bento-card {
    background: var(--surface-container-lowest);
    padding: 40px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-ambient);
    transition: transform 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-4px);
}

.bento-wide {
    grid-column: span 2; /* تأخذ مساحة عمودين */
}



/* --- Quote Section (Editorial Vibe) --- */
.quote-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.quote-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--inverse-surface);
    margin-bottom: 40px;
    line-height: 1.3;
}

.quote-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: left;
}
/* --- Footer --- */
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--on-surface-variant);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* =========================================
   Product Page Styles (صفحة المنتج)
   ========================================= */

/* مسار التصفح */
.breadcrumb {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--on-surface-variant);
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
}

.breadcrumb a {
    color: var(--on-surface-variant);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--on-surface);
    font-weight: 500;
}

/* الشبكة المنقسمة (Split Layout) */
.product-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px; /* يسار عريض، يمين ثابت */
    gap: 64px;
    align-items: start; /* مهم جداً لكي يعمل الـ Sticky */
}

/* صور المنتج */
.product-hero-img {
    width: 100%;
    height: 500px;
    background: var(--surface-container-high);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.product-gallery-img {
    width: 100%;
    height: 300px;
    background: var(--surface-container-low);
    border-radius: 16px;
}

/* القائمة المنقطة الفاخرة */
.premium-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.premium-list li {
    position: relative;
    padding-left: 32px;
    font-size: 1.1rem;
    color: var(--on-surface-variant);
}

/* صنع علامة صح مخصصة باستخدام CSS فقط */
.premium-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* بطاقة الدفع الجانبية (The Sticky Checkout Card) */
.product-sidebar {
    position: sticky;
    top: 120px; /* تلتصق بالشاشة تحت شريط التنقل */
}

.checkout-card {
    background: var(--surface-container-lowest);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-ambient);
}

/* متجاوب مع الهواتف */
@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr; /* عمود واحد في الشاشات الصغيرة */
    }
    
    .product-sidebar {
        position: static; /* إلغاء الالتصاق في الموبايل */
        order: -1; /* رفع بطاقة الشراء للأعلى في الموبايل */
    }
    
    .product-hero-img {
        height: 350px;
    }
}
/* ==============================================
   تعديلات استجابة الهاتف للصفحات الرئيسية (Main Layout)
   ============================================== */

/* تنظيف الـ Bento Grid من الأكواد المضمنة */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

/* تحسينات الكروت */
.featured-card { border: 2px solid var(--primary-fixed-dim); }
.tag-neutral { background: var(--surface-container-high); color: var(--on-surface); }
.product-title { font-family: var(--font-display); color: var(--inverse-surface); font-size: 1.25rem; }
.product-desc { font-size: 0.9rem; margin-top: 4px; }
.product-price { margin-top: 16px; font-weight: 600; color: var(--primary); }
.card-image { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: 24px; box-shadow: var(--shadow-ambient); }
.card-title { font-family: var(--font-display); margin-bottom: 8px; color: var(--inverse-surface); }
.card-subtitle { font-size: 0.9rem; }
.center-btn-wrapper { text-align: center; margin-top: 48px; }
.center-header { text-align: center; max-width: 600px; margin: 0 auto; }
.newsletter-form { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; text-align: left; }
.footer-brand p { color: var(--on-surface-variant); }
.footer-bottom { margin-top: 80px; padding-top: 24px; border-top: var(--ghost-border-light); text-align: center; color: var(--on-surface-variant); font-size: 0.875rem; }

/* تنسيقات السلة الداخلية */
.cart-item-img { width: 80px; height: 80px; background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: 12px; display: flex; justify-content: center; align-items: center; }
.cart-item-details { flex-grow: 1; }
.cart-item-details h4 { font-family: var(--font-display); margin-bottom: 4px; font-size: 0.9rem; }
.cart-item-details p { color: var(--on-surface-variant); font-size: 0.8rem; }
.cart-item-details .price { margin-top: 8px; font-weight: 600; color: var(--primary); }
.remove-btn { background: none; border: none; color: #ff4757; cursor: pointer; padding: 8px; font-size: 1.1rem; }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 24px; font-size: 1.25rem; font-weight: 600; }

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-container {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    body {
        /* إضافة مساحة سفلية لمنع الكبسولة السفلية من تغطية الفوتر أو المحتوى */
        padding-bottom: 100px; 
    }

    /* 1. القسم الرئيسي (Hero) */
    .hero {
        /* تقليل المسافة العلوية جداً لأن الشاشة العلوية أصبحت نظيفة بدون هيدر */
        padding-top: 40px; 
        min-height: auto;
    }
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text-col {
        align-items: center;
    }
    .hero-visual-col {
        transform: translateY(0); /* إلغاء النزول في الموبايل */
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .badge {
        margin: 0 auto 24px auto;
    }

    /* 2. الأقسام العامة */
    .section-padding {
        padding: 60px 5%; /* تقليل المساحات البيضاء الضخمة */
    }
    .section-header {
        margin-bottom: 40px;
        text-align: center;
    }
    .section-header p {
        margin: 0 auto;
    }

    /* 3. شبكة المنتجات و Bento */
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .curated-grid {
        /* تصغير عرض البطاقات ليتناسب مع شاشات الهواتف النحيفة */
        grid-template-columns: minmax(260px, 1fr);
        gap: 24px;
    }

    /* 4. الفوتر (Footer) */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .footer-brand p {
        margin: 0 auto;
    }
    .footer-links {
        align-items: center;
    }
}
