/* ==========================================================================
   1. ROOT & GENERAL STYLES
   ========================================================================== */
:root {
    --pink: #e5a9b4;
    --blue: #a9d4e5;
    --beige: #e5dcd2;
    --off-white: #fff9f7;
    --text-color: #5d5d5d;
    --heading-color: #5d5d5d;
    --price-color: #e74c3c;
    --border-color: #EAE0D7;
}

/* --- Global reset for tap highlight --- */
a,
button,
.product-card,
.modal-thumbnails img {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* --- Animation Keyframes --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--off-white);
    color: var(--text-color);
    text-align: center;
    margin: 0;
    width: 100%;
    overflow-x: hidden;
}

body.modal-is-open {
    overflow: hidden;
}

/* ==========================================================================
   2. HEADER & LANGUAGE SWITCHER
   ========================================================================== */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    box-sizing: border-box;
}

.brand h1 {
    margin: 0;
    font-size: 2.2rem;
    color: var(--pink);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    transition: color 0.4s ease;
}

.lang-switcher {
    display: flex;
    gap: 5px;
    background: #fff;
    border-radius: 20px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.lang-switcher button {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    padding: 8px 15px;
    border-radius: 15px;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    font-weight: 700;
    color: #888;
    transition: all 0.3s ease;
}

.lang-switcher button:hover {
    background-color: #f5f5ff;
}

.lang-switcher button.active {
    background-color: var(--blue);
    color: white;
}

.flag-icon {
    width: 22px;
    height: 15px;
    border-radius: 3px;
    object-fit: cover;
}

/* ==========================================================================
   3. SEARCH BAR
   ========================================================================== */
.search-container {
    margin: 0 auto 25px auto;
    max-width: 500px;
    padding: 0 20px;
}

#search-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
}

#search-input:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: 0 6px 22px rgba(229, 169, 180, 0.4);
}

/* ==========================================================================
   4. NAVIGATION & CATEGORIES
   ========================================================================== */
.main-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.nav-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 500px;
}

.main-category,
.nav-row > .main-category-button {
    flex: 1;
    position: relative;
}

.main-category-button {
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: #A08C7D;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.main-category-button:hover {
    border-color: #D6C6B9;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
}

.main-category-button.active {
    background-color: var(--pink);
    color: #ffffff;
    border-color: var(--pink);
    box-shadow: 0 3px 12px rgba(229, 169, 180, 0.5);
    transform: translateY(0);
}

.subcategory-list {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 115%;
    right: 0;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 8px;
    min-width: 100%;
    z-index: 100;
    border: 1px solid #f0f0f0;
    box-sizing: border-box;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
}

.subcategory-list.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
}

.main-category:last-child .subcategory-list {
    right: auto;
    left: 0;
}

.subcategory-list a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    border-radius: 8px;
    text-align: right;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.subcategory-list a:hover {
    background-color: #f5f5f5;
}

.subcategory-list a.active {
    background-color: var(--blue);
    color: white;
}

/* ==========================================================================
   5. PRODUCT GRID & CARDS
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-out backwards;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overlay-price {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.overlay-details {
    font-size: 0.8rem;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
}

.product-info {
    padding: 15px;
    text-align: right;
}

.product-name {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 700;
}

/* ==========================================================================
   6. MODAL STYLES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

.modal-content {
    background-color: white;
    border-radius: 20px;
    width: 100%;
    max-width: 950px;
    max-height: 90vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    overflow: hidden; /* This is important to clip the corners */
    position: relative;
}

.modal-body {
    width: 100%;
    display: flex;
    gap: 30px;
    padding: 30px;
    padding-top: 60px; /* Space for the top back button */
    box-sizing: border-box;
    overflow-y: auto; /* This makes the body scrollable */
    position: relative;
}

/* --- THE ONLY CORRECTED AND FINAL CODE FOR THE TOP "BACK" BUTTON --- */
.modal-close-button {
    position: absolute; /* ✨ This makes the button scroll with the content */
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    text-shadow: 0px 1px 3px rgba(255, 255, 255, 0.9), 0px 0px 5px rgba(255, 255, 255, 0.9);
}

.modal-close-button:hover {
    background: transparent;
    color: #000;
    transform: scale(1.1);
}

