﻿/* ================================================================
   SMG — SHARED STYLES (Extracted from MASTERPLAN 1)
   Design System + Navbar + Footer + Auth Modals + Floating + Utils
   ================================================================ */

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
    /* Gold Palette */
    --gold-50:  #FFF9E6;
    --gold-100: #FFF0BF;
    --gold-200: #FFE699;
    --gold-300: #FFDA6A;
    --gold-400: #F5D442;
    --gold-500: #D4AF37;
    --gold-600: #C6A032;
    --gold-700: #B8912D;
    --gold-800: #9A7B26;
    --gold-900: #7C641F;

    --gold-bright:    #F5D442;
    --gold-warm:      #D4A843;
    --gold-deep:      #B8860B;
    --gold-primary:   #D4AF37;
    --gold-dark:      #B8912D;
    --gold-gradient:  linear-gradient(135deg, #B8912D 0%, #D4AF37 40%, #F5D442 100%);

    /* Background */
    --bg-primary:     #08080A;
    --bg-secondary:   #0D0D12;
    --bg-tertiary:    #131318;
    --bg-card:        #16161C;
    --bg-elevated:    #1A1A22;
    --bg-hover:       #1E1E28;

    /* Text */
    --text-primary:   #F5F5F7;
    --text-secondary: #A0A0B0;
    --text-muted:     #6B6B80;
    --text-inverse:   #08080A;

    /* Borders */
    --border-subtle:  rgba(255,255,255,0.06);
    --border-light:   rgba(255,255,255,0.10);
    --border-gold:    rgba(212,175,55,0.3);

    /* Status */
    --success:   #34D399;
    --warning:   #FBBF24;
    --error:     #F87171;
    --info:      #60A5FA;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;

    /* Radius */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:    0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.5);
    --shadow-xl:    0 16px 48px rgba(0,0,0,0.6);
    --shadow-gold:  0 4px 24px rgba(212,175,55,0.15);

    /* Transitions */
    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;

    /* Z-index Scale */
    --z-base:      1;
    --z-dropdown:  100;
    --z-sticky:    200;
    --z-fixed:     300;
    --z-overlay:   400;
    --z-modal:     500;
    --z-toast:     600;
    --z-tooltip:   700;

    /* Aliases — backward compat for page-specific CSS */
    --font-heading:  var(--font-display);
    --border-color:  var(--border-subtle);
    --error-color:   var(--error);
    --gold-light:    var(--gold-bright);
}

/* ── Global Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    cursor: none;
}

@media (hover: none) and (pointer: coarse) {
    body, body * { cursor: auto !important; }
}

a { color: inherit; text-decoration: none; cursor: none; }
button { cursor: none; border: none; background: none; font-family: inherit; }
@media (hover: none) and (pointer: coarse) { button, a { cursor: pointer !important; } }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* Utility: hidden */
.hidden { display: none !important; }

/* ── Custom Cursor ────────────────────────────────────────────── */
.cursor-dot {
    position: fixed; top: 0; left: 0; width: 8px; height: 8px;
    background: var(--gold-500); border-radius: 50%; pointer-events: none;
    z-index: 99999; transform: translate(-50%, -50%); opacity: 0;
    transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), background 0.3s, opacity 0.3s;
}
.cursor-ring {
    position: fixed; top: 0; left: 0; width: 40px; height: 40px;
    border: 1.5px solid rgba(212,175,55,0.4); border-radius: 50%; pointer-events: none;
    z-index: 99999; transform: translate(-50%, -50%); opacity: 0;
    transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), border-color 0.3s, opacity 0.3s;
}
body.cursor-hover .cursor-dot { width: 14px; height: 14px; background: var(--gold-400); }
body.cursor-hover .cursor-ring { width: 55px; height: 55px; border-color: rgba(212,175,55,0.7); }
body.cursor-click .cursor-dot  { width: 5px; height: 5px; }
body.cursor-click .cursor-ring { width: 28px; height: 28px; }
body.cursor-text .cursor-dot { width: 3px; height: 26px; border-radius: 2px; background: var(--gold-400); }
body.cursor-text .cursor-ring { opacity: 0; }
@media (hover: none) and (pointer: coarse) { .cursor-dot, .cursor-ring { display: none !important; } }

