/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;600;700;900&display=swap');

:root {
    --primary-color: #10b981;
    /* Emerald Green */
    --primary-dark: #059669;
    --secondary-color: #f3f4f6;
    --text-color: #1f2937;
    --white: #ffffff;
    --bg-light: #f9fafb;
    --danger: #ef4444;
    --success: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header & Navbar */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-item {
    font-weight: 600;
    color: var(--text-color);
}

.nav-item:hover {
    color: var(--primary-color);
}

/* Search Bar - Premium Upgrade */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    padding: 0.2rem 0.5rem;
    width: 320px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.search-bar:focus-within {
    width: 400px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.15), 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

.search-input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-family: inherit;
    padding: 0.6rem 0.8rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.search-input::placeholder {
    color: #94a3b8;
    transition: opacity 0.3s ease;
}

.search-bar:focus-within ::placeholder {
    opacity: 0.7;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.search-btn i {
    font-size: 1rem;
}

.cart-link {
    position: relative;
    font-size: 1.4rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.cart-link .badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-actions {
    display: none;
}

.mobile-toggle {
    display: none;
}

/* Base Mobile Responsive Tweaks */
@media (max-width: 768px) {
    .navbar {
        height: auto !important;
        padding: 0.75rem 1rem !important;
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .logo {
        font-size: 1.4rem !important;
        margin: 0 !important;
        order: 1 !important;
    }

    .mobile-actions {
        display: flex !important;
        align-items: center !important;
        gap: 1rem !important;
        order: 2 !important;
    }

    .mobile-toggle {
        display: block !important;
        background: transparent;
        border: none;
        font-size: 1.6rem !important;
        color: var(--primary-color);
        cursor: pointer;
        padding: 5px;
    }

    .desktop-only {
        display: none !important;
    }

    .search-bar {
        width: 100% !important;
        margin-top: 0.8rem !important;
        order: 3 !important;
        flex-basis: 100% !important;
        background: #f1f5f9 !important;
        border-radius: 10px !important;
    }

    .search-bar:focus-within {
        width: 100% !important;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1) !important;
    }

    /* Side Menu Implementation */
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        background: white !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        padding: 5rem 1.5rem !important;
        gap: 1.5rem !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1) !important;
        transition: right 0.4s ease !important;
        z-index: 9999 !important;
        display: flex !important;
        visibility: visible !important;
    }

    .nav-links.active {
        right: 0 !important;
    }

    .nav-item {
        font-size: 1.1rem !important;
        width: 100% !important;
        border-bottom: 1px solid var(--secondary-color) !important;
        padding-bottom: 0.8rem !important;
        display: block !important;
        color: var(--text-color) !important;
        text-align: right !important;
    }

    .dropdown-menu {
        display: none !important;
    }

    .dropdown.active .dropdown-menu {
        display: block !important;
        position: static !important;
        box-shadow: none !important;
        padding-right: 1.5rem !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .hero-slider {
        height: 250px !important;
    }

    .slide-content h1 {
        font-size: 1.4rem !important;
    }

    .section-title {
        font-size: 1.6rem !important;
        margin: 2rem 0 !important;
    }

    .premium-product-card {
        min-width: 155px !important;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* END MEDIA QUERY */

/* General Styles (Outside Media Query) */
.dropdown.active .dropdown-menu {
    display: block;
}

/* Dropdown */
.dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    /* RTL alignment */
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--secondary-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Hero Section (Basic style for index) */
.hero {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    border-radius: 0 0 2rem 2rem;
}

.section-title {
    text-align: center;
    margin: 3rem 0;
    font-size: 2rem;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* Footer */
.main-footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 4rem;
}

/* Category Card Pop-out */
.category-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-20px);
    box-shadow: var(--shadow-lg);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: 0 0 2rem 2rem;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 600px;
}

/* Infinite Logo Carousel */
.logo-carousel-container {
    overflow: hidden;
    padding: 2.5rem 0;
    background: white;
    white-space: nowrap;
    position: relative;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.logo-carousel {
    display: inline-block;
    animation: slide 20s infinite linear;
}

.logo-item {
    display: inline-block;
    margin: 0 2rem;
    font-size: 2rem;
    color: #9ca3af;
    font-weight: bold;
    opacity: 0.7;
}

@keyframes slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }

    /* RTL: Moves right to left visually ? Wait, allow standard translate, check direction */
}

/* Note: In RTL, negative translateX moves Left? Let's try standard 0 to -100% or similar. 
   If dir=rtl, positive translation moves to LEFT? No, verify. 
   Actually, standard is: background moves. 
   Let's assume standard infinite loop logic: Duplicate content.
*/

/* Premium Reviews Section Overhaul */
.reviews-card {
    background: #ffffff;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    margin-top: 4rem;
    border: 1px solid #f1f5f9;
}

.review-form-container {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1.5rem;
    margin-bottom: 3.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
}

/* Premium SVG Stars Input */
.star-rating-v2 {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    direction: ltr;
}

.star-rating-v2 input {
    display: none;
}

.star-rating-v2 label {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.star-rating-v2 label svg {
    width: 20px;
    /* Small Standard Size */
    height: 20px;
    fill: #e2e8f0;
    /* Light Gray */
    transition: all 0.2s ease;
}

.star-rating-v2 label:hover svg,
.star-rating-v2 label:hover~label svg,
.star-rating-v2 input:checked~label svg {
    fill: #facc15;
    /* Standard Yellow (Yellow-400) */
    transform: scale(1.1);
    filter: none;
    /* Flat look */
}

.rating-description {
    text-align: center;
    font-weight: 700;
    color: #475569;
    min-height: 2rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

/* Luxury Textarea */
.review-textarea {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid #f1f5f9;
    border-radius: 1.2rem;
    font-family: inherit;
    font-size: 1.1rem;
    background: #f8fafc;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    resize: none;
    outline: none;
}

.review-textarea:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.1);
    transform: scale(1.02);
}

/* Elegant Review Item */
.review-item {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1.8rem;
    border: 1px solid #f1f5f9;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    border-left: 5px solid transparent;
}

.review-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.03);
    border-left-color: var(--primary-color);
}

.review-user-badge {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}