/* ===================================================== CLALMOBILE HEADER & NAVIGATION v1.0 Mobile-First with Hamburger Menu & Drawer ===================================================== */ /* ===== HEADER BASE — Premium Glassmorphism ===== */ .site-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); background: var(--header-bg); backdrop-filter: blur(var(--header-blur, 24px)); -webkit-backdrop-filter: blur(var(--header-blur, 24px)); border-bottom: 1px solid var(--header-border); z-index: var(--z-header); transition: transform var(--duration-normal) var(--ease-out), background var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out); } @media (min-width: 1024px) { .site-header { height: var(--header-height-desktop); } } /* Hide header on scroll down, show on scroll up */ .site-header.header-hidden { transform: translateY(-100%); } .header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; padding-inline: var(--container-padding); max-width: var(--container-max); margin-inline: auto; } /* Mobile styles now in /css/mobile-premium.css */ /* ===== LOGO ===== */ .header-logo { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: var(--text-1); font-weight: 700; font-size: var(--text-lg); } .header-logo img { height: 34px; width: auto; transition: transform var(--duration-fast) var(--ease-out); } .header-logo:hover img { transform: scale(1.03); } @media (min-width: 768px) { .header-logo img { height: 42px; } } /* ===== HAMBURGER MENU BUTTON ===== */ .menu-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: calc(var(--z-overlay) + 1); } .hamburger { position: relative; width: 24px; height: 18px; } .hamburger span { display: block; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text-1); border-radius: var(--r-full); transition: all var(--duration-fast) var(--ease-out); } .hamburger span:nth-child(1) { top: 0; } .hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); } .hamburger span:nth-child(3) { bottom: 0; } /* Hamburger to X animation */ .menu-toggle.active .hamburger span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); } .menu-toggle.active .hamburger span:nth-child(2) { opacity: 0; transform: translateX(-10px); } .menu-toggle.active .hamburger span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); } /* Hide hamburger on desktop */ @media (min-width: 1024px) { .menu-toggle { display: none; } } /* ===== DESKTOP NAV ===== */ .desktop-nav { display: none; align-items: center; gap: var(--space-1); } @media (min-width: 1024px) { .desktop-nav { display: flex; } } .nav-link { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-2) var(--space-3); color: var(--text-2); text-decoration: none; font-size: var(--text-sm); font-weight: 500; border-radius: var(--r-md); transition: all var(--duration-fast) var(--ease-out); } .nav-link:hover { color: var(--text-1); background: var(--bg-3); } .nav-link.active { color: var(--accent); background: rgba(225, 29, 72, 0.1); } .nav-link svg { width: 18px; height: 18px; opacity: 0.8; } /* ===== HEADER ACTIONS (Cart, Search) ===== */ .header-actions { display: flex; align-items: center; gap: var(--space-1); } .header-action-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: none; border-radius: var(--r-md); cursor: pointer; color: var(--text-2); transition: all var(--duration-fast) var(--ease-out); position: relative; } .header-action-btn:hover { color: var(--text-1); background: var(--bg-3); } .header-action-btn svg { width: 22px; height: 22px; } /* Cart badge */ .cart-badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--accent); color: white; font-size: 11px; font-weight: 700; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; line-height: 1; } .cart-badge:empty { display: none; } /* ===== MOBILE DRAWER OVERLAY ===== */ .drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transition: all var(--duration-normal) var(--ease-out); } .drawer-overlay.open { opacity: 1; visibility: visible; } /* ===== MOBILE DRAWER ===== */ .mobile-drawer { position: fixed; top: 0; bottom: 0; width: 100%; max-width: 320px; background: var(--bg-1); z-index: var(--z-drawer); transform: translateX(100%); transition: transform var(--duration-normal) var(--ease-out); overflow-y: auto; display: flex; flex-direction: column; } /* RTL: drawer slides from right */ [dir="rtl"] .mobile-drawer { right: 0; transform: translateX(100%); } [dir="rtl"] .mobile-drawer.open { transform: translateX(0); } /* LTR: drawer slides from left */ [dir="ltr"] .mobile-drawer { left: 0; transform: translateX(-100%); } [dir="ltr"] .mobile-drawer.open { transform: translateX(0); } .mobile-drawer.open { transform: translateX(0); } /* Drawer header */ .drawer-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); border-bottom: 1px solid var(--border); min-height: var(--header-height); } .drawer-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: none; border-radius: var(--r-md); cursor: pointer; color: var(--text-2); } .drawer-close:hover { background: var(--bg-3); color: var(--text-1); } .drawer-close svg { width: 24px; height: 24px; } /* Drawer navigation */ .drawer-nav { flex: 1; padding: var(--space-4); } .drawer-nav-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); color: var(--text-2); text-decoration: none; font-size: var(--text-base); font-weight: 500; border-radius: var(--r-lg); transition: all var(--duration-fast) var(--ease-out); margin-bottom: var(--space-1); } .drawer-nav-item:hover { color: var(--text-1); background: var(--bg-3); } .drawer-nav-item.active { color: var(--accent); background: rgba(225, 29, 72, 0.1); } .drawer-nav-item svg { width: 22px; height: 22px; opacity: 0.8; } /* Drawer divider */ .drawer-divider { height: 1px; background: var(--border); margin: var(--space-4) 0; } /* Drawer footer */ .drawer-footer { padding: var(--space-4); border-top: 1px solid var(--border); } /* ===== LANGUAGE SWITCHER ===== */ .lang-switcher { display: flex; align-items: center; gap: var(--space-1); background: var(--bg-2); border-radius: var(--r-lg); padding: var(--space-1); } .lang-btn { padding: var(--space-2) var(--space-3); background: transparent; border: none; border-radius: var(--r-md); cursor: pointer; color: var(--text-2); font-size: var(--text-sm); font-weight: 500; transition: all var(--duration-fast) var(--ease-out); } .lang-btn:hover { color: var(--text-1); } .lang-btn.active { background: var(--bg-1); color: var(--text-1); box-shadow: var(--shadow-sm); } /* ===== SEARCH BAR (in header - desktop) ===== */ .header-search { display: none; position: relative; max-width: 320px; flex: 1; } @media (min-width: 768px) { .header-search { display: block; } } .header-search input { width: 100%; height: 40px; padding: 0 var(--space-4); padding-right: 44px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-full); color: var(--text-1); font-size: var(--text-sm); transition: all var(--duration-fast) var(--ease-out); } [dir="rtl"] .header-search input { padding-right: var(--space-4); padding-left: 44px; } .header-search input::placeholder { color: var(--muted-1); } .header-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1); } .header-search-icon { position: absolute; right: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--muted-1); pointer-events: none; } [dir="rtl"] .header-search-icon { right: auto; left: var(--space-3); } .header-search-icon svg { width: 18px; height: 18px; } /* ===== PREVENT BODY SCROLL WHEN DRAWER OPEN ===== */ body.drawer-open { overflow: hidden; } /* ===== HEADER SCROLLED STATE — Premium ===== */ .site-header.scrolled { background: rgba(5, 8, 14, 0.94); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.03); }