/* ── Focus Visible ────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
button:not(:focus-visible),
a:not(:focus-visible) {
    outline: none;
}

/* ── Touch Target Enforcement ─────────────────────────────────── */
@media (pointer: coarse) {
    button, a, input[type="checkbox"], input[type="radio"],
    .nav-link, .dropdown-item, .tab-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ── Utility Classes ──────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.text-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-padding {
    padding: var(--space-10) 0;
}

/* ── Scroll Lock (for modals) ─────────────────────────────────── */
body.scroll-locked {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0px);
}

/* ── Animation Base Classes ───────────────────────────────────── */
/* Keyframes */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@keyframes blurIn { from { opacity: 0; filter: blur(20px); } to { opacity: 1; filter: blur(0); } }

/* Scroll-reveal classes */
.anim-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.anim-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.anim-fade-down {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.anim-fade-down.visible {
    opacity: 1;
    transform: translateY(0);
}
.anim-fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.anim-fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.anim-fade-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.anim-fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.anim-fade-in {
    opacity: 0;
    transition: opacity 0.8s var(--ease-out);
}
.anim-fade-in.visible {
    opacity: 1;
}
.anim-scale-in {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.anim-scale-in.visible {
    opacity: 1;
    transform: scale(1);
}
.anim-blur-in {
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.8s var(--ease-out), filter 0.8s var(--ease-out);
}
.anim-blur-in.visible {
    opacity: 1;
    filter: blur(0);
}

/* Page entrance animation */
.page-content {
    animation: fadeInUp 0.8s var(--ease-out) both;
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* ── Reduced Motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ================================================================
   SHARED NAVBAR (Guest + Logged-in States)
   ================================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: 16px 0;
    transition: all 0.4s var(--ease-out);
    background: transparent;
    animation: fadeInDown 0.6s var(--ease-out) both;
}

.navbar.scrolled {
    background: rgba(8,8,10,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.navbar-logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.navbar-logo-text {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: var(--text-xl);
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-7);
}

.navbar-links {
    display: flex;
    gap: var(--space-6);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
    padding: var(--space-2) 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: width 0.3s var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ── Auth Buttons (Guest state) ── */
.nav-btn-login {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gold-primary);
    border: 1px solid var(--border-gold);
    background: transparent;
    transition: all 0.3s var(--ease-out);
}

.nav-btn-login:hover {
    background: rgba(212,175,55,0.08);
    border-color: var(--gold-primary);
}

.nav-btn-signup {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--gold-gradient);
    border: none;
    transition: all 0.3s var(--ease-out);
}

.nav-btn-signup:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

/* ── User Menu (Logged-in state) ── */
.nav-user-menu {
    display: none;
    align-items: center;
    gap: var(--space-4);
}

.nav-user-menu.active {
    display: flex;
}

.navbar-actions.guest .nav-user-menu { display: none; }
.navbar-actions.guest .nav-auth-buttons { display: flex; }
.navbar-actions.logged-in .nav-user-menu { display: flex; }
.navbar-actions.logged-in .nav-auth-buttons { display: none; }

/* Cart icon */
.nav-cart-btn,
.nav-wishlist-btn,
.nav-notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
    background: transparent;
    border: 1px solid transparent;
}

.nav-cart-btn:hover,
.nav-wishlist-btn:hover,
.nav-notif-btn:hover {
    color: var(--gold-primary);
    background: rgba(212,175,55,0.08);
    border-color: var(--border-gold);
}

.nav-cart-btn svg,
.nav-wishlist-btn svg,
.nav-notif-btn svg {
    width: 20px;
    height: 20px;
}

.nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    background: var(--error);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-primary);
}

.nav-badge:empty,
.nav-badge[data-count="0"] {
    display: none;
}

/* User avatar dropdown trigger */
.nav-user-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.nav-user-trigger:hover {
    border-color: var(--border-gold);
    background: var(--bg-tertiary);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--bg-primary);
}

.nav-user-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.nav-user-trigger.open .nav-user-chevron {
    transform: rotate(180deg);
}

/* User dropdown */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s var(--ease-out);
    z-index: var(--z-dropdown);
}

.nav-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}

.nav-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-dropdown-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-2) var(--space-4);
}

.nav-dropdown-item.danger {
    color: var(--error);
}

.nav-dropdown-item.danger:hover {
    background: rgba(248,113,113,0.08);
}

