/* ============================================
   Sintdma - Black & White SaaS Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Variables - Light Theme */
:root {
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --gray-950: #0a0a0a;
    --accent: #ffffff;
    --accent-hover: #e5e5e5;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Light theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #737373;
    --border-color: #e5e5e5;
    --border-hover: #171717;
    --navbar-bg: #ffffff;
    --navbar-text: #171717;
    --hero-bg: #ffffff;
    --hero-text: #171717;
    --hero-subtext: #525252;
    --hero-badge-bg: #f5f5f5;
    --hero-badge-text: #525252;
    --hero-badge-border: #e5e5e5;
    --footer-bg: #0a0a0a;
    --input-bg: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e5e5e5;
    --section-dark-bg: #0a0a0a;
    --section-dark-text: #ffffff;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #171717;
    --text-primary: #ffffff;
    --text-secondary: #d4d4d4;
    --text-muted: #a3a3a3;
    --border-color: #222222;
    --border-hover: #ffffff;
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
    --hero-bg: #111111;
    --hero-text: #ffffff;
    --hero-subtext: #a3a3a3;
    --hero-badge-bg: rgba(255,255,255,0.08);
    --hero-badge-text: #a3a3a3;
    --hero-badge-border: rgba(255,255,255,0.12);
    --footer-bg: #050505;
    --input-bg: #1a1a1a;
    --card-bg: #171717;
    --card-border: #222222;
    --section-dark-bg: #050505;
    --section-dark-text: #ffffff;
    --gray-50: #111111;
    --gray-100: #1a1a1a;
    --gray-200: #262626;
    --gray-300: #404040;
}

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Ensure ALL text is visible in both modes */
h1, h2, h3, h4, h5, h6, p, span, label, td, th, strong, a, li, div {
    color: inherit;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--navbar-bg);
    color: var(--navbar-text);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    transition: background 0.3s ease, color 0.3s ease;
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
}

.navbar-main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.navbar-main-nav .nav-link {
    color: var(--navbar-text);
    opacity: 0.75;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
}
.navbar-main-nav .nav-link:hover,
.navbar-main-nav .nav-link.active {
    color: var(--navbar-text);
    opacity: 1;
    background: rgba(128, 128, 128, 0.15);
}
.navbar-main-nav .nav-link i {
    font-size: 0.95rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.65rem;
    color: var(--navbar-text);
    letter-spacing: -0.03em;
}

.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--navbar-text);
    color: var(--navbar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 900;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--navbar-text);
    opacity: 0.75;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--navbar-text);
    opacity: 1;
    background: rgba(128,128,128,0.15);
}

.nav-link i { font-size: 1rem; }

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--navbar-text);
    opacity: 0.75;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.nav-icon-btn:hover { opacity: 1; background: rgba(128,128,128,0.15); }

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: var(--navbar-text);
    color: var(--navbar-bg);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: var(--radius-md);
    color: var(--navbar-text);
    cursor: pointer;
    transition: var(--transition);
}

.navbar-user:hover { background: rgba(128,128,128,0.15); }

.navbar-user .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.navbar-user .user-name { font-size: 0.875rem; font-weight: 500; }

.search-input {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    width: 220px;
    padding: 8px 12px 8px 38px;
    border-radius: 100px;
    font-size: 0.85rem;
}
.search-input::placeholder { color: var(--text-muted) !important; }
.search-form .input-icon i { color: var(--text-muted); }

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--navbar-text);
    font-size: 1.3rem;
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn i { font-size: 0.95rem; }

