/* ================= GLOBAL ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #f4f6f9;   /* ✅ page bg stays light */
    overflow-x: hidden;
}

/* ================= HEADER (FIXED) ================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: #1f2a44;
    color: #fff;
}

/* ================= HEADER ROW ================= */
.header-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
}

/* Logo + hamburger */
.left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger {
    font-size: 24px;
    cursor: pointer;
}

.logo {
    font-size: 22px;
    font-weight: bold;
}

/* ================= SEARCH ================= */
.search-bar {
    flex: 1;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 25px;
    border: none;
    outline: none;
}

/* ================= RIGHT NAV ================= */
.right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.right nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 10px;
    font-weight: 600;
}

.welcome {
    color: #ffd814;
    font-weight: 600;
}

.logout-btn {
    background: #ffd814;
    padding: 6px 14px;
    border-radius: 6px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

.login-btn {
    background: #28a745;
    padding: 6px 14px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
}

/* =================================================
   CATEGORY NAV (GUREZ / AMAZON STYLE)
================================================= */
.category-nav {
    background: #232f3e;
    padding: 8px 30px;
}

.category-menu {
    display: flex;
    justify-content: center;
    gap: 28px;
    list-style: none;
}

.category-item {
    position: relative;
}

.category-item > a {
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 0;
    display: inline-block;
}

/* underline on hover */
.category-item > a:hover {
    border-bottom: 2px solid #ffd814;
}

/* ================= LIMIT CATEGORY COUNT ================= */

/* Show only first 12 categories */
.category-item:nth-child(n+13) {
    display: none;
}

/* ================= SUB CATEGORY DROPDOWN ================= */
.subcategory-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    border-radius: 6px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.25);
    display: none;
    z-index: 9999;
}

.subcategory-dropdown li {
    list-style: none;
}

.subcategory-dropdown a {
    display: block;
    padding: 10px 14px;
    color: #232f3e;
    font-weight: 500;
    text-decoration: none;
}

.subcategory-dropdown a:hover {
    background: #f4f6f9;
}

.category-item:hover > .subcategory-dropdown {
    display: block;
}

/* 🔥 INVISIBLE HOVER BRIDGE (FIXES GAP) */
.category-item::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

/* ================= MAIN CONTENT ================= */
.main-content {
    padding: 30px;
    margin-top: 150px;  /* ✅ adjusted for category nav */
    margin-bottom: 70px;
    background: #f4f6f9; /* ✅ prevent blue bg bug */
}

/* ================= FOOTER ================= */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1f2a44;
    color: #fff;
    text-align: center;
    padding: 15px;
    z-index: 10000;
}

/* ================= SIDEBAR ================= */
.sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 260px;
    height: 100%;
    background: linear-gradient(180deg, #1f2a44, #182238);
    color: #fff;
    padding: 20px 15px;
    transition: 0.3s ease;
    z-index: 10001;
    box-shadow: 4px 0 15px rgba(0,0,0,0.25);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.25s, transform 0.2s;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(4px);
}

.sidebar-menu .icon {
    font-size: 18px;
}

.sidebar-menu .divider {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 12px 0;
}

.sidebar-menu a.logout {
    background: rgba(255,0,0,0.15);
}

.sidebar-menu a.logout:hover {
    background: rgba(255,0,0,0.3);
}

.sidebar.open {
    left: 0;
}


/* ================= OVERLAY ================= */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 10000;
}

/* ================= WISHLIST TOAST ================= */
.wishlist-toast {
    position: fixed;
    left: 50%;
    bottom: 80px;              /* 👈 ABOVE FOOTER */
    transform: translateX(-50%) translateY(20px);

    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 12px 22px;
    border-radius: 30px;

    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;  

    opacity: 0;
    pointer-events: none;

    z-index: 99999;            /* 🔥 ABOVE EVERYTHING */
    transition: all 0.35s ease;
}

/* SHOW STATE */
.wishlist-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