/* ── Hamburger (Matching index.html animation exactly) ── */
.nav-hamburger {
    display: flex;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 10;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold-500);
    border-radius: 2px;
    transition: all 0.4s var(--ease-out);
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Hide desktop links & actions (sidebar-only on sub-pages) ── */
.navbar-menu,
.navbar-actions {
    display: none !important;
}

/* ── Sidebar Overlay ── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: calc(var(--z-overlay) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Sidebar Panel ── */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    z-index: var(--z-overlay);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}

.sidebar.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
}

.sidebar-logo-text {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-size: var(--text-lg);
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.sidebar-close {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.sidebar-close span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold-500);
    border-radius: 2px;
    transition: all 0.4s var(--ease-out);
    transform-origin: center;
}

.sidebar.active .sidebar-close span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.sidebar.active .sidebar-close span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.sidebar.active .sidebar-close span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Sidebar Navigation Links */
.sidebar-nav {
    flex: 1;
    padding: var(--space-4) 0;
    display: flex;
    flex-direction: column;
}

.sidebar-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: var(--space-4) var(--space-6) var(--space-2);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    transition: all 0.25s var(--ease-out);
    position: relative;
    text-decoration: none;
    opacity: 0;
    transform: translateX(16px);
}

.sidebar-link::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    border-radius: 3px 0 0 3px;
    background: var(--gold-gradient);
    transition: transform 0.25s var(--ease-out);
}

.sidebar-link:hover {
    color: var(--gold-primary);
    background: rgba(212,175,55,0.05);
}

.sidebar-link:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar-link.active {
    color: var(--gold-primary);
    background: rgba(212,175,55,0.08);
}

.sidebar-link.active::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-link .sidebar-link-text {
    flex: 1;
}

.sidebar-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--error);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.sidebar-badge:empty,
.sidebar-badge[data-count="0"] {
    display: none;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-3) var(--space-6);
}

/* Staggered link animation */
.sidebar.active .sidebar-link {
    animation: sidebarLinkIn 0.4s var(--ease-out) both;
}
.sidebar.active .sidebar-link:nth-child(1) { animation-delay: 0.05s; }
.sidebar.active .sidebar-link:nth-child(2) { animation-delay: 0.1s; }
.sidebar.active .sidebar-link:nth-child(3) { animation-delay: 0.15s; }
.sidebar.active .sidebar-link:nth-child(4) { animation-delay: 0.2s; }
.sidebar.active .sidebar-link:nth-child(5) { animation-delay: 0.25s; }
.sidebar.active .sidebar-link:nth-child(6) { animation-delay: 0.3s; }
.sidebar.active .sidebar-link:nth-child(7) { animation-delay: 0.35s; }
.sidebar.active .sidebar-link:nth-child(8) { animation-delay: 0.4s; }

@keyframes sidebarLinkIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Sidebar Footer / Auth */
.sidebar-footer {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-5) var(--space-6);
    flex-shrink: 0;
}

/* Guest Auth */
.sidebar-auth-guest {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.sidebar-btn-login {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gold-primary);
    border: 1px solid var(--border-gold);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.sidebar-btn-login:hover {
    background: rgba(212,175,55,0.08);
    border-color: var(--gold-primary);
}

.sidebar-btn-register {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--bg-primary);
    background: var(--gold-gradient);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.sidebar-btn-register:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

/* Logged-in User */
.sidebar-auth-logged {
    display: none;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--bg-primary);
    flex-shrink: 0;
}

.sidebar-user-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-btn-logout {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--error);
    border: 1px solid rgba(248,113,113,0.2);
    background: rgba(248,113,113,0.06);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.sidebar-btn-logout:hover {
    background: rgba(248,113,113,0.12);
    border-color: rgba(248,113,113,0.3);
}

.sidebar-btn-logout svg {
    width: 16px;
    height: 16px;
}

/* ================================================================
   SHARED FOOTER
   ================================================================ */
.site-footer {
    position: relative;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    overflow: hidden;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-10) var(--space-6) var(--space-7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-8);
}

.footer-brand-text {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: var(--space-4);
}

.footer-heading {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
}

.footer-link {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
    padding: var(--space-2) 0;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-link:hover {
    color: var(--gold-primary);
    padding-left: var(--space-2);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-6) var(--space-6) 0;
    text-align: center;
}

