/* --- المتغيرات --- */
:root {
    --oxin-red: #E31837; --oxin-red-hover: #C1122B;
    --text-dark: #1A1A1A; --text-light: #666666;
    --bg-white: #FFFFFF; --bg-light-gray: #F8F9FA;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Cairo', sans-serif; background-color: var(--bg-white); color: var(--text-dark); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* الهيدر */
.top-announcement { background-color: var(--text-dark); color: var(--bg-white); text-align: center; padding: 8px 15px; font-size: 0.85rem; font-weight: 700; }
.top-announcement strong { color: var(--oxin-red); }
.navbar { background-color: var(--bg-white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo h1 { font-size: 2rem; font-weight: 800; color: var(--oxin-red); }
.logo span { color: var(--text-dark); }
.nav-links { display: flex; align-items: center; }
.nav-links > a { text-decoration: none; color: var(--text-dark); font-weight: 600; margin-right: 20px; transition: var(--transition); }
.nav-links > a:hover { color: var(--oxin-red); }

.cart-btn { background-color: transparent; border: 2px solid var(--text-dark); padding: 8px 15px; border-radius: 25px; font-family: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: var(--transition); }
.cart-btn:hover { background-color: var(--text-dark); color: var(--bg-white); }
.cart-count { background-color: var(--oxin-red); color: var(--bg-white); border-radius: 50%; padding: 2px 8px; font-size: 0.8rem; }
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 21px; background: transparent; border: none; cursor: pointer; z-index: 1001; }
.menu-toggle span { width: 100%; height: 3px; background-color: var(--text-dark); border-radius: 5px; transition: var(--transition); }

/* الواجهة */
.hero { background-color: var(--bg-light-gray); padding: 80px 0; display: flex; align-items: center; }
.hero-container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.badge { display: inline-block; background-color: rgba(227, 24, 55, 0.1); color: var(--oxin-red); padding: 5px 15px; border-radius: 20px; font-weight: 700; font-size: 0.9rem; margin-bottom: 20px; }
.bundle-badge { background-color: var(--oxin-red); color: white; }
.hero-content h2 { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; color: var(--text-light); margin-bottom: 30px; max-width: 500px; }
.hero-buttons { display: flex; gap: 15px; }
.btn { text-decoration: none; padding: 12px 30px; border-radius: 30px; font-weight: 700; transition: var(--transition); text-align: center; cursor: pointer; border: none; font-family: inherit; font-size: 1rem; }
.btn-primary { background-color: var(--oxin-red); color: var(--bg-white); border: 2px solid var(--oxin-red); }
.btn-primary:hover { background-color: var(--oxin-red-hover); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(227, 24, 55, 0.3); }
.btn-secondary { background-color: transparent; color: var(--text-dark); border: 2px solid var(--text-dark); }
.btn-secondary:hover { background-color: var(--text-dark); color: var(--bg-white); transform: translateY(-2px); }
.hero-image { flex: 1; display: flex; justify-content: center; }
.hero-product-img { max-width: 100%; border-radius: 20px; box-shadow: 0 20px 40px rgba(227, 24, 55, 0.15); }

/* الأقسام العامة */
.categories-section, .best-sellers-section { padding: 80px 0; background-color: var(--bg-white); }
.offers-section { padding: 80px 0; background: linear-gradient(135deg, var(--bg-light-gray) 0%, rgba(227, 24, 55, 0.05) 100%); }
.products-section { padding: 80px 0; background-color: var(--bg-light-gray); position: relative; overflow: hidden; }

.section-header { text-align: center; margin-bottom: 50px; position: relative; z-index: 1; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; color: var(--text-dark); }
.section-header h2 span { color: var(--oxin-red); }

/* الفئات البصرية */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.category-card { background-color: var(--bg-light-gray); padding: 30px 20px; border-radius: 20px; text-align: center; text-decoration: none; color: var(--text-dark); transition: var(--transition); border: 1px solid rgba(0,0,0,0.05); }
.category-card:hover { transform: translateY(-5px); background-color: var(--bg-white); box-shadow: 0 10px 30px rgba(227, 24, 55, 0.1); border-color: var(--oxin-red); }
.cat-icon { font-size: 3rem; margin-bottom: 15px; }

/* الفلتر */
.category-filters { display: flex; justify-content: center; gap: 15px; margin-top: 30px; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; border-radius: 30px; border: 2px solid var(--bg-white); background-color: var(--bg-white); font-family: inherit; font-weight: 700; color: var(--text-light); cursor: pointer; transition: var(--transition); }
.filter-btn:hover, .filter-btn.active { background-color: var(--oxin-red); color: var(--bg-white); border-color: var(--oxin-red); box-shadow: 0 5px 15px rgba(227, 24, 55, 0.2); }

/* شبكة المنتجات الموحدة */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; position: relative; z-index: 1; }
.product-card { background-color: var(--bg-white); border-radius: 20px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.4s ease; display: flex; flex-direction: column; }
.product-card.hide { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(227, 24, 55, 0.1); border-color: rgba(227, 24, 55, 0.2); }
.product-image { position: relative; height: 250px; background-color: var(--bg-light-gray); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-image img { transform: scale(1.08); }
.discount-tag, .new-tag { position: absolute; top: 15px; right: 15px; padding: 5px 12px; border-radius: 15px; font-size: 0.85rem; font-weight: 700; z-index: 2; }
.discount-tag { background-color: var(--oxin-red); color: white; }
.new-tag { background-color: var(--text-dark); color: white; }

.product-info { padding: 25px; display: flex; flex-direction: column; flex: 1; }
.product-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.description { color: var(--text-light); font-size: 0.9rem; margin-bottom: 20px; flex: 1; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.price { display: flex; flex-direction: column; }
.current { font-size: 1.3rem; font-weight: 800; color: var(--oxin-red); }
.old { font-size: 0.9rem; color: var(--text-light); text-decoration: line-through; }
.btn-add-cart { padding: 10px 20px; font-size: 0.9rem; position: relative; overflow: hidden; z-index: 1; }
.btn-add-cart::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.1) 70%); border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.5s ease-out, height 0.5s ease-out, opacity 0.5s ease-out; z-index: -1; }
.btn-add-cart:hover::after { width: 300px; height: 300px; opacity: 0; }
.btn-add-cart:hover .btn-text { position: relative; z-index: 2; }

