/* style.css (الإصدار الأخير والنهائي والمضبوط 100%) */

:root {
    --primary-yellow: #ffc300;
    --light-bg: #f9f9f9;
    --dark-text: #1a1a1a;
    --secondary-text: #555555;
    --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    --border-color: #e9e9e9;
}

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700;900&display=swap');

body {
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    background-color: var(--light-bg);
    color: var(--dark-text);
    overflow-x: hidden;
}

.container { 
    padding: 70px 5%; 
}

/* --- Header & Navigation --- */
.header { background-color: rgba(249, 249, 249, 0.85); backdrop-filter: blur(10px); padding: 15px 5%; position: sticky; top: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.logo { font-size: 1.8rem; font-weight: 900; color: var(--dark-text); text-decoration: none; }
.logo span { color: var(--primary-yellow); }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 35px; }
.nav-links a { color: var(--dark-text); text-decoration: none; font-size: 1rem; font-weight: 700; position: relative; transition: color 0.3s ease; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 3px; bottom: -8px; right: 0; background-color: var(--primary-yellow); transition: width 0.3s ease; }
.nav-links a:hover { color: var(--primary-yellow); }
.nav-links li.active a { color: var(--primary-yellow); }
.nav-links li.active a::after { width: 100%; }
.hamburger { display: none; cursor: pointer; }
.hamburger div { width: 25px; height: 3px; background-color: var(--dark-text); margin: 5px; transition: all 0.3s ease; }

/* --- Hero Section --- */
.hero-section { height: 85vh; background-image: linear-gradient(to top, rgba(249, 249, 249, 0.7), rgba(249, 249, 249, 0.2)), url('https://images.unsplash.com/photo-1505740420928-5e560c06d30e?q=80&w=2070&auto=format&fit=crop'); background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 20px; }
.hero-section h1 { font-size: 4.5rem; font-weight: 900; color: var(--dark-text); margin: 0; }
.hero-section .highlight { color: var(--primary-yellow); text-shadow: 1px 1px 3px rgba(0,0,0,0.1); }
.hero-section p { font-size: 1.5rem; max-width: 600px; margin: 20px 0 40px 0; color: var(--secondary-text); font-weight: 700; }
.cta-button { background-color: var(--primary-yellow); color: var(--dark-text); padding: 15px 40px; font-size: 1.2rem; font-weight: 700; text-decoration: none; border-radius: 50px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.cta-button:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(255, 195, 0, 0.4); }

