body {
    margin:0;
    font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI";
    background:#fff;
    color:#111;
}
.container {
    max-width:1200px;
    margin:auto;
    padding:0 24px;
}
a { text-decoration:none; }

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,0.07);
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    gap: 16px;
    /* ترتيب RTL (شعار - بحث - أيقونات) */
    flex-direction: row-reverse; 
}

.header-col-center { 
    flex-grow: 1; 
    max-width: 500px; 
    margin-right: 20px; 
    display: flex;
    align-items: center;
    height: 100%;
}

.header-col-left,
.header-col-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* LOGO */
.header-logo {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    unicode-bidi: embed; 
    direction: ltr; 
    word-spacing: 0; 
    letter-spacing: 0;
}
.logo-closet { 
    color: #0f766e; 
    display: inline-block;
}
.logo-na   { 
    color: #111; 
    display: inline-block; 
}

/* الحركة على "na" */
.animated-na {
    animation: slideInNa 1.0s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

@keyframes slideInNa {
    0% {
        transform: translateY(20px); 
        opacity: 0; 
    }
    70% {
        transform: translateY(-2px); 
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ------------------------------------- */
/* SEARCH – شكل احترافي */
/* ------------------------------------- */
.header-search { 
    width: 100%; 
    position: relative; 
}
.header-search input {
    width: 100%;
    height: 48px;
    padding: 0 56px 0 20px; /* مساحة للأيقونة على الشمال */
    border-radius: 999px;
    border: 1.5px solid #cfd7df;
    background: #ffffff;
    font-size: 15px;
    line-height: 1.5;
    color: #111;
    outline: none;
    transition: all 0.18s ease-in-out;
}
.header-search input::placeholder {
    color: #6b7280;
}
.header-search input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.18);
}

/* زر البحث (الأيقونة جوّه الحقل) */
.header-search button {
    position: absolute;
    right: auto; 
    left: 18px; 
    top: 50%;
    transform: translateY(-50%);
    color: #4b5563; 
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer; 
    z-index: 20; 
}

/* صندوق الاقتراحات (جاهز لو حبيت تشغّله) */
.search-suggest {
    position:absolute;
    top:52px;
    right:0;
    width:100%;
    max-height:260px;
    overflow-y:auto;
    background:#fff;
    border-radius:10px;
    box-shadow:0 8px 22px rgba(15,23,42,0.16);
    padding:6px 0;
    display:none;
    z-index:1500;
}

/* ------------------------------------- */
/* BUTTONS */
/* ------------------------------------- */
.header-btn {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
}
.header-btn-sell {
    background: #0f766e;
    color: #fff;
    padding: 8px 18px;
    font-weight: 600;
    border-radius: 6px; 
}
.header-btn-login {
    border: 1px solid #0f766e;
    color: #0f766e;
}
.header-btn-register {
    border: 1px solid #d1d5db;
}

/* ------------------------------------- */
/* ICONS */
/* ------------------------------------- */
.header-icon {
    position: relative;
    font-size: 22px; 
    color: #111; 
    cursor: pointer;
    padding: 0 4px; 
}

.header-icon .icon-emoji {
    font-size: 22px; 
    line-height: 1; 
    display: inline-block;
}

.header-icon:hover {
    opacity: 0.8;
}

.header-icon .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
}

