/* ===================================================
   HEADER STYLES — مكتبة الفقراء
   =================================================== */

.layout-header {
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* ===== Top Bar ===== */
.top-bar {
    background: linear-gradient(135deg, var(--color-text-dark), var(--color-primary));
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.82rem;
    padding: 8px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.top-bar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    position: absolute;
    width: 100%;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: var(--color-secondary);
}

.top-bar .top-bar-logout {
    color: #ff8a8a;
}

.top-bar .top-bar-logout:hover {
    color: #ff5555;
}

.top-bar i {
    margin-left: 4px;
}

/* ===== Main Navbar ===== */
.main-navbar {
    background: rgba(250, 250, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1001;
    transition: var(--transition-base);
}

.main-navbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: none;
    z-index: 1001;
}

.navbar-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-logo img {
    height: 65px;
    width: auto;
}

.navbar-logo .logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

/* Search Bar */
.navbar-search {
    flex: 1;
    max-width: 520px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-base);
}

.search-input-wrapper:focus-within {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(72, 202, 228, 0.15);
    background: #fff;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 0.92rem;
    color: #2c3e50;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: #adb5bd;
}

.search-btn {
    background:  var(--color-secondary);
    border: none;
    color: #fff;
    padding: 10px 18px;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 0.95rem;
}

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

/* Search Autocomplete Dropdown */
.search-results-header {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 320px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    z-index: var(--z-overlay);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 6px;
}

/* Loading spinner */
.search-loading {
    padding: 20px;
    text-align: center;
    color: var(--color-text-grey);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--color-primary);
    border-radius: var(--radius-circle);
    animation: searchSpin 0.6s linear infinite;
}

@keyframes searchSpin {
    to { transform: rotate(360deg); }
}

/* Result items */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f0f4f8;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f0f4ff;
    text-decoration: none;
    color: inherit;
}

.search-result-item img {
    width: 45px;
    height: 62px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-author,
.search-result-publisher {
    font-size: 0.78rem;
    color: var(--color-text-grey);
}

.search-result-author i,
.search-result-publisher i {
    font-size: 0.7rem;
    margin-left: 3px;
    width: 14px;
    text-align: center;
}

.search-result-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 2px;
}

/* Highlight matching text */
.search-result-item mark {
    background: rgba(72, 202, 228, 0.25);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

/* View all link */
.search-view-all {
    display: block;
    text-align: center;
    padding: 12px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border-top: 1px solid #f0f4f8;
    transition: background 0.2s;
}

.search-view-all:hover {
    background: #f0f4ff;
    color: var(--color-primary);
    text-decoration: none;
}

.search-view-all i {
    margin-left: 6px;
}

/* No results */
.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--color-text-grey);
    font-size: 0.9rem;
}

.search-no-results i {
    margin-left: 6px;
    color: #adb5bd;
}

/* Recent searches section */
.search-section-header {
    padding: 10px 16px 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-section-header i {
    margin-left: 4px;
    font-size: 0.72rem;
}

.search-recent-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.2s;
}

.search-recent-item:hover {
    background: #f0f4ff;
    color: var(--color-primary);
    text-decoration: none;
}

.search-recent-item i {
    color: #adb5bd;
    font-size: 0.75rem;
    width: 16px;
    text-align: center;
}

/* Mobile search results */
.search-results-mobile {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-radius: 10px;
    margin-top: 4px;
}

/* Legacy list-group support */
.search-results-header .list-group-item {
    border: none;
    border-bottom: 1px solid var(--color-border-light);
    padding: 10px 16px;
    transition: background 0.2s;
}

.search-results-header .list-group-item:hover {
    background-color: #f0f4ff;
}

@media (max-width: 768px) {
    .search-results-header {
        min-width: unset;
        border-radius: 10px;
        max-height: 300px;
    }

    .search-result-item {
        padding: 8px 12px;
        gap: 10px;
    }

    .search-result-item img {
        width: 38px;
        height: 52px;
    }

    .search-result-title {
        font-size: 0.82rem;
    }

    .search-result-author,
    .search-result-publisher {
        font-size: 0.72rem;
    }
}

/* Navbar Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.navbar-actions {
    margin-right: auto;
}

.nav-action-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f5f7fa;
    color: var(--color-primary);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1.1rem;
}

.nav-action-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

.action-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: var(--color-danger-alt);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-circle);
    line-height: 1;
}

.wishlist-badge {
    background: var(--color-danger-alt);
}

.cart-badge {
    background: var(--color-secondary);
}

/* Account Dropdown */
.nav-account-dropdown {
    position: relative;
}

