@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');

:root {
    /* User-specified Joja Color Palette */
    --joja-background: #FBF1F6;
    --joja-text: #121212;
    --joja-button-bg: #B7477E;
    --joja-button-text: #121212;
    --joja-outline-btn: #121212;

    /* Legacy mappings */
    --joja-black: #121212;
    --joja-white: #ffffff;
    --joja-nude: #FBF1F6;
    --joja-hover: #a03968;

    /* Functional mappings */
    --primary-color: var(--joja-button-bg);
    --secondary-color: var(--joja-text);
    --accent-color: var(--joja-nude);
    --text-color: var(--joja-text);

    --header-height: 80px;
    --container-width: 1200px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--joja-text);
    margin: 0;
    padding: 0;
    background-color: var(--joja-background);
}

h1,
h2,
h3,
.brand-font,
.navbar-brand {
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--joja-black);
}

/* Navbar */
.navbar {
    background-color: var(--joja-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    color: var(--joja-text);
    transition: color 0.3s;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: #999;
}

/* Buttons */
.btn-primary,
.btn-joja-dark {
    background-color: var(--joja-button-bg);
    color: var(--joja-button-text);
    padding: 12px 30px;
    border: none;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Montserrat', sans-serif;
    display: inline-block;
}

.btn-primary:hover,
.btn-joja-dark:hover {
    background-color: var(--joja-hover);
}

/* Language Switcher Button */
.lang-switch-btn {
    background: transparent;
    border: 1px solid var(--joja-text);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.3s;
    color: var(--joja-text);
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lang-switch-btn:hover {
    background-color: var(--joja-button-bg);
    color: var(--joja-white);
    border-color: var(--joja-button-bg);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.product-price {
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Video Stories */
.joja-video-thumb {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--joja-nude);
    transition: transform 0.3s ease, border-color 0.3s;
    cursor: pointer;
}

.joja-video-thumb:hover {
    transform: scale(1.05);
    border-color: var(--joja-black);
}

.video-card p {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

/* Video Modal */
.joja-video-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-video {
    position: relative;
    background: var(--joja-white);
    padding: 0;
    /* Removing padding for immersive feel or keep small padding */
    border-radius: 10px;
    max-width: 400px;
    /* Mobile style vertical */
    width: 90%;
    overflow: hidden;
}

#modalVideo {
    width: 100%;
    display: block;
    max-height: 80vh;
}

.video-info {
    padding: 20px;
    background: white;
}

.close-video {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    /* Depends on video background, maybe mix-blend-mode or fixed */
    font-size: 35px;
    cursor: pointer;
    z-index: 1001;
    text-shadow: 0 0 5px black;
}

/* Filter Buttons */
.btn-filter {
    background: #fff;
    border: 2px solid #eaeaea;
    padding: 8px 20px;
    margin: 5px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    color: #333;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 1px;
}

.btn-filter.active,
.btn-filter:hover {
    background-color: rgba(183, 71, 126, 0.15);
    color: var(--joja-button-bg);
    border-color: var(--joja-button-bg);
}

/* Footer (Basic) */
footer {
    background-color: var(--joja-nude);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
}

/* Newsletter Modal */
.joja-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.joja-modal .modal-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.joja-modal input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Mobile Menu Toggle - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #B7477E !important;
    padding: 0;
    line-height: 1;
}

/* Navigation Links - Desktop Default */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 15px;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: var(--joja-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #B7477E;
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
}

.mobile-menu-backdrop.active {
    display: block;
}

/* Mobile Responsive Navigation */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block !important;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px; /* Specific width for mobile sidebar */
        flex-direction: column;
        background-color: #ffffff;
        padding: 80px 20px 20px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        text-align: right; /* Better for Arabic/Mixed flow */
        align-items: flex-start;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-links a {
        display: block;
        padding: 15px 10px;
        font-size: 1.1rem;
        width: 100%;
    }
}

.nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-icons a {
    color: var(--joja-text);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.nav-icons a:hover {
    color: var(--joja-black);
}

/* Logo */
.logo-img {
    height: 50px;
    width: auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

/* Hero Section */
.hero-section {
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

/* ========================================
   JOJA REELS - Instagram Style
   ======================================== */
.joja-reels-section {
    padding: 40px 0;
    background: var(--joja-background);
    overflow: hidden;
}

.joja-reels-swiper {
    padding: 10px 20px 40px 20px !important;
    overflow: hidden !important;
}

/* كارد الريل - شكل بورتريه 9:16 */
.joja-reel-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background: var(--joja-nude);
    box-shadow: 0 4px 20px rgba(183, 71, 126, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.joja-reel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(183, 71, 126, 0.3);
    outline: 2px solid var(--joja-button-bg);
}

/* الفيديو يملا الكارد */
.joja-reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* اسم الريل في الأسفل */
.joja-reel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 15px 15px;
    background: linear-gradient(to top, rgba(183, 71, 126, 0.7) 0%, transparent 100%);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 576px) {
    .joja-reels-swiper {
        padding: 10px 15px 30px 15px !important;
    }
}




.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.section-title {
    text-align: center;
    margin: 50px 0 30px 0;
    font-size: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.footer-col h3 {
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--joja-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--joja-black);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.5rem;
}

.copyright {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 991px) {

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block !important;
    }

    /* Adjust logo */
    .logo-img {
        height: 40px;
    }

    /* Icons smaller */
    .nav-icons {
        gap: 15px;
    }

    .nav-icons a {
        font-size: 1.1rem;
    }

    /* Hide Search and User icons on mobile as requested (Removed) */



    /* Hero Section */
    .hero-section {
        height: 350px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Product Grid - 1 column on small mobiles, 2 on larger */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 15px 10px;
    }

    .product-name {
        font-size: 0.95rem;
    }

    /* Buttons */
    .btn-primary,
    .btn-joja-dark {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-filter {
        padding: 6px 15px;
        font-size: 0.75rem;
        margin: 3px;
    }

    /* Video Stories / Ticker */
    .video-ticker-container {
        width: 100%;
        overflow: hidden;
        white-space: nowrap;
        padding: 20px 0;
        position: relative;
        background-color: transparent;
    }

    .video-track {
        display: inline-block;
        animation: scrollVideos 25s linear infinite;
        /* سرعة الحركة */
    }

    /* إيقاف حركة الشريط بالكامل عند الوقوف عليه */
    .video-track:hover {
        animation-play-state: paused;
    }

    @keyframes scrollVideos {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-50%);
        }
    }

    .video-item {
        display: inline-block;
        width: 220px;
        /* عرض الفيديو */
        height: 380px;
        /* طول الفيديو */
        margin-right: 15px;
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .video-item:hover {
        transform: scale(1.05);
        /* إبراز الفيديو عند الوقوف عليه */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        z-index: 10;
        position: relative;
    }

    /* شريط معرض الصور الجديد */
    .joja-gallery-strip-container .video-item img.gallery-strip-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* لضمان ملء الصورة للصندوق بشكل شيك */
        border-radius: 12px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* تكبير الصورة وإضافة ظل عند الوقوف عليها بالماوس */
    .joja-gallery-strip-container .video-item:hover img.gallery-strip-img {
        transform: scale(1.08);
        /* تكبير الصورة قليلاً */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

    /* Section Titles */
    .section-title {
        font-size: 1.5rem;
        margin: 30px 0 20px 0;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
        color: #ffffff !important;
    }

    .footer-col h3,
    .footer-col p,
    .footer-col a {
        color: #ffffff !important;
    }

    .social-links {
        justify-content: center;
    }

    .footer-col h3 {
        font-size: 1.1rem;
    }

    /* Modal adjustments */
    .modal-content-video {
        max-width: 350px;
        width: 95%;
    }

    .joja-modal .modal-content {
        padding: 30px 20px;
        max-width: 350px;
    }

    /* Container padding */
    .container {
        padding: 0 10px;
    }

    /* Navbar height adjustment */
    :root {
        --header-height: 60px;
    }

    .navbar {
        height: var(--header-height);
    }
}

/* Extra Small Devices (< 480px) */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .btn-filter {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .joja-video-thumb {
        width: 80px;
        height: 80px;
    }
}

/* 1. استدعاء خط عربي فخم جداً للبراند */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* 2. فرض الخلفية البيضاء الناصعة وتطبيق الخط */
html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
}

body,
html {
    background-color: #ffffff !important;
    font-family: 'Tajawal', sans-serif !important;
}

/* Fix Bootstrap row negative margins on mobile */
.row {
    margin-right: 0;
    margin-left: 0;
}

/* 2. إزالة الخط السفلي من جميع المنتجات والروابط */
a.text-dark,
.product-card a,
a {
    text-decoration: none !important;
}

/* 3. تظبيط مقاس وشكل كارت المنتج (The Premium Look) */
.product-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    /* بيدي مساحة للمنتج يتنفس ويكبر */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    /* ظل خفيف جداً يبرز المنتج من الخلفية البيضاء */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: 1px solid #f9f9f9;
    /* تحديد ناعم جداً */
}

/* تأثير الشياكة لما الماوس ييجي على المنتج */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 3. إصلاح صور المنتجات لعدم التشوه على الديسك توب */
.product-card img {
    width: 100%;
    height: 260px;
    /* توحيد الطول ليناسب الديسك توب والموبايل */
    object-fit: cover;
    /* يمنع تمطيط الصورة */
    border-radius: 8px;
}

/* 4. تغيير لون اسم المنتج إلى الأسود */
.product-title {
    color: #000 !important;
    /* لون أسود */
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 15px;
    margin-bottom: 10px;
}

/* 5. تغيير لون السعر الجديد إلى البينك */
.new-price {
    color: #B7477E !important;
    /* لون بينك أنيق يليق مع البراند */
    font-weight: 800;
    font-size: 1.3rem;
}

/* لون السعر القديم المشطوب */
.old-price {
    color: #999 !important;
    text-decoration: line-through;
    font-size: 1rem;
    margin-left: 8px;
}

/* 4. تصميم الأكورديون (المكونات والاستخدام) */
details {
    background-color: #f9f9f9;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
}

details summary {
    font-weight: bold;
    color: #2D5A27;
    outline: none;
    list-style: none;
    /* بيشيل السهم الافتراضي في بعض المتصفحات */
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    float: left;
    /* عشان السهم ييجي على الشمال في العربي */
    font-size: 1.2rem;
}

details [open] summary::after {
    content: '-';
}

details p {
    margin-top: 10px;
    color: #555;
    font-size: 0.95rem;
}

/* 1. توحيد الفوتر مع الهيدر باللون البينك */
footer {
    background-color: #B7477E !important;
    color: #ffffff;
}

/* 2. تصميم الخصم (Badge) */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #C5A059;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 10;
}