.modal-gallery {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.swiper-container.modal-swiper {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 5px;
}

.modal-thumbnails img {
    width: 70px;
    height: 85px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.modal-thumbnails img:hover {
    opacity: 1;
    border-color: var(--beige);
}

.modal-thumbnails img.active {
    opacity: 1;
    border-color: var(--pink);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: right;
}

.modal-details h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: var(--heading-color);
    transition: color 0.3s ease;
}

#modal-product-code {
    font-size: 1rem;
    color: #777;
    margin: 0 0 10px 0;
}

#modal-product-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--price-color);
    margin: 0 0 20px 0;
}

.modal-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
    margin: 15px 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.modal-details p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin: 0 0 10px 0;
}

.size-group-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 15px 0 10px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.size-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
html[dir="rtl"] .size-tags-container {
    justify-content: flex-start;
}

.size-tag {
    background-color: #f9f9f9;
    border: 1px solid var(--beige);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.modal-buttons-container {
    margin-top: auto; /* Pushes button to the bottom */
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.order-button {
    display: block;
    width: 100%;
    max-width: 250px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    color: white; /* لون النص أبيض */

    /* ✨ هذا هو التدرج اللوني الجديد لشعار انستاجرام */
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.order-button:hover {
    transform: translateY(-3px); /* حركة صعود للأعلى عند المرور */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); /* ظل أكبر للتأكيد */
}


.secondary-back-button {
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    transition: background-color 0.2s ease;
}
.secondary-back-button:hover {
    background-color: #e0e0e0;
}

/* ==========================================================================
   7. THEME COLORS
   ========================================================================== */
body.newborn-theme { --pink: #d1e7dd; --heading-color: #5E7C5A; }
body.girls-theme { --pink: #e5a9b4; --heading-color: #C97B8B; }
body.boys-theme { --pink: #a9d4e5; --heading-color: #5D8A9E; }
body.accessories-theme { --pink: #d1c4e9; --heading-color: #673ab7; }
body.shoes-theme { --pink: #d3d3d3; --heading-color: #5a5a5a; }
body.seasonal-theme { --pink: #c8e6c9; --heading-color: #4A7A4C; }
body.sales-theme { --pink: #f8cbad; --heading-color: #b5651d; }

/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 15px;
    }

    .modal-body {
        flex-direction: column;
        padding: 15px;
        padding-top: 50px;
    }

    .modal-close-button {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .modal-details h2 { font-size: 24px; }
    #modal-product-price { font-size: 1.8rem; }
.modal-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: flex-start; /* ✨ Agrega esta línea */
    overflow-x: auto;
    padding-top: 5px;
    padding-bottom: 5px;
}
}
/* ==========================================================================
   الفوتر (Footer Styles)
   ========================================================================== */
.site-footer {
    background-color: #F9F9F9;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding: 2rem 1rem 0.01rem;
    /* py-4, with some horizontal padding */
    margin-top: 4rem; /* Add some space above the footer */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* Mobile first: stack everything vertically */
    align-items: center; /* Center everything on mobile */
    gap: 1.5rem; /* Space between elements */
}

/* --- Quick Links --- */
.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: #000;
    text-decoration: underline;
}

/* --- Copyright --- */
.footer-copyright p {
    margin: 0;
    text-align: center;
}



/* ==========================================================================
   Responsive Layout for Footer
   ========================================================================== */
@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    /* لا نحتاج لترتيب العناصر بعد الآن */
}

/* هذا الكود يحل مشكلة اتجاه النص للبراند وحقوق النشر */
.footer-copyright p {
    direction: ltr; /* نجبر هذا السطر تحديداً أن يكون اتجاهه من اليسار لليمين */
    text-align: center; /* (أو right إذا كنت تريده أن يبقى على اليمين) */
}

/* ==========================================================================
   9. SHOPPING CART & NEW ELEMENTS STYLES
   ========================================================================== */

/* --- Header Cart Icon --- */
.cart-container {
    position: absolute;
    left: 20px; /* نضع السلة في الجهة المقابلة للغة */
    top: 50%;
    transform: translateY(-50%);
}

.cart-icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2rem; /* حجم أيقونة السلة */
    color: var(--text-color);
    position: relative;
    padding: 5px;
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -5px;
    background-color: var(--price-color);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid var(--off-white);
    transition: transform 0.2s ease;
}

.cart-icon-button:active .cart-count {
    transform: scale(0.9);
}


/* --- Product Modal Actions --- */
.modal-actions {
    margin-top: auto; /* يدفع العناصر للأسفل */
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.options-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: flex-start; /* لتبدأ من اليمين في العربي */
    text-align: right;
}

.option-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* لتبدأ من اليمين في العربي */
}

.option-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.size-select,
.quantity-input {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #fcfcfc;
    transition: border-color 0.2s ease;
}

.size-select:focus,
.quantity-input:focus {
    outline: none;
    border-color: var(--pink);
}

/* تعديل لون زر "أضف للسلة" ليناسب هوية المتجر */

/* ✨ تعديل لجعل زر "أضف إلى السلة" أكثر بروزاً وجاذبية ✨ */
#add-to-cart-button {
    background-color: #f08e9a; /* لون زهري أكثر حيوية وجاذبية */
    color: white;
    padding: 14px 25px; /* زيادة حجم الزر قليلاً */
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    /* ظل قوي وواضح باللون الزهري ليعطي بروزاً */
    box-shadow: 0 5px 15px rgba(229, 169, 180, 0.7);
    text-align: center;
    text-decoration: none;
    display: block;
    width: 100%;
}

#add-to-cart-button:hover {
    background-color: #e07a89; /* يصبح اللون أغمق قليلاً عند التمرير */
    box-shadow: 0 7px 20px rgba(229, 169, 180, 0.9); /* يصبح الظل أقوى */
    transform: translateY(-3px); /* يرتفع الزر للأعلى قليلاً */
}

#add-to-cart-button:active {
    background-color: #d16a78; /* يصبح اللون أغمق عند الضغط */
    box-shadow: 0 3px 10px rgba(229, 169, 180, 0.6);
    transform: translateY(-1px);
}



