/* MotionFlow-inspired dark marketplace UI */
:root {
    --bg-dark: #0d0d0f;
    --bg-card: #16161a;
    --bg-elevated: #1c1c21;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Outfit', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
    flex-wrap: wrap;
}
.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.logo-img {
    display: block;
    max-height: 51px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.nav-main {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}
.nav-main > a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}
.nav-main > a:hover { color: var(--text); }
.nav-item-dropdown {
    position: relative;
}
.nav-dropdown-trigger {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font);
    font-size: inherit;
    cursor: pointer;
}
.nav-dropdown-trigger:hover { color: var(--text); }
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 180px;
    padding: 8px 0;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 50;
}
.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown.is-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-dropdown a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}
.nav-dropdown a:first-child {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 4px;
    padding-bottom: 10px;
}
.header-actions { display: flex; gap: 12px; align-items: center; }
.header-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}
.header-cart-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.header-cart-icon { display: flex; align-items: center; justify-content: center; }
.header-cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: background .2s, color .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }

/* Hero */
.hero {
    padding: 64px 24px 48px;
    text-align: center;
    position: relative;
    background:
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(99,102,241,0.2) 0%, rgba(99,102,241,0.06) 45%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 90%, rgba(139,92,246,0.12) 0%, transparent 55%),
        linear-gradient(180deg, var(--bg-dark) 0%, rgba(22,22,28,0.97) 100%);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,0.04) 50%, transparent 100%);
    pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); margin: 0 0 8px; }
.hero-desc { color: var(--text-muted); margin: 0 0 32px; }
.search-form {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
    font-family: var(--font);
}
.search-category {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    min-width: 160px;
}

/* Categories */
.categories-section { padding: 48px 24px; }
.section-title { font-size: 1.5rem; margin: 0 0 8px; }
.section-desc { color: var(--text-muted); margin: 0 0 24px; }
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.category-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 24px 24px 20px;
    padding-left: 28px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}
.category-card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), rgba(99,102,241,0.5));
    border-radius: var(--radius) 0 0 var(--radius);
}
.category-card:hover .category-card-accent { background: var(--accent); }
.category-card-name {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
}
.category-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.category-card-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 4px;
}
.category-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 28px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
}
.category-nav-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.category-nav-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.category-nav-item:hover { color: var(--accent); background: rgba(99,102,241,0.12); }
.category-nav-item.is-current {
    color: var(--accent);
    font-weight: 600;
    background: rgba(99,102,241,0.12);
    cursor: default;
}

/* Product grid */
.products-section {
    padding: 48px 24px;
    position: relative;
    background:
        radial-gradient(ellipse 100% 80% at 50% 0%, rgba(99,102,241,0.2) 0%, rgba(99,102,241,0.06) 45%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 10%, rgba(139,92,246,0.12) 0%, transparent 55%),
        linear-gradient(0deg, var(--bg-dark) 0%, rgba(22,22,28,0.97) 100%);
}
.products-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,0.04) 50%, transparent 100%);
    pointer-events: none;
}
.products-section .container { position: relative; z-index: 1; }
.product-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.tab {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.tab:hover, .tab.active { color: var(--accent); }
.tab.active { background: rgba(99,102,241,0.15); }
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color .2s, transform .2s;
}
.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}
.product-thumb {
    aspect-ratio: 16/10;
    background: var(--bg-elevated);
    overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(99,102,241,0.1) 100%);
}
.product-info { padding: 16px; }
.product-category { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.product-name { font-size: 1rem; margin: 0 0 8px; font-weight: 600; }
.product-price { font-weight: 600; color: var(--accent); }
.product-price-old {
    text-decoration: line-through;
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 8px;
}
.product-price-sale { font-weight: 700; color: var(--accent); }

.product-detail-related { margin-top: 56px; padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.08); max-width: 1100px; margin-left: auto; margin-right: auto; }
.product-detail-related-title { margin: 0 0 24px; font-size: 1.35rem; font-weight: 700; }
.product-detail-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 768px) { .product-detail-related-grid { grid-template-columns: 1fr; } }

.section-actions { margin-top: 24px; text-align: center; }

/* Main content */
.main-content { flex: 1; }

/* Footer */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 56px 24px 0;
    margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px 64px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 640px) {
    .footer-top { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
}
.footer-brand { max-width: 280px; }
.footer-logo-link { display: inline-block; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; }
.footer-logo-link:hover { color: var(--accent); }
.footer-logo-img {
    display: block;
    max-height: 80px;
    width: auto;
    max-width: 211px;
    object-fit: contain;
    margin-bottom: 8px;
}
.footer-tagline { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.footer-nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-section { min-width: 120px; }
.footer-heading {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 16px;
}
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section li { margin-bottom: 10px; }
.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.footer-section a:hover { color: var(--text); }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 0 32px;
}
@media (max-width: 640px) {
    .footer-bottom { flex-direction: column; align-items: flex-start; padding-bottom: 28px; }
}
.footer-bottom-left { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 8px; }
.footer-copy { color: var(--text-muted); font-size: 0.875rem; margin: 0; }
.footer-links { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-dot { color: rgba(255,255,255,0.2); user-select: none; }
.footer-payments {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}
.footer-payments-label { font-size: 0.8rem; color: var(--text-muted); }
.footer-stripe-badge { display: inline-flex; align-items: center; text-decoration: none; }
.footer-stripe-text { font-weight: 600; font-size: 0.9rem; color: var(--text-muted); }
.footer-stripe-badge:hover .footer-stripe-text { color: var(--text); }

/* Product detail page */
.product-detail {
    width: 100%;
    min-height: calc(100vh - 80px);
    position: relative;
    background:
        radial-gradient(ellipse 100% 80% at 50% 0%, rgba(99,102,241,0.2) 0%, rgba(99,102,241,0.06) 45%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 10%, rgba(139,92,246,0.12) 0%, transparent 55%),
        linear-gradient(0deg, var(--bg-dark) 0%, rgba(22,22,28,0.97) 100%);
}
.product-detail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,0.04) 50%, transparent 100%);
    pointer-events: none;
}
.product-detail-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}
.product-detail-breadcrumb {
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.product-detail-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}
.product-detail-breadcrumb a:hover { color: var(--text); }
.product-detail-breadcrumb-sep { margin: 0 8px; opacity: 0.6; }
.product-detail-breadcrumb-current { color: var(--text); font-weight: 500; }

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}
@media (max-width: 768px) {
    .product-detail-grid { grid-template-columns: 1fr; gap: 32px; }
    .product-gallery { position: static; }
}

.product-gallery {
    position: static;
}
@media (min-width: 769px) {
    .product-gallery {
        position: sticky;
        top: 88px;
    }
}
.product-gallery-main {
    aspect-ratio: 4/3;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.product-lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    font: inherit;
    position: relative;
}
.product-gallery-main .product-lightbox-trigger { border-radius: inherit; }
.product-gallery-main .product-lightbox-trigger:hover img { transform: scale(1.02); }
.product-gallery-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.product-gallery-main .product-lightbox-trigger:hover .product-gallery-zoom-hint { opacity: 1; }
.product-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.product-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.product-gallery-thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
    cursor: zoom-in;
    flex-shrink: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.product-gallery-thumb:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.product-lightbox[hidden] { display: none; }
.product-lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9); cursor: pointer; }
.product-lightbox-content { position: relative; z-index: 1; max-width: 95vw; max-height: 95vh; display: flex; align-items: center; justify-content: center; }
.product-lightbox-img { max-width: 100%; max-height: 95vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,0.5); }
.product-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 2;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}
.product-lightbox-close:hover { background: rgba(255,255,255,0.22); }
.product-lightbox-prev,
.product-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}
.product-lightbox-prev { left: 16px; }
.product-lightbox-next { right: 16px; }
.product-lightbox-prev:hover,
.product-lightbox-next:hover { background: rgba(255,255,255,0.22); }
.product-lightbox-single .product-lightbox-prev,
.product-lightbox-single .product-lightbox-next { display: none; }