.footer-bottom-text {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   TOAST NOTIFICATION SYSTEM (Global)
   ================================================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s var(--ease-out);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.removing {
    transform: translateX(120%);
    opacity: 0;
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-icon.success { color: var(--success); }
.toast-icon.error   { color: var(--error); }
.toast-icon.warning { color: var(--warning); }
.toast-icon.info    { color: var(--info); }

.toast-body {
    flex: 1;
}

.toast-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

.toast-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

.toast-action {
    display: inline-block;
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gold-primary);
    cursor: pointer;
    transition: color 0.2s;
}

.toast-action:hover {
    color: var(--gold-bright);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info    { border-left: 3px solid var(--info); }

@media (max-width: 480px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 70px;
    }
}

/* ================================================================
   CONFIRM DIALOG (Global)
   ================================================================ */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s var(--ease-out);
}

.confirm-overlay.active .confirm-dialog {
    transform: scale(1);
}

.confirm-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.confirm-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.confirm-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.confirm-btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all 0.3s;
}

.confirm-btn-cancel {
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    background: transparent;
}

.confirm-btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.confirm-btn-confirm {
    color: var(--bg-primary);
    background: var(--gold-gradient);
}

.confirm-btn-confirm:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

.confirm-btn-danger {
    color: #fff;
    background: var(--error);
}

.confirm-btn-danger:hover {
    box-shadow: 0 4px 16px rgba(248,113,113,0.3);
    transform: translateY(-1px);
}

/* ================================================================
   LOADING & SKELETON STATES
   ================================================================ */