/* --- Off-Canvas Cart Panel --- */
.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.offcanvas-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.offcanvas {
    position: fixed;
    top: 0;
    right: -100%; /* يبدأ مخفياً خارج الشاشة */
    width: 100%;
    max-width: 380px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html[dir="rtl"] .offcanvas {
    right: auto;
    left: -100%;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.offcanvas.is-open {
    right: 0;
}

html[dir="rtl"] .offcanvas.is-open {
    left: 0;
}


.offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.offcanvas-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--heading-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #333;
}

.offcanvas-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart-message {
    text-align: center;
    margin-top: 50px;
    color: #888;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.cart-item-details {
    flex-grow: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.cart-item-details .price {
    color: var(--price-color);
    font-weight: 700;
    margin: 5px 0;
}

.cart-item-info {
    font-size: 0.9rem;
    color: #777;
}

.cart-item-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-item-btn {
    font-size: 0.8rem;
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.offcanvas-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.cart-total span:first-child {
    color: #555;
}
.cart-total span:last-child {
    font-weight: 700;
}

.final-total {
    font-size: 1.2rem;
    font-weight: bold;
}

/* ✨ تعديل لجعل زر "إتمام الطلب" بارزاً وجذاباً ✨ */
.checkout-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background-color: #f08e9a; /* نفس اللون الزهري الحيوي */
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease-in-out;
    /* نفس الظل البارز والجميل */
    box-shadow: 0 5px 15px rgba(229, 169, 180, 0.7);
}

/* التأثيرات عند مرور الماوس (فقط إذا لم يكن الزر معطلاً) */
.checkout-button:hover:not(:disabled) {
    background-color: #e07a89;
    box-shadow: 0 7px 20px rgba(229, 169, 180, 0.9);
    transform: translateY(-2px);
}

/* التأثيرات عند الضغط (فقط إذا لم يكن الزر معطلاً) */
.checkout-button:active:not(:disabled) {
    background-color: #d16a78;
    box-shadow: 0 3px 10px rgba(229, 169, 180, 0.6);
    transform: translateY(-1px);
}

/* شكل الزر عندما يكون معطلاً (السلة فارغة أو لم يتم اختيار محافظة) */
.checkout-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none; /* إزالة الظل عند التعطيل */
    transform: none; /* إزالة الحركة عند التعطيل */
}



/* تعديل بسيط على الهيدر ليتسع لأيقونة السلة على الشاشات الصغيرة */
@media (max-width: 768px) {
    .site-header {
        position: relative;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    .cart-container {
        left: 15px;
        top: 35px; /* لضبط الموقع العمودي */
    }
    .brand {
        width: 100%; /* نجعل البراند يأخذ عرض كامل */
    }
    .lang-switcher {
        margin: 0 auto; /* نضع اللغة في المنتصف تحت البراند */
    }
}
/* ==========================================================================
   10. TOAST NOTIFICATION STYLES
   ========================================================================== */

.toast {
    position: fixed;
    bottom: -100px; /* يبدأ مخفياً أسفل الشاشة */
    left: 50%;
    transform: translateX(-50%);
    background-color: #2c3e50; /* لون غامق وواضح */
    color: white;
    padding: 16px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    z-index: 3000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* حركة دخول وخروج ناعمة */
}

.toast.show {
    bottom: 30px; /* يظهر على الشاشة */
}

/* ==========================================================================
   11. GOVERNORATE SELECTOR STYLES
   ========================================================================== */
.governorate-selector {
    margin-top: 15px;
    text-align: right;
}

.governorate-selector label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

#governorate-select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    background-color: #fff;
}

/* ==========================================================================
   12. QUANTITY STEPPER & OPTIONS LAYOUT
   ========================================================================== */

/* تحسينات على الحاوية الرئيسية للخيارات */
.options-container {
    flex-wrap: wrap; /* للسماح للعناصر بالنزول لسطر جديد إذا ضاقت الشاشة */
    justify-content: space-between; /* لتوزيع المسافة بشكل أفضل */
    align-items: flex-end;
}

.option-group {
    flex-grow: 1; /* السماح للعناصر بالنمو */
    flex-basis: 120px; /* تحديد عرض أساسي مرن */
    min-width: 120px;
}

/* تصميم أزرار الكمية الجديدة */
.quantity-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: 130px; /* تحديد عرض ثابت لشكل أرتب */
    background-color: #fff;
}