.btn-primary {
    background: var(--black);
    color: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero .btn-primary {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero .btn-primary:hover {
    background: var(--gray-100);
}

.hero .btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.hero .btn-outline:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.btn-primary:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.btn-secondary {
    background: var(--white);
    color: var(--black);
    border: 1.5px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.btn-outline {
    background: transparent;
    color: var(--hero-text, var(--white));
    border: 1.5px solid var(--hero-badge-border, rgba(255,255,255,0.3));
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover { background: #16a34a; transform: translateY(-1px); }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-icon { width: 42px; height: 42px; padding: 0; }
.btn-block { width: 100%; }

.btn-login {
    background: transparent;
    color: var(--navbar-text);
    border: 1.5px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--bg-secondary);
    color: var(--navbar-text);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-register {
    background: var(--navbar-text);
    color: var(--navbar-bg);
    border: 1.5px solid var(--navbar-text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-register:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    filter: drop-shadow(0 20px 60px rgba(0,0,0,0.4));
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--hero-badge-bg);
    border: 1px solid var(--hero-badge-border);
    color: var(--hero-badge-text);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-badge i { color: var(--hero-text); }

.hero h1 {
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    color: var(--hero-text);
    line-height: 1.1;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--hero-text) 0%, var(--hero-subtext) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

.hero p {
    font-size: 1.15rem;
    color: var(--hero-subtext);
    margin-bottom: 36px;
    max-width: 540px;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.hero-stat .stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--hero-text);
}

.hero-stat .stat-label {
    font-size: 0.8rem;
    color: var(--hero-subtext);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
    padding: 80px 0;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.section-dark {
    background: var(--section-dark-bg);
    color: var(--section-dark-text);
}

.section-gray {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.section-header h2 { margin-bottom: 12px; color: var(--text-primary); }

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

.section-header .section-line {
    width: 48px;
    height: 3px;
    background: var(--text-primary);
    margin: 16px auto 0;
    border-radius: 100px;
}

/* ============================================
   CATEGORY CARDS
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    color: var(--text-primary);
}

.category-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.category-card .cat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.3rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.category-card:hover .cat-icon {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.category-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.category-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

.product-card-link:hover { text-decoration: none; }

.product-card .product-image {
    position: relative;
    padding-top: 100%;
    background: var(--bg-secondary);
    overflow: hidden;
    cursor: pointer;
}

.product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--black);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--card-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 2;
}

.product-wishlist:hover { color: var(--danger); transform: scale(1.1); }
.product-wishlist.active { color: var(--danger); }

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info .product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-primary);
    cursor: pointer;
}

.product-info h3:hover { text-decoration: underline; }

.product-info .product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-price .current {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.product-price .original {
    font-size: 0.85rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.product-rating i { color: var(--warning); font-size: 0.75rem; }

.product-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 20px 20px;
}

.product-card-actions .btn-add-cart {
    flex: 1;
    padding: 10px 12px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-card-actions .btn-add-cart:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.product-card-actions .btn-buy-now {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.product-card-actions .btn-buy-now:hover {
    border-color: var(--text-primary);
    transform: translateY(-1px);
}

/* ============================================
   IMAGE ZOOM / MAGNIFIER (Amazon-style)
   ============================================ */
.zoom-container {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.zoom-container img {
    transition: none;
    transform-origin: center center;
}

.zoom-lens {
    position: absolute;
    border: 2px solid rgba(0,0,0,0.15);
    width: 120px;
    height: 120px;
    pointer-events: none;
    display: none;
    z-index: 10;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 4000px rgba(0,0,0,0.12);
    border-radius: 50%;
}

.zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 16px);
    width: 400px;
    height: 400px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-repeat: no-repeat;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-xl);
    background-color: var(--bg-primary);
}

/* Product detail thumbnails */
.product-gallery-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 1;
    position: relative;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.product-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.product-thumb:hover,
.product-thumb.active {
    border-color: var(--text-primary);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    transition: var(--transition);
    color: var(--text-primary);
}

.feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.feature-card .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--text-primary);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; color: var(--gray-500); line-height: 1.6; }

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--gray-900);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.form-control::placeholder { color: var(--gray-400); }

textarea.form-control { resize: vertical; min-height: 100px; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 6px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 6px;
}

/* Validation hints - inline feedback under fields */
.validation-hint {
    font-size: 0.78rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    line-height: 1.4;
}

/* Phone row (country code + number) */
.phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.phone-row select.country-code {
    flex: 0 0 130px;
    padding: 8px 10px;
    font-size: 0.85rem;
    cursor: pointer;
}
.validation-hint i { font-size: 0.85rem; flex-shrink: 0; }
.vd-ok {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
}
.vd-ok i { color: #16a34a; }
.vd-fail {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.25);
}
.vd-fail i { color: #dc2626; }

/* Password requirements dialog */
.password-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 10px;
}
.pd-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.pd-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pd-list li {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc2626;
    transition: color 0.2s ease;
}
.pd-list li i {
    font-size: 0.8rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}
.pd-list li.pd-ok { color: #16a34a; }
.pd-list li.pd-ok i { color: #16a34a; }
.pd-list li.pd-fail { color: #dc2626; }
.pd-list li.pd-fail i { color: #dc2626; }


.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--black);
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Input with icon */
.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
    pointer-events: none;
}

.input-icon .form-control {
    padding-left: 42px;
}

/* ============================================
   AUTH PAGES (Login / Register)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-visual {
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.auth-visual-content { position: relative; z-index: 1; text-align: center; }

.auth-visual-content .auth-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
}

.auth-visual-content h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.auth-visual-content p {
    color: var(--gray-400);
    font-size: 1rem;
    max-width: 360px;
}

.auth-form-header {
    margin-bottom: 36px;
}

.auth-form-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 32px;
}

.auth-form-header .logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 900;
}

.auth-form-header h2 { margin-bottom: 8px; }
.auth-form-header p { color: var(--gray-500); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    font-size: 0.8rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--text-primary);
    font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }

/* ============================================
   SHOP PAGE
   ============================================ */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    padding: 40px 0;
}

.shop-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.filter-list li {
    margin-bottom: 4px;
}

.filter-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--gray-600);
    transition: var(--transition);
}

.filter-list a:hover, .filter-list a.active {
    background: var(--gray-100);
    color: var(--black);
}

.filter-list .count {
    font-size: 0.75rem;
    background: var(--gray-200);
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 500;
}

.price-range {
    display: flex;
    gap: 8px;
    align-items: center;
}

.price-range input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.shop-header h1 {
    font-size: 1.5rem;
}

.shop-header .result-count {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.shop-sort select {
    padding: 8px 36px 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--white);
    cursor: pointer;
}

/* ============================================
   PRODUCT DETAIL
   ============================================ */
.product-detail {
    padding: 40px 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 96px;
}

.product-gallery .main-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-100);
    aspect-ratio: 1;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.product-detail-info .product-rating-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.product-detail-info .product-rating-detail i { color: var(--warning); }