/* ------------------------------------- */
/* USER MENU */
/* ------------------------------------- */
.user-menu { 
    position: relative; 
    cursor: pointer; 
    font-size: 14px; 
    display: flex; 
    align-items: center;
    gap: 6px;
}
.user-avatar { 
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #d1d5db; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}
.user-menu-box {
    position:absolute;
    top:110%;
    right:0;
    background:#fff;
    border:1px solid #ddd;
    border-radius:8px;
    width:190px;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
    display:none;
    z-index: 6000;
}
.user-menu-box a {
    display:block;
    padding:10px 14px;
    color:#111;
    font-size:14px;
}
.user-menu-box a:hover { background:#f3f4f6; }
.show-menu { display:block; }

/* ------------------------------------- */
/* CATEGORY BAR */
/* ------------------------------------- */
.header-bottom { border-top:1px solid #f3f4f6; }
.category-nav {
    display:flex;
    gap:20px; 
    height:44px;
    align-items:center;
}
.category-button {
    background:none;
    border:none;
    font-size: 16px; 
    font-weight: 700; 
    color:#111; 
    cursor:pointer;
    padding:6px 0; 
    border-radius:0;
    display:flex;
    align-items:center;
    gap:4px;
}
.category-button:hover {
    color:#0f766e;
    background:none;
}
.category-button .caret {
    font-size:12px;
    color: #999;
    font-weight: 500;
}

.cat-dropdown { position:relative; }

.cat-menu {
    position:absolute;
    top:38px;
    right:0;
    min-width:190px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:8px;
    padding:6px 0;
    box-shadow:0 6px 20px rgba(15,23,42,0.16);
    display:none;
    z-index:5000;
}
.cat-menu a {
    display:block;
    padding:8px 16px;
    font-size:13px;
    color:#111827;
    white-space:nowrap;
}
.cat-menu a:hover {
    background:#f3f4f6;
}

/* ------------------------------------- */
/* HELP */
/* ------------------------------------- */
.header-help {
    width:24px;
    height:24px;
    border-radius:999px;
    border:1px solid #d1d5db;
    font-size:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#6b7280;
}

/* ------------------------------------- */
/* RESPONSIVE */
/* ------------------------------------- */
@media (max-width: 768px) {
    .header-top {
        flex-direction:column;
        align-items:stretch;
        height:auto;
        padding:8px 0 12px;
    }
    .header-col-right { order: 1; }
    .header-col-center { order: 2; margin-right:0; max-width: 100%; height: auto; }
    .header-col-left   { order: 3; justify-content:space-between; padding-top: 8px;}
    .category-nav { overflow-x:auto; }
}
/* ==============================
   SITE FOOTER – FIX VISIBILITY
============================== */
.site-footer-inner {
    max-width: 1100px;
    margin: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
    overflow: visible !important;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.footer-links a {
    display: inline-block;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.95;
    white-space: nowrap;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}
/* ===== FORCE FOOTER FULL HEIGHT ===== */
.site-footer {
    height: auto !important;
    overflow: visible !important;
}

.site-footer-inner {
    height: auto !important;
    overflow: visible !important;
}

.footer-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: 100% !important;
    overflow: visible !important;
}
/* ==============================
   SITE FOOTER – FINAL FIX
============================== */
.site-footer {
    background: #0f766e;   /* لون واضح */
    color: #ffffff;
    margin-top: 60px;
    direction: rtl;
}

.site-footer a {
    color: #ffffff !important;
}
/* ============================================================
   CLOSETNA MENU FIX — أضف في آخر main.css
   ============================================================ */

/* إصلاح الـ z-index للهيدر الجديد */
.site-header {
    z-index: 900 !important;
    overflow: visible !important;
}

/* شريط الفئات الجديد */
.hdr-bottom {
    overflow: visible !important;
    position: relative;
    z-index: 901 !important;
}

.hdr-bottom-inner {
    overflow: visible !important;
}

.cat-nav {
    overflow: visible !important;
    position: relative;
}

/* الـ cat-item الجديد */
.cat-item {
    overflow: visible !important;
    position: relative !important;
}

/* الـ dropdown الجديد — نضمن ظهوره */
.cat-dropdown-menu {
    display: block !important; /* نلغي أي display:none خارجي */
    z-index: 9999 !important;
    overflow: visible !important;
}

/* ونرجع نخفيه بالطريقة الصح (opacity + pointer-events) */
.cat-dropdown-menu:not(.force-show) {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-4px) !important;
    transition: opacity 0.18s, transform 0.18s !important;
}

/* CSS Hover على الديسكتوب */
@media (hover: hover) and (pointer: fine) {
    .cat-item:hover > .cat-dropdown-menu {
        opacity: 1 !important;
        pointer-events: all !important;
        transform: translateY(0) !important;
    }
    .cat-item:hover > .cat-btn .cat-caret {
        transform: rotate(180deg) !important;
    }
}

/* JS Class للتاتش */
.cat-item.open > .cat-dropdown-menu {
    opacity: 1 !important;
    pointer-events: all !important;
    transform: translateY(0) !important;
}

/* User dropdown */
.user-dropdown {
    z-index: 9999 !important;
    overflow: visible !important;
}

/* Mobile drawer */
.mobile-drawer,
.mobile-overlay {
    z-index: 9999 !important;
}