.quantity-stepper .quantity-input {
    width: 100%;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    /* لإزالة الأسهم الافتراضية للمتصفح */
    -moz-appearance: textfield;
    appearance: textfield;
}
.quantity-stepper .quantity-input::-webkit-outer-spin-button,
.quantity-stepper .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-btn {
    background-color: #f9f9f9;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
    padding: 5px 15px;
    transition: background-color 0.2s ease;
}

.quantity-btn:hover {
    background-color: #f1f1f1;
}

.quantity-btn.minus {
    border-left: 1px solid var(--border-color);
}

.quantity-btn.plus {
    border-right: 1px solid var(--border-color);
}

/* ==========================================================================
   13. BODY LOCK FOR OFF-CANVAS
   ========================================================================== */

body.offcanvas-is-open {
    overflow: hidden;
}

/* ==========================================================================
   14. CUSTOM SCROLLBAR FOR CART
   ========================================================================== */

/* لجعل شريط التمرير ظاهراً في المتصفحات التي تدعم ذلك (مثل كروم) */
.offcanvas-body::-webkit-scrollbar {
  width: 8px; /* تحديد عرض شريط التمرير */
}

/* تصميم خلفية شريط التمرير (المسار) */
.offcanvas-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

/* تصميم الجزء المتحرك من شريط التمرير */
.offcanvas-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

/* تغيير لون الجزء المتحرك عند مرور الماوس فوقه (للكمبيوتر) */
.offcanvas-body::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* تصميم أزرار التحكم بالكمية داخل السلة */
.cart-quantity {
    width: 100px; /* حجم أصغر ليناسب السلة */
    height: 30px;
}

.cart-quantity .quantity-input {
    font-size: 0.9rem;
    padding: 0;
}

.cart-quantity .quantity-btn {
    font-size: 1.2rem;
    padding: 0 10px;
}

/* تحسينات على ترتيب العناصر في السلة */
.cart-item-actions {
    flex-wrap: wrap; /* السماح للعناصر بالنزول لسطر جديد */
    gap: 10px; /* مسافة بين العناصر */
    margin-top: 10px;
}
.remove-item-btn {
    margin-right: auto; /* يدفع زر الحذف لليسار */
}