.account-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 280px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
    padding: 16px;
    z-index: 1060;
    animation: dropdownFadeIn 0.25s ease;
}

.account-dropdown-menu.show {
    display: block;
}

.dropdown-user-info {
    text-align: center;
    padding-bottom: 12px;
}

.dropdown-user-info strong {
    display: block;
    color: #2c3e50;
    font-size: 1rem;
}

.dropdown-user-info small {
    color: #7f8c8d;
    font-size: 0.82rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: 10px 0;
}

.dropdown-track-order label {
    font-size: 0.82rem;
    color: #7f8c8d;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.track-input-group {
    display: flex;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    overflow: hidden;
}

.track-input-group input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
}

.track-input-group button {
    background: var(--color-secondary);
    border: none;
    color: #fff;
    padding: 8px 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.track-input-group button:hover {
    opacity: 0.8;
}

.account-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.account-dropdown-menu a:hover {
    background: #f0f4ff;
    color: var(--color-primary);
}

.account-dropdown-menu a i {
    width: 18px;
    text-align: center;
    color: var(--color-primary);
    font-size: 0.85rem;
}

.dropdown-logout {
    color: var(--color-danger-alt) !important;
}

.dropdown-logout i {
    color: var(--color-danger-alt) !important;
}

.dropdown-logout:hover {
    background: #fde8e8 !important;
}

.dropdown-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px !important;
    background:  var(--color-secondary) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 600;
    text-align: center;
}

.dropdown-login-btn:hover {
    opacity: 0.9;
    color: var(--color-secondary) !important;
    background: #f0f3f7 !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== Navigation Links Bar ===== */
.nav-links-bar {
    background: var(--color-primary);
    position: relative;
    z-index: var(--z-navbar);
    transition: var(--transition-base);
}

.nav-links-bar.sticky {
    
    top: 69px;
    left: 0;
    right: 0;
    box-shadow: var(--shadow-md);
    z-index: var(--z-navbar);
}

.nav-links-inner {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Categories Button */
.nav-categories-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    white-space: nowrap;
}

.nav-categories-btn:hover,
.nav-categories-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.chevron-icon {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-categories-btn.active .chevron-icon {
    transform: rotate(180deg);
}

/* Categories Mega Menu */
.nav-categories-dropdown {
    position: relative;
}

.categories-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 650px;
    background: #fff;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    padding: 25px;
    z-index: var(--z-overlay);
    animation: dropdownFadeIn 0.25s ease;
}

.categories-mega-menu.show {
    display: block;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.mega-menu-title {
    display: block;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-bottom: 10px;
    text-decoration: none;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-secondary);
}

.mega-menu-title:hover {
    color: var(--color-secondary);
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-list li a {
    display: block;
    padding: 5px 0;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s, padding-right 0.2s;
}

.mega-menu-list li a:hover {
    color: var(--color-primary);
    padding-right: 5px;
}

.mega-menu-all {
    display: flex;
    align-items: flex-end;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    background: #f0f4ff;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.view-all-link:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Nav Links List */
.nav-links-list {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav-links-list li a {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-links-list li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width 0.3s ease;
}

.nav-links-list li a:hover::after {
    width: 100%;
}

/* ===== Mobile Menu ===== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-slide-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 2001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
}

.mobile-slide-menu.open {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.mobile-menu-header img {
    height: 35px;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #7f8c8d;
    cursor: pointer;
    padding: 5px;
}

.mobile-search {
    display: flex;
    margin: 16px 20px;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}

.mobile-search input {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
}

.mobile-search button {
    background: var(--color-primary);
    border: none;
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
}

.mobile-nav {
    padding: 10px 0;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.mobile-nav a:hover {
    background: #f0f4ff;
    color: var(--color-primary);
}

.mobile-nav a i {
    width: 20px;
    text-align: center;
    color: var(--color-primary);
}

/* ===== Animations ===== */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .top-bar {
        display: none;
    }

    .navbar-logo .logo-text {
        display: none;
    }

    .navbar-search {
        max-width: 300px;
    }

    .nav-links-bar {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Hide navbar action buttons on mobile — they live in the slide menu now */
    .mobile-hide-action {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .navbar-actions {
        gap: 4px;
    }

    .nav-action-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    /* Keep search bar inline between logo and hamburger */
    .navbar-inner {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .navbar-logo {
        order: 1;
    }

    .navbar-search {
        order: 2;
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .navbar-actions {
        order: 3;
    }

    .search-input {
        padding: 9px 12px;
        font-size: 0.88rem;
    }

    .search-btn {
        padding: 11px 16px;
        font-size: 1rem;
    }

    /* Search dropdown should never overflow viewport */
    .search-results-header {
        min-width: 0;
        max-width: 100vw;
    }

    /* Notification dropdown — fit screen */
    .notif-dropdown-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        width: auto;
        max-width: 100vw;
    }

    /* Account dropdown — fit screen */
    .account-dropdown-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        width: auto;
        min-width: unset;
    }
}

@media (max-width: 576px) {
    .nav-action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        border-radius: var(--radius-sm);
    }

    .navbar-actions {
        gap: 3px;
    }

    .navbar-logo img {
        height: 36px;
    }

    .main-navbar {
        padding: 6px 0;
    }

    .action-badge {
        min-width: 16px;
        height: 16px;
        font-size: 0.6rem;
        top: -3px;
        left: -3px;
    }
}

@media (max-width: 400px) {
    .nav-action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .navbar-logo img {
        height: 32px;
    }

    .navbar-inner {
        gap: 8px 6px;
    }
}

.letters-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-above);
    overflow: hidden;
}

.letter {
    position: absolute;
    color: rgba(255, 255, 255, 0.4);
    font-size: 30px;
    animation: fallDown linear infinite;
    font-family: 'Amiri', serif;
    z-index: var(--z-above);
}

.search-container {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 20px;
    position: relative;
    z-index: 3;
}

@keyframes fallDown {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.8; }
    100% { transform: translateY(400px) rotate(360deg); opacity: 0; }
}

/* Cart toast */
.layout-header #cartSuccessToast {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: var(--z-overlay);
    background: linear-gradient(135deg, #03045E, var(--color-secondary));
    color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.3);
    border: none;
}

