/*
 * ╔══════════════════════════════════════════════════════╗
 * ║         Modern Manara Medical EST. - layout.css      ║
 * ║                                                      ║
 * ║  المحتوى:                                           ║
 * ║  1. TOPBAR       — الشريط العلوي                    ║
 * ║  2. NAVBAR       — شريط التنقل الرئيسي             ║
 * ║  3. NAV CATS     — تصنيفات النافبار + القائمة       ║
 * ║  4. TRUST STRIP  — شريط الثقة                       ║
 * ║  5. SECTIONS     — هيكل الأقسام العام               ║
 * ║  6. FOOTER       — الذيل                            ║
 * ║  7. FLASH        — رسائل التنبيه                    ║
 * ║  8. MOBILE MENU  — القائمة على الموبايل             ║
 * ║  9. RESPONSIVE   — Breakpoints العامة               ║
 * ╚══════════════════════════════════════════════════════╝
 */

/* ==================== 1. TOPBAR ==================== */
.topbar {
    background: var(--navy);
    color: rgba(255,255,255,0.85);
    font-size: var(--text-sm);
    padding: 8px 0;
    letter-spacing: 0.02em;
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.topbar-left  { display: flex; gap: 20px; align-items: center; }
.topbar-right { display: flex; gap: 16px; align-items: center; }
.topbar a     { color: rgba(255,255,255,0.85); text-decoration: none; transition: color 0.2s; }
.topbar a:hover { color: var(--teal); }
.topbar i     { margin-right: 5px; color: var(--teal); font-size: var(--text-xs); }
.lang-switch  { display: flex; gap: 6px; align-items: center; }
.lang-btn {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: var(--font-main);
}
.lang-btn.active         { background: var(--teal); color: var(--white); }
.lang-btn:not(.active)   { color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.2); }


/* ==================== 2. NAVBAR ==================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

/* الشعار */
.logo           { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.logo-icon      { width: 44px; height: 44px; background: var(--teal-pale); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: var(--text-xl); }
.logo-text      { line-height: 1.2; }
.logo-name      { font-family: var(--font-display); font-size: var(--text-lg); color: var(--navy); font-weight: 700; }
.logo-sub       { font-size: var(--text-xs); color: var(--teal); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

/* حقل البحث */
.nav-search { flex: 1; max-width: 480px; position: relative; }
.nav-search input {
    width: 100%;
    padding: 10px 44px 10px 18px;
    border: 1.5px solid var(--gray-200);
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: var(--text-md);
    color: var(--gray-800);
    background: var(--gray-50);
    transition: all 0.2s;
    outline: none;
}
.nav-search input:focus {
    border-color: var(--teal);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(91,191,181,0.12);
}
.nav-search button {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--navy); cursor: pointer; font-size: var(--text-base);
}

/* أزرار التنقل */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px;
    text-decoration: none; font-size: var(--text-md); font-weight: 500;
    font-family: var(--font-main);
    transition: all 0.2s; white-space: nowrap;
}
.nav-btn-ghost         { color: var(--navy); }
.nav-btn-ghost:hover   { background: var(--gray-100); }
.nav-btn-primary       { background: var(--navy); color: var(--white); }
.nav-btn-primary:hover { background: var(--navy-dark); }

/* زر السلة */
.cart-btn {
    position: relative; width: 40px; height: 40px;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: var(--navy); text-decoration: none; transition: background 0.2s;
}
.cart-btn:hover { background: var(--gray-100); }
.cart-badge {
    position: absolute; top: 4px; right: 4px;
    width: 16px; height: 16px;
    background: var(--teal); color: white;
    border-radius: 50%; font-size: var(--text-xs); font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* زر الهامبرغر */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border-radius: 8px; transition: background 0.2s; }
.hamburger:hover { background: var(--gray-100); }
.hamburger span  { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: all 0.3s; }


/* ==================== 3. NAV CATEGORIES ==================== */
.nav-categories { background: var(--navy); border-top: 1px solid rgba(255,255,255,0.08); }
.cat-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 4px;
    overflow: visible;
    scrollbar-width: none;
}
.cat-inner::-webkit-scrollbar { display: none; }
.cat-link {
    display: flex; align-items: center; gap: 7px;
    padding: 11px 16px; color: rgba(255,255,255,0.95);
    text-decoration: none; font-size: var(--text-md); font-weight: 500;
    font-family: var(--font-main);
    white-space: nowrap; border-bottom: 2px solid transparent; transition: all 0.2s;
}
.cat-link:hover, .cat-link.active { color: var(--teal); border-bottom-color: var(--teal); }
.cat-link i { font-size: var(--text-sm); }

