:root {
    --primary: #2fb9c8; 
    --primary-hover: #00707c;
    --secondary: #173163; 
    --secondary-hover: #111d33;
    --dark: #2c3e50;
    --dark-light: #34495e;
    --light: #f8fafc;
    --gray: #333333; /* التعديل هنا: كان #7f8c8d */
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --danger: #3c9ae7;
    --success: #2ecc71;
    --shadow-sm: 0 2px 8px rgba(26, 43, 76, 0.04);
    --shadow-md: 0 8px 16px rgba(26, 43, 76, 0.08);
    --shadow-lg: 0 16px 32px rgba(26, 43, 76, 0.12);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    width: 100%;
    overflow-x: clip; /* استخدمنا clip بدلاً من hidden عشان الـ sticky يشتغل */
}

.text-orange {
    color: var(--primary);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    z-index: 997; /* رفعنا الرقم عشان الناف بار تكون دايماً فوق كل محتوى الموقع */
    box-shadow: var(--shadow-sm);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.dropbtn i {
    font-size: 12px;
    color: var(--primary);
}

.dropbtn:hover {
    background-color: var(--light);
    color: var(--primary);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    z-index: 10;
    top: 110%;
    
    /* التعديل هنا */
    left: 0; 
    right: auto; 
    
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-light);
}

@media (max-width: 992px) {
    .dropdown-content {
        right: auto;
        left: 0;
    }
}

.dropdown-content a {
    color: var(--secondary);
    padding: 14px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-light);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a i {
    color: var(--primary);
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.dropdown-content a:hover {
    background-color: var(--light);
    color: var(--primary);
    padding-right: 25px;
}

.show {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-container {
    display: flex;
    width: 45%;
    background-color: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 30px;
    overflow: hidden;
    transition: var(--transition);
}

.search-container:focus-within {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1);
}

.search-container input {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--secondary);
    outline: none;
}

.search-btn {
    padding: 0 25px;
    background-color: transparent;
    color: var(--secondary);
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    position: relative;
    color: var(--secondary);
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-btn {
    padding: 10px 24px;
    border: none;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.login-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--secondary);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 43, 76, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99;
    animation: fadeIn 0.3s ease;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    padding: 30px 40px; /* قللنا البادنج من فوق وتحت شوية */
    width: 450px;
    max-width: 90%;
    max-height: 85vh; /* السحر هنا: أقصى ارتفاع 85% من الشاشة */
    overflow-y: auto; /* إضافة سكرول داخلي لو المحتوى أطول من الشاشة */
    border-radius: 24px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
}

/* عشان الموبايلات الصغيرة كمان نظبط السكرول */
@media (max-width: 480px) {
    .modal {
        padding: 25px 20px;
        max-height: 80vh; 
    }
}

.cart-modal {
    width: 550px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.modal-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.modal-title {
    text-align: center;
    margin-bottom: 25px;
    color: var(--secondary);
    font-weight: 800;
    font-size: 24px;
}

.modal-title i {
    color: var(--primary);
    margin-left: 10px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 18px;
}

.modal-input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    font-size: 15px;
    transition: var(--transition);
    background-color: var(--light);
}

.modal-input:focus {
    border-color: var(--primary);
    background-color: var(--white);
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.modal-input:focus + i, .input-group:focus-within i {
    color: var(--primary);
}

.modal-link {
    font-size: 14px;
    margin-bottom: 25px;
    text-align: center;
    color: var(--gray);
}

.modal-link span {
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.modal-submit {
    width: 100%;
    padding: 16px;
    background-color: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: var(--transition);
}

.modal-submit:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-left: 5px;
}

.cart-items::-webkit-scrollbar {
    width: 5px;
}

.cart-items::-webkit-scrollbar-thumb {
    background-color: var(--gray-light);
    border-radius: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.item-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.item-img {
    width: 60px;
    height: 80px;
    background-color: var(--light);
    border-radius: 8px;
    border: 1px solid var(--gray-light);
}

.item-info h4 {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 5px;
    font-weight: 700;
}

.item-price {
    color: var(--primary);
    font-weight: 800;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--light);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
}

.quantity-control button {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: var(--secondary);
    transition: var(--transition);
}

.quantity-control button:hover {
    color: var(--primary);
}

.quantity-control span {
    font-weight: 700;
    color: var(--secondary);
    width: 20px;
    text-align: center;
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.cart-summary {
    background-color: var(--light);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--secondary);
}

.free-delivery {
    color: var(--success);
}

.total-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary);
    border-top: 1px solid var(--gray-light);
    padding-top: 15px;
}