.product-meta { min-width: 0; }
.product-meta-category {
    display: inline-block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.product-meta-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 20px;
    color: var(--text);
}
@media (max-width: 768px) { .product-meta-title { font-size: 1.6rem; } }

.product-meta-price-block {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 28px;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}
.product-meta-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}
.product-meta-price-block .product-price-old {
    font-size: 1.25rem;
    font-weight: 600;
}
.product-meta-price-block .product-price-sale.product-meta-price {
    font-size: 1.75rem;
}
.add-to-cart-form { margin: 0; flex: 1; min-width: 160px; }
.btn-add-to-cart { width: 100%; padding: 14px 24px; font-size: 1rem; }

.product-meta-section { margin-bottom: 28px; }
.bundle-product-list { list-style: none; padding: 0; margin: 0 0 12px; }
.bundle-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bundle-product-item:last-child { border-bottom: none; }
.bundle-product-thumb { flex-shrink: 0; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--bg-elevated); display: block; }
.bundle-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bundle-product-thumb-placeholder { background: var(--bg-elevated); }
.bundle-product-name { flex: 1; min-width: 0; font-weight: 500; color: var(--text); }
.bundle-product-name:hover { color: var(--accent); }
.bundle-product-price { font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.bundle-includes-note { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.product-meta-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 10px;
}
.product-info-list {
    margin: 0;
    display: grid;
    gap: 6px 16px;
    grid-template-columns: auto 1fr;
    font-size: 0.95rem;
}
.product-info-list dt {
    color: var(--text-muted);
    font-weight: 500;
}
.product-info-list dd {
    margin: 0;
    color: var(--text);
}
.product-description, .product-details {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

/* Rich HTML in product description/details */
.product-content-html p { margin: 0 0 1em; }
.product-content-html p:last-child { margin-bottom: 0; }
.product-content-html h2 {
    margin: 1.25em 0 0.5em;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}
.product-content-html h2:first-child { margin-top: 0; }
.product-content-html h3, .product-content-html h4 {
    margin: 1em 0 0.4em;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}
.product-content-html ul, .product-content-html ol {
    margin: 0.75em 0;
    padding-left: 1.5em;
}
.product-content-html li { margin-bottom: 0.35em; }
.product-content-html a {
    color: var(--accent);
    text-decoration: none;
}
.product-content-html a:hover { text-decoration: underline; }
.product-content-html strong { font-weight: 700; color: var(--text); }
.product-content-html em { font-style: italic; }
.product-content-html br { display: block; content: ''; margin-top: 0.5em; }

.product-current-version {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.product-version-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.product-version-date { font-size: 0.9rem; color: var(--text-muted); }
.product-changelog {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 0;
    border: 1px solid rgba(255,255,255,0.06);
}
.product-changelog-title { margin: 0 0 18px; font-size: 1.05rem; font-weight: 700; }
.product-changelog-list { list-style: none; margin: 0; padding: 0; }
.product-changelog-item { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.product-changelog-item:last-of-type { border-bottom: none; }
.product-changelog-version { font-weight: 700; margin-right: 10px; }
.product-changelog-date { font-size: 0.875rem; color: var(--text-muted); }
.product-changelog-text { margin: 8px 0 0; font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }
.product-updates-note { margin: 16px 0 0; font-size: 0.9rem; color: var(--text-muted); }

/* Custom order request page */
.custom-order-page { padding: 40px 24px 64px; max-width: 720px; margin: 0 auto; }
.custom-order-header { margin-bottom: 32px; }
.custom-order-title { margin: 0 0 8px; font-size: 1.75rem; font-weight: 700; }
.custom-order-desc { margin: 0; color: var(--text-muted); font-size: 1rem; line-height: 1.5; }
.custom-order-form .alert { margin-bottom: 24px; }
.custom-order-success { padding: 20px; }
.custom-order-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.06);
}
.custom-order-card-account { border-color: rgba(99,102,241,0.25); }
.custom-order-card-title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; }
.custom-order-hint { margin: 0 0 16px; font-size: 0.9rem; color: var(--text-muted); }
.custom-order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.custom-order-grid .form-group:last-child { margin-bottom: 0; }
.custom-order-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.custom-order-account-toggle { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.custom-order-account-tab { padding: 10px 16px; font-size: 0.95rem; font-weight: 500; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); cursor: pointer; font-family: inherit; margin-bottom: -1px; }
.custom-order-account-tab:hover { color: var(--text); }
.custom-order-account-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.custom-order-account-block { margin-top: 0; }
.custom-order-login-form .custom-order-grid { margin-bottom: 12px; }
.custom-order-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.custom-order-form .form-group { margin-bottom: 16px; }
.custom-order-form .form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.custom-order-form input[type="text"], .custom-order-form input[type="email"], .custom-order-form select, .custom-order-form textarea {
    width: 100%; padding: 10px 14px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.12);
    background: var(--bg-dark); color: var(--text); font-size: 1rem;
}
.custom-order-form textarea { min-height: 100px; resize: vertical; }
.form-hint { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--text-muted); }

/* Checkout page */
.checkout-page { padding: 40px 24px 64px; max-width: 920px; margin: 0 auto; }
.checkout-page-title { margin: 0 0 32px; font-size: 1.75rem; font-weight: 700; }

.checkout-stepper { margin-bottom: 40px; }
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    flex-wrap: wrap;
}
.checkout-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}
.checkout-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid rgba(255,255,255,0.1);
    color: inherit;
    font-weight: 700;
    font-size: 0.9rem;
}
.checkout-step-active { color: var(--text); }
.checkout-step-active .checkout-step-num {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.checkout-step-done .checkout-step-num {
    background: rgba(34,197,94,0.2);
    border-color: var(--success);
    color: var(--success);
}
.checkout-step-connector {
    width: 32px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    margin: 0 4px;
    list-style: none;
}
.checkout-alert { margin-bottom: 24px; }

.checkout-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.06);
}
.checkout-card-heading { margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; }
.checkout-card-desc { margin: 0 0 24px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.checkout-logged-in p { margin: 0 0 16px; color: var(--text-muted); }
.checkout-sections { display: grid; gap: 28px; }
.checkout-section-title { margin: 0 0 16px; font-size: 1rem; font-weight: 600; }
.checkout-section-desc { margin: 0 0 16px; color: var(--text-muted); font-size: 0.9rem; }
.checkout-domain-fields {
    margin-bottom: 24px;
    padding: 18px 20px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.08);
}
.checkout-domain-fields .form-group { margin-bottom: 16px; }
.checkout-domain-fields .form-group:last-child { margin-bottom: 0; }
.checkout-domain-fields input[type="text"] {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    background: var(--bg-dark);
    color: var(--text);
    font-size: 1rem;
}
.checkout-domain-fields input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}
.checkout-section-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 8px 0;
}
.checkout-form .form-group:last-of-type { margin-bottom: 20px; }
.checkout-form .btn { margin-top: 4px; }

.checkout-account-toggle { max-width: 400px; }
.checkout-account-block { margin-bottom: 24px; }
.checkout-forgot-link { font-size: 0.9rem; color: var(--text-muted); display: inline-block; margin-top: 4px; }
.checkout-forgot-link:hover { color: var(--accent); }
.checkout-switch-desc { margin: 1rem 0 0; color: var(--text-muted); font-size: 0.95rem; }
.checkout-switch-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: inherit; text-decoration: underline; padding: 0; }
.checkout-switch-btn:hover { color: var(--accent-hover, var(--accent)); }