/* القائمة المنسدلة للتصنيفات */
.cat-dropdown-wrap { position: relative; display: flex; align-items: center; }
.cat-dropdown-wrap:hover .cat-dropdown { display: block; }
.cat-dropdown {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: white;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 220px;
    z-index: 9999;
    padding: 8px 0;
}
.cat-dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    font-size: var(--text-md);
    font-family: var(--font-main);
    color: var(--navy);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    white-space: nowrap;
}
.cat-dropdown-item:hover { background: var(--teal-pale); color: var(--teal); }
.cat-dropdown-item i     { color: var(--teal); font-size: var(--text-sm); }


/* ==================== 4. TRUST STRIP ==================== */
.trust-strip { background: var(--teal-pale); border-bottom: 1px solid rgba(91,191,181,0.15); }
.trust-inner {
    max-width: 1280px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.trust-item   { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--navy); font-weight: 500; }
.trust-item i { color: var(--teal); font-size: var(--text-base); }


/* ==================== 5. SECTIONS ==================== */
.section       { padding: 64px 24px; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; gap: 16px; flex-wrap: wrap; }
.section-eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.section-title   { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy); font-weight: 700; line-height: 1.2; }
.view-all        { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); text-decoration: none; font-size: var(--text-md); font-weight: 600; white-space: nowrap; transition: gap 0.2s; }
.view-all:hover  { gap: 10px; }


/* ==================== 6. FOOTER ==================== */
.footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 60px 24px 0; }
.footer-inner {
    max-width: 1280px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px; padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo      { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-icon { width: 36px; height: 36px; background: rgba(91,191,181,0.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: var(--text-lg); color: var(--teal); }
.footer-logo-name { font-family: var(--font-display); font-size: var(--text-md); color: var(--white); font-weight: 700; }
.footer-desc      { font-size: var(--text-sm); line-height: 1.7; margin-bottom: 20px; }
.social-links     { display: flex; gap: 10px; }
.social-link      { width: 34px; height: 34px; background: rgba(255,255,255,0.06); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); text-decoration: none; font-size: var(--text-md); transition: all 0.2s; }
.social-link:hover { background: var(--teal); color: var(--white); }
.footer-col h4    { font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); margin-bottom: 16px; font-family: var(--font-main); }
.footer-links     { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a   { color: rgba(255,255,255,0.6); text-decoration: none; font-size: var(--text-sm); transition: color 0.2s; display: flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom    { max-width: 1280px; margin: 0 auto; padding: 20px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p  { font-size: var(--text-sm); }
.footer-bottom-links     { display: flex; gap: 20px; }
.footer-bottom-links a   { color: rgba(255,255,255,0.5); text-decoration: none; font-size: var(--text-sm); transition: color 0.2s; }
.footer-bottom-links a:hover { color: var(--teal); }


/* ==================== 7. FLASH MESSAGES ==================== */
.flash-messages { position: fixed; top: 90px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.flash {
    padding: 12px 20px; border-radius: 10px;
    font-size: var(--text-md); font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
    display: flex; align-items: center; gap: 10px;
    min-width: 280px; font-family: var(--font-main);
}
.flash-success { background: var(--color-success-bg);  color: var(--color-success-main);  border: 1px solid var(--color-success-border); }
.flash-danger  { background: var(--color-error-bg);    color: var(--color-error-dark);     border: 1px solid var(--color-error-border);   }
.flash-warning { background: var(--color-warning-bg);  color: var(--color-warning-main);   border: 1px solid var(--color-warning-border);  }
.flash-info    { background: var(--teal-pale);          color: var(--navy);                 border: 1px solid var(--teal);                  }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }


/* ==================== 8. MOBILE MENU ==================== */
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.mobile-menu.open { display: block; }
.mobile-menu-panel {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: min(320px, 85vw); background: var(--white);
    overflow-y: auto; transform: translateX(-100%); transition: transform 0.3s ease;
}
.mobile-menu.open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-header { background: var(--navy); padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.mobile-menu-header .logo-name { color: var(--white); }
.mobile-close     { background: none; border: none; color: var(--white); font-size: var(--text-lg); cursor: pointer; }
.mobile-menu-body { padding: 20px; }
.mobile-nav-link  { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--gray-100); text-decoration: none; color: var(--navy); font-size: var(--text-base); font-weight: 500; font-family: var(--font-main); }
.mobile-nav-link i { color: var(--teal); width: 20px; text-align: center; }


/* ==================== 9. RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .topbar-left  { display: none; }
    .nav-search   { display: none; }
    .nav-btn-ghost { display: none; }
    .hamburger    { display: flex; }
    .nav-categories { display: none; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .section { padding: 48px 16px; }
    .trust-inner { gap: 20px; }
    .trust-item span { display: none; }
}
@media (max-width: 480px) {
    .trust-item span { display: none; }
}