main {
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.sub-categories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0 20px 0;
    scrollbar-width: none; 
}

.sub-categories::-webkit-scrollbar {
    display: none; 
}

.sub-cat {
    padding: 10px 24px;
    background-color: var(--white);
    color: var(--secondary);
    border: 1px solid var(--gray-light);
    border-radius: 30px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
}

.sub-cat:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sub-cat.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.product-cards {
    margin-bottom: 60px;
    margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all:hover {
    color: var(--primary-hover);
    transform: translateX(-5px);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.card {
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--white);
    border: 1px solid var(--gray-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(243, 156, 18, 0.3);
}

.product-img {
    height: 220px;
    background-color: var(--light);
    border-bottom: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.brand {
    color: var(--gray);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

.price {
    font-weight: 800;
    font-size: 20px;
    color: var(--primary);
}

.add-to-cart-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background-color: var(--light);
    color: var(--secondary);
    border: 1px solid var(--gray-light);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.add-to-cart-btn:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.why-choose-us {
    text-align: center;
    margin-bottom: 60px;
    background-color: var(--secondary);
    border-radius: var(--radius);
    padding: 60px 30px;
    color: var(--white);
}

.why-choose-us h2 {
    margin-bottom: 50px;
    font-size: 28px;
    font-weight: 800;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-box {
    padding: 20px;
}

.feature-icon {
    font-size: 32px;
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--primary);
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.feature-box:hover .feature-icon {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-5px);
}

.feature-box h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--white);
}

.feature-box p {
    color: var(--gray-light);
    font-size: 15px;
    opacity: 0.8;
}

footer {
    background-color: var(--secondary-hover);
    color: var(--white);
    padding: 60px 5% 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-content p {
    color: var(--gray-light);
    opacity: 0.8;
    margin-bottom: 30px;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.05);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray-light);
    opacity: 0.6;
    font-size: 14px;
}

.product-page-main {
    padding: 20px 5% 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--gray);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 10px;
}

.current-page {
    color: var(--primary);
    font-weight: 700;
}

.single-product-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    margin-bottom: 60px;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-light);
}

.main-image-container {
    width: 100%;
    height: 400px;
    background-color: var(--light);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--gray-light);
}

.thumbnails-container {
    display: flex;
    gap: 15px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    background-color: var(--light);
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail:hover, .active-thumb {
    border-color: var(--primary);
}

.product-brand {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 10px;
    background-color: rgba(243, 156, 18, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
}

.product-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 14px;
    color: var(--gray);
    font-weight: 600;
}

.sku span {
    color: var(--secondary);
}

.in-stock {
    color: var(--success);
}

.product-price-container {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-light);
}

.product-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.product-short-description {
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
    font-size: 15px;
}

.product-actions-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quantity-wrapper label {
    display: block;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.lg-control {
    width: fit-content;
    padding: 8px 15px;
}

.lg-control .qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    outline: none;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    flex: 1;
    padding: 15px 30px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    width: 54px;
    height: 54px;
    background-color: var(--white);
    border: 1px solid var(--gray-light);
    color: var(--secondary);
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-icon:hover {
    border-color: var(--danger);
    color: var(--danger);
    background-color: rgba(231, 76, 60, 0.05);
}

.product-description-tabs {
    background-color: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-light);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background-color: var(--light);
    border-bottom: 1px solid var(--gray-light);
}

.tab-btn {
    padding: 18px 30px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--secondary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: var(--white);
}

.tab-content {
    display: none;
    padding: 40px;
    line-height: 1.8;
    color: var(--secondary);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-content h3 {
    margin-bottom: 20px;
    color: var(--secondary);
}

.specs-list {
    list-style: none;
}

.specs-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
}