.checkout-modal {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.checkout-modal[hidden] {
    display: none !important;
}
.checkout-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6);
}
.checkout-modal-box {
    position: relative; background: var(--bg-card); border-radius: var(--radius); padding: 28px; max-width: 400px; width: 100%; border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.checkout-modal-title { margin: 0 0 12px; font-size: 1.25rem; font-weight: 700; }
.checkout-modal-desc { margin: 0 0 20px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.checkout-modal-message { margin: 12px 0 0; font-size: 0.9rem; }
.checkout-modal-message-success { color: var(--success, #22c55e); }
.checkout-modal-message-error { color: var(--danger, #ef4444); }
.checkout-modal-cooldown { display: inline-block; margin-left: 12px; font-size: 0.9rem; color: var(--text-muted); }
.checkout-modal-close {
    position: absolute; top: 12px; right: 12px; background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 4px;
}
.checkout-modal-close:hover { color: var(--text); }

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 768px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-sidebar { order: -1; }
}
.checkout-main { min-width: 0; }
.checkout-submit-btn { width: 100%; padding: 14px; font-size: 1rem; margin-top: 8px; }
.checkout-payment-label { display: block; margin-bottom: 12px; font-weight: 500; color: var(--text-muted); font-size: 0.9rem; }
.checkout-free-desc { margin: 0 0 20px; color: var(--text-muted); font-size: 1rem; line-height: 1.5; }

.checkout-sidebar { position: sticky; top: 88px; }
.checkout-order-summary {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.06);
}
.checkout-order-summary-title { margin: 0 0 20px; font-size: 1rem; font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.checkout-order-list { list-style: none; margin: 0; padding: 0; }
.checkout-order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.checkout-order-item:last-of-type { border-bottom: none; }
.checkout-order-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-elevated);
    display: block;
}
.checkout-order-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkout-order-thumb-placeholder { background: var(--bg-elevated); }
.checkout-order-name { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 500; }
.checkout-order-price { font-size: 0.95rem; font-weight: 600; color: var(--accent); }
.checkout-order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
}
.checkout-order-total strong { font-size: 1.35rem; color: var(--accent); }

/* Cart page */
.cart-page { padding: 48px 24px 64px; max-width: 720px; margin: 0 auto; }
.cart-page-title { margin: 0 0 28px; font-size: 1.75rem; font-weight: 700; }
.cart-empty { text-align: center; padding: 48px 24px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.06); }
.cart-empty p { margin: 0 0 12px; color: var(--text-muted); }
.cart-empty p:last-child { margin-bottom: 0; }
.cart-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.06);
}
.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-item:last-of-type { border-bottom: none; }
.cart-item-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-elevated);
    display: block;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-item-thumb-placeholder { background: var(--bg-elevated); }
.cart-item-thumb:hover img { opacity: 0.9; }
.cart-item-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-weight: 600; color: var(--text); }
.cart-item-price { font-size: 0.95rem; color: var(--accent); font-weight: 600; }
.cart-item-remove { flex-shrink: 0; margin: 0; }
.cart-item-badge { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-left: 6px; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.cart-summary { margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.cart-summary-message { margin-bottom: 16px; }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 1rem; }
.cart-summary-row strong { font-size: 1.2rem; }
.cart-checkout-btn { width: 100%; margin-top: 16px; padding: 14px; font-size: 1rem; display: block; text-align: center; }

/* Discount code — apply */
.cart-discount-apply {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
}
.cart-discount-prompt {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cart-discount-label { font-weight: 500; }
.cart-discount-reveal-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    font-family: var(--font);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.cart-discount-reveal-btn:hover {
    border-color: var(--accent);
    background: rgba(99,102,241,0.1);
    color: var(--accent);
}
.cart-discount-form-wrap {
    margin-top: 14px;
}
.cart-discount-form-wrap[hidden] {
    display: none !important;
}
.cart-discount-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.cart-discount-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cart-discount-input::placeholder { color: var(--text-muted); opacity: 0.8; }
.cart-discount-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.cart-discount-submit {
    flex-shrink: 0;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    white-space: nowrap;
}

/* Discount code — applied */
.cart-discount-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px 18px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-sm);
}
.cart-discount-applied-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cart-discount-applied-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.cart-discount-applied-code {
    font-weight: 600;
    color: var(--accent);
    font-size: 1rem;
}
.cart-discount-applied-amount {
    font-weight: 600;
    color: var(--accent);
    font-size: 1rem;
}
.cart-discount-remove-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
    text-decoration: underline;
    transition: color 0.2s;
}
.cart-discount-remove-btn:hover { color: var(--text); }

.cart-discount-locked {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
}
.cart-discount-locked-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.cart-discount-locked-text strong { color: var(--text); }

@media (max-width: 380px) {
    .cart-discount-form { flex-wrap: wrap; }
    .cart-discount-input { min-width: 100%; }
    .cart-discount-submit { flex: 1; min-width: 0; }
    .cart-discount-applied { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}
.order-summary { margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); }
.order-summary .row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.order-summary .total { font-size: 1.25rem; font-weight: 700; margin-top: 12px; }
.payment-methods { display: flex; gap: 12px; flex-wrap: wrap; }
.payment-method {
    padding: 16px 24px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font);
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
}
.payment-method:hover, .payment-method.selected { border-color: var(--accent); background: rgba(99,102,241,0.12); }

/* Dashboard */
.dashboard-page {
    padding: 48px 24px 64px;
    max-width: 920px;
    margin: 0 auto;
}
.dashboard-header { margin-bottom: 28px; }
.dashboard-title { margin: 0 0 6px; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.dashboard-subtitle { margin: 0; color: var(--text-muted); font-size: 1rem; }
.dashboard-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 32px;
    padding: 6px;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    width: fit-content;
    border: 1px solid rgba(255,255,255,0.06);
}
.dashboard-tab {
    padding: 12px 24px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
}
.dashboard-tab:hover { color: var(--text); background: var(--bg-hover); }
.dashboard-tab.active { color: var(--text); background: var(--bg-card); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow);
}
.dashboard-card-header { margin-bottom: 28px; }
.dashboard-card-title { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; }
.dashboard-card-desc { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.dashboard-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.dashboard-empty-icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    background: var(--bg-dark);
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.12);
}
.dashboard-empty p { margin: 0 0 20px; font-size: 1.05rem; }
.dashboard-empty-inline { padding: 24px; text-align: left; }
.dashboard-empty-inline p { margin: 0; }
.download-list { list-style: none; margin: 0; padding: 0; }
.download-item {
    padding: 0; margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--bg-dark);
    transition: border-color var(--transition);
}
.download-item:last-child { margin-bottom: 0; }
.download-item:hover { border-color: rgba(255,255,255,0.1); }
.download-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    flex-wrap: wrap;
}
.download-item-info { min-width: 0; flex: 1; }
.download-item-name { display: block; font-weight: 600; font-size: 1.08rem; color: var(--text); margin-bottom: 6px; }
.download-item-name em { font-style: normal; color: var(--text-muted); font-weight: 500; }
.download-item-meta { font-size: 0.875rem; color: var(--text-muted); }
.download-item-stat { font-weight: 500; }
.download-item-sep { margin: 0 8px; opacity: 0.6; }
.download-item-action { flex-shrink: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-download { padding: 10px 20px; font-size: 0.9rem; }
.btn-extend-support { white-space: nowrap; }
.badge { display: inline-block; padding: 6px 14px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; }
.badge-success { background: rgba(34,197,94,0.2); color: var(--success); }
.badge-warning { background: rgba(234,179,8,0.2); color: var(--warning); }
.badge-muted { background: rgba(255,255,255,0.1); color: var(--text-muted); }
.badge-update { background: rgba(99,102,241,0.25); color: var(--accent); margin-left: 10px; }
.badge-service { background: rgba(34,197,94,0.2); color: var(--success); }
.product-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; margin-left: 8px; vertical-align: middle; }
.product-badge-service { background: rgba(34,197,94,0.2); color: var(--success); }
.product-badge-update { background: rgba(99,102,241,0.25); color: var(--accent); }
.download-item-info .download-item-name { display: inline-block; }
.dashboard-form { margin-bottom: 36px; }
.dashboard-form .form-group { margin-bottom: 20px; }
.dashboard-form .form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.dashboard-form select,
.dashboard-form input[type="text"],
.dashboard-form textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color var(--transition);
}
.dashboard-form select:focus,
.dashboard-form input:focus,
.dashboard-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.dashboard-form textarea { resize: vertical; min-height: 120px; }
.dashboard-section { padding-top: 28px; padding-bottom: 8px; border-top: 1px solid rgba(255,255,255,0.06); }
.dashboard-section-title { margin: 0 0 16px; font-size: 1.05rem; font-weight: 700; }
.dashboard-section-actions { margin: 0 0 16px; }

