/* =================================================================
   LIQUID GLASS HEADER — ElmasHepin
================================================================= */

.oyuntag-header,
.category-nav,
#mobileSidebar,
.mega-menu-container,
.notification-panel,
.user-panel,
.category-dropdown-inner {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Main Header --- */
.oyuntag-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

/* Header içi: global `a { transition: all }` border flaşını engelle */
.oyuntag-header a,
.oyuntag-header button,
.category-nav a,
.category-nav button {
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease, color 0.2s ease !important;
}

.oyuntag-header a:focus,
.oyuntag-header button:focus,
.category-nav a:focus,
.category-nav button:focus {
    outline: none;
}

.oyuntag-header a:focus-visible,
.oyuntag-header button:focus-visible {
    outline: 2px solid rgba(var(--accent-rgb), 0.45);
    outline-offset: 2px;
}

.oyuntag-header .container {
    height: 100%;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    height: var(--header-height);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-center {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.header-main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s cubic-bezier(0.32, 0.72, 0, 1);
    white-space: nowrap;
}

.header-nav-link i {
    font-size: 1.125rem;
    opacity: 0.85;
}

.header-nav-link:hover,
.header-nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

#megaMenuBtn.active {
    color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.1);
}

html.light-theme .header-nav-link:hover,
html.light-theme .header-nav-link.active {
    background: rgba(0, 0, 0, 0.04);
}

.header-mega-wrap {
    position: relative;
}

.header-search {
    flex: 1;
    max-width: 420px;
    min-width: 180px;
}

.header-search form {
    position: relative;
    width: 100%;
}

.header-search input {
    width: 100%;
    height: 44px;
    padding: 0 1rem 0 2.75rem;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius-pill);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 400;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search input:focus {
    outline: none;
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-secondary);
}

.header-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
    pointer-events: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-actions-cluster {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.glass-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.glass-btn:hover {
    background: var(--bg-hover);
    border-color: rgba(var(--accent-rgb), 0.25);
}

.glass-btn:active {
    transform: scale(0.97);
}

.glass-btn i {
    font-size: 1.25rem;
}

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

.mobile-search-toggle {
    display: none;
}

.balance-btn {
    display: none !important;
}

.logo img {
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.logo-text span {
    color: var(--accent-color);
}

.cart-badge,
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--glass-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* User pill */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.75rem 0.375rem 0.375rem;
    background: var(--profile-surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--glass-radius-pill);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease;
    min-width: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

html.light-theme .user-btn {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.user-btn:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.user-btn:active {
    transform: scale(0.98);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    text-align: left;
    min-width: 0;
}

.user-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.user-balance {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.dropdown-arrow {
    font-size: 1.125rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border: none;
    border-radius: var(--glass-radius-pill);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), box-shadow 0.2s ease;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-login:active {
    transform: scale(0.97);
}

/* Mobile search slide-down */
.mobile-search-bar {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1), padding 0.35s ease;
    padding: 0 0;
}

.mobile-search-bar.is-open {
    display: block;
    max-height: 80px;
    padding: 0 0 12px;
}

.mobile-search-bar form {
    position: relative;
}

.mobile-search-bar input {
    width: 100%;
    height: 44px;
    padding: 0 1rem 0 2.75rem;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius-pill);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.mobile-search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* --- Category Nav --- */
.category-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    z-index: 999;
    height: var(--category-nav-height);
    background: var(--header-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.category-scroll-outer {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.category-scroll-outer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 56px;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(
        to right,
        rgba(28, 28, 28, 0) 0%,
        rgba(28, 28, 28, 0.55) 45%,
        rgba(28, 28, 28, 0.92) 100%
    );
}

html.light-theme .category-scroll-outer::after {
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.55) 45%,
        rgba(255, 255, 255, 0.92) 100%
    );
}

.category-nav .container {
    height: 100%;
    position: relative;
    overflow: visible !important;
}

.category-scroll-wrapper {
    height: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
}

.category-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.category-list {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    height: 100%;
    margin: 0;
    padding: 0 2rem 0 0;
    list-style: none;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
}

.category-list > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.category-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    height: 100%;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
    position: relative;
}

.category-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.has-dropdown:hover > .category-item::after,
.has-dropdown.is-open > .category-item::after {
    transform: scaleX(1);
}

.category-item:hover {
    color: var(--text-primary);
}

.category-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item > .ri-arrow-down-s-line {
    font-size: 0.875rem;
    opacity: 0.6;
}

/* Category dropdown — glass */
.has-dropdown {
    position: relative;
}

.category-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    max-width: 340px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.2s cubic-bezier(0.3, 1, 0.4, 1),
                transform 0.2s cubic-bezier(0.3, 1, 0.4, 1),
                visibility 0.2s;
    pointer-events: none;
    z-index: 999999;
    padding-top: 4px;
}