.specs-list li span {
    width: 150px;
    font-weight: 700;
    color: var(--gray);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-link .product-img {
    transition: var(--transition);
}

.product-link:hover .product-img {
    opacity: 0.9;
}

.product-link:hover h3 {
    color: var(--primary);
    transition: var(--transition);
}

.mobile-bottom-nav {
    display: none; 
}

@media (max-width: 992px) {
    .search-container {
        width: 35%;
    }
    .single-product-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }

    header {
        padding: 12px 20px;
        gap: 15px;
    }

    .header-right {
        gap: 15px;
    }

    .logo {
        font-size: 22px;
    }

    .dropdown {
        display: none;
    }

    .search-container {
        width: auto;
        flex: 1;
    }

    .search-container input {
        padding: 10px 15px;
        font-size: 14px;
    }

    .search-btn {
        padding: 0 15px;
    }

    .header-actions {
        gap: 15px;
    }

.mobile-menu-btn {
    display: none;
}

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 92%;
        max-width: 400px;
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        z-index: 9999;
        padding: 8px;
        justify-content: space-between;
        border-radius: 20px;
        border: 1px solid var(--gray-light);
    }

    .nav-item {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--gray);
        font-size: 11px;
        font-weight: 700;
        gap: 4px;
        transition: var(--transition);
        padding: 8px 0;
        border-radius: 12px;
    }

    .nav-item i {
        font-size: 20px;
    }

    .nav-item.active {
        color: var(--primary);
        background-color: var(--light);
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }

    .product-img {
        height: 160px;
    }

    .why-choose-us {
        padding: 40px 20px;
    }

    .tab-btn {
        padding: 15px;
        font-size: 15px;
        flex: 1;
        text-align: center;
    }
    
    .tab-content {
        padding: 20px;
    }

    .main-image-container {
        height: 300px;
    }
    
    .product-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .modal {
        padding: 30px 20px;
    }
}

.checkout-wrapper {
    background-color: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    border: 1px solid var(--gray-light);
}

.section-title {
    color: var(--secondary);
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.delivery-card {
    flex: 1;
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: var(--transition);
}

.delivery-card:hover {
    border-color: rgba(243, 156, 18, 0.3);
}

.delivery-card.active {
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 1px var(--primary);
}

.delivery-card input[type="radio"] {
    accent-color: var(--primary);
    margin-top: 4px;
    transform: scale(1.1);
}

.method-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.method-info i {
    color: var(--gray);
    font-size: 18px;
    margin-bottom: 5px;
    transition: var(--transition);
}

.delivery-card.active .method-info i {
    color: var(--primary);
}

.method-info span {
    font-weight: 700;
    font-size: 14px;
    color: var(--secondary);
}

.method-info small {
    color: var(--primary);
    font-weight: 800;
    font-size: 12px;
}

.address-group {
    transition: var(--transition);
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
}

.address-group.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

.vf-cash-notice {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.vf-cash-notice i {
    font-size: 28px;
}

.vf-cash-notice p {
    font-size: 13px;
    margin-bottom: 0;
}

.vf-cash-notice h3 {
    font-size: 20px;
    letter-spacing: 1px;
    margin-top: 5px;
}

.store-notice {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.store-notice i {
    font-size: 24px;
}

.latest-products-section {
    margin: 30px 5%;
}

.latest-slider-container {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap; /* دي أهم حاجة بتجبر المنتجات تفضل في صف واحد */
    gap: 15px;
    padding: 15px 0;
    scroll-behavior: auto !important; /* مهم جداً عشان التمرير بالـ JS ميخرفش */
}

/* لإخفاء شريط التمرير المزعج (اختياري) */
.latest-slider-container::-webkit-scrollbar {
    display: none;
}

.latest-slider-container .card {
    min-width: 250px;
    flex-shrink: 0;
    margin: 0;
}

.slider-arrows {
    display: flex;
    gap: 10px;
}

.arrow-btn {
    background-color: var(--white);
    color: var(--secondary);
    border: 1px solid var(--gray-light);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.arrow-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-color: var(--light);
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(243, 156, 18, 0.1); 
    top: -50px;
    right: -50px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(26, 43, 76, 0.05);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(46, 204, 113, 0.05);
    top: 40%;
    left: 20%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 40px) scale(1.05); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}

.store-categories-section {
    margin: 30px 5%;
}

.contact-page-main {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-light);
    margin-bottom: 50px;
}

.contact-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.contact-title span {
    color: var(--primary);
}

.contact-subtitle {
    color: var(--gray);
    font-size: 15px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-light);
}

.info-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-icon {
    width: 54px;
    height: 54px;
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: var(--transition);
}

.info-card:hover .info-icon {
    background-color: var(--primary);
    color: var(--white);
}

.info-content h3 {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 4px;
    font-weight: 800;
}

.info-content p {
    color: var(--gray);
    font-size: 15px;
    font-weight: 600;
}