.product-detail-info .price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.product-detail-info .price-block .current-price {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.product-detail-info .price-block .original-price {
    font-size: 1.1rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

.product-detail-info .price-block .discount-badge {
    background: var(--gray-900);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-detail-info .product-description {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 24px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    display: inline-flex;
    margin-bottom: 24px;
}

.quantity-selector button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--gray-600);
    transition: var(--transition);
}

.quantity-selector button:hover { background: var(--gray-100); color: var(--black); }

.quantity-selector input {
    width: 60px;
    height: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 1rem;
    outline: none;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.product-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.product-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.product-feature i {
    font-size: 1.2rem;
    color: var(--gray-600);
}

.product-feature span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   CART
   ============================================ */
.cart-page { padding: 40px 0; }

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.cart-items { }

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--gray-200);
    align-items: center;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-100);
}

.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-info p {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.cart-item-actions .quantity-selector { margin-bottom: 0; }

.cart-item-actions .remove-btn {
    color: var(--gray-400);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.cart-item-actions .remove-btn:hover { color: var(--danger); }

.cart-item-price {
    text-align: right;
}

.cart-item-price .item-total {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item-price .item-price {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.cart-summary {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: sticky;
    top: 96px;
}

.cart-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.cart-summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.cart-summary .coupon-input {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.cart-summary .coupon-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.cart-empty {
    text-align: center;
    padding: 80px 0;
}

.cart-empty i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 20px;
}

.cart-empty h2 { margin-bottom: 8px; }
.cart-empty p { color: var(--gray-500); margin-bottom: 24px; }

/* ============================================
   CHECKOUT
   ============================================ */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    padding: 40px 0;
    align-items: start;
}

.checkout-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.checkout-section h3 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-section h3 .step-number {
    width: 28px;
    height: 28px;
    background: var(--black);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.payment-options {
    display: grid;
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover { border-color: var(--gray-400); }

.payment-option.active {
    border-color: var(--black);
    background: var(--gray-50);
}

.payment-option input[type="radio"] { accent-color: var(--black); }

.payment-option i { font-size: 1.3rem; color: var(--gray-600); }

.payment-option .payment-label { font-weight: 600; font-size: 0.95rem; }
.payment-option .payment-desc { font-size: 0.8rem; color: var(--gray-500); }

/* ============================================
   ORDER SUCCESS
   ============================================ */
.order-success {
    text-align: center;
    padding: 80px 0;
}

.order-success .success-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-900);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
}

.order-success h1 { margin-bottom: 12px; }
.order-success p { color: var(--gray-500); margin-bottom: 8px; }

.order-success .order-number {
    display: inline-block;
    background: var(--gray-100);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
    margin: 16px 0 32px;
}

/* ============================================
   USER DASHBOARD
   ============================================ */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 40px 0;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 96px;
}

.dashboard-nav {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.dashboard-nav a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dashboard-nav a.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-left-color: var(--text-primary);
    font-weight: 600;
}

.dashboard-nav a i { width: 20px; text-align: center; }

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: var(--text-primary);
}

.dashboard-card h2 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    background: var(--black);
    color: var(--white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Orders Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}

table td {
    padding: 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-100);
}

table tr:hover td { background: var(--gray-50); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-shipped { background: #e0e7ff; color: #3730a3; }
.badge-delivered { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-failed { background: #fee2e2; color: #991b1b; }

/* ============================================
   ADMIN
   ============================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--navbar-bg);
    color: var(--navbar-text);
    padding: 24px 0;
}

.admin-sidebar .admin-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--navbar-text);
}

.admin-sidebar .admin-logo i {
    width: 40px;
    height: 40px;
    background: var(--navbar-text);
    color: var(--navbar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 900;
}

.admin-nav-group {
    margin-bottom: 24px;
}

.admin-nav-group .group-title {
    padding: 0 24px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: var(--navbar-text);
    opacity: 0.7;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.admin-nav a:hover { opacity: 1; background: rgba(128,128,128,0.15); }

.admin-nav a.active {
    color: var(--navbar-text);
    opacity: 1;
    background: rgba(128,128,128,0.2);
}

.admin-nav a i { width: 20px; text-align: center; }

.admin-main {
    background: var(--bg-secondary);
    padding: 0;
}

.admin-topbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-primary);
}

.admin-topbar h1 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Admin sidebar hamburger toggle */
.admin-sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.admin-sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.admin-sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.admin-sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}
.admin-sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Admin sidebar overlay (mobile) */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.admin-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-content { padding: 32px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--gray-950);
    color: var(--gray-400);
    padding: 60px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-400);
    padding: 6px 0;
    transition: var(--transition);
}

.footer-col a:hover { color: var(--white); }

/* Payment logos in footer */
.payment-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.payment-logo {
    width: 54px;
    height: 36px;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    filter: none;
    opacity: 1;
}
/* Default = full color, hover = grayscale + lift */
.payment-logo:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    filter: grayscale(100%);
    opacity: 0.9;
}