/* الفقاعات */
.bubbles-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bubble { position: absolute; bottom: -50px; background: radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.8), rgba(227, 24, 55, 0.25)); border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.9); box-shadow: inset 0 0 15px rgba(227, 24, 55, 0.4), 0 0 10px rgba(255, 255, 255, 0.8); animation: rise linear infinite; opacity: 0; }
.b1 { width: 45px; height: 45px; left: 10%; animation-duration: 7s; } .b2 { width: 25px; height: 25px; left: 25%; animation-duration: 9s; animation-delay: 2s; } .b3 { width: 65px; height: 65px; left: 40%; animation-duration: 11s; animation-delay: 4s; } .b4 { width: 35px; height: 35px; left: 65%; animation-duration: 8s; animation-delay: 1s; } .b5 { width: 55px; height: 55px; left: 80%; animation-duration: 10s; animation-delay: 3s; }
@keyframes rise { 0% { bottom: -50px; opacity: 0; transform: translateX(0) scale(0.9); } 15% { opacity: 0.85; } 50% { transform: translateX(25px) scale(1.1); opacity: 0.95; } 85% { opacity: 0.85; } 100% { bottom: 110%; opacity: 0; transform: translateX(-25px) scale(0.9); } }

/* آراء العملاء */
.testimonials-section { padding: 100px 0; background-color: var(--bg-white); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.testimonial-card { background-color: var(--bg-light-gray); padding: 40px; border-radius: 20px; position: relative; border: 1px solid rgba(0,0,0,0.05); }
.testimonial-card::before { content: '"'; position: absolute; top: 10px; right: 20px; font-size: 5rem; color: rgba(227, 24, 55, 0.1); font-family: serif; line-height: 1; }
.stars { margin-bottom: 15px; font-size: 1.2rem; letter-spacing: 2px; }
.review-text { font-size: 1rem; font-style: italic; color: var(--text-dark); margin-bottom: 25px; line-height: 1.8; position: relative; z-index: 1; }
.customer-name { font-weight: 800; color: var(--oxin-red); font-size: 1.1rem; }

/* الفوتر الاحترافي الجديد */
.premium-footer { background-color: #111111; color: #ffffff; padding: 80px 0 20px; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 50px; }
.brand-col h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 15px; }
.brand-col span { color: var(--oxin-red); }
.brand-col p { color: #aaaaaa; font-size: 0.95rem; margin-bottom: 20px; line-height: 1.8; max-width: 300px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background-color: rgba(255,255,255,0.05); border-radius: 50%; text-decoration: none; transition: var(--transition); font-size: 1.2rem; }
.social-icons a:hover { background-color: var(--oxin-red); transform: translateY(-3px); }
.links-col h3, .contact-col h3 { font-size: 1.2rem; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.links-col h3::after, .contact-col h3::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background-color: var(--oxin-red); }
.links-col ul { list-style: none; }
.links-col ul li { margin-bottom: 15px; }
.links-col a { color: #aaaaaa; text-decoration: none; transition: var(--transition); }
.links-col a:hover { color: var(--oxin-red); padding-right: 8px; }
.contact-col p { color: #aaaaaa; margin-bottom: 10px; }
.payment-methods { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.payment-methods span { background-color: #222; padding: 8px 12px; border-radius: 5px; font-size: 0.85rem; color: #ccc; border: 1px solid #333; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; color: #777; font-size: 0.9rem; }


/* =======================================================
   استجابة الموبايل: هنا يتم إجبار جميع المنتجات على (صفين)
   ======================================================= */
@media (max-width: 768px) {
    /* ترتيب شريط التنقل */
    .nav-actions { order: 1; margin-right: auto; margin-left: 20px; }
    .menu-toggle { display: flex; order: 2; }
    
    /* القائمة الجانبية */
    .nav-links { position: fixed; top: 0; right: -100%; width: 250px; height: 100vh; background-color: var(--bg-white); flex-direction: column; justify-content: center; align-items: center; box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: right 0.4s ease; z-index: 1000; display: flex; }
    .nav-links.active { right: 0; }
    .nav-links > a { margin: 15px 0; font-size: 1.2rem; }
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); background-color: var(--oxin-red); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background-color: var(--oxin-red); }

    /* الواجهة */
    .hero { padding: 40px 0; }
    .hero-container { flex-direction: column-reverse; text-align: center; }
    .hero-content h2 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; gap: 10px; }

    /* ---------------------------------------------------
       إجبار كل شبكات المنتجات والأقسام على 2 في الصف
       --------------------------------------------------- */
    .product-grid, .category-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 عمود في كل صف إجبارياً */
        gap: 10px; 
    }

    /* تصغير الفئات لتناسب الموبايل */
    .category-card { padding: 15px 10px; }
    .cat-icon { font-size: 2rem; margin-bottom: 10px; }
    .category-card h3 { font-size: 0.85rem; }

    /* تصغير بطاقات المنتجات لتناسب الـ 2 في الصف */
    .product-image { height: 140px; } 
    .discount-tag, .new-tag { font-size: 0.7rem; padding: 3px 6px; top: 10px; right: 10px; }
    
    .product-info { padding: 10px; }
    .product-info h3 { font-size: 0.8rem; height: 35px; overflow: hidden; margin-bottom: 5px; }
    .description { display: none; } /* إخفاء الوصف تماماً */
    
    .product-footer { flex-direction: column; align-items: stretch; gap: 8px; }
    .price { flex-direction: row; align-items: center; gap: 5px; justify-content: center; }
    .current { font-size: 1rem; }
    .old { font-size: 0.75rem; }
    
    .btn-add-cart { padding: 8px 5px; font-size: 0.8rem; width: 100%; text-align: center; }

    /* آراء العملاء والفوتر */
    .testimonials-grid { grid-template-columns: 1fr; } /* الآراء تبقى 1 في الصف لسهولة القراءة */
    .footer-container { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .brand-col p { max-width: 100%; margin: 0 auto 20px; }
    .social-icons { justify-content: center; }
    .links-col h3::after, .contact-col h3::after { left: 50%; right: auto; transform: translateX(-50%); }
    .payment-methods { justify-content: center; }
}