.contact-map {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-light);
}

.map-wrapper {
    width: 100%;
    height: 100%;
}

@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-map {
        min-height: 300px;
    }
}

.cta-section {
    background: var(--secondary);
    margin: 0 5% 40px; 
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-section::after {
    content: '\f590'; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 220px;
    opacity: 0.03;
    transform: rotate(15deg);
    pointer-events: none;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    color: var(--white);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
}

.cta-content p {
    color: var(--gray-light);
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-content p strong {
    color: var(--primary); 
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    background-color: var(--primary); 
    color: var(--white); 
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    border-radius: 30px;
    transition: var(--transition);
}

.cta-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .cta-section {
        padding: 40px 20px;
        margin: 0 5% 30px; 
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .cta-btn {
        width: 100%; 
    }
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; 
}

.cta-btn.outline-btn {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.cta-btn.outline-btn:hover {
    background-color: var(--primary);
    color: var(--white);
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px; 
    background-color: #25d366; 
    color: #FFF;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #1ebe57;
    transform: scale(1.05) translateY(-3px);
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 54px;
        height: 54px;
        /* كانت 95، خليناها 100 عشان تترفع 5 بيكسل لفوق */
        bottom: 100px; 
        left: 20px;
        font-size: 28px;
    }
}

.top-bar {
    background-color: var(--primary); 
    color: var(--white);
    padding: 8px 5%;
    font-size: 13px;
    font-weight: 700;
    position: relative;
    z-index: 100; 
}

.top-bar-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.top-bar-content p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-content i {
    font-size: 14px;
}

.top-bar-content a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 800;
    margin-right: 8px;
    transition: var(--transition);
}

.top-bar-content a:hover {
    color: var(--white);
}

.top-bar-close {
    position: absolute;
    left: 0; 
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    transition: var(--transition);
    padding: 0 10px;
}

.top-bar-close:hover {
    color: var(--white);
}

@media (max-width: 768px) {
    .top-bar {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .top-bar-content p {
        text-align: center;
        flex-wrap: wrap; 
        justify-content: center;
    }
    
    .top-bar-close {
        display: none; 
    }
}

.wholesale-banner {
    background: var(--secondary);
    margin: 0 5% 40px; 
    border-radius: var(--radius);
    padding: 50px 40px; 
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.wholesale-banner::after {
    content: '\f49e'; 
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: -20px;
    top: -30px;
    font-size: 220px; 
    opacity: 0.03;
    transform: rotate(-15deg);
    pointer-events: none;
}

.wholesale-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.wholesale-text {
    text-align: right;
}

.wholesale-text .badge {
    background-color: var(--primary); 
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 15px;
}

.wholesale-text h2 {
    font-size: 28px; 
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.wholesale-text h2 i {
    color: var(--primary);
}

.wholesale-text p {
    font-size: 15px; 
    opacity: 0.9;
    max-width: 500px;
    line-height: 1.6;
    color: var(--gray-light);
}

.wholesale-btn {
    background-color: var(--white);
    color: var(--secondary);
    padding: 15px 36px; 
    border-radius: 30px;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px; 
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.wholesale-btn:hover {
    background-color: var(--primary); 
    color: var(--white);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .wholesale-banner {
        padding: 40px 20px;
        margin: 0 5% 30px; 
        text-align: center;
    }
    
    .wholesale-content {
        flex-direction: column;
    }
    
    .wholesale-text {
        text-align: center;
    }
    
    .wholesale-text h2 {
        font-size: 24px;
        justify-content: center;
    }
    
    .wholesale-btn {
        width: 100%;
        justify-content: center;
    }
}

/* تنسيقات بانر الصورة الواحدة (بعد تصغير الحجم) */
.hero-banner-only {
    display: block;
    width: 100%;
    max-width: 1000px; /* تصغير عرض البانر في الديسكتوب (كان 1200) */
    margin: 0 auto 50px auto; /* توسيط البانر ومسافة أسفله */
    box-shadow: var(--shadow-lg); 
    border-radius: 24px; /* حواف منحنية للديسكتوب */
    overflow: hidden; 
    border: 1px solid var(--gray-light); 
    transition: var(--transition); 
}

.hero-banner-only .banner-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.hero-banner-only img {
    width: 100%;
    display: block;
    height: auto;
    max-height: 350px; /* تقليل أقصى ارتفاع للديسكتوب ليتناسب مع العرض */
    object-fit: cover; 
}

.hero-banner-only:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.15); /* لون الظل معدل للثيم الأزرق */
}

/* التجاوب مع الموبايل (عرض الشاشة 768 بكسل أو أقل) */
@media (max-width: 768px) {
    .hero-banner-only {
        width: calc(100% + 10%); 
        margin-left: -5%; 
        margin-right: -5%;
        
        /* السحر هنا: هوامش سلبية لكسر الـ 40 بيكسل الخاصة بالـ main عشان تلزق في الناف بار */
        margin-top: -40px; 
        margin-bottom: 30px; 
        
        /* تحريك البانر لليسار بمقدار 5 بيكسل (لأن اتجاه الموقع RTL، بنزق من اليمين) */
        position: relative;
        right: 5px; 
        
        border-radius: 0; 
        max-width: none; 
        border: none; 
    }
    
    .hero-banner-only img {
        width: 100%;
        height: auto;
        max-height: 220px; 
        object-fit: cover; 
    }
}

/* ========================================= */
/* 1. تصميم بانر العناوين (وصل حديثاً، الأقسام، إلخ) */
/* ========================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    
    /* السحر هنا: خلفية متدرجة فخمة من الأزرق للأخضر */
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    padding: 15px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--white); /* لون الخط أبيض عشان يقرأ على الخلفية الغامقة */
    margin: 0;
}

/* تعديل زر "عرض الكل" عشان يليق مع البانر */
.view-all {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.15); /* خلفية بيضاء شفافة */
    text-decoration: none;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 30px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.view-all:hover {
    background-color: var(--white);
    color: var(--primary); /* يقلب أخضر لما تقف عليه */
    transform: translateX(-5px);
}

/* تعديل أزرار الأسهم عشان تليق مع البانر الغامق */
.section-header .arrow-btn {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header .arrow-btn:hover {
    background-color: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

/* ========================================= */
/* 2. تصميم خلفية شريط الأقسام (الكاتيجوريز) */
/* ========================================= */
.sub-categories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    
    /* خلفية متدرجة خفيفة جداً تدمج الأزرق مع الأخضر */
    background: linear-gradient(to right, rgba(30, 58, 138, 0.05), rgba(16, 185, 129, 0.08));
    padding: 15px 20px; /* مسافة داخلية عشان الزراير متلزقش في الحواف */
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.15); /* إطار أخضر شفاف */
    margin-bottom: 20px;
}

.sub-categories::-webkit-scrollbar {
    display: none; 
}

/* تعديل للموبايل عشان البانر ميطلعش بره الشاشة */
@media (max-width: 768px) {
    .section-header {
        padding: 12px 20px;
        flex-direction: column; /* نخلي العنوان فوق والزراير تحته لو الشاشة ضيقة */
        gap: 15px;
        text-align: center;
    }
    
    .sub-categories {
        padding: 10px 15px;
        border-radius: 16px;
    }

.login-btn {
        font-size: 0; 
        padding: 0;
        width: 38px;
        height: 38px;
        border-radius: 50%; 
        justify-content: center;
        gap: 0;
        /* لو حابب تظبط المسافة بينه وبين السلة */
        margin-left: 5px; 
    }

    .login-btn i {
        font-size: 16px; 
        margin: 0;
    }

    /* إخفاء كلمة "حسابي" في حالة إن اليوزر مسجل دخول بالفعل */
    #userNameDisplay {
        display: none;
    }
}