.category-dropdown.is-detached {
    position: fixed;
    top: auto;
    left: auto;
    z-index: 12000;
    padding-top: 0;
}

.has-dropdown.is-open .category-dropdown:not(.is-detached),
.category-dropdown.is-detached.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.category-dropdown-inner {
    background: rgba(24, 24, 24, 0.96);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 22px 50px -14px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(255, 255, 255, 0.06);
    padding: 0.45rem;
    overflow: hidden;
}

html.light-theme .category-dropdown-inner {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(17, 24, 39, 0.1);
    box-shadow: 0 22px 50px -14px rgba(16, 20, 30, 0.22),
                0 0 0 1px rgba(17, 24, 39, 0.06);
}

.dropdown-all-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.62rem 0.7rem;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.04));
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-radius: 12px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.dropdown-all-link:hover {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.08));
    border-color: rgba(var(--accent-rgb), 0.35);
    transform: translateX(2px);
}

.dropdown-all-link > i:first-child {
    font-size: 1.125rem;
}

.dropdown-all-link > span {
    flex: 1;
}

.dropdown-all-link > i:last-child {
    font-size: 1rem;
    opacity: 0.8;
}

.dropdown-sub-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sub-category-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0.6rem;
    color: var(--text-muted, #a1a1aa);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 11px;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.sub-category-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.sub-category-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-category-go {
    font-size: 0.95rem;
    opacity: 0;
    color: var(--accent-color);
    flex-shrink: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sub-category-item:hover .sub-category-go {
    opacity: 0.85;
    transform: translateX(2px);
}

html.light-theme .sub-category-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.sub-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sub-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sub-icon i {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* --- Mega Menu --- */
.mega-menu-container {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 1100px;
    max-width: calc(100vw - 30px);
    background: var(--glass-surface);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(var(--accent-rgb), 0.1);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 1001;
    overflow: hidden;
    pointer-events: none;
}

.mega-menu-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mega-menu-left {
    width: 320px;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
}

.mega-menu-header {
    padding: 1.25rem 1.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    max-height: 480px;
}

.mega-menu-item {
    border-bottom: 1px solid var(--glass-border);
}

.mega-menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mega-menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
}

.mega-menu-link i.arrow {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.mega-menu-item.active .mega-menu-link i.arrow {
    transform: rotate(90deg);
}

.mega-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.12);
    padding: 0.25rem 0;
}

.mega-menu-item.active .mega-submenu {
    display: block;
}

.mega-submenu a {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem 0.625rem 2.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: 0.2s;
}

.mega-submenu a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.view-all-cats {
    margin: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.view-all-cats:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.mega-menu-extras {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0 1rem 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 0.75rem;
}

.mega-extra-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
}

.mega-extra-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mega-extra-link i {
    color: var(--accent-color);
    font-size: 1.125rem;
}

.mega-menu-right {
    flex: 1;
    padding: 0 1.25rem 1.25rem;
    overflow-y: auto;
    max-height: 560px;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
}

.mega-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    display: block;
    background: var(--bg-secondary);
}

.mega-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    opacity: 0.9;
}

.mega-card:hover img {
    transform: scale(1.06);
    opacity: 1;
}

.mega-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem;
}

.mega-card-title {
    color: #fff !important;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
}