/* Brand color logos - VIBRANT by default */
.payment-visa { color: #1a1f71 !important; background: #ffffff; }            /* Visa navy blue */
.payment-mastercard { color: #eb001b !important; background: #ffffff; }       /* Mastercard red */
.payment-amex { color: #006fcf !important; background: #ffffff; }             /* Amex blue */
.payment-stripe { color: #635bff !important; background: #ffffff; }           /* Stripe purple */
.payment-paypal { color: #003087 !important; background: #ffffff; }           /* PayPal blue */
.payment-apple-pay { color: #000000 !important; background: #ffffff; }        /* Apple Pay black */
.payment-google-pay { color: #4285f4 !important; background: #ffffff; }       /* Google Pay blue */

/* Image drop zone (admin product images) */
.image-drop-zone {
    position: relative;
    min-height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 12px;
    text-align: center;
}
.image-drop-zone:hover,
.image-drop-zone.drag-over {
    border-color: var(--text-primary);
    background: var(--bg-card);
}
.image-drop-zone.drag-over {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.image-drop-zone img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    border-radius: 6px;
}
.payment-paypal { color: #003087; background: #ffffff; }      /* PayPal dark blue */
.payment-paypal:hover { color: #003087; background: #f0f4ff; }
.payment-apple-pay { color: #000000; background: #ffffff; }   /* Apple black */
.payment-apple-pay:hover { color: #000000; background: #f5f5f5; }
.payment-google-pay { color: #4285f4; background: #ffffff; }   /* Google blue */
.payment-google-pay:hover { color: #4285f4; background: #f0f6ff; }
.payment-local {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.payment-local-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--gray-200);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.payment-local-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.payment-local-badge i {
    font-size: 0.75rem;
    color: var(--gray-300);
}
.payment-local-badge:hover i {
    color: #fff;
}

[data-theme="light"] .payment-logo {
    background: #fff;
    border-color: var(--border-color);
    color: #1a1a1a;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--white);
    color: var(--black);
}

/* ============================================
   AI ASSISTANT
   ============================================ */
.ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.ai-fab-btn {
    width: 60px;
    height: 60px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-fab-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

.ai-chat {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 520px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    animation: slideUp 0.3s ease;
}

.ai-chat.active { display: flex; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-chat-header {
    background: var(--black);
    color: var(--white);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-header .ai-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-header .ai-avatar .ai-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-header .ai-avatar .ai-status {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.ai-chat-header .ai-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.ai-chat-header .ai-close:hover { color: var(--white); }

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.ai-message.bot { align-self: flex-start; }
.ai-message.user { align-self: flex-end; flex-direction: row-reverse; }

.ai-message .msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.ai-message.bot .msg-avatar {
    background: var(--gray-100);
    color: var(--gray-700);
}

.ai-message.user .msg-avatar {
    background: var(--black);
    color: var(--white);
}

.ai-message .msg-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.6;
}

.ai-message.bot .msg-bubble {
    background: var(--gray-100);
    color: var(--gray-800);
    border-bottom-left-radius: 4px;
}

.ai-message.user .msg-bubble {
    background: var(--black);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

/* Markdown in AI chat bubbles */
.ai-message .msg-bubble h1,
.ai-message .msg-bubble h2,
.ai-message .msg-bubble h3,
.ai-message .msg-bubble h4 {
    margin: 8px 0 4px;
    font-weight: 700;
    line-height: 1.3;
}
.ai-message .msg-bubble h1 { font-size: 1.15rem; }
.ai-message .msg-bubble h2 { font-size: 1.05rem; }
.ai-message .msg-bubble h3 { font-size: 0.95rem; }
.ai-message .msg-bubble h4 { font-size: 0.9rem; }
.ai-message .msg-bubble p { margin: 0 0 6px; line-height: 1.5; }
.ai-message .msg-bubble p:last-child { margin-bottom: 0; }
.ai-message .msg-bubble strong { font-weight: 700; }
.ai-message .msg-bubble em { font-style: italic; }
.ai-message .msg-bubble del { opacity: 0.6; }
.ai-message .msg-bubble ul,
.ai-message .msg-bubble ol {
    margin: 4px 0 6px;
    padding-left: 20px;
    line-height: 1.6;
}
.ai-message .msg-bubble li { margin: 2px 0; }
.ai-message .msg-bubble code {
    background: rgba(0,0,0,0.08);
    color: #d6336c;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85em;
}
[data-theme="dark"] .ai-message .msg-bubble code {
    background: rgba(255,255,255,0.12);
    color: #f783ac;
}
.ai-message .msg-bubble pre {
    background: #1a1a1a;
    color: #f8f8f2;
    padding: 10px 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 6px 0;
    font-size: 0.8rem;
    line-height: 1.5;
}
.ai-message .msg-bubble pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.ai-message .msg-bubble a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}
[data-theme="dark"] .ai-message .msg-bubble a {
    color: #60a5fa;
}
.ai-message .msg-bubble .md-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 0.78rem;
}
.ai-message .msg-bubble .md-table th,
.ai-message .msg-bubble .md-table td {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    text-align: left;
    line-height: 1.4;
}
.ai-message .msg-bubble .md-table th {
    background: rgba(0,0,0,0.05);
    font-weight: 700;
}
[data-theme="dark"] .ai-message .msg-bubble .md-table th {
    background: rgba(255,255,255,0.08);
}

.ai-chat-input {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 10px;
}

.ai-chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: 100px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.ai-chat-input input:focus { border-color: var(--black); }

.ai-chat-input button {
    width: 44px;
    height: 44px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1rem;
}

.ai-chat-input button:hover { background: var(--gray-800); }

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.pagination a:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.pagination .active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--navbar-text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--bg-card);
    color: var(--navbar-text);
    transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0); }

[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(0); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

[data-theme="dark"] .dashboard-card {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .cart-summary {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .stat-card .stat-value {
    color: var(--text-primary);
}

[data-theme="dark"] .stat-card .stat-label {
    color: var(--text-muted);
}

[data-theme="dark"] .footer {
    background: var(--footer-bg);
}

[data-theme="dark"] table td {
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] table tr:hover td {
    background: var(--bg-secondary);
}

[data-theme="dark"] .badge-pending { background: #422006; color: #fbbf24; }
[data-theme="dark"] .badge-processing { background: #1e3a5f; color: #60a5fa; }
[data-theme="dark"] .badge-shipped { background: #1e1b4b; color: #818cf8; }
[data-theme="dark"] .badge-delivered { background: #052e16; color: #4ade80; }
[data-theme="dark"] .badge-cancelled { background: #450a0a; color: #f87171; }
[data-theme="dark"] .badge-paid { background: #052e16; color: #4ade80; }
[data-theme="dark"] .badge-failed { background: #450a0a; color: #f87171; }

[data-theme="dark"] .pagination a, [data-theme="dark"] .pagination span {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .pagination .active {
    background: var(--white);
    color: var(--black);
}

/* Dark mode - shop sidebar */
[data-theme="dark"] .sidebar-section h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .filter-list a {
    color: var(--text-secondary);
}

[data-theme="dark"] .filter-list a:hover,
[data-theme="dark"] .filter-list a.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .shop-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .shop-header h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .shop-header .result-count {
    color: var(--text-muted);
}

[data-theme="dark"] .shop-sort select {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Dark mode - checkout */
[data-theme="dark"] .checkout-section {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .payment-option {
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .payment-option.active {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

[data-theme="dark"] .payment-option i {
    color: var(--text-secondary);
}

/* Dark mode - product detail */
[data-theme="dark"] .product-detail-info h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .product-detail-info .product-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .product-feature {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Dark mode - global text fix */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] label,
[data-theme="dark"] td, [data-theme="dark"] th, [data-theme="dark"] strong,
[data-theme="dark"] div, [data-theme="dark"] li {
    color: inherit;
}

[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .hero {
    background: var(--hero-bg);
    border-bottom-color: var(--border-color);
}

/* Dark mode - AI chat */
[data-theme="dark"] .ai-chat {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .ai-message.bot .msg-bubble {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

[data-theme="dark"] .ai-message.user .msg-bubble {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* Dark mode - product card buttons */
[data-theme="dark"] .btn-add-cart {
    background: var(--text-primary);
    color: var(--bg-primary);
}

[data-theme="dark"] .btn-buy-now {
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-buy-now:hover {
    border-color: var(--text-primary);
}

[data-theme="dark"] .flash-success { background: #052e16; color: #4ade80; border-color: #166534; }
[data-theme="dark"] .flash-error { background: #450a0a; color: #f87171; border-color: #991b1b; }
[data-theme="dark"] .flash-info { background: #1e3a5f; color: #60a5fa; border-color: #1e40af; }

/* ============================================
   AI ASSISTANT - COOL ANIMATIONS
   ============================================ */
.ai-chat {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 520px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transform-origin: bottom right;
}

.ai-chat.active {
    display: flex;
    animation: chatOpen 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ai-chat.closing {
    animation: chatClose 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes chatOpen {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(40px);
        border-radius: 50%;
    }
    50% {
        opacity: 0.8;
        transform: scale(0.9) translateY(10px);
        border-radius: var(--radius-xl);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        border-radius: var(--radius-xl);
    }
}

@keyframes chatClose {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
        border-radius: var(--radius-xl);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.7) translateY(20px);
        border-radius: 50%;
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(60px);
        border-radius: 50%;
    }
}

.ai-fab-btn {
    width: 60px;
    height: 60px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ai-fab-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-fab-btn:hover::before { opacity: 1; }

.ai-fab-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 30px rgba(0,0,0,0.4);
}

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

.ai-chat-header {
    background: var(--black);
    color: var(--white);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-header .ai-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-header .ai-avatar .ai-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}

.ai-chat-header .ai-avatar .ai-status {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.ai-chat-header .ai-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ai-chat-header .ai-close:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

.ai-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: msgSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-message.user { align-self: flex-end; flex-direction: row-reverse; }

/* ============================================
   LOADING SCREEN - Truck Animation (Uiverse.io)
   ============================================ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen .loading-text {
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 40px;
    letter-spacing: -0.02em;
}

.loading-screen .loading-sub {
    color: #737373;
    font-size: 0.9rem;
    margin-top: 8px;
}

.loader {
    width: fit-content;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
}

.truckWrapper {
    width: 200px;
    height: 100px;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
    justify-content: flex-end;
    overflow-x: hidden;
}

.truckBody {
    width: 130px;
    height: fit-content;
    margin-bottom: 6px;
    animation: truckBounce 1s linear infinite;
}

@keyframes truckBounce {
    0% { transform: translateY(0px); }
    50% { transform: translateY(3px); }
    100% { transform: translateY(0px); }
}

.truckTires {
    width: 130px;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 10px 0px 15px;
    position: absolute;
    bottom: 0;
}

.truckTires svg {
    width: 24px;
}

.road {
    width: 100%;
    height: 1.5px;
    background-color: #282828;
    position: relative;
    bottom: 0;
    align-self: flex-end;
    border-radius: 3px;
}

.road::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 100%;
    background-color: #282828;
    right: -50%;
    border-radius: 3px;
    animation: roadMove 1.4s linear infinite;
    border-left: 10px solid white;
}

.road::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 100%;
    background-color: #282828;
    right: -65%;
    border-radius: 3px;
    animation: roadMove 1.4s linear infinite;
    border-left: 4px solid white;
}

.lampPost {
    position: absolute;
    bottom: 0;
    right: -90%;
    height: 90px;
    animation: roadMove 1.4s linear infinite;
}

@keyframes roadMove {
    0% { transform: translateX(0px); }
    100% { transform: translateX(-350px); }
}

/* ============================================
   FAVORITE BUTTON (logged-in only)
   ============================================ */
.product-wishlist {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:hover .product-wishlist {
    opacity: 1;
    transform: scale(1);
}

.product-wishlist.active {
    opacity: 1;
    transform: scale(1);
    color: #ef4444 !important;
}

.product-wishlist.active i {
    color: #ef4444;
}

.product-wishlist.adding {
    animation: heartPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Desktop defaults - hide mobile elements */
.mobile-menu-item { display: none !important; }
.mobile-close { display: none !important; }
.mobile-toggle { display: none !important; }
.sidebar-header { display: none !important; }

/* Tablet - keep 2-column layout but smaller */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-inner { gap: 30px; }
    .hero-content { max-width: 100%; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-image img { max-width: 280px; }
    .hero-stats { gap: 30px; }
    .shop-layout { grid-template-columns: 220px 1fr; gap: 20px; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Show mobile elements */
    .mobile-toggle { display: flex !important; }
    .mobile-menu-item { display: flex !important; }
    .mobile-close { display: flex !important; }
    .navbar-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: 100%;
        background: #000000;
        color: #ffffff;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        padding: 24px 20px 30px;
        z-index: 10005;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .navbar-nav.active {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    /* Backdrop overlay for mobile menu */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 10001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    /* When mobile nav is open, lock body scroll */
    body.nav-open { overflow: hidden; }
    .navbar-nav .nav-link {
        font-size: 1.05rem;
        padding: 14px 20px;
        width: 100%;
        max-width: 320px;
        justify-content: flex-start;
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.06);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 1;
        transform: none;
        transition: background 0.2s ease, border-color 0.2s ease;
    }
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.14);
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.3);
    }

    /* Hide user actions on mobile */
    .navbar-user,
    .navbar-actions .nav-link[style*="Admin"],
    .navbar-actions a[href*="logout"],
    .navbar-actions a[href*="cart"],
    .navbar-actions button[title="Logout"],
    .navbar-actions .nav-icon-btn:not(.mobile-only) {
        display: none !important;
    }

    /* Close button in mobile menu */
    .mobile-close {
        width: 42px;
        height: 42px;
        min-width: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        color: #ffffff;
        font-size: 1rem;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
        flex-shrink: 0;
    }
    .mobile-close:hover {
        background: var(--danger);
        color: #ffffff;
        border-color: var(--danger);
        transform: translateX(-3px);
    }
    .mobile-close i { line-height: 1; }

    /* Sidebar header & divider */
    .sidebar-header {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 0 0 20px 0;
        width: 100%;
        max-width: 360px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        margin-bottom: 20px;
        color: #ffffff;
        font-weight: 700;
        font-size: 1.2rem;
    }
    .sidebar-header img {
        height: 32px;
        width: auto;
        border-radius: 6px;
    }
    .sidebar-divider {
        width: 100%;
        max-width: 360px;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
        margin: 12px 0;
    }
    .sidebar-logout {
        background: rgba(220, 38, 38, 0.18) !important;
        border-color: rgba(220, 38, 38, 0.4) !important;
        color: #fca5a5 !important;
    }
    .sidebar-logout:hover {
        background: rgba(220, 38, 38, 0.3) !important;
        color: #ffffff !important;
    }

    /* Hamburger animation */
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10001;
        padding: 0;
    }
    .mobile-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--navbar-text);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hide non-essential navbar items */
    .navbar-actions > *:not(.mobile-toggle):not(.theme-toggle) {
        display: none !important;
    }
    .navbar-actions .theme-toggle {
        display: flex !important;
    }
    .navbar-main-nav {
        display: none !important;
    }
    .navbar-inner {
        height: 64px;
    }
    .navbar-brand { font-size: 1.3rem; }
    .navbar-brand img { height: 36px; border-radius: 7px; }
    .navbar-brand .brand-icon { width: 36px; height: 36px; font-size: 0.95rem; }
    .search-form { display: none; }

    /* Container */
    .container { padding: 0 16px; }

    /* Hero */
    .hero { padding: 30px 0 30px; }
    .hero h1 { font-size: 2.6rem; text-align: center; }
    .hero p { font-size: 0.85rem; }
    .hero-actions { flex-direction: column; align-items: center; gap: 10px; }
    .hero-actions .btn { width: 100%; max-width: 300px; justify-content: center; }
    .hero-stats { gap: 12px; flex-wrap: wrap; justify-content: center; }
    .hero-stat .stat-value { font-size: 1.1rem; }
    .hero-stat .stat-label { font-size: 0.65rem; }
    .hero-image img { max-width: 320px; height: auto; margin-top: 16px; }
    .hero-inner { grid-template-columns: 1fr; gap: 24px; text-align: center; }

    /* Center hero text on mobile */
    .hero-content { text-align: center; align-items: center; margin: 0 auto; }
    .hero-content h1 { text-align: center; }
    .hero-content p { text-align: center; max-width: 100%; }

    /* Sections */
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 1.4rem; }
    .section-header p { font-size: 0.9rem; }

    /* Products */
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .product-info { padding: 12px; }
    .product-info h3 { font-size: 0.85rem; }
    .product-info .product-desc { font-size: 0.8rem; }
    .product-price .current { font-size: 1rem; }
    .product-price .original { font-size: 0.75rem; }
    .product-card-actions { flex-direction: column; padding: 0 12px 12px; gap: 6px; }
    .product-card-actions .btn-add-cart,
    .product-card-actions .btn-buy-now { width: 100%; font-size: 0.8rem; padding: 8px; }
    .product-rating { font-size: 0.75rem; }
    .product-meta { flex-direction: column; align-items: flex-start; gap: 4px; }

    /* Categories */
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .category-card { padding: 16px 12px; }
    .category-card .cat-icon { width: 44px; height: 44px; font-size: 1.1rem; margin-bottom: 10px; }
    .category-card h4 { font-size: 0.85rem; }

    /* Product Detail */
    .product-detail { padding: 16px 0; }
    .product-detail-grid { grid-template-columns: 1fr; gap: 24px; }
    .product-gallery { position: static; top: auto; }
    .product-detail-info h1 { font-size: 1.3rem; line-height: 1.3; }
    .product-detail-info .product-rating-detail { flex-wrap: wrap; gap: 8px; }
    .product-detail-info .price-block { flex-wrap: wrap; gap: 8px; }
    .product-detail-info .price-block .current-price { font-size: 1.6rem; }
    .product-detail-info .price-block .original-price { font-size: 1rem; }
    .product-detail-info .product-description { font-size: 0.9rem; }
    .product-gallery-main { border-radius: var(--radius-md); }
    .product-thumbnails { gap: 6px; justify-content: flex-start; }
    .product-thumb { width: 52px; height: 52px; }
    .product-features { grid-template-columns: 1fr; }
    .product-feature { padding: 12px; }
    .product-actions { flex-direction: column; gap: 10px; }
    .product-actions .btn { width: 100%; }
    .product-tabs { flex-wrap: wrap; gap: 4px; }
    .product-tabs button { font-size: 0.85rem; padding: 8px 12px; }

    /* Cart */
    .cart-layout { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 65px 1fr; gap: 10px; }
    .cart-item-image { width: 65px; height: 65px; }
    .cart-item-info h3 { font-size: 0.9rem; }
    .cart-item-info p { font-size: 0.8rem; }
    .cart-item-price { grid-column: span 2; text-align: left; }
    .cart-item-actions { flex-direction: column; gap: 8px; align-items: flex-start; }
    .quantity-selector { transform: scale(0.9); transform-origin: left; }
    .cart-summary { position: static; padding: 20px; }
    .cart-summary h3 { font-size: 1.1rem; }

    /* Checkout */
    .checkout-section { padding: 20px; }
    .payment-option { padding: 12px; }
    .payment-option .payment-label { font-size: 0.9rem; }

    /* Auth */
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { padding: 20px; }
    .auth-form-wrapper { max-width: 100%; }

    /* Dashboard */
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }
    .dashboard-card { padding: 20px; }
    .dashboard-card h2 { font-size: 1.1rem; }
    .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 1.2rem; }
    .stat-card .stat-label { font-size: 0.7rem; }

    /* Footer */
    .footer { padding: 40px 0 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

    /* AI Chat */
    .ai-chat { width: calc(100% - 16px); right: 8px; bottom: 76px; height: 380px; border-radius: var(--radius-lg); }
    .ai-fab { bottom: 12px; right: 12px; }
    .ai-fab-btn { width: 50px; height: 50px; font-size: 1.2rem; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; }
    .form-group { margin-bottom: 14px; }
    .form-control { padding: 10px 14px; font-size: 0.9rem; }

    /* Tables */
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { font-size: 0.8rem; min-width: 600px; }
    table th, table td { padding: 10px 8px; white-space: nowrap; }

    /* Popups */
    .popup-modal { padding: 20px; width: 92%; max-width: 360px; }
    .popup-title { font-size: 1.1rem; }
    .popup-icon { width: 52px; height: 52px; font-size: 1.5rem; }

    /* Features */
    .features-grid { grid-template-columns: 1fr; gap: 12px; }
    .feature-card { padding: 20px; }

    /* Notifications */
    #notifDropdown { width: calc(100vw - 32px); right: -60px; max-width: 320px; }

    /* Shop Header */
    .shop-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .shop-sort select { width: 100%; }

    /* Shop Layout - stack sidebar on top on mobile */
    .shop-layout { grid-template-columns: 1fr; gap: 20px; padding: 20px 0; }
    .shop-sidebar { position: static; top: auto; display: none; }
    .shop-sidebar.open { display: block; }
    .shop-sidebar .sidebar-section { margin-bottom: 20px; }
    .shop-products { width: 100%; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 10px !important; }
    #mobileFiltersBtn { display: block !important; }

    /* Admin panel - mobile sidebar */
    .admin-sidebar-toggle { display: flex; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 80vw;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-sidebar-overlay {
        display: block;
    }
    .admin-topbar {
        gap: 8px;
        padding: 0 12px !important;
        flex-wrap: wrap;
        height: auto !important;
        min-height: 56px;
        padding: 8px 12px !important;
    }
    .admin-topbar h1 { font-size: 0.95rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-content { padding: 16px !important; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-icon { width: 32px; height: 32px; font-size: 0.9rem; }
    .stat-card .stat-value { font-size: 1.4rem; }
    .stat-card .stat-label { font-size: 0.7rem; }
    .stat-card .stat-trend { font-size: 0.65rem; }

    /* Admin forms - mobile */
    .admin-topbar-actions { gap: 6px; }
    .admin-topbar-actions .text-sm { display: none; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .dashboard-card input.form-control,
    .dashboard-card select.form-control,
    .dashboard-card textarea.form-control { font-size: 0.9rem; }

    /* Admin tables - more compact */
    table { font-size: 0.78rem; min-width: 500px; }
    table th, table td { padding: 8px 6px; white-space: nowrap; }
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Admin toolbar buttons - wrap nicely */
    .admin-topbar input.form-control { font-size: 0.8rem; padding: 4px 8px; }

    /* Bulk action toolbar */
    [id$="Tbody"] + div { flex-wrap: wrap; gap: 4px; }

    /* Order/product edit forms - mobile */
    .modal-body { padding: 16px; }

    /* Admin tables - enable horizontal scroll on mobile */
    .dashboard-card { padding: 12px !important; }
    .dashboard-card > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
    }
    .dashboard-card > div:first-child > div:last-child {
        width: 100%;
    }
    table { font-size: 0.75rem; min-width: 500px; }
    table th, table td { padding: 8px 6px; }

    /* Admin forms */
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-control { font-size: 16px; } /* prevent iOS zoom */
    .dashboard-card h2 { font-size: 1.1rem; }
    .dashboard-card form > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .product-info { padding: 10px; }
    .product-info h3 { font-size: 0.8rem; line-height: 1.3; }
    .product-price .current { font-size: 0.9rem; }
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2.1rem; }
    .hero p { font-size: 0.8rem; }
    .hero-image img { max-width: 240px; height: auto; }
    .stat-cards { grid-template-columns: 1fr; }
    .popup-actions { flex-direction: column; }
    .popup-btn { width: 100%; }
    .footer-brand p { font-size: 0.85rem; }
    .cart-item { grid-template-columns: 55px 1fr; gap: 8px; }
    .cart-item-image { width: 55px; height: 55px; }
    .cart-item-info h3 { font-size: 0.8rem; }
    .cart-item-actions .quantity-selector { transform: scale(0.85); }
    .product-thumb { width: 44px; height: 44px; }
    .checkout-section { padding: 16px; }
    .payment-option { padding: 10px; gap: 10px; }
    .error-actions .btn { max-width: 100%; }
    .main_wrapper { transform: scale(0.6); }
    .text_404 { transform: scale(0.6); }
    .dashboard-nav a { padding: 10px 14px; font-size: 0.85rem; }
    .admin-topbar { padding: 0 16px; height: 56px; }
    .admin-topbar h1 { font-size: 1rem; }
    .admin-content { padding: 16px; }
    .btn-sm { padding: 6px 10px; font-size: 0.75rem; }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 100px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
    background: var(--text-primary);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

/* Dark mode scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-700);
    background-clip: padding-box;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
    background-clip: padding-box;
}
[data-theme="dark"] * {
    scrollbar-color: var(--gray-700) transparent;
}

/* Chat & sidebar specific - thinner scrollbar */
.ai-chat-messages::-webkit-scrollbar,
.shop-sidebar::-webkit-scrollbar,
.admin-sidebar::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.popup-modal::-webkit-scrollbar {
    width: 6px;
}
.ai-chat-messages::-webkit-scrollbar-thumb,
.shop-sidebar::-webkit-scrollbar-thumb,
.admin-sidebar::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.popup-modal::-webkit-scrollbar-thumb {
    background: var(--gray-400);
}
[data-theme="dark"] .ai-chat-messages::-webkit-scrollbar-thumb,
[data-theme="dark"] .shop-sidebar::-webkit-scrollbar-thumb,
[data-theme="dark"] .admin-sidebar::-webkit-scrollbar-thumb,
[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb,
[data-theme="dark"] .popup-modal::-webkit-scrollbar-thumb {
    background: var(--gray-600);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    padding-top: 100%;
    background: var(--bg-secondary);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-100 { width: 100%; }
.skeleton-text.h-lg { height: 20px; }

.skeleton-body { padding: 20px; }

/* Skeleton table rows */
.skeleton-table { padding: 16px; }
.skel-row {
    display: grid;
    grid-template-columns: 200px 1fr 100px 80px 100px 80px;
    gap: 16px;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color);
}
.skel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}
.skel-avatar::after,
.skel-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}
.skel-lines { display: flex; flex-direction: column; gap: 6px; }
.skel-line {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Skeleton overlay (full section loading) */
.skeleton-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    border-radius: var(--radius-md);
}
[data-theme="dark"] .skeleton-overlay { background: rgba(10,10,10,0.85); }
.skeleton-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton-text { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

/* Cart badge - red circle white text */
.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}
/* Append to style.css */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .navbar-nav,
    .navbar-nav.active,
    .admin-sidebar,
    .ai-chat,
    .skeleton,
    .skeleton::after,
    .product-card,
    .product-card-actions .btn,
    .btn,
    .nav-link {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}