/* Extend support page */
.extend-support-page { padding: 40px 24px 64px; max-width: 560px; margin: 0 auto; }
.extend-support-header { margin-bottom: 28px; }
.extend-support-title { margin: 0 0 8px; font-size: 1.75rem; font-weight: 700; }
.extend-support-desc { margin: 0; color: var(--text-muted); font-size: 1rem; }
.extend-support-card {
    padding: 28px 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.08);
    background: var(--bg-card);
}
.extend-support-product { margin: 0 0 12px; font-size: 1.2rem; font-weight: 700; }
.extend-support-price { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; }
.extend-support-period { font-weight: 500; font-size: 1rem; color: var(--text-muted); }
.extend-support-note { margin: 0 0 24px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.extend-support-form { margin-bottom: 20px; }
.btn-extend-support { padding: 12px 24px; font-size: 1rem; }
.extend-support-back { color: var(--text-muted); font-size: 0.95rem; }
.extend-support-back:hover { color: var(--text); }

.support-ticket-list { list-style: none; margin: 0; padding: 0; }
.support-ticket {
    padding: 0; margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--bg-dark);
    transition: border-color var(--transition);
}
.support-ticket:last-child { margin-bottom: 0; }
.support-ticket:hover { border-color: rgba(255,255,255,0.12); }
.support-ticket-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 18px 22px;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition);
}
.support-ticket-link:hover { background: var(--bg-hover); }
.support-ticket-subject { font-weight: 600; font-size: 1rem; }
.support-ticket-product { color: var(--text-muted); font-size: 0.9rem; }
.support-ticket-link .badge { margin-left: auto; }
.support-ticket-date { display: block; padding: 0 22px 16px; font-size: 0.85rem; color: var(--text-muted); }
.support-messages .msg { padding: 12px 16px; margin-bottom: 8px; border-radius: 8px; }
.support-messages .msg.customer { background: rgba(99,102,241,0.15); }
.support-messages .msg.staff { background: var(--bg-elevated); }

.support-msg-content { line-height: 1.6; word-wrap: break-word; }
.support-msg-content p { margin: 0 0 0.75em; }
.support-msg-content p:last-child { margin-bottom: 0; }
.support-msg-content ul, .support-msg-content ol { margin: 0 0 0.75em 1.25em; padding-left: 1em; }
.support-msg-content li { margin-bottom: 0.25em; }
.support-msg-content strong, .support-msg-content b { font-weight: 700; }
.support-msg-content em, .support-msg-content i { font-style: italic; }
.support-msg-content u { text-decoration: underline; }
.support-msg-content code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.9em; padding: 0.15em 0.4em; border-radius: 4px; background: rgba(255,255,255,0.08); }
.support-msg-content pre { margin: 0 0 0.75em; padding: 12px; border-radius: 6px; background: rgba(255,255,255,0.06); overflow-x: auto; font-size: 0.9em; line-height: 1.5; white-space: pre-wrap; }
.support-msg-content pre code { padding: 0; background: none; }
.support-msg-content h2, .support-msg-content h3 { margin: 0.75em 0 0.35em; font-size: 1.05rem; font-weight: 700; }
.support-msg-content h2:first-child, .support-msg-content h3:first-child { margin-top: 0; }
.support-msg-content a { color: var(--accent, #6366f1); text-decoration: underline; }
.support-msg-content a:hover { text-decoration: none; }
.support-msg-content br { line-height: 1.6; }

/* Rich text toolbar (support messages) */
.rich-text-toolbar-wrap { margin-bottom: 0; }
.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
}
.rich-text-toolbar .rich-text-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.9rem;
    font-family: var(--font, inherit);
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.rich-text-toolbar .rich-text-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
}
.rich-text-toolbar .rich-text-btn[data-cmd="bold"] { font-weight: 700; }
.rich-text-toolbar .rich-text-btn[data-cmd="italic"] { font-style: italic; font-weight: 600; }
.rich-text-toolbar .rich-text-btn[data-cmd="underline"] { text-decoration: underline; font-weight: 600; }
.rich-text-toolbar .rich-text-btn[data-cmd="code"] { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.85rem; }

.rich-text-editor {
    min-height: 120px;
    padding: 12px 14px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    outline: none;
    overflow-y: auto;
    word-wrap: break-word;
}
.rich-text-editor:empty::before { content: attr(data-placeholder); color: var(--text-muted); }
.rich-text-editor:focus { border-color: rgba(99,102,241,0.5); }
.rich-text-editor strong, .rich-text-editor b { font-weight: 700; }
.rich-text-editor em, .rich-text-editor i { font-style: italic; }
.rich-text-editor u { text-decoration: underline; }
.rich-text-editor code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.9em; padding: 0.15em 0.4em; border-radius: 4px; background: rgba(255,255,255,0.08); }
.rich-text-editor a { color: var(--accent, #6366f1); text-decoration: underline; }
.rich-text-editor ul { margin: 0.5em 0; padding-left: 1.5em; }
.rich-text-editor li { margin-bottom: 0.25em; }

/* Dashboard orders tab */
.dashboard-order-list { list-style: none; margin: 0; padding: 0; }
.dashboard-order-item {
    padding: 18px 22px;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
    background: var(--bg-dark);
}
.dashboard-order-item:last-child { margin-bottom: 0; }
.dashboard-order-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 10px;
}
.dashboard-order-number { font-weight: 600; font-size: 1rem; }
.dashboard-order-total { color: var(--text-muted); font-size: 0.95rem; }
.dashboard-order-date { font-size: 0.9rem; color: var(--text-muted); margin-left: auto; }
.dashboard-order-items { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid rgba(255,255,255,0.08); }
.dashboard-order-line {
    padding: 6px 0;
    font-size: 0.95rem;
}
.dashboard-order-line-name { font-weight: 500; }
.dashboard-order-line-meta {
    display: block;
    margin-top: 4px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Help Center */
.help-page {
    padding: 48px 24px 64px;
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    background:
        radial-gradient(ellipse 100% 80% at 50% 0%, rgba(99,102,241,0.2) 0%, rgba(99,102,241,0.06) 45%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 10%, rgba(139,92,246,0.12) 0%, transparent 55%),
        linear-gradient(0deg, var(--bg-dark) 0%, rgba(22,22,28,0.97) 100%);
}
.help-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,0.04) 50%, transparent 100%);
    pointer-events: none;
}
.help-page .help-header,
.help-page .help-search-wrap,
.help-page .help-empty,
.help-page .help-faq-list { position: relative; z-index: 1; }
.help-header { text-align: center; margin-bottom: 40px; padding: 0 16px; }
.help-title { margin: 0 0 10px; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.help-desc { margin: 0; color: var(--text-muted); font-size: 1.05rem; line-height: 1.5; }
.help-search-wrap { margin-bottom: 44px; }
.help-search-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow);
}
.help-search-label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; }
.help-search-row { display: flex; gap: 12px; margin-bottom: 20px; }
.help-search-input {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.help-search-input::placeholder { color: var(--text-muted); opacity: 0.8; }
.help-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.help-search-btn { flex-shrink: 0; padding: 16px 24px; }
.help-category-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.help-category-label { font-size: 0.875rem; color: var(--text-muted); margin-right: 4px; }
.help-pill {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all var(--transition);
}
.help-pill:hover { color: var(--text); border-color: rgba(255,255,255,0.15); background: var(--bg-hover); }
.help-pill.active { color: var(--accent); background: var(--accent-dim); border-color: rgba(99,102,241,0.4); }
.help-empty { text-align: center; padding: 56px 24px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.06); }
.help-empty p { margin: 0 0 20px; color: var(--text-muted); font-size: 1.05rem; }
.help-empty .btn { margin-right: 12px; }
.help-back { display: inline-block; margin-top: 16px; color: var(--accent); font-weight: 500; text-decoration: none; }
.help-back:hover { text-decoration: underline; }