.full-categories-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* استخدام dvh بيخليها تاخد طول الشاشة بالظبط في الموبايلات الحديثة حتى لو شريط المتصفح ظهر أو اختفى */
    height: 100vh; 
    height: 100dvh; 
    background-color: #fff; /* لازم لون خلفية عشان يغطي الموقع بالكامل */
    z-index: 999; /* لازم يكون رقم عالي جداً عشان يغطي الموقع كله */
    display: flex;
    flex-direction: column;
    padding-bottom: 70px; /* مساحة عشان المحتوى ميتغطاش تحت البار السفلي */
}

/* هيدر نافذة الأقسام */
.full-cats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 2;
}

.full-cats-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--primary, #28c1f0);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-cats-btn {
    background: #f9f9f9;
    border: 1px solid #eee;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.close-cats-btn:active {
    background: #eee;
}

/* جسم النافذة الذي يحتوي على اليمين واليسار */
.full-cats-body {
    display: flex;
    flex: 1; /* يأخذ باقي المساحة المتاحة تحت الهيدر */
    overflow: hidden; /* لمنع تمرير الشاشة بالكامل */
}

/* القائمة الجانبية اليمنى (الأقسام الرئيسية) */
.cats-sidebar {
    width: 30%;
    background: #f4f5f7;
    overflow-y: auto;
    border-left: 1px solid #eeeeee;
}

