/* =====================================================
   style.css - التنسيق العام للموقع
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'Segoe UI', Arial, sans-serif;
    background: var(--bg-light);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 15px;
}

/* =====================================================
   الشريط العلوي (Top Bar)
   ===================================================== */
.top-bar {
    background: var(--bg-dark);
    color: #ddd;
    padding: 6px 0;
    font-size: 0.75rem;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.top-bar a {
    color: #ddd;
    text-decoration: none;
    margin-left: 12px;
}
.top-bar a:hover {
    color: var(--secondary);
}
.contact-info span {
    margin-left: 15px;
}

/* =====================================================
   الهيدر (Navbar)
   ===================================================== */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 6px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo a {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.logo-img {
    height: 35px;
    width: auto;
    max-height: 35px;
}
.logo-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--bg-dark);
    white-space: nowrap;
}

/* =====================================================
   القوائم الرئيسية
   ===================================================== */
.nav-links {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    align-items: center;
    flex-wrap: wrap;
}
.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.85rem;
    transition: 0.3s;
}
.nav-links a:hover {
    color: var(--primary);
}
.nav-links .admin-link {
    background: var(--primary);
    color: white !important;
    padding: 4px 12px;
    border-radius: 30px;
}
.nav-links .admin-link:hover {
    background: var(--secondary);
}

.mobile-toggle {
    display: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--bg-dark);
}

/* =====================================================
   السلايدر (خلفية شفافة)
   ===================================================== */
.slider-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    background: var(--bg-light);
    width: 100%;
}

/* =====================================================
   السلايدر - حجم 325×575
   ===================================================== */
.slider-container {
    width: 325px;
    height: 575px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 15px;
    position: relative;
    background: transparent;
    box-shadow: none;
    margin: 0 auto;
}
/* استجابة للشاشات الصغيرة */
@media (max-width: 576px) {
    .slider-container {
        width: 90%;
        height: auto;
        aspect-ratio: 325 / 575;
        max-width: 325px;
    }
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
}

/* ===== التسمية التوضيحية ===== */
.slide-caption {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.85rem;
    backdrop-filter: blur(3px);
}
.slide-caption h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}
.slide-caption p {
    font-size: 0.8rem;
    margin-bottom: 6px;
}
.slide-caption .btn-light {
    background: white;
    color: #333;
    padding: 5px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.75rem;
    display: inline-block;
    transition: 0.3s;
}
.slide-caption .btn-light:hover {
    background: var(--primary);
    color: white;
}

/* ===== أزرار التنقل ===== */
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 0.9rem;
    z-index: 10;
    transition: 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-prev { left: 6px; }
.slider-next { right: 6px; }
.slider-prev:hover,
.slider-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ===== نقاط التنقل ===== */
.slider-dots {
    text-align: center;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}
.slider-dots .dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* ===== رسالة في حال عدم وجود سلايدرات ===== */
.slider-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    border-radius: 15px;
    font-size: 0.9rem;
    padding: 20px;
    text-align: center;
}

/* =====================================================
   الأزرار العامة
   ===================================================== */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 40px;
    text-decoration: none;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}
.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}
.btn-light {
    background: white;
    color: #333;
}
.btn-light:hover {
    background: var(--primary);
    color: white;
}

/* =====================================================
   التنبيهات (Alerts)
   ===================================================== */
.alert {
    padding: 12px 18px;
    margin-bottom: 15px;
    border-radius: 8px;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.alert-warning {
    background: #fff3cd;
    color: #856404;
}

/* =====================================================
   نماذج تسجيل الدخول والتسجيل
   ===================================================== */
.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}
.auth-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 450px;
}
.auth-box h2 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--bg-dark);
}
.auth-link {
    text-align: center;
    margin-top: 12px;
}
.auth-link a {
    color: var(--primary);
    text-decoration: none;
}
.auth-link a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: #fefaf5;
    font-size: 0.9rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}
.form-group textarea {
    border-radius: 15px;
    min-height: 80px;
    resize: vertical;
}
.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.form-row .form-group {
    flex: 1;
    min-width: 180px;
}

/* =====================================================
   بطاقات المنتجات
   ===================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.product-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
}
.product-body {
    padding: 15px;
}
.product-body h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}
.product-price {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: bold;
}

/* =====================================================
   صفحة اتصل بنا
   ===================================================== */
.contact-layout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin: 50px auto;
}
.contact-info-box,
.contact-form-box {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    min-width: 280px;
}
.contact-info-box .info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}
.contact-info-box .info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 40px;
    text-align: center;
}
.contact-info-box .info-item a {
    color: var(--bg-dark);
    text-decoration: none;
}
.contact-info-box .info-item a:hover {
    color: var(--primary);
}

/* =====================================================
   الفوتر
   ===================================================== */
.footer {
    background: var(--bg-dark);
    color: #ddd;
    padding: 30px 0 15px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}
.footer-col h3 {
    margin-bottom: 10px;
    color: white;
    font-size: 1rem;
}
.footer-col p,
.footer-col ul {
    font-size: 0.85rem;
    line-height: 1.8;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li a {
    color: #ddd;
    text-decoration: none;
    transition: 0.3s;
}
.footer-col ul li a:hover {
    color: var(--secondary);
}
.footer-col i {
    margin-left: 6px;
    width: 18px;
}
.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #444;
    margin-top: 15px;
    font-size: 0.8rem;
    color: #aaa;
}

/* =====================================================
   أيقونات التواصل الاجتماعي
   ===================================================== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: white;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.social-links a.phone { background: #2c3e50; }
.social-links a.whatsapp { background: #25D366; }
.social-links a.website { background: #3498db; }
.social-links a.tiktok { background: #000000; }
.social-links a.twitter { background: #000000; }
.social-links a.facebook { background: #1877F2; }
.social-links a.youtube { background: #FF0000; }
.social-links a.instagram { background: #E4405F; }

/* =====================================================
   استجابة للشاشات الصغيرة
   ===================================================== */
@media (max-width: 992px) {
    .mobile-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        padding: 15px 0;
        gap: 8px;
    }
    .nav-links.active {
        display: flex;
    }
    .slider-container {
        max-width: 380px;
    }
    .contact-layout {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .top-bar .container {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 0.7rem;
    }
    .logo-img {
        height: 32px;
        max-height: 32px;
    }
    .logo-text {
        font-size: 0.85rem;
    }
    .slider-container {
        width: 95%;
        max-width: 320px;
    }
    .slide-caption {
        font-size: 0.7rem;
        padding: 6px 10px;
        bottom: 8px;
        left: 8px;
        right: 8px;
    }
    .slide-caption h3 {
        font-size: 0.85rem;
    }
    .slide-caption .btn-light {
        font-size: 0.65rem;
        padding: 3px 12px;
    }
    .slider-prev,
    .slider-next {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .auth-box {
        padding: 20px;
    }
    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}