/* About page */
.about-page {
    padding: 48px 24px 64px;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    background:
        radial-gradient(ellipse 100% 80% at 50% 0%, rgba(99,102,241,0.2) 0%, rgba(99,102,241,0.06) 45%, transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 10%, rgba(139,92,246,0.12) 0%, transparent 55%),
        linear-gradient(0deg, var(--bg-dark) 0%, rgba(22,22,28,0.97) 100%);
}
.about-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,0.04) 50%, transparent 100%);
    pointer-events: none;
}
.about-page .about-header,
.about-page .about-content { position: relative; z-index: 1; }
.about-header { margin-bottom: 40px; }
.about-title { margin: 0 0 12px; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.about-lead { margin: 0; color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; }
.about-content { display: flex; flex-direction: column; gap: 24px; }
.about-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.06);
}
.about-card-title { margin: 0 0 14px; font-size: 1.15rem; font-weight: 700; }
.about-card p { margin: 0; color: var(--text-muted); line-height: 1.65; }
.about-card p + p { margin-top: 14px; }
.about-card a { color: var(--accent); text-decoration: none; }
.about-card a:hover { text-decoration: underline; }
.about-list { margin: 0; padding-left: 1.35em; color: var(--text-muted); line-height: 1.7; }
.about-list li { margin-bottom: 10px; }
.about-card-recommended { border-color: rgba(99,102,241,0.2); }
.hero-recommended { margin-top: 16px; font-size: 0.9rem; color: var(--text-muted); }
.hero-recommended a { color: var(--accent); text-decoration: none; }
.hero-recommended a:hover { text-decoration: underline; }
.help-recommended { margin-top: 40px; padding: 20px 24px; background: rgba(255,255,255,0.03); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.06); }
.help-recommended-title { margin: 0 0 8px; font-size: 1.1rem; }
.help-recommended-desc { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.help-recommended-desc a { color: var(--accent); text-decoration: none; }
.help-recommended-desc a:hover { text-decoration: underline; }
.custom-order-recommended { margin-top: 12px; font-size: 0.9rem; color: var(--text-muted); }
.custom-order-recommended a { color: var(--accent); text-decoration: none; }
.custom-order-recommended a:hover { text-decoration: underline; }
.dashboard-recommended { margin-top: 28px; padding: 14px 18px; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-muted); }
.dashboard-recommended a { color: var(--accent); text-decoration: none; }
.dashboard-recommended a:hover { text-decoration: underline; }
.about-list li:last-child { margin-bottom: 0; }
.about-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* Policy pages (Terms, Privacy, Return) */
.policy-page { padding: 48px 24px 64px; max-width: 720px; margin: 0 auto; }
.policy-header { margin-bottom: 32px; }
.policy-title { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.policy-content { margin-bottom: 32px; }
.policy-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
}
.policy-body p { margin: 0 0 1em; }
.policy-body p:last-child { margin-bottom: 0; }
.policy-empty { color: var(--text-muted); font-style: italic; margin: 0; }
.policy-footer-links { padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.06); }
.policy-footer-links a { color: var(--accent); text-decoration: none; }
.policy-footer-links a:hover { text-decoration: underline; }

.help-category { margin-bottom: 40px; }
.help-category:last-child { margin-bottom: 0; }
.help-category-title {
    margin: 0 0 20px;
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.help-category-items { display: flex; flex-direction: column; gap: 12px; }
.help-faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    transition: border-color var(--transition);
}
.help-faq-item:hover { border-color: rgba(255,255,255,0.1); }
.help-faq-item[open] { border-color: rgba(99,102,241,0.3); box-shadow: 0 0 0 1px rgba(99,102,241,0.2); }
.help-faq-question {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: background var(--transition);
}
.help-faq-question::-webkit-details-marker { display: none; }
.help-faq-question::after {
    content: '';
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.7;
    transition: transform var(--transition);
}
.help-faq-item[open] .help-faq-question::after { transform: rotate(-135deg); }
.help-faq-question:hover { background: rgba(255,255,255,0.02); }
.help-faq-answer { padding: 0 24px 22px; color: var(--text-muted); line-height: 1.7; font-size: 0.98rem; }

/* Login */
.login-page { padding: 48px 24px; min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.login-box {
    max-width: 400px;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid rgba(255,255,255,0.06);
}
.login-box h1 { margin: 0 0 24px; font-size: 1.5rem; text-align: center; }
.login-box-desc { margin: 0 0 20px; text-align: center; color: var(--text-muted); font-size: 0.95rem; }
.login-box .form-group { margin-bottom: 20px; }
.login-box .btn { width: 100%; padding: 14px; margin-top: 8px; }
.login-box p { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.9rem; }
.login-box-footer a { color: var(--accent); font-weight: 600; }
.login-box-footer a:hover { text-decoration: underline; }

.register-terms-group label { display: block; margin-bottom: 6px; font-weight: 600; }
.register-terms-hint { margin: 0 0 8px; font-size: 0.9rem; color: var(--text-muted); }
.register-terms-box {
    max-height: 220px;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    background: var(--bg-dark);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}
.register-terms-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,0.25); }
.register-terms-content { white-space: pre-wrap; word-wrap: break-word; }
.register-terms-accept-hint { margin: 8px 0 0; font-size: 0.85rem; color: var(--text-muted); }
#register-accept-terms:disabled + span { opacity: 0.7; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background: rgba(239,68,68,0.2); color: #f87171; }
.alert-success { background: rgba(34,197,94,0.2); color: var(--success); }
.alert-warning { background: rgba(234,179,8,0.2); color: var(--warning); }
.alert .alert-link { color: inherit; font-weight: 600; text-decoration: underline; }
.alert .alert-link:hover { opacity: 0.9; }
.support-expired-prompt .btn { margin-top: 4px; }

/* Support tab: expired banner + frozen form */
.support-expired-banner {
    margin-bottom: 28px;
    padding: 24px 28px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(234, 179, 8, 0.06) 100%);
    border: 1px solid rgba(234, 179, 8, 0.35);
    position: relative;
}
.support-expired-banner-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: rgba(234, 179, 8, 0.25);
    position: relative;
}
.support-expired-banner-icon::after {
    content: '!';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warning);
    line-height: 1;
}
.support-expired-banner-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--warning);
}
.support-expired-banner-desc {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}
.support-expired-banner-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.support-expired-banner-item {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.support-expired-banner-item:last-child { border-bottom: none; }
.support-expired-banner-product {
    font-weight: 600;
    color: var(--text);
    flex: 1;
    min-width: 0;
}
.support-expired-banner-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    font-size: 0.9rem;
}