.filter-list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    gap: 10px;
}

.filter-list::-webkit-scrollbar {
    display: none;
}

@keyframes bounceWhatsApp {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* تنسيق زر الواتساب العائم */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    width: 60px;
    height: 60px;
    line-height: 60px;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
    animation: bounceWhatsApp 2s infinite;
}

.whatsapp-float:hover {
    animation-play-state: paused;
    transform: scale(1.1);
    color: white;
}

/* إجبار صندوق الصورة على أبعاد ثابتة للديسك توب */
.image-box {
    display: block;
    width: 100%;
    height: 320px !important;
    /* طول مميز للديسك توب */
    border-radius: 12px;
    overflow: hidden;
    background-color: #f9f9f9;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

/* إجبار الصورة على ملء الصندوق بدون تمطيط (أهم سطر) */
.product-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block;
}

/* تعديل الطول للموبايل فقط ليكون متناسق */
@media (max-width: 991px) {
    .image-box {
        height: 220px !important;
    }
}

/* إزالة أي بوردر أو خلفية من النصوص */
.product-info {
    background: transparent;
    border: none;
}

.product-title {
    color: #000 !important;
    /* لون أسود */
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.new-price {
    color: #B7477E !important;
    /* لون بينك */
    font-size: 1.25rem;
    font-weight: bold;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.95rem;
    margin-left: 8px;
}

/* زر أضف للسلة */
.btn-add-cart {
    background-color: #B7477E;
    color: white;
    border-radius: 25px;
    padding: 6px 20px;
    font-size: 0.9rem;
    width: 100%;
    border: none;
    transition: background 0.3s ease;
}

.btn-add-cart:hover {
    background-color: #923864;
    color: white;
}

/* إجبار الشبكة على 4 منتجات في الديسك توب */
.desktop-4-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
    /* المسافة بين المنتجات */
    width: 100%;
}

/* wrapper للمنتجات في الـ partial view */
.product-card-wrap {
    display: contents;
}

/* 3 منتجات للشاشات المتوسطة (التابلت) */
@media (max-width: 991px) {

    .desktop-4-grid,
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* منتجين لشاشات الموبايل */
@media (max-width: 768px) {

    .desktop-4-grid,
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    /* ضمان توسيط عناصر الشبكة */
    .desktop-4-grid {
        justify-items: center;
    }
}

/* Force Header Bars Text Color */
.top-bar,
.top-bar *,
.announcement-bar,
.announcement-bar *,
.announcement-bar a,
.top-bar a {
    color: #ffffff !important;
}
.joja-reels-swiper .swiper-wrapper { transition-timing-function: linear !important; }


/* WhatsApp Mobile Optimizations */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 15px;
        width: 55px;
        height: 55px;
        line-height: 55px;
        font-size: 30px;
    }

    /* Move to left on Arabic mobile for better thumb reach and layout flow */
    html[lang='ar'] .whatsapp-float {
        right: auto;
        left: 15px;
    }
}