/* --- Notification / User panels (glass) --- */
.notification-dropdown {
    position: relative;
}

.notification-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 16, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 999;
}

.notification-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 2rem);
    background: var(--glass-surface);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
    z-index: 1000;
    pointer-events: none;
}

.notification-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.notification-header {
    padding: 1.25rem 1.375rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.mark-all-read {
    padding: 0.5rem 0.75rem;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-radius: 10px;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mark-all-read:hover {
    background: rgba(var(--accent-rgb), 0.16);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    align-items: flex-start;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notification-item.unread {
    background: rgba(var(--accent-rgb), 0.06);
}

.notif-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon i {
    font-size: 1rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.25rem;
    line-height: 1.5;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
}

.notification-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.notification-empty i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.notification-empty p {
    color: var(--text-muted);
    margin: 0;
}

.user-panel-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.14) 0%, rgba(24, 24, 26, 0.98) 100%);
    text-align: center;
}

html.light-theme .user-panel-header {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(255, 255, 255, 0.99) 100%);
}

.user-avatar-large {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.user-avatar-large-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-panel-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.user-panel-email {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.user-balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 10px;
    color: var(--accent-color);
    font-size: 0.9375rem;
    font-weight: 700;
}

.user-panel-divider {
    height: 1px;
    background: var(--glass-border);
}

.user-panel-links {
    padding: 0.75rem;
}

.panel-link-content {
    flex: 1;
    min-width: 0;
}

.user-panel-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    margin-bottom: 0.25rem;
}

.user-panel-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.panel-link-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.panel-link-icon.primary { background: rgba(var(--accent-rgb), 0.14); color: var(--accent-color); }
.panel-link-icon.success { background: rgba(155, 23, 212, 0.12); color: #9b17d4; }
.panel-link-icon.warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.panel-link-icon.info { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.panel-link-icon i { font-size: 1.25rem; }

.panel-link-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-link-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.panel-link-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.user-panel-footer {
    padding: 0.75rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 14px;
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.16);
}

.glass-btn.guest-promo-attention,
.header-icon.guest-promo-attention {
    animation: none;
}

@keyframes guestBellPulse {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 0 4px var(--accent-glow); border-color: var(--accent-color); }
}

.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: rgba(var(--accent-rgb), 0.25);
}

.theme-toggle:active {
    transform: scale(0.97);
}

.theme-toggle i {
    font-size: 1.25rem;
    transition: opacity 0.2s ease;
}

.user-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    background: var(--profile-panel-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
    z-index: 1000;
    pointer-events: none;
}

html.light-theme .user-panel {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}

.user-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- Mobile Sidebar --- */
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#sidebarOverlay.active {
    opacity: 1;
    visibility: visible;
}

#mobileSidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(380px, 92vw);
    background: var(--bg-primary);
    border-right: 1px solid var(--glass-border);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
}

#mobileSidebar.active {
    transform: translateX(0);
}

.mob-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.125rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.mob-drawer-header .mob-logo img {
    height: 2rem;
    width: auto;
}

.mob-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.375rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.mob-close:active {
    transform: scale(0.95);
}

.mob-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mob-user-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--profile-surface);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

html.light-theme .mob-user-card {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.mob-user-card:hover {
    border-color: rgba(var(--accent-rgb), 0.25);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.mob-user-card .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.mob-user-info {
    flex: 1;
    min-width: 0;
}

.mob-user-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mob-user-balance {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.mob-user-card > .ri-arrow-right-s-line {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.mob-search {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius-pill);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s;
}

.mob-search:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    background: var(--bg-hover);
}

.mob-search-lbl {
    flex: 1;
    color: var(--text-muted);
}

.mob-search .search-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    position: static;
    transform: none;
}

.mob-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.mob-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mob-quick-btn:active {
    transform: scale(0.97);
}

.mob-quick-btn i {
    font-size: 1.25rem;
    color: var(--accent-color);
}

.mob-quick-btn .cart-badge {
    position: static;
    margin-left: 0.25rem;
}

.mob-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0;
}