.layout-header .toast-header {
    background: linear-gradient(135deg, #03045E, var(--color-secondary));
    color: white;
    border-radius: 10px 10px 0 0;
    border: none;
}

/* ===== Unified Page Hero ===== */
.page-hero {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/images/pattern.webp');
    opacity: 0.08;
    pointer-events: none;
}
.page-hero .hero-content {
    position: relative;
    z-index: var(--z-above);
}
.page-hero .hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.page-hero .hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 1rem;
}
.page-hero .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
    font-size: .875rem;
}
.page-hero .breadcrumb-item a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: color .2s;
}
.page-hero .breadcrumb-item a:hover { color: #fff; }
.page-hero .breadcrumb-item.active { color: #fff; }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.page-hero--accent {
    background: linear-gradient(135deg, var(--color-warning-alt) 0%, #e67e22 50%, var(--color-primary) 100%);
}
@media (max-width: 768px) {
    .page-hero { padding: 2rem 0 1.5rem; }
    .page-hero .hero-title { font-size: 1.6rem; }
}

/* ===== Notification Bell & Dropdown ===== */
.nav-notif-dropdown {
    position: relative;
}

.notif-badge {
    background: var(--color-danger-alt);
}

.notif-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 320px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(44,75,121,.16);
    border: 1px solid #e8edf5;
    z-index: var(--z-toast);
    overflow: hidden;
}

.notif-dropdown-menu.show {
    display: block;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e8edf5;
    font-weight: 700;
    color: var(--color-text-dark);
    font-size: .95rem;
}

.notif-mark-all {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .78rem;
    color: var(--color-primary);
    padding: 0;
}

.notif-mark-all:hover { text-decoration: underline; }

.notif-list {
    max-height: 360px;
    overflow-y: auto;
}

.notif-empty {
    text-align: center;
    padding: 28px 16px;
    color: #aaa;
    font-size: .9rem;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f4f8;
    cursor: pointer;
    transition: background .15s;
}

.notif-item:hover { background: #f8faff; }

.notif-item.unread {
    background: #f0f6ff;
    border-right: 3px solid var(--color-primary);
}

.notif-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: .85rem; color: var(--color-text-dark); margin-bottom: 2px; }
.notif-text  { font-size: .8rem; color: var(--color-text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time  { font-size: .72rem; color: #aaa; margin-top: 3px; }

/* ===== Follow Button ===== */
.follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all .25s ease;
    border: 2px solid #fff;
    background: rgba(255,255,255,.15);
    color: #fff;
    backdrop-filter: blur(4px);
}

.follow-btn:hover {
    background: #fff;
    color: var(--color-primary);
}

.follow-btn.following {
    background: #fff;
    color: var(--color-primary);
}

.follow-btn.following:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

/* ===== Mobile Slide Menu Sections ===== */
.mobile-menu-account {
    background: var(--gradient-primary);
    padding: 20px;
    color: #fff;
}

.mobile-account-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-account-info strong {
    display: block;
    font-size: 1rem;
}

.mobile-account-info small {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

.mobile-avatar {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-circle);
    background: rgba(255,255,255,0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.mobile-account-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mobile-account-actions a,
.mobile-account-actions button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.mobile-account-actions a:hover,
.mobile-account-actions button:hover {
    background: rgba(255,255,255,0.3);
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #fff;
    color: var(--color-primary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s;
}

.mobile-login-btn:hover {
    background: #f0f4ff;
    color: var(--color-primary);
}

/* Quick Links */
.mobile-menu-quicklinks {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-light, #f0f0f0);
}

.mobile-menu-quicklinks a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.mobile-menu-quicklinks a:hover {
    background: #f0f4ff;
    color: var(--color-primary);
}

.mobile-menu-quicklinks a i {
    width: 20px;
    text-align: center;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.mobile-ql-badge {
    margin-inline-start: auto;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-circle);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.wishlist-ql-badge {
    background: var(--color-danger-alt);
}

.cart-ql-badge {
    background: var(--color-secondary);
}

/* Track Order inside quick links */
.mobile-track-order {
    padding: 8px 24px 12px;
}

.mobile-track-order label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted, #7f8c8d);
    margin-bottom: 8px;
}

.mobile-track-order label i {
    width: 20px;
    text-align: center;
    color: var(--color-primary);
}

/* Contact Info */
.mobile-menu-contact {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border-light, #f0f0f0);
}

.mobile-menu-contact a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--color-text-muted, #7f8c8d);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.mobile-menu-contact a:hover {
    color: var(--color-primary);
}

.mobile-menu-contact a i {
    width: 18px;
    text-align: center;
    color: var(--color-primary);
    font-size: 0.85rem;
}

/* ===== Mobile Bottom Tab Bar ===== */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 991px) {
    .mobile-bottom-bar {
        display: flex;
        align-items: center;
        justify-content: space-around;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
        z-index: 1050;
        border-top: 1px solid rgba(44, 75, 121, 0.08);
        padding: 0 8px;
    }

    /* ---- Tab Item ---- */
    .bottom-bar-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        position: relative;
        padding: 6px 0;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.2s ease;
    }

    .bottom-bar-item:active {
        transform: scale(0.92);
    }

    /* ---- Icon Container ---- */
    .bottom-bar-icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 32px;
        border-radius: 16px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .bottom-bar-icon i {
        font-size: 1.15rem;
        color: #8b95a5;
        transition: color 0.3s ease, transform 0.3s ease;
    }

    /* ---- Label ---- */
    .bottom-bar-label {
        font-size: 0.68rem;
        font-weight: 600;
        color: #8b95a5;
        letter-spacing: 0.01em;
        transition: color 0.3s ease;
    }

    /* ---- Hover State ---- */
    .bottom-bar-item:hover .bottom-bar-icon i,
    .bottom-bar-item:hover .bottom-bar-label {
        color: var(--color-primary);
    }

    /* ---- Active State — pill highlight behind icon ---- */
    .bottom-bar-item.active .bottom-bar-icon {
        background: linear-gradient(135deg, rgba(44, 75, 121, 0.12), rgba(72, 202, 228, 0.15));
    }

    .bottom-bar-item.active .bottom-bar-icon i {
        color: var(--color-primary);
        transform: scale(1.08);
    }

    .bottom-bar-item.active .bottom-bar-label {
        color: var(--color-primary);
    }

    /* ---- Badge ---- */
    .bottom-bar-badge {
        position: absolute;
        top: -2px;
        right: 2px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 10px;
        font-size: 0.62rem;
        font-weight: 700;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        border: 2px solid #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    }

    .wishlist-bottom-badge {
        background: var(--color-danger-alt);
    }

    .cart-bottom-badge {
        background: var(--color-secondary);
    }

    /* Push page content above the bottom bar */
    body {
        padding-bottom: 68px;
    }

    /* Ensure slide menu content clears the bottom bar */
    .mobile-slide-menu {
        padding-bottom: 74px;
    }
}