/* --- Categories Section --- */
.categories-section { padding: 50px 0; background-color: #fff; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.categories-container { display: flex; gap: 20px; overflow-x: auto; padding: 20px 5%; scrollbar-width: none; }
.categories-container::-webkit-scrollbar { display: none; }
.category-item { flex: 0 0 100px; text-align: center; text-decoration: none; color: var(--dark-text); transition: transform 0.2s ease; }
.category-item:hover { transform: scale(1.1); }
.category-icon { height: 100px; width: 100px; background-color: var(--light-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px auto; box-shadow: var(--card-shadow); transition: background-color 0.3s; }
.category-item:hover .category-icon { background-color: var(--primary-yellow); }
.category-item span { font-weight: 700; }

/* --- Section Title --- */
.section-title { text-align: center; font-size: 2.5rem; font-weight: 900; margin-bottom: 60px; position: relative; }
.section-title::after { content: ''; position: absolute; width: 80px; height: 4px; bottom: -15px; left: 50%; transform: translateX(-50%); background-color: var(--primary-yellow); }

/* --- Products & Services Grid --- */
.products-grid, .services-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }

/* --- Product Card Style --- */
.product-card { background-color: #fff; border-radius: 15px; overflow: hidden; box-shadow: var(--card-shadow); transition: transform 0.3s ease; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-10px); }
.product-card img { width: 100%; height: 250px; object-fit: cover; display: block; }
.product-info { padding: 20px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; }
.product-info h3 { margin: 0 0 10px 0; font-size: 1.2rem; }
.product-price { font-size: 1.4rem; font-weight: bold; color: var(--primary-yellow); margin-bottom: 15px; }
.add-to-cart-btn { width: 100%; background-color: var(--dark-text); color: var(--light-bg); border: none; padding: 12px; border-radius: 8px; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: background-color 0.2s; margin-top: auto; text-decoration: none; display: inline-block; text-align: center; }
.add-to-cart-btn:hover { background-color: #000; }

/* --- Service Card Style (تم إصلاحه) --- */
.service-card { background-color: #fff; padding: 30px; text-align: center; border-radius: 15px; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid var(--border-color); }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--card-shadow); border-color: var(--primary-yellow); }
.service-card h3 { margin-top: 0; font-size: 2.5rem; margin-bottom: 10px; color: var(--primary-yellow); }
.service-card p { font-size: 1rem; color: var(--secondary-text); line-height: 1.6; margin: 0; }

/* --- NEW CHECKOUT PAGE STYLES --- */
.new-checkout-page { max-width: 1200px; margin: 0 auto; }
.new-checkout-page .container { padding-top: 40px; }
.new-checkout-page-content { display: block; }
.product-hero-image img { width: 100%; height: 350px; object-fit: cover; }
.product-title-bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; background: #fff; border-bottom: 1px solid var(--border-color); }
.product-title-bar h2 { font-size: 1.2rem; margin: 0; }
.product-title-bar p { font-size: 1.2rem; margin: 0; font-weight: bold; color: var(--primary-yellow); }
.product-actions-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 15px 5%; }
.product-actions-bar .action-btn, .product-actions-bar .viewers-box { padding: 12px 5px; border: 2px solid var(--dark-text); background: none; font-weight: 700; font-size: 0.9rem; cursor: pointer; border-radius: 8px; font-family: 'Tajawal', sans-serif; text-align: center; }
.product-actions-bar .action-btn.buy { background: var(--dark-text); color: #fff; }
.product-actions-bar .viewers-box { border: none; background: #ffeeda; color: #f5a623; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; }
.product-description-section { padding: 30px 5%; background: #fff; border-top: 1px solid var(--border-color); }
.product-description-section h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.1rem; font-weight: 900; }
.product-description-section p { margin: 0; color: var(--secondary-text); line-height: 1.8; font-size: 0.95rem; }
.new-checkout-page .section-title.small { font-size: 1.4rem; margin-bottom: 30px; text-align: right; }

/* --- Modal Styles --- */
.modal-overlay { display: none; position: fixed; z-index: 1002; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-content { background-color: #fefefe; margin: auto; padding: 30px; border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); position: relative; }
.close-btn { color: #aaa; position: absolute; left: 20px; top: 10px; font-size: 28px; font-weight: bold; cursor: pointer; }
.modal-content h3 { margin-top: 0; }
.modal-content .form-group { margin-bottom: 15px; }
.modal-content .form-group label { display: block; margin-bottom: 5px; font-weight: 700; }
.modal-content .form-group input { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; box-sizing: border-box; font-family: 'Tajawal', sans-serif; }
.confirm-btn { width: 100%; padding: 15px; border: none; border-radius: 8px; background-color: var(--primary-yellow); color: var(--dark-text); font-size: 1.2rem; font-weight: 700; cursor: pointer; transition: background-color 0.3s; }
.confirm-btn:hover { background-color: #ffda47; }

/* --- New Simple Footer --- */
.simple-footer { background-color: var(--dark-text); color: #a9a9a9; padding: 30px 5%; margin-top: 60px; text-align: center; }
.footer-socials { margin-bottom: 20px; }
.footer-socials a { color: #fff; margin: 0 15px; display: inline-block; transition: transform 0.3s, color 0.3s; }
.footer-socials a:hover { color: var(--primary-yellow); transform: translateY(-3px); }
.footer-legal { margin-bottom: 20px; font-size: 0.9rem; }
.footer-legal a { color: #a9a9a9; text-decoration: none; margin: 0 10px; transition: color 0.3s; }
.footer-legal a:hover { color: var(--primary-yellow); }
.footer-legal .separator { display: inline-block; }
.footer-credit { font-size: 0.9rem; margin-bottom: 20px; }
.footer-credit a { color: var(--primary-yellow); font-weight: 700; text-decoration: none; }
.footer-copyright { margin-top: 20px; padding-top: 20px; border-top: 1px solid #3a3a3a; font-size: 0.9rem; color: #888; }

/* --- Bottom Nav Menu --- */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background-color: #ffffff; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 1000; justify-content: space-around; padding: 5px 0; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #888; font-size: 0.75rem; padding: 5px 10px; flex-grow: 1; transition: color 0.2s; }
.bottom-nav a svg { width: 24px; height: 24px; margin-bottom: 3px; }
.bottom-nav a:hover { color: var(--dark-text); }
.bottom-nav a.active { color: var(--primary-yellow); }

/* --- Responsive Design --- */

/* Desktop & Large Screens */
@media (min-width: 992px) {
    /* === 6 مربعات في السطر وتصغيرها (تم التعديل) === */
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    /* تصغير كروت المنتجات في الكمبيوتر */
    .product-card img { 
        height: 150px; /* كان 250px, قصرناه عشان المربع يصغر */
    }
    .product-info { 
        padding: 15px 10px; 
    }
    .product-info h3 { 
        font-size: 0.9rem; 
        margin-bottom: 8px;
    }
    .product-price { 
        font-size: 1rem;   
        margin-bottom: 10px;
    }
    .add-to-cart-btn { 
        font-size: 0.8rem; 
        padding: 8px;
    }

    /* === إصلاح شكل صفحة المنتج في الكمبيوتر === */
    .new-checkout-page-content { display: flex; gap: 40px; align-items: flex-start; }
    .checkout-image-column { flex: 1.2; position: sticky; top: 100px; }
    .checkout-details-column { flex: 1; }
    .product-hero-image img { border-radius: 15px; }
    .product-title-bar, .product-actions-bar, .product-description-section { padding-left: 0; padding-right: 0; }
}


/* Mobile & Tablet */
@media screen and (max-width: 991px) {
    .header { padding: 10px 5%; }
    .hero-section { height: 45vh; }
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section p { font-size: 0.9rem; max-width: 90%; margin: 15px 0 30px 0; }
    .product-card img { height: 160px; }
    .product-info { padding: 12px; }
    .product-info h3 { font-size: 1.0rem; margin-bottom: 8px; }
    .product-price { font-size: 1.1rem; margin-bottom: 10px; }
    .add-to-cart-btn { padding: 8px; font-size: 0.8rem; }
    .nav-links { position: fixed; right: -100%; top: 0; height: 100vh; width: 70%; background-color: var(--light-bg); box-shadow: -10px 0 30px rgba(0,0,0,0.1); flex-direction: column; align-items: center; justify-content: space-evenly; transition: right 0.5s ease-in-out; }
    .hamburger { display: block; z-index: 1001; }
    .nav-active { right: 0; }
    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
    .bottom-nav { display: flex; }
    body { padding-bottom: 70px; }
}

/* Smallest Mobile Phones */
@media (max-width: 480px) {
    .footer-legal .separator { display: none; }
    .footer-legal a, .footer-legal span:first-child { display: block; margin-bottom: 10px; }
    .product-actions-bar { grid-template-columns: repeat(2, 1fr); }
    .product-actions-bar .viewers-box { grid-column: 1 / -1; margin-top: 10px; }
}