.mob-all-cats-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border: none;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mob-all-cats-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.mob-cat-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.mob-cat-wrapper {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--glass-surface);
    transition: border-color 0.2s ease;
}

.mob-cat-wrapper.active {
    border-color: rgba(var(--accent-rgb), 0.35);
}

.mob-cat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-primary);
}

.mob-cat-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.mob-cat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mob-cat-name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
}

.mob-cat-arrow {
    font-size: 1.125rem;
    color: var(--text-muted);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.mob-cat-wrapper.active .mob-cat-arrow {
    transform: rotate(180deg);
}

.mob-sub-list {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.25s ease,
                padding 0.35s ease;
    padding: 0 1rem;
}

.mob-cat-wrapper.active .mob-sub-list {
    max-height: 600px;
    opacity: 1;
    padding: 0 1rem 0.75rem;
}

.mob-sub-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}

.mob-sub-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.mob-sub-item img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
}

.mob-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.375rem;
    padding: 0.75rem 1.125rem;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.mf-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.625rem 0.25rem;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mf-btn i {
    font-size: 1.125rem;
}

.mf-btn:active {
    transform: scale(0.95);
}

.mf-blue i { color: #3b82f6; }
.mf-yellow i { color: #f59e0b; }
.mf-purple i { color: #8b5cf6; }
.mf-green i { color: var(--accent-color); }

/* --- Main content offset --- */
.main-content {
    margin-top: calc(var(--header-height) + var(--category-nav-height));
    min-height: calc(100vh - var(--header-height) - var(--category-nav-height));
}

/* --- Desktop only --- */
@media (min-width: 993px) {
    .header-center {
        display: flex;
    }

    .mobile-search-bar,
    .mobile-search-toggle {
        display: none !important;
    }

    .mobile-menu-btn {
        display: none !important;
    }
}

/* --- Mobile --- */
@media (max-width: 992px) {
    :root,
    html.dark-theme,
    html.light-theme {
        --header-height: 56px;
        --category-nav-height: 48px;
    }

    .oyuntag-header .container {
        padding: 0 12px;
    }

    .category-nav .container {
        padding-right: 0;
    }

    .header-wrapper {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .header-center,
    .header-main-nav,
    .header-search.desktop-only {
        display: none !important;
    }

    .header-left {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .logo {
        max-width: 100%;
    }

    .logo img {
        height: 24px;
        max-width: min(130px, 34vw);
        object-fit: contain;
    }

    .logo-text {
        font-size: 1.125rem;
        letter-spacing: -0.02em;
    }

    .header-right {
        gap: 0.375rem;
        flex-shrink: 0;
    }

    .header-actions-cluster {
        gap: 6px;
        flex-shrink: 0;
    }

    .notification-dropdown {
        display: none !important;
    }

    .mobile-search-toggle,
    .mobile-menu-btn {
        display: flex !important;
    }

    .glass-btn,
    .theme-toggle {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .glass-btn i,
    .theme-toggle i {
        font-size: 1.05rem;
    }

    .user-btn {
        width: 36px;
        height: 36px;
        padding: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--glass-surface);
        border: 1px solid var(--glass-border);
        border-radius: 11px;
        box-shadow: none;
        min-width: 0;
    }

    html.light-theme .user-btn {
        border-color: var(--glass-border);
    }

    .user-btn .user-info,
    .user-btn .dropdown-arrow {
        display: none !important;
    }

    .user-btn .user-avatar {
        width: 24px;
        height: 24px;
        border-radius: 7px;
        font-size: 0.6875rem;
        flex-shrink: 0;
    }

    .user-btn .user-avatar-img {
        border-radius: 7px;
    }

    .user-dropdown {
        display: flex;
        flex-shrink: 0;
    }

    .btn-login {
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 11px;
        justify-content: center;
    }

    .btn-login span {
        display: none;
    }

    .notification-panel,
    .user-panel {
        position: fixed !important;
        top: calc(var(--header-height) + 8px) !important;
        right: 0.75rem !important;
        left: 0.75rem !important;
        width: auto !important;
        max-width: none !important;
    }

    .mega-menu-container {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .category-nav {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }
}