.cat-tab {
    padding: 18px 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    border-bottom: 1px solid #e9e9e9;
    transition: all 0.3s ease;
}

.cat-tab.active {
    background: #ffffff;
    color: var(--primary, #28d2f0);
    border-right: 4px solid var(--primary, #28c8f0);
}

/* محتوى الأقسام الفرعية اليسرى */
.cats-content {
    width: 70%;
    background: #ffffff;
    overflow-y: auto;
    padding: 15px;
}

.subcat-group-title {
    color: var(--primary, #28f0ed);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.subcat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.subcat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #333;
}

.subcat-item span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

/* ========================================= */
/* تصميمات الموبايل (البحث، الـ FAB، الـ Glassmorphism) */
/* ========================================= */
@media (max-width: 768px) {
    /* إخفاء شريط البحث الطويل للديسكتوب */
    .search-container {
        display: none;
    }
    
    /* إظهار أيقونة البحث الخاصة بالموبايل */
    .mobile-only-icon {
        display: flex !important;
        font-size: 20px;
    }

    /* إخفاء سلة الديسكتوب من الهيدر */
    .desktop-cart-btn {
        display: none !important;
    }

    /* شريط التنقل السفلي (تأثير Glassmorphism) */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 25px; /* رفع الشريط عن الحافة السفلية */
        left: 50%;
        transform: translateX(-50%);
        width: 92%;
        max-width: 400px;
        justify-content: space-between;
        align-items: center;
        padding: 5px 20px; /* تقليل الارتفاع للسماح ببروز الزر العائم */
        
        /* تأثير الزجاج (Glassmorphism) */
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.9);
        border-radius: 30px; /* تدوير الحواف بالكامل */
        box-shadow: 0 10px 30px rgba(23, 49, 99, 0.1);
        z-index: 9999;
    }

    .nav-item {
        flex: unset; /* إزالة الـ flex:1 لضبط المسافات حول الزر العائم */
        padding: 5px 10px;
        gap: 2px;
    }

/* زر السلة العائم (FAB) */
    .fab-cart {
        background: linear-gradient(135deg, var(--primary), #1db0bd);
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        border: 4px solid var(--white); 
        color: var(--white);
        box-shadow: 0 8px 20px rgba(47, 185, 200, 0.4);
        
        /* التعديل هنا: غيرنا القيمة من -25 لـ -12 عشان ينزل لتحت شوية */
        transform: translateY(-3px); 
        
        cursor: pointer;
        position: relative;
        z-index: 10;
        transition: var(--transition);
        padding: 0;
    }

    .fab-cart i {
        font-size: 22px;
        color: var(--white);
    }

    .fab-cart .cart-badge {
        top: -2px;
        right: -2px;
        background: var(--danger);
        border: 2px solid var(--white); /* إطار أحمر وأبيض للرقم */
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .fab-cart:active {
        transform: translateY(-20px) scale(0.95);
    }
}

/* شريط البحث المنبثق للموبايل */
.mobile-search-popup {
    display: none; /* مخفي افتراضياً */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    animation: slideDownSearch 0.3s ease-out forwards;
    display: none; /* يتم التحكم فيه بالـ JS */
    align-items: center;
    gap: 15px;
}

.mobile-search-content {
    display: flex;
    align-items: center;
    flex: 1;
    background: var(--light);
    border: 1px solid var(--primary);
    border-radius: 30px;
    padding: 2px 10px;
}

.mobile-search-content input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    outline: none;
    font-size: 15px;
}

.close-search-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--light);
    border-radius: 50%;
}