.page-loading {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: var(--z-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.page-loading.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton shimmer */
.skeleton {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.04) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }
.skeleton-text.full { width: 100%; }

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
    border-radius: 6px;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

/* Button loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
}

/* ================================================================
   COMMON BUTTON STYLES
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    color: var(--bg-primary);
    background: var(--gold-gradient);
    border: none;
}

.btn-primary:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--gold-primary);
    background: transparent;
    border: 1px solid var(--border-gold);
}

.btn-secondary:hover {
    background: rgba(212,175,55,0.08);
    border-color: var(--gold-primary);
}

.btn-ghost {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.18);
}

.btn-danger {
    color: #fff;
    background: var(--error);
    border: none;
}

.btn-danger:hover {
    box-shadow: 0 4px 16px rgba(248,113,113,0.3);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 16px;
    font-size: var(--text-xs);
}

.btn-lg {
    padding: 14px 32px;
    font-size: var(--text-base);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ================================================================
   FORM ELEMENTS (Shared)
   ================================================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-label .required {
    color: var(--error);
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: all 0.3s;
}

.form-input:hover {
    border-color: var(--border-light);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(248,113,113,0.1);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--error);
    margin-top: var(--space-1);
    display: none;
}

.form-error.visible {
    display: block;
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6B80' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    padding: var(--space-2) 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-light);
    background: var(--bg-tertiary);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-input:checked {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
}

.form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid var(--bg-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-check-input[type="radio"]:checked::after {
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: var(--bg-primary);
    transform: none;
}

.form-check-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(212,175,55,0.15);
    border-color: var(--gold-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    background: var(--gold-primary);
    transform: translateX(20px);
}

/* ================================================================
   BADGE COMPONENTS
   ================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-gold {
    background: rgba(212,175,55,0.12);
    color: var(--gold-primary);
    border: 1px solid rgba(212,175,55,0.2);
}

.badge-success {
    background: rgba(52,211,153,0.12);
    color: var(--success);
    border: 1px solid rgba(52,211,153,0.2);
}

.badge-warning {
    background: rgba(251,191,36,0.12);
    color: var(--warning);
    border: 1px solid rgba(251,191,36,0.2);
}

.badge-error {
    background: rgba(248,113,113,0.12);
    color: var(--error);
    border: 1px solid rgba(248,113,113,0.2);
}

.badge-info {
    background: rgba(96,165,250,0.12);
    color: var(--info);
    border: 1px solid rgba(96,165,250,0.2);
}

.badge-muted {
    background: rgba(107,107,128,0.12);
    color: var(--text-muted);
    border: 1px solid rgba(107,107,128,0.2);
}

/* ================================================================
   BREADCRUMB
   ================================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    font-size: var(--text-sm);
}

.breadcrumb-item {
    color: var(--text-muted);
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--gold-primary);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
    pointer-events: none;
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 10px;
}

/* ================================================================
   TABS COMPONENT
   ================================================================ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
}

.tab-content {
    display: none;
    padding: var(--space-6) 0;
}

.tab-content.active {
    display: block;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-6);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-state-icon svg {
    width: 100%;
    height: 100%;
}

.empty-state-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.empty-state-text {
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto var(--space-6);
    line-height: 1.6;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-6) 0;
}

.page-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    background: transparent;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--border-gold);
    color: var(--gold-primary);
}

.page-btn.active {
    background: var(--gold-gradient);
    color: var(--bg-primary);
    border-color: transparent;
}

.page-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.page-btn svg {
    width: 16px;
    height: 16px;
}

/* ================================================================
   CARD BASE
   ================================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all 0.3s var(--ease-out);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.card-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ================================================================
   MODAL BASE
   ================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s var(--ease-out);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-subtle);
}

/* ================================================================
   MOBILE BOTTOM NAVIGATION (Marketplace pages)
   ================================================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    z-index: var(--z-fixed);
    padding: var(--space-2) 0 calc(var(--space-2) + env(safe-area-inset-bottom));
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    min-width: 56px;
}

.bottom-nav-item.active {
    color: var(--gold-primary);
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

.bottom-nav-badge {
    position: absolute;
    top: 0;
    right: 8px;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    background: var(--error);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.bottom-nav-badge:empty { display: none; }

/* bottom-nav removed — navigation moved to sidebar */

/* ================================================================
   STAR RATING COMPONENT
   ================================================================ */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .star {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.star-rating .star.filled {
    color: var(--gold-primary);
}

.star-rating .star.half {
    color: var(--gold-primary);
    position: relative;
}

/* Interactive star rating (for reviews) */
.star-input {
    display: inline-flex;
    gap: 4px;
    cursor: pointer;
}

.star-input .star-btn {
    width: 32px;
    height: 32px;
    color: var(--border-light);
    transition: all 0.2s;
}

.star-input .star-btn.active,
.star-input .star-btn:hover {
    color: var(--gold-primary);
    transform: scale(1.1);
}

/* ================================================================
   PRICE FORMAT
   ================================================================ */
.price-main {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--text-primary);
}

.price-original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.price-discount {
    color: var(--error);
    font-weight: 600;
    font-size: var(--text-sm);
}

/* ================================================================
   STATUS BADGE COLORS (Orders)
   ================================================================ */
.status-pending     { background: rgba(251,191,36,0.12); color: var(--warning); border: 1px solid rgba(251,191,36,0.2); }
.status-processing  { background: rgba(96,165,250,0.12); color: var(--info); border: 1px solid rgba(96,165,250,0.2); }
.status-shipped     { background: rgba(52,211,153,0.12); color: var(--success); border: 1px solid rgba(52,211,153,0.2); }
.status-completed   { background: rgba(107,107,128,0.12); color: var(--text-muted); border: 1px solid rgba(107,107,128,0.2); }
.status-cancelled   { background: rgba(248,113,113,0.12); color: var(--error); border: 1px solid rgba(248,113,113,0.2); }


/* ================================================================
   NOTIFICATION DROPDOWN (Navbar)
   ================================================================ */
.nav-notif-wrap {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: -60px;
    width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s var(--ease-out);
    overflow: hidden;
}

.notif-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
}

.notif-dropdown-title {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
}

.notif-mark-all {
    font-size: var(--text-xs);
    color: var(--gold-primary);
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
    background: none;
    border: none;
}

.notif-mark-all:hover { color: var(--gold-bright); }

.notif-dropdown-body {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,175,55,0.15) transparent;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background 0.2s;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-hover); }

.notif-item.unread {
    background: rgba(212,175,55,0.03);
}

.notif-item-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-msg {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
}

.notif-item-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notif-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-primary);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-empty {
    text-align: center;
    padding: var(--space-8) var(--space-6);
    color: var(--text-muted);
}

.notif-empty svg { margin: 0 auto 12px; opacity: 0.4; display: block; }
.notif-empty p { font-size: var(--text-sm); }

.notif-dropdown-footer {
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.notif-dropdown-footer a {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gold-primary);
    transition: color 0.2s;
}

.notif-dropdown-footer a:hover { color: var(--gold-bright); }

@media (max-width: 480px) {
    .notif-dropdown {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        width: auto;
    }
}


/* ================================================================
   NAVBAR SEARCH BAR (Enhanced)
   ================================================================ */
.nav-search-wrap {
    position: relative;
    display: none;
}

.navbar-actions.logged-in .nav-search-wrap {
    display: flex;
}

