@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --bg-color: #2c0b0a; /* نبيذي داكن جداً للخلفية */
    --text-color: #f5e6ca; /* بيج فاتح للنصوص */
    --accent-color: #6f1d1b; /* لون التمييز الجديد */
    --secondary-text: #d4c5a9; /* بيج أغمق قليلاً للنصوص الثانوية */
    --card-bg: rgba(44, 11, 10, 0.95); /* خلفية البطاقات */
    --gold-text: #ffd700; /* ذهبي للنجوم والعناصر المميزة */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    background-image: url('assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
}

/* طبقة تعتيم للخلفية */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 1;
    visibility: visible;
}

.notification.hidden {
    top: -100px;
    opacity: 0;
    visibility: hidden;
}

.notification i {
    color: #fff;
    font-size: 1.2rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.header-spacer {
    width: 120px; /* نفس عرض زر اللغة تقريباً */
}

/* Language Switcher */
.lang-switcher {
    width: 120px;
    display: flex;
    justify-content: flex-end;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 25px;
    color: var(--text-color);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lang-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(111, 29, 27, 0.3);
}

.flag-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-img {
    height: 120px;
    width: auto;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-text);
    margin-bottom: 2rem;
}

/* Navigation Categories */
.categories-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 25px;
    border-radius: 30px;
    color: #ffe6a7;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-btn i {
    font-size: 1.1rem;
    color: #ffe6a7;
}

.category-btn:hover, .category-btn.active {
    background: var(--accent-color);
    color: #ffe6a7;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(111, 29, 27, 0.4);
    border-color: var(--accent-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.product-image i {
    font-size: 3.5rem;
    color: var(--text-color);
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.description {
    color: var(--secondary-text);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    min-height: 3rem;
}

.price {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    border: 1px solid var(--accent-color);
}

/* قسم المراجعات */
.reviews-section {
    margin-top: 5rem;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--text-color);
    margin: 0 auto 3rem;
    position: relative;
    display: table;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.reviews-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 40px; /* Space for arrows */
}

.reviews-track-container {
    overflow: hidden;
    border-radius: 20px;
    padding: 20px 0; /* Space for shadow */
    margin: -20px 0; /* Compensate padding */
}

.reviews-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}

/* Reverted to Dark Theme */
.review-card {
    min-width: 100%;
    flex: 0 0 100%; /* Ensure it takes full width */
    background: linear-gradient(135deg, rgba(35, 10, 10, 0.9), rgba(20, 5, 5, 0.95));
    border: none;
    border-top: 4px solid var(--accent-color);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    overflow: hidden;
    box-sizing: border-box; /* Important for padding */
}

.review-card:hover {
    transform: none; /* Disable hover lift for carousel items */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.slider-btn:hover {
    background: #fff;
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    right: -10px; /* Adjust for RTL */
}

.next-btn {
    left: -10px; /* Adjust for RTL */
}

/* RTL Support for buttons */
html[dir="ltr"] .prev-btn {
    left: -10px;
    right: auto;
}

html[dir="ltr"] .next-btn {
    right: -10px;
    left: auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .reviews-slider-wrapper {
        padding: 0;
    }
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    .prev-btn {
        right: 0;
    }
    .next-btn {
        left: 0;
    }
    html[dir="ltr"] .prev-btn {
        left: 0;
    }
    html[dir="ltr"] .next-btn {
        right: 0;
    }
}

.review-card::before {
    content: '\f10e'; /* FontAwesome quote icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent-color);
    opacity: 0.07;
    transform: rotate(15deg);
    z-index: 0;
}

.review-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* RTL handling for quote icon */
html[dir="rtl"] .review-card::before {
    left: 20px;
    right: auto;
    transform: rotate(15deg) scaleX(-1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    background: none;
    color: #fff;
    font-size: 2.5rem;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reviewer-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.review-stars {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.review-text {
    position: relative;
    z-index: 1;
    color: var(--secondary-text);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 10px;
}

.review-date {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-color);
    text-align: left;
    font-weight: 500;
    opacity: 0.8;
}

/* تنسيق نموذج المراجعة */
.review-form-wrapper {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.review-form-wrapper h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.rating-group {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.rating-label {
    color: var(--text-color);
    font-weight: 500;
}

/* نظام تقييم النجوم التفاعلي */
.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    cursor: pointer;
    font-size: 1.8rem;
    color: #444;
    transition: color 0.2s ease;
}

.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label {
    color: #FFD700;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 25px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #8a2422; /* لون أغمق قليلاً عند التحويم */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(111, 29, 27, 0.4);
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(to top, #1a0505, transparent);
    background-color: #2c0b0a;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 3px solid var(--accent-color);
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section h3 {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: var(--accent-color);
}

/* LTR Support for header underline */
html[lang="en"] .footer-section h3::after {
    left: 0;
    right: auto;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.contact-list li i {
    color: #fff;
    width: 25px;
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 60px;
    height: 60px;
    border-radius: 16px; /* مربع بحواف ناعمة */
    background: #ffffff; /* لون أبيض */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-color); /* لون الأيقونة داكن */
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0));
    opacity: 0;
    transition: 0.3s;
}

.social-link:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    color: white;
}

.social-link.facebook:hover { background: #1877f2; }
.social-link.instagram:hover { 
    background: #f09433; 
    background: -moz-linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
    background: -webkit-linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
}
.social-link.whatsapp:hover { background: #25d366; }

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--secondary-text);
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Menu Styles */
.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    transition: transform 0.3s ease;
}

.mobile-toggle:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(44, 11, 10, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
    box-shadow: -5px 0 20px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-sidebar {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.close-sidebar:hover {
    color: var(--accent-color);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.mobile-categories-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.mobile-categories-nav .category-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 15px 20px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-categories-nav .category-btn:hover,
.mobile-categories-nav .category-btn.active {
    background: var(--accent-color);
    transform: translateX(-5px);
    color: #ffe6a7;
}

.mobile-lang-switcher-container {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: center;
}

/* RTL Specifics for Sidebar */
html[dir="rtl"] .mobile-sidebar {
    right: auto;
    left: -320px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 20px rgba(0,0,0,0.6);
}

html[dir="rtl"] .mobile-sidebar.active {
    left: 0;
    right: auto;
}

html[dir="rtl"] .close-sidebar {
    align-self: flex-end; /* Keeps it at the top corner away from content start if LTR, wait. */
}
/* In RTL, flex-start is right. flex-end is left. */
/* We want close button on the top-left of the sidebar (which is on the left of screen)? */
/* If sidebar is on left, close button on left edge is weird. Should be on right edge of sidebar. */
/* Right edge is flex-start in RTL. */
html[dir="rtl"] .close-sidebar {
    align-self: flex-start; 
}


/* تحسينات للهواتف */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .header-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }

    .header-spacer {
        width: 40px; /* Balance the toggle button size */
        display: block;
    }
    
    .lang-switcher, 
    .categories-nav {
        display: none !important;
    }
    
    h1 {
        font-size: 2rem;
    }
    .logo-img {
        height: 90px;
        margin-bottom: 1rem;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    .product-card {
        padding: 1.5rem;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(50%); /* RTL centered */
        right: auto;
    }

    html[lang="en"] .footer-section h3::after {
         transform: translateX(-50%);
    }

    .contact-list li {
        justify-content: center;
    }
}