@keyframes slideDownSearch {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========================================= */
/* تخصيص شكل شريط التمرير (Scrollbar) */
/* ========================================= */

/* عرض شريط التمرير */
::-webkit-scrollbar {
    width: 10px;  /* للنزول والطلوع */
    height: 8px;  /* للاسكرول الأفقي لو موجود */
}

/* خلفية مسار شريط التمرير */
::-webkit-scrollbar-track {
    background: var(--light); 
    border-radius: 10px;
}

/* الجزء اللي بتسحبه بالماوس (الـ Thumb) */
::-webkit-scrollbar-thumb {
    background: var(--primary); /* اللون الأزرق الفاتح الخاص بالموقع */
    border-radius: 10px;
}

/* لون الـ Thumb لما تقف عليه بالماوس */
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover); /* أو ممكن تستخدم var(--secondary) لو عايزه يقلب أزرق كحلي */
}

/* تنسيق قائمة حسابي لتصبح نافذة في منتصف الشاشة للموبايل */
@media (max-width: 768px) {
    #userDropdownMenu {
        position: fixed !important;       /* تحويلها من مطلقة إلى نافذة ثابتة على الشاشة */
        top: 50% !important;             /* التموضع في منتصف الارتفاع */
        left: 50% !important;            /* التموضع في منتصف العرض */
        transform: translate(-50%, -50%) !important; /* التوسيط الدقيق وبدقة 100% */
        
        /* إلغاء التنسيقات القديمة */
        right: auto !important;
        top: 50% !important;
        
        /* أبعاد النافذة */
        width: 85% !important;           /* عرض مناسب لشاشات الموبايل */
        max-width: 320px !important;     /* أقصى عرض عشان متبقاش ضخمة */
        
        /* التصميم والشكل */
        background-color: var(--white) !important;
        border-radius: 24px !important;   /* حواف دائرية تتماشى مع الهوية */
        box-shadow: 0 20px 50px rgba(23, 49, 99, 0.3) !important; /* ظل قوي لإبراز النافذة */
        border: 1px solid var(--gray-light) !important;
        padding: 10px 0 !important;
        z-index: 100000 !important;       /* جعلها فوق شريط التنقل السفلي والـ FAB */
        
        /* أنيميشن خفيف أثناء الظهور */
        animation: modalFadeIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    }

    /* تعديل شكل الروابط بالداخل لتناسب ضغطات الأصابع */
    #userDropdownMenu a {
        padding: 16px 20px !important;
        font-size: 15px !important;
        border-bottom: 1px solid var(--gray-light) !important;
    }
    
    #userDropdownMenu a:last-child {
        border-bottom: none !important;
    }
}

/* حركة ظهور النافذة */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ==========================================
   تصميم قائمة البحث المنسدلة (Dropdown Search)
   ========================================== */
.search-dropdown {
    position: absolute;
    top: 110%; /* تظهر أسفل مربع البحث مباشرة */
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    max-height: 350px;
    overflow-y: auto;
    z-index: 9999;
    display: none; /* مخفية افتراضياً */
}

.search-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: #f8fafc;
}

.search-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    margin-left: 12px;
    border: 1px solid #eee;
}

.search-item-info {
    flex: 1;
}

.search-item-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1e293b;
    /* لقص النص الطويل وإضافة نقاط... */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.search-item-price {
    font-size: 13px;
}

/* ==========================================
   تأثير الفيدباك لأزرار الموبايل ناف السفلي
   ========================================== */
.mobile-bottom-nav .nav-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* حركة مرنة وسلسة */
    position: relative;
}

/* تأثير لحظة اللمس بالصبع (Shrink/Bounce Effect) */
.mobile-bottom-nav .nav-item:active {
    transform: scale(0.88); /* يصغر بنسبة بسيطة عند الضغط */
}

/* فيدباك خاص بزر السلة العائم عشان موقعه متسنتر في النص */
.mobile-bottom-nav .fab-cart:active {
    transform: translate(-50%, -35%) scale(0.9) !important; /* الحفاظ على السنتر مع تأثير الضغط */
}

/* شكل الأيقونة والنص لما يكون الزرار نشط (Active) */
.mobile-bottom-nav .nav-item.active {
    color: var(--primary) !important; /* هيتحول للون الأساسي للمتجر */
    font-weight: 800;
}

.mobile-bottom-nav .nav-item.active i {
    transform: translateY(-5px); /* رفع الأيقونة لأعلى سنة */
    color: var(--primary);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* ظل خفيف تحت الأيقونة المرفوعة */
}

/* أنيميشن ناعم للأيقونة عند التحول */
.mobile-bottom-nav .nav-item i {
    transition: transform 0.2s ease-in-out, color 0.2s;
}

#catBreadcrumb a:hover {
    color: var(--secondary) !important;
    text-decoration: underline !important;
}