.nav-search-inner {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 0 var(--space-3);
    transition: all 0.3s;
    width: 200px;
}

.nav-search-inner:focus-within {
    border-color: rgba(212,175,55,0.4);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
    width: 280px;
    background: var(--bg-elevated);
}

.nav-search-inner svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.nav-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
    padding: 8px;
    font-family: var(--font-body);
}

.nav-search-input::placeholder { color: var(--text-muted); }

.nav-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    border: none;
}

.nav-search-clear:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-search-clear svg { width: 12px; height: 12px; }

/* Search Dropdown */
.nav-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-dropdown);
    max-height: 420px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s var(--ease-out);
    scrollbar-width: thin;
    scrollbar-color: rgba(212,175,55,0.15) transparent;
}

.nav-search-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dd-section {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.search-dd-section:last-child { border-bottom: none; }

.search-dd-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-1) var(--space-4) var(--space-2);
}

.search-dd-clear-all {
    font-size: 10px;
    font-weight: 600;
    color: var(--error);
    cursor: pointer;
    text-transform: uppercase;
    background: none;
    border: none;
}

.search-dd-clear-all:hover { text-decoration: underline; }

.search-dd-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.search-dd-item:hover { background: var(--bg-hover); }

.search-dd-product {
    padding: var(--space-3) var(--space-4);
}

.search-dd-thumb {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.search-dd-info { flex: 1; min-width: 0; }

.search-dd-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dd-price {
    font-size: var(--text-xs);
    color: var(--gold-primary);
    font-weight: 600;
}

.search-dd-remove {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
    background: none;
    border: none;
}

.search-dd-remove:hover { background: var(--bg-hover); color: var(--error); }

.search-dd-empty {
    text-align: center;
    padding: var(--space-6);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.search-dd-history svg,
.search-dd-popular svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .nav-search-wrap { display: none !important; }
}


/* ================================================================
   PRODUCT COMPARE — Floating Tray + Modal
   ================================================================ */
.compare-tray {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(212,175,55,0.08);
    padding: var(--space-3) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
}

.compare-tray.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.compare-tray-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.compare-tray-count {
    font-weight: 700;
    color: var(--gold-primary);
}

.compare-tray-thumbs {
    display: flex;
    gap: var(--space-2);
}

.compare-tray-item {
    position: relative;
}

.compare-tray-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--bg-primary);
}

.compare-tray-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--error);
    color: #fff;
    font-size: 10px;
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.compare-tray-actions {
    display: flex;
    gap: var(--space-2);
}

/* Compare Modal */
.compare-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: var(--space-4);
}

.compare-overlay.active {
    opacity: 1;
    visibility: visible;
}

.compare-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow: auto;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s var(--ease-out);
}

.compare-overlay.active .compare-modal {
    transform: translateY(0) scale(1);
}

.compare-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.compare-modal-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.compare-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
    background: none;
    border: none;
}

.compare-modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.compare-modal-close svg { width: 20px; height: 20px; }

.compare-modal-body {
    padding: var(--space-6);
    overflow-x: auto;
}

/* Compare Table */
.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: var(--space-4);
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-sm);
}

.compare-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    min-width: 200px;
}

.compare-table th:first-child {
    min-width: 120px;
    text-align: left;
}

.compare-table td:first-child {
    text-align: left;
}

.compare-spec-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.compare-product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.compare-product-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-primary);
    font-size: var(--text-sm);
}

.compare-product-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.compare-remove-btn {
    font-size: var(--text-xs);
    color: var(--error);
    cursor: pointer;
    transition: opacity 0.2s;
    background: none;
    border: none;
}

.compare-remove-btn:hover { opacity: 0.7; }

@media (max-width: 768px) {
    .compare-tray { bottom: 72px; padding: var(--space-2) var(--space-4); }
    .compare-modal { max-width: 100%; border-radius: var(--radius-lg); }
}


/* ================================================================
   BACK TO TOP BUTTON
   ================================================================ */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: var(--z-sticky);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s var(--ease-out);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gold-gradient);
    color: var(--bg-primary);
    border-color: transparent;
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .back-to-top { bottom: 72px; right: 12px; }
}


/* ================================================================
   SKIP TO CONTENT (A11Y)
   ================================================================ */
.skip-to-content {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    padding: 12px 24px;
    background: var(--gold-gradient);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: var(--text-sm);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: top 0.3s;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}