.support-form-wrap {
    position: relative;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
}
.support-form-wrap--frozen .dashboard-form {
    pointer-events: none;
    opacity: 0.6;
    filter: saturate(0.7);
    transition: opacity 0.25s ease, filter 0.25s ease;
}
.support-form-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
}
.support-form-overlay-text {
    margin: 0;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Cart */
.cart-badge { background: var(--accent); color: #fff; font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; margin-left: 4px; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state a { color: var(--accent); }

/* Admin */
.admin-app { background: var(--bg-dark); min-height: 100vh; display: flex; flex-direction: row; }

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--bg-card) 0%, #141418 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
}
.admin-sidebar .admin-brand {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}
.admin-sidebar .admin-brand:hover { color: var(--accent); }

.admin-sidebar .admin-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.admin-sidebar .admin-nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-sidebar .admin-nav-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 0 12px 8px;
    opacity: 0.85;
}
.admin-sidebar .admin-nav-links { display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar .admin-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s, background 0.2s;
    border-left: 3px solid transparent;
    margin-left: 4px;
}
.admin-sidebar .admin-nav-link:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}
.admin-sidebar .admin-nav-link.active {
    color: var(--accent);
    background: rgba(99,102,241,0.12);
    border-left-color: var(--accent);
    margin-left: 0;
    padding-left: 17px;
}
.admin-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--danger);
    border-radius: 999px;
    flex-shrink: 0;
}
.admin-sidebar-footer {
    padding: 20px 12px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-sidebar-link {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}
.admin-sidebar-link--store {
    color: var(--accent);
}
.admin-sidebar-link--store:hover {
    background: rgba(99,102,241,0.12);
    color: var(--accent-hover);
}
.admin-sidebar-link--logout {
    color: var(--text-muted);
}
.admin-sidebar-link--logout:hover {
    color: var(--danger);
    background: rgba(239,68,68,0.1);
}

.admin-sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 102;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    padding: 0;
    box-shadow: var(--shadow);
}
.admin-sidebar-toggle:hover { background: var(--bg-hover); }
.admin-sidebar-toggle[aria-expanded="true"] .admin-sidebar-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.admin-sidebar-toggle[aria-expanded="true"] .admin-sidebar-toggle-bar:nth-child(2) { opacity: 0; }
.admin-sidebar-toggle[aria-expanded="true"] .admin-sidebar-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.admin-sidebar-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s;
}
.admin-overlay.is-open { display: block; opacity: 1; }

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.admin-body { padding: 36px 28px 48px; max-width: 1280px; margin: 0 auto; width: 100%; }
.admin-page-header { margin-bottom: 32px; }
.admin-page-title { margin: 0 0 6px; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.admin-page-desc { margin: 0; color: var(--text-muted); font-size: 1rem; }
.admin-body h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 24px; }
.admin-body h2 { font-size: 1.35rem; font-weight: 700; margin: 32px 0 18px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 36px; }
.admin-stat {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.admin-stat::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.admin-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.admin-stat--orders::before { background: linear-gradient(90deg, var(--success), #16a34a); }
.admin-stat--total::before { background: linear-gradient(90deg, var(--accent), #5558e3); }
.admin-stat--products::before { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.admin-stat--users::before { background: linear-gradient(90deg, #0ea5e9, #0284c7); }
.admin-stat--custom::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.admin-stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.admin-stat-label { display: block; font-size: 0.9rem; color: var(--text-muted); margin-top: 6px; }
.admin-section { margin-bottom: 40px; }
.admin-section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.admin-section-title { margin: 0 0 16px; font-size: 1.2rem; font-weight: 700; }
.admin-section-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.admin-section-link:hover { text-decoration: underline; }
.admin-table-wrap, .admin-body > .admin-table {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.06);
}
.admin-table-wrap { margin-bottom: 20px; }
.admin-body > .admin-table { margin-bottom: 24px; }
.admin-products-toolbar { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-filter-label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin: 0; }
.admin-filter-select { padding: 8px 14px; font-size: 0.9rem; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.15); background: var(--bg-dark); color: var(--text); min-width: 180px; }
.admin-filter-select:focus { outline: none; border-color: var(--accent); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
.admin-table th { background: var(--bg-elevated); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.admin-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table-empty { color: var(--text-muted); text-align: center; padding: 32px !important; }
.admin-table-desc { max-width: 240px; color: var(--text-muted); font-size: 0.9rem; line-height: 1.4; }
.admin-table-col-num { text-align: center; white-space: nowrap; }
.admin-table-col-actions { white-space: nowrap; }
.admin-badge { display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.admin-badge--success { background: rgba(34,197,94,0.2); color: var(--success); }
.admin-badge--danger { background: rgba(239,68,68,0.2); color: var(--danger); }
.admin-badge--muted { background: rgba(255,255,255,0.1); color: var(--text-muted); }
.admin-badge--warning { background: rgba(234,179,8,0.2); color: var(--warning); }
.admin-ticket-subject { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-ticket-subject:hover { text-decoration: underline; }
.admin-support-status-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-support-status-form { display: inline-flex; }
.admin-support-status-select { padding: 4px 8px; font-size: 0.8rem; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.15); background: var(--bg-dark); color: var(--text); min-width: 0; }
.admin-support-status-select:focus { outline: none; border-color: var(--accent); }
.admin-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.admin-link:hover { text-decoration: underline; }
.admin-link.active { color: var(--text); text-decoration: underline; }
.admin-table-thumb { width: 64px; padding-right: 12px; vertical-align: middle; }
.admin-product-thumb-link { display: inline-block; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
.admin-product-thumb-link:hover { border-color: var(--accent); }
.admin-product-thumb { display: block; width: 48px; height: 48px; object-fit: cover; }
.admin-product-thumb-placeholder { display: inline-block; width: 48px; height: 48px; line-height: 48px; text-align: center; background: var(--bg-elevated); border-radius: var(--radius); color: var(--text-muted); font-size: 0.9rem; }
.admin-table-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-bulk-bar { margin-bottom: 16px; padding: 12px 18px; background: var(--bg-card); border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-bulk-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-bulk-label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.admin-table-col-check { width: 40px; padding-right: 8px; vertical-align: middle; }
.admin-checkbox-label { display: inline-block; margin: 0; cursor: pointer; }
.admin-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.admin-inline-form { display: inline; }
.admin-inline-form .btn { padding: 6px 12px; font-size: 0.85rem; }
.admin-btn-danger {
    background: rgba(239,68,68,0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239,68,68,0.4);
}
.admin-btn-danger:hover { background: rgba(239,68,68,0.25) !important; color: #fca5a5 !important; border-color: var(--danger); }
.admin-quick-links { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-card { background: var(--bg-card); border-radius: var(--radius); padding: 28px; margin-bottom: 28px; border: 1px solid rgba(255,255,255,0.06); box-shadow: var(--shadow); }
.admin-card-title { margin: 0 0 20px; font-size: 1.05rem; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-card-desc { margin: 0 0 20px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.admin-form .form-textarea { width: 100%; max-width: 100%; min-height: 200px; }
.settings-logo-preview { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.settings-logo-img { display: block; max-height: 48px; width: auto; margin-top: 8px; }
.admin-form .form-group { margin-bottom: 22px; }
.admin-form .form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.admin-form input[type="text"], .admin-form input[type="number"], .admin-form select, .admin-form textarea {
    width: 100%; max-width: 480px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color var(--transition);
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.admin-form textarea { resize: vertical; min-height: 100px; }
.admin-form input[type="file"] { padding: 10px 0; cursor: pointer; max-width: 100%; }
.admin-form input[type="checkbox"] { width: auto; max-width: none; margin-right: 10px; }
.upload-preview img { max-width: 200px; max-height: 120px; border-radius: var(--radius-sm); object-fit: cover; margin-top: 10px; border: 1px solid rgba(255,255,255,0.1); }
.upload-hint { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* Product edit page */
.admin-product-edit .admin-page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.admin-product-edit .admin-page-header .btn-ghost { flex-shrink: 0; }
.product-edit-form { max-width: 900px; }
.product-edit-card { margin-bottom: 24px; }
.product-edit-card-title { margin: 0 0 20px; font-size: 1.1rem; font-weight: 700; color: var(--text); padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.rich-editor-wrap { margin-bottom: 0; }
.rich-editor-wrap .ql-toolbar.ql-snow,
.rich-editor-wrap .ql-container.ql-snow { border-color: rgba(255,255,255,0.15); }
.rich-editor-wrap .ql-container.ql-snow { min-height: 140px; background: var(--bg-dark); border-radius: 0 0 8px 8px; }
.rich-editor-wrap .ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; background: rgba(255,255,255,0.04); }
.rich-editor-wrap .ql-editor { min-height: 120px; color: var(--text); }
.rich-editor-wrap .ql-editor.ql-blank::before { color: var(--text-muted); }
.product-edit-card-desc { margin: 0 0 20px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.product-edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.product-edit-row:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .product-edit-row { grid-template-columns: 1fr; } }
.product-edit-field input, .product-edit-field select { max-width: 100%; }
.product-edit-price input { max-width: 140px; }
.product-edit-thumb-preview { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.product-edit-thumb-preview img { display: block; max-width: 160px; max-height: 100px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.1); margin-top: 8px; }
.product-edit-gallery-item { display: inline-flex; align-items: center; gap: 12px; margin: 0 12px 12px 0; padding: 10px; background: var(--bg-dark, rgba(0,0,0,0.2)); border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,0.08); }
.product-edit-gallery-thumb { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.product-edit-gallery-remove { flex-shrink: 0; }
.product-edit-gallery-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 120px;
    padding: 20px;
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: var(--radius);
    background: rgba(0,0,0,0.15);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.product-edit-gallery-dropzone:hover { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.product-edit-gallery-dropzone-dragover { border-color: var(--accent); background: rgba(99,102,241,0.12); }
.product-edit-gallery-dropzone-text { font-weight: 500; color: var(--text); }
.product-edit-gallery-dropzone-hint { font-size: 0.85rem; color: var(--text-muted); }
.product-edit-gallery-count { font-size: 0.9rem; color: var(--accent); font-weight: 500; }
.product-edit-gallery-input { position: absolute; width: 0; height: 0; opacity: 0; overflow: hidden; clip: rect(0,0,0,0); pointer-events: none; }
.product-edit-gallery-dropzone { position: relative; }
.product-edit-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.product-edit-actions .form-group { margin-bottom: 0; }
.form-group-inline .checkbox-label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: var(--text); }
.form-group-inline input[type="checkbox"] { margin: 0; }
.form-group .checkbox-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.form-group .checkbox-label input[type="checkbox"] { margin: 0; width: auto; }
.form-group .checkbox-label a { color: var(--link-color, #0d6efd); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
/* Product edit: Description / Versions tabs */
.product-edit-tabs { margin-bottom: 28px; }
.product-edit-tab-list { display: flex; gap: 4px; margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0; }
.product-edit-tab-btn {
    padding: 14px 24px; font-size: 0.95rem; font-weight: 600; color: var(--text-muted);
    background: transparent; border: none; border-bottom: 3px solid transparent;
    cursor: pointer; margin-bottom: -1px; border-radius: var(--radius) var(--radius) 0 0;
    transition: color 0.15s, background 0.15s;
}
.product-edit-tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.product-edit-tab-btn.active { color: var(--accent); background: var(--bg-card); border-bottom-color: var(--accent); }
.product-edit-tab-panel { display: none; }
.product-edit-tab-panel.active { display: block; }
.product-edit-tab-panel[hidden] { display: none !important; }

/* Product edit – Versions tab: list + add form */
.product-edit-versions-block { }
.product-edit-versions-header { margin-bottom: 24px; }
.product-edit-versions-title { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; color: var(--text); }
.product-edit-versions-desc { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

.product-edit-version-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.product-edit-version-item {
    display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px;
    background: var(--bg-dark); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius);
    transition: border-color 0.15s, background 0.15s;
}
.product-edit-version-item:hover { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.12); }
.product-edit-version-badge {
    flex-shrink: 0; min-width: 56px; padding: 8px 14px; font-size: 1rem; font-weight: 700; color: var(--accent);
    background: rgba(99,102,241,0.15); border-radius: 8px; text-align: center;
}
.product-edit-version-body { flex: 1; min-width: 0; }
.product-edit-version-changelog { margin: 0 0 8px; font-size: 0.9rem; color: var(--text); line-height: 1.45; }
.product-edit-version-file { margin: 0 0 6px; font-size: 0.85rem; }
.product-edit-version-file code { font-size: 0.8rem; padding: 4px 10px; background: rgba(0,0,0,0.25); border-radius: 6px; color: var(--text-muted); }
.product-edit-version-date { font-size: 0.8rem; color: var(--text-muted); }
.product-edit-version-actions { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.product-edit-version-actions .btn { padding: 8px 14px; font-size: 0.85rem; }
.product-edit-version-delete-form { display: inline; margin: 0; }

.product-edit-version-empty {
    text-align: center; padding: 40px 24px; margin-bottom: 28px;
    background: var(--bg-dark); border: 1px dashed rgba(255,255,255,0.12); border-radius: var(--radius);
}
.product-edit-version-empty-icon { display: block; font-size: 2rem; margin-bottom: 12px; opacity: 0.7; }
.product-edit-version-empty p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }

.product-edit-add-version-card {
    padding: 28px; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.product-edit-add-version-title { margin: 0 0 24px; font-size: 1.1rem; font-weight: 700; color: var(--text); padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.product-edit-add-version { margin: 0; }
.product-edit-add-version-grid { display: grid; grid-template-columns: 140px 1fr; gap: 24px 20px; margin-bottom: 20px; align-items: start; }
@media (max-width: 640px) { .product-edit-add-version-grid { grid-template-columns: 1fr; } }
.product-edit-add-version .form-group { margin-bottom: 20px; }
.product-edit-add-version .form-group:last-of-type { margin-bottom: 24px; }
.product-edit-add-version-input { width: 100%; padding: 12px 14px; font-size: 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); background: var(--bg-dark); color: var(--text); }
.product-edit-add-version-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,0.25); }

.product-edit-add-version-file-wrap { min-width: 0; }
.product-edit-add-version-file-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 0 0;
}
.product-edit-add-version-upload-btn {
    display: inline-flex; align-items: center; padding: 10px 20px; font-size: 0.9rem; font-weight: 600;
    background: rgba(99,102,241,0.2); color: var(--accent); border: 1px solid rgba(99,102,241,0.4);
    border-radius: 8px; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.product-edit-add-version-upload-btn:hover { background: rgba(99,102,241,0.3); border-color: var(--accent); }
.product-edit-add-version-upload-text { pointer-events: none; }
.product-edit-add-version-file-input { position: absolute; width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; clip: rect(0,0,0,0); }
.product-edit-add-version-file-or { font-size: 0.85rem; color: var(--text-muted); }
.product-edit-add-version-path-input {
    flex: 1; min-width: 200px; padding: 10px 14px; font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; background: var(--bg-dark); color: var(--text);
}
.product-edit-add-version-path-input:focus { outline: none; border-color: var(--accent); }
.product-edit-add-version-path-input::placeholder { color: var(--text-muted); opacity: 0.8; }

.product-edit-add-version-optional { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.product-edit-add-version-textarea {
    width: 100%; min-height: 80px; padding: 12px 14px; font-size: 0.9rem; line-height: 1.5;
    border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; background: var(--bg-dark); color: var(--text);
    resize: vertical;
}
.product-edit-add-version-textarea:focus { outline: none; border-color: var(--accent); }
.product-edit-add-version-submit { padding: 12px 24px; font-size: 0.95rem; font-weight: 600; }

.product-edit-field-wide { grid-column: 1 / -1; }
.product-edit-field-wide input[type="text"] { max-width: 100%; }
.admin-code { font-size: 0.8rem; padding: 2px 8px; background: var(--bg-dark); border-radius: 6px; color: var(--text-muted); }
.product-edit-danger { border-color: rgba(239,68,68,0.2); }
.product-edit-danger .product-edit-card-title { color: var(--text-muted); }

/* ========== Responsive ========== */
/* Mobile menu: hidden on desktop, shown on small screens */
.nav-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}
.nav-mobile-toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-mobile-toggle-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: background 0.2s;
}
.nav-mobile-toggle-icon::before,
.nav-mobile-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s, top 0.2s;
}
.nav-mobile-toggle-icon::before { top: -6px; }
.nav-mobile-toggle-icon::after { top: 6px; }
.site-header.nav-open .nav-mobile-toggle-icon { background: transparent; }
.site-header.nav-open .nav-mobile-toggle-icon::before { top: 0; transform: rotate(45deg); }
.site-header.nav-open .nav-mobile-toggle-icon::after { top: 0; transform: rotate(-45deg); }

.nav-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 0;
    cursor: pointer;
}
.site-header.nav-open .nav-drawer-backdrop { display: block; }

@media (max-width: 900px) {
    .nav-mobile-toggle { display: flex; }
    .nav-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 100vw - 48px);
        background: var(--bg-card);
        border-left: 1px solid rgba(255,255,255,0.08);
        box-shadow: -8px 0 32px rgba(0,0,0,0.3);
        z-index: 200;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        display: flex;
        flex-direction: column;
        padding-top: 72px;
        padding-bottom: 24px;
        overflow-y: auto;
    }
    .site-header.nav-open .nav-drawer { transform: translateX(0); }
    .nav-drawer .nav-main {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0 24px;
        flex-wrap: nowrap;
        position: relative;
        z-index: 1;
        background: var(--bg-card);
    }
    .nav-drawer .nav-main > a,
    .nav-drawer .nav-item-dropdown {
        padding: 14px 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .nav-drawer .nav-dropdown-trigger { padding: 0; }
    .nav-drawer .nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 8px 0 8px 16px;
        margin-top: 4px;
        margin-bottom: 8px;
        border-left: 2px solid rgba(255,255,255,0.15);
    }
    .nav-drawer .nav-dropdown a { padding: 8px 0; }
    .nav-drawer .nav-dropdown a:first-child { border-bottom: none; margin-bottom: 0; padding-bottom: 8px; }
}

@media (max-width: 768px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .header-inner { padding: 12px 16px; gap: 12px; }
    .hero { padding: 40px 16px 32px; }
    .hero-title { font-size: clamp(1.75rem, 5vw, 2.5rem); }
    .hero-subtitle { font-size: 1.1rem; }
    .search-form { flex-direction: column; min-width: 0; }
    .search-input { min-width: 0; }
    .search-category { min-width: 0; width: 100%; }
    .categories-section { padding: 32px 16px; }
    .category-cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .category-card { padding: 18px 18px 14px 22px; }
    .category-card-desc { -webkit-line-clamp: 1; }
    .category-nav { padding: 12px 14px; gap: 6px 12px; }
    .category-nav-item { padding: 5px 10px; font-size: 0.85rem; }
    .products-section { padding: 32px 16px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .product-info { padding: 12px; }
    .product-detail-inner { padding: 24px 16px 48px; }
    .product-detail-grid { gap: 24px; }
    .add-to-cart-form { flex-wrap: wrap; }
    .add-to-cart-form .btn-primary { min-width: 0; width: 100%; }
    .cart-page { padding: 32px 16px 48px; }
    .cart-item { flex-wrap: wrap; gap: 12px; }
    .cart-item-thumb { width: 56px; height: 56px; }
    .dashboard-page { padding: 32px 16px 48px; }
    .dashboard-tabs { flex-wrap: wrap; width: 100%; padding: 6px; }
    .dashboard-tab { padding: 10px 16px; font-size: 0.9rem; flex: 1 1 auto; min-width: 0; }
    .dashboard-card { padding: 24px; }
    .download-item { flex-wrap: wrap; gap: 12px; }
    .download-item-main { min-width: 0; }
    .download-item-action { width: 100%; }
    .download-item-action .btn { width: 100%; justify-content: center; }
    .support-ticket-link { flex-wrap: wrap; gap: 8px; }
    .support-ticket .badge { margin-left: 0; }
    .custom-order-page { padding: 32px 16px 48px; }
    .checkout-page { padding: 32px 16px 48px; }
    .checkout-grid { gap: 24px; }
    .extend-support-page { padding: 32px 16px 48px; }
    .policy-page { padding: 32px 16px 48px; }
    .login-card-wrap { padding: 24px 16px; }
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 101;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: 280px;
    }
    .admin-sidebar.is-open { transform: translateX(0); }
    .admin-sidebar-toggle { display: flex; }
    .admin-main { padding-top: 0; }
    .admin-body { padding: 56px 16px 36px 16px; }
    .admin-page-header { flex-direction: column; align-items: flex-start; }
    .admin-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .admin-section-header { flex-direction: column; align-items: flex-start; }
    .admin-form input[type="text"], .admin-form input[type="number"], .admin-form select, .admin-form textarea { max-width: 100%; }
}

@media (max-width: 640px) {
    .container { padding-left: 12px; padding-right: 12px; }
    .header-actions .btn { padding: 8px 14px; font-size: 0.85rem; }
    .header-actions .btn-ghost { padding: 8px 12px; }
    .hero { padding: 32px 12px 24px; }
    .hero-desc { margin-bottom: 24px; }
    .categories-section { padding: 24px 12px; }
    .category-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .category-card { padding: 14px 14px 12px 18px; }
    .category-card-name { font-size: 0.95rem; }
    .category-card-desc { display: none; }
    .category-nav { flex-direction: column; align-items: flex-start; }
    .products-section { padding: 24px 12px; }
    .product-grid { grid-template-columns: 1fr; gap: 12px; }
    .product-detail-inner { padding: 20px 12px 40px; }
    .product-detail-breadcrumb { font-size: 0.85rem; margin-bottom: 16px; }
    .product-meta-title { font-size: 1.4rem; }
    .cart-page { padding: 24px 12px 40px; }
    .cart-card { padding: 20px; }
    .dashboard-page { padding: 24px 12px 40px; }
    .dashboard-title { font-size: 1.5rem; }
    .dashboard-card { padding: 20px; }
    .support-form-wrap { margin-top: 24px; padding-top: 24px; }
    .custom-order-page { padding: 24px 12px 40px; }
    .checkout-page { padding: 24px 12px 40px; }
    .checkout-order-summary { padding: 20px; }
    .admin-stats { grid-template-columns: 1fr; }
    .product-edit-card { padding: 20px; }
    .product-edit-tab-list { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .product-edit-tab-btn { flex-shrink: 0; white-space: nowrap; }
    .support-expired-banner-list { padding-left: 20px; }
}

@media (max-width: 480px) {
    .container { padding-left: 12px; padding-right: 12px; }
    .logo-img { max-width: 140px; }
    .header-cart-link { width: 40px; height: 40px; }
    .footer-links { flex-wrap: wrap; }
}

/* Tables: horizontal scroll on small screens */
.admin-table-wrap,
.dashboard-card-downloads .download-list,
.dashboard-order-list,
.support-ticket-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .admin-table { font-size: 0.9rem; }
    .admin-table th, .admin-table td { padding: 12px 14px; }
    .admin-table-thumb, .admin-product-thumb-link { display: none; }
    .admin-table .admin-product-thumb-placeholder { display: none; }
}

/* Form rows stack on small screens */
@media (max-width: 640px) {
    .form-row { flex-direction: column; }
    .form-row .form-group { width: 100%; }
}
