/* 
 * إستايلات هيدر الديسك توب المخصص
 * يتم تحميلها فقط على شاشات الديسك توب
 */

.janalight-desktop-header {
    display: none;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1000;
    font-family: inherit;
}

@media (min-width: 992px) {
    .janalight-desktop-header {
        display: block;
    }
    
    /* إخفاء هيدر وودمارت الافتراضي على الديسك توب */
    .whb-header { display: none !important; }
}

.jdh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* شريط الإشعارات العلوي */
.jdh-top-bar {
    background-color: #f8f8f8;
    color: #666;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.jdh-top-bar a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    margin-right: 15px;
}

.jdh-top-bar a:hover {
    color: var(--wd-primary-color, #f4b000);
}

/* القسم الأوسط (اللوجو، البحث، الأيقونات) */
.jdh-main-header {
    padding: 15px 0;
    background-color: var(--jdh-bg, #fee000); /* Noon style */
    transition: background-color 0.3s ease;
}

.jdh-main-header .jdh-container {
    gap: 30px;
}

/* اللوجو وموقع التوصيل */
.jdh-logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.jdh-logo img {
    max-height: 40px;
    width: auto;
}

.jdh-delivery-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--jdh-text, #1a1a1a);
    padding-right: 20px;
    border-right: 1px solid rgba(0,0,0,0.1); /* RTL border */
    white-space: nowrap;
}

.jdh-dl-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.jdh-dl-label {
    font-size: 11px;
    opacity: 0.8;
}

.jdh-dl-city {
    font-size: 14px;
    font-weight: 800;
}

/* البحث */
.jdh-search-box {
    flex: 1 1 auto;
    max-width: 900px; /* تم توسيع مربع البحث */
    position: relative;
    margin: 0 20px;
}

.jdh-search-form {
    display: flex;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, border 0.3s ease;
    border: 1px solid transparent;
}
.jdh-search-form:focus-within {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.05);
}

.jdh-search-input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    outline: none;
    box-shadow: none;
    background: transparent;
}

.jdh-search-btn {
    background-color: var(--jdh-search-bg, #000);
    color: var(--jdh-search-text, #fff);
    border: none;
    padding: 0 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    font-weight: bold;
}

.jdh-search-btn:hover {
    opacity: 0.85;
}

/* الأيقونات (الحساب، السلة) */
.jdh-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.jdh-action-divider {
    width: 1px;
    height: 30px;
    background-color: rgba(0,0,0,0.1);
}

.jdh-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--jdh-text, #333);
    font-weight: 700;
    font-size: 11px;
    transition: transform 0.2s ease, opacity 0.3s ease;
    gap: 4px;
}

.jdh-action-item:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.jdh-action-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jdh-cart-count {
    position: absolute;
    top: -8px;
    right: -8px; /* Depending on RTL or LTR */
    background-color: #333;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* القسم السفلي (القائمة) */
.jdh-bottom-nav {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* قائمة جميع الأقسام */
.jdh-departments-menu {
    position: relative;
    cursor: pointer;
}

.jdh-dept-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    font-weight: bold;
    color: #333;
    border-left: 1px solid #eee;
}

/* القائمة الرئيسية */
.jdh-main-menu {
    flex: 1;
    margin-right: 20px;
}

.jdh-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.jdh-nav-list li a {
    color: #444;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 15px 0;
    display: block;
    position: relative;
    transition: color 0.3s;
}

.jdh-nav-list li a:hover {
    color: var(--wd-primary-color, #f4b000);
}

/* RTL Adjustments */
body.rtl .jdh-action-icon {
    margin-left: 0;
    margin-right: 0;
}
body.rtl .jdh-main-menu {
    margin-right: 20px;
    margin-left: 0;
}
body.rtl .jdh-dept-title {
    border-left: 1px solid #eee;
    border-right: none;
}

/* =========================================
   Delivery Location Modal Styles
   ========================================= */
.jdh-modal-overlay {
    display: none; /* مخفي افتراضياً، وسيتم فتحه عبر JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.jdh-modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: jdhModalPop 0.3s ease-out;
}

@keyframes jdhModalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.jdh-modal-header {
    background-color: #f8f8f8;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.jdh-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.jdh-modal-close {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.jdh-modal-close:hover {
    color: #333;
}

.jdh-modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.jdh-city-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jdh-city-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 6px;
    margin-bottom: 5px;
}

.jdh-city-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.jdh-city-list li:hover {
    background-color: #f5f5f5;
    color: #000;
}
