/* ===== CATEGORY TEMPLATE CSS ===== */
/* Save as /css/category-template.css */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --text: #0f0f1a;
    --text-secondary: #3d3d5c;
    --text-muted: #5c5c7a;
    --border: #d4d4e0;
    --border-light: #ebebf2;
    --bg: #f5f5fa;
    --surface: #ffffff;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-light: #ede9fe;
    --primary-dark: #6d28d9;
    --success: #047857;
    --success-light: #d1fae5;
    --success-text: #065f46;
    --warning: #b45309;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    
    --surface-dark: #1a1f2e;
    --bg-dark: #0d1117;
    --border-dark: #2d3548;
    --text-dark: #f0f2f5;
    --text-secondary-dark: #c9cdd4;
    --text-muted-dark: #8b92a0;
    --primary-light-dark: #2a2660;
    --primary-dark-mode: #a78bfa;
    
    --z-sticky: 100;
    --z-toast: 500;
    --header-height: 72px;
    --max-width: 1400px;
    --container-padding: 24px;
    
    --text-xs: 11px;
    --text-sm: 13px;
    --text-base: 15px;
    --text-lg: 17px;
    --text-xl: 20px;
    --text-2xl: 26px;
    --text-3xl: 34px;
    --text-4xl: 44px;
    
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 10px 10px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.2);
    --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 120ms;
    --duration-base: 200ms;
    --duration-slow: 350ms;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary); color: white; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

.skip-to-content {
    position: absolute;
    left: -9999px;
    top: var(--space-md);
    z-index: 9999;
    background: var(--primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 600;
}

.skip-to-content:focus { left: var(--space-md); }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--duration-slow) var(--ease-out), visibility var(--duration-slow);
}

.loading-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loading-content { text-align: center; }

.loading-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-glow);
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto var(--space-md);
}

.loading-bar-fill {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: var(--radius-full);
    animation: loading-progress 1.5s ease-in-out infinite;
}

@keyframes loading-progress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(150%); }
    100% { transform: translateX(-100%); }
}

.loading-text { font-size: var(--text-sm); color: var(--text-muted); }

/* Page Header */
.page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-sm) var(--container-padding);
}

.page-header-inner { max-width: var(--max-width); margin: 0 auto; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-secondary); transition: color var(--duration-fast); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb svg { width: 14px; height: 14px; flex-shrink: 0; }
.breadcrumb-current { color: var(--text); font-weight: 600; }

/* Main Content */
.main { min-height: calc(100vh - var(--header-height)); padding-top: var(--header-height); }

.main-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.main-content.visible { opacity: 1; transform: translateY(0); }

/* Category Hero */
.category-hero {
    margin: var(--space-lg) var(--container-padding);
    padding: var(--space-2xl);
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.category-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139, 92, 246, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(167, 139, 250, 0.25) 0%, transparent 50%);
    pointer-events: none;
}

.category-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.5;
}

.category-hero.has-banner { padding: 0; background: none; }
.category-hero.has-banner::before, .category-hero.has-banner::after { display: none; }

.category-hero-banner { position: absolute; inset: 0; z-index: 0; }
.category-hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.category-hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(49, 46, 129, 0.85) 50%, rgba(76, 29, 149, 0.9) 100%);
}

.category-hero.has-banner .category-hero-content {
    position: relative;
    z-index: 1;
    padding: var(--space-2xl);
}

.category-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    max-width: var(--max-width);
    margin: 0 auto;
}

.category-icon-wrapper { position: relative; flex-shrink: 0; }

.category-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    box-shadow: var(--shadow-xl), 0 0 40px rgba(139, 92, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.category-icon img { width: 100%; height: 100%; object-fit: cover; }
.category-icon-placeholder { font-size: 56px; }

.category-info { flex: 1; color: white; }

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-badge svg { width: 14px; height: 14px; }

.category-name {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.category-tagline {
    font-size: var(--text-lg);
    opacity: 0.9;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.category-features { display: flex; gap: var(--space-lg); flex-wrap: wrap; }

.category-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}

.category-feature-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform var(--duration-base) var(--ease-spring);
}

.category-feature:hover .category-feature-icon { transform: scale(1.1); }
.category-feature-icon svg { width: 20px; height: 20px; }

/* Subcategories */
.subcategories-section {
    max-width: var(--max-width);
    margin: var(--space-lg) auto;
    padding: 0 var(--container-padding);
}

.subcategories-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text);
}

.subcategories-grid { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

.subcategory-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    transition: all var(--duration-base) var(--ease-out);
    cursor: pointer;
    text-decoration: none;
}

.subcategory-chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.subcategory-chip-icon { font-size: 18px; }

.subcategory-card {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    transition: all var(--duration-base) var(--ease-out);
    cursor: pointer;
    text-decoration: none;
}

.subcategory-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.subcategory-icon { font-size: 18px; flex-shrink: 0; }
.subcategory-name { font-weight: 600; }
.subcategory-arrow { width: 14px; height: 14px; opacity: 0.4; flex-shrink: 0; transition: opacity var(--duration-fast); }
.subcategory-card:hover .subcategory-arrow { opacity: 0.8; }

.subcategory-chip-count {
    background: var(--border-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* Filters Bar */
.filters-bar {
    position: sticky;
    top: var(--header-height);
    z-index: var(--z-sticky);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-md) var(--container-padding);
    transition: box-shadow var(--duration-base);
}

.filters-bar.scrolled { box-shadow: var(--shadow-md); }

.filters-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    justify-content: space-between;
}

.filter-group { display: flex; gap: var(--space-sm); align-items: center; }

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
    min-height: 42px;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-chip svg { width: 16px; height: 16px; }

.filter-select {
    appearance: none;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c5c7a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 36px 10px 16px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast);
    min-height: 42px;
    min-width: 140px;
}

.filter-select:hover { border-color: var(--primary); }
.filter-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }

.results-info { display: flex; align-items: center; gap: var(--space-md); }
.results-count { font-size: var(--text-sm); color: var(--text-muted); }
.results-count strong { color: var(--text); }

.clear-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--danger-light);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast);
}

.clear-filters-btn:hover { background: var(--danger); color: white; }
.clear-filters-btn svg { width: 14px; height: 14px; }

/* Product Grid */
.product-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-lg) var(--container-padding);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* Product Card */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--duration-base) var(--ease-out);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border);
}

.product-card.sold-out { opacity: 0.7; }
.product-card a { display: flex; flex-direction: column; height: 100%; }

.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg);
    padding: var(--space-md);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--duration-slow) var(--ease-out);
}

.product-card:hover .product-image img { transform: scale(1.05); }

.product-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    background: linear-gradient(145deg, var(--bg) 0%, var(--border-light) 100%);
}

.product-image-placeholder svg { width: 52px; height: 52px; opacity: 0.3; }
.product-image-placeholder span { font-size: var(--text-xs); opacity: 0.6; }

.product-badges {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    box-shadow: var(--shadow-sm);
}

.badge svg { width: 11px; height: 11px; }
.badge-discount { background: linear-gradient(135deg, #dc2626, #f43f5e); color: white; }
.badge-condition { background: var(--success-light); color: var(--success-text); font-weight: 800; }
.badge-sold-out { background: var(--text); color: white; }
.badge-new { background: linear-gradient(135deg, var(--primary), #a78bfa); color: white; }

.wishlist-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: scale(0.85);
    transition: all var(--duration-base) var(--ease-spring);
    z-index: 2;
}

.product-card:hover .wishlist-btn,
.product-card:focus-within .wishlist-btn { opacity: 1; transform: scale(1); }

@media (hover: none) { .wishlist-btn { opacity: 1; transform: scale(1); } }

.wishlist-btn svg { width: 18px; height: 18px; color: var(--text-muted); transition: all var(--duration-fast); }
.wishlist-btn:hover { background: var(--danger-light); }
.wishlist-btn:hover svg, .wishlist-btn.active svg { color: var(--danger); fill: var(--danger); }
.wishlist-btn:active { transform: scale(0.9); }

.product-content { padding: var(--space-md); flex: 1; display: flex; flex-direction: column; }

.product-category {
    font-size: var(--text-xs);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-title {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 6px;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}

.product-brand {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-brand svg { width: 12px; height: 12px; }
.product-footer { margin-top: auto; }

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.product-price { font-size: var(--text-xl); font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.product-original-price { font-size: var(--text-sm); color: var(--text-muted); text-decoration: line-through; }

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
    gap: var(--space-sm);
}

.product-stock { display: flex; align-items: center; gap: 5px; font-size: var(--text-xs); font-weight: 700; }
.product-stock svg { width: 14px; height: 14px; }
.stock-available { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-out { color: var(--text-muted); }

.product-shipping { display: flex; align-items: center; gap: 5px; font-size: var(--text-xs); color: var(--text-muted); font-weight: 500; }
.product-shipping svg { width: 14px; height: 14px; }

/* Skeleton Loader */
.skeleton-card { background: var(--surface); border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border-light); }

.skeleton-image {
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, var(--border-light) 25%, var(--bg) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-content { padding: var(--space-md); }

.skeleton-line {
    height: 13px;
    background: linear-gradient(90deg, var(--border-light) 25%, var(--bg) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.skeleton-line.short { width: 35%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.price { width: 28%; height: 24px; margin-top: var(--space-md); }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state { text-align: center; padding: var(--space-3xl) var(--space-lg); display: none; }

.empty-icon {
    width: 110px;
    height: 110px;
    background: linear-gradient(145deg, var(--primary-light), var(--bg));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.empty-icon svg { width: 52px; height: 52px; color: var(--primary); }
.empty-title { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-sm); color: var(--text); }
.empty-text { color: var(--text-secondary); font-size: var(--text-base); max-width: 420px; margin: 0 auto var(--space-lg); line-height: 1.7; }

.empty-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}

.empty-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35); }
.empty-btn:active { transform: translateY(0); }
.empty-btn svg { width: 18px; height: 18px; }

/* Category Description Section */
.category-description-section {
    max-width: var(--max-width);
    margin: var(--space-2xl) auto;
    padding: var(--space-2xl);
    padding-left: calc(var(--container-padding) + var(--space-2xl));
    padding-right: calc(var(--container-padding) + var(--space-2xl));
    background: var(--surface);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-left: var(--container-padding);
    margin-right: var(--container-padding);
}

.category-description-header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); }

.category-description-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, var(--primary-light), var(--bg));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.category-description-icon svg { width: 26px; height: 26px; }
.category-description-title { font-size: var(--text-2xl); font-weight: 700; color: var(--text); }
.category-description-wrapper { position: relative; }

.category-description-content { font-size: var(--text-base); line-height: 1.8; color: var(--text-secondary); }
.category-description-content h2 { font-size: var(--text-xl); font-weight: 700; color: var(--text); margin: var(--space-xl) 0 var(--space-md); }
.category-description-content h2:first-child { margin-top: 0; }
.category-description-content h3 { font-size: var(--text-lg); font-weight: 600; color: var(--text); margin: var(--space-lg) 0 var(--space-sm); }
.category-description-content p { margin-bottom: var(--space-md); }
.category-description-content strong { color: var(--text); font-weight: 600; }
.category-description-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.category-description-content a:hover { color: var(--primary-hover); }
.category-description-content ul, .category-description-content ol { margin: var(--space-md) 0; padding-left: var(--space-lg); }
.category-description-content li { margin-bottom: var(--space-sm); }

.read-more-btn {
    display: none;
    width: 100%;
    padding: 14px 20px;
    margin-top: var(--space-md);
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.read-more-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }
.read-more-btn svg { width: 16px; height: 16px; transition: transform var(--duration-base); }
.read-more-btn.expanded svg { transform: rotate(180deg); }

@media (max-width: 768px) {
    .category-description-wrapper.collapsible .category-description-content { max-height: 300px; overflow: hidden; }
    .category-description-wrapper.collapsible.expanded .category-description-content { max-height: none; }
    .category-description-wrapper.collapsible .read-more-btn { display: flex; }
}

/* SEO Highlights */
.seo-highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); margin-top: var(--space-xl); }

.seo-highlight {
    background: var(--bg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--duration-base) var(--ease-out);
}

.seo-highlight:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border); }

.seo-highlight-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(145deg, var(--primary-light), white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.seo-highlight-icon svg { width: 26px; height: 26px; }
.seo-highlight-title { font-weight: 800; color: var(--text); margin-bottom: 4px; font-size: var(--text-sm); }
.seo-highlight-text { font-size: var(--text-xs); color: var(--text-muted); }

/* ===== FAQ SECTION ===== */
.faq-section {
    max-width: var(--max-width);
    margin: var(--space-2xl) auto;
    padding: 0 var(--container-padding);
}

.faq-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.faq-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, var(--primary-light), white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.faq-icon svg { width: 32px; height: 32px; }

.faq-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.faq-subtitle {
    font-size: var(--text-base);
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--duration-base) var(--ease-out);
}

.faq-item:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--primary-light);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--duration-fast);
}

.faq-question:hover { background: var(--bg); }
.faq-question:focus { outline: none; background: var(--primary-light); }
.faq-question:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.faq-question-text {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    flex: 1;
}

.faq-toggle {
    width: 32px;
    height: 32px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--duration-base) var(--ease-out);
    color: var(--text-muted);
}

.faq-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform var(--duration-base) var(--ease-out);
}

.faq-item.active .faq-toggle {
    background: var(--primary);
    color: white;
}

.faq-item.active .faq-toggle svg { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-slow) var(--ease-out);
}

.faq-item.active .faq-answer { max-height: 500px; }

.faq-answer-content {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.faq-answer-content p { margin: 0; }
.faq-answer-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.faq-answer-content a:hover { color: var(--primary-hover); }

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    animation: toast-in var(--duration-base) var(--ease-spring);
    pointer-events: auto;
}

.toast.toast-out { animation: toast-out var(--duration-fast) var(--ease-out) forwards; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(10px) scale(0.95); }
}

.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* Responsive */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .seo-highlights { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    :root { --container-padding: 16px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
    .category-hero { margin: var(--space-md) var(--container-padding); padding: var(--space-xl); }
    .category-name { font-size: var(--text-3xl); }
}

@media (max-width: 768px) {
    :root { --header-height: 64px; --container-padding: 12px; }
    .page-header { padding: var(--space-sm) var(--container-padding); }
    .breadcrumb { font-size: var(--text-xs); gap: 5px; }
    .breadcrumb svg { width: 12px; height: 12px; }
    .category-hero { margin: var(--space-sm) var(--container-padding); padding: var(--space-lg); border-radius: var(--radius-xl); text-align: center; }
    .category-hero-content { flex-direction: column; gap: var(--space-md); }
    .category-icon { width: 100px; height: 100px; border-radius: var(--radius-xl); }
    .category-icon-placeholder { font-size: 42px; }
    .category-badge { padding: 8px 14px; font-size: 10px; }
    .category-name { font-size: var(--text-2xl); margin-bottom: var(--space-xs); }
    .category-tagline { font-size: var(--text-sm); max-width: 100%; margin-bottom: var(--space-md); }
    .category-features { justify-content: center; gap: var(--space-sm); }
    .category-feature { font-size: var(--text-xs); gap: 8px; }
    .category-feature-icon { width: 38px; height: 38px; border-radius: var(--radius-md); }
    .category-feature-icon svg { width: 18px; height: 18px; }
    .filters-bar { padding: var(--space-sm) var(--container-padding); top: var(--header-height); }
    .filters-inner { gap: 6px; justify-content: flex-start; flex-wrap: wrap; }
    .filter-group { flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
    .filter-chip { padding: 8px 14px; font-size: var(--text-xs); min-height: 38px; }
    .filter-select { padding: 8px 30px 8px 14px; font-size: var(--text-xs); min-width: 120px; min-height: 38px; }
    .product-content { padding: 10px; }
    .product-title { font-size: var(--text-xs); min-height: 36px; }
    .product-price { font-size: var(--text-lg); }
    .category-description-section { margin-top: var(--space-lg); padding: var(--space-lg); border-radius: var(--radius-xl); }
    .seo-highlights { grid-template-columns: 1fr; gap: var(--space-sm); }
    
    /* FAQ Mobile */
    .faq-section { margin: var(--space-xl) auto; }
    .faq-icon { width: 52px; height: 52px; }
    .faq-icon svg { width: 26px; height: 26px; }
    .faq-title { font-size: var(--text-xl); }
    .faq-subtitle { font-size: var(--text-sm); }
    .faq-question { padding: var(--space-md); }
    .faq-question-text { font-size: var(--text-sm); }
    .faq-toggle { width: 28px; height: 28px; }
    .faq-toggle svg { width: 16px; height: 16px; }
    .faq-answer-content { padding: 0 var(--space-md) var(--space-md); font-size: var(--text-xs); }
}

@media (max-width: 480px) {
    :root { --container-padding: 10px; }
    .category-hero { padding: var(--space-md); border-radius: var(--radius-lg); margin: 6px var(--container-padding); }
    .category-icon { width: 80px; height: 80px; border-radius: var(--radius-lg); }
    .category-icon-placeholder { font-size: 34px; }
    .category-badge { padding: 6px 12px; font-size: 9px; }
    .category-name { font-size: var(--text-xl); }
    .category-tagline { font-size: var(--text-xs); }
    .product-grid { gap: var(--space-sm); }
    .product-content { padding: 8px; }
    .product-title { font-size: 11px; min-height: 32px; }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body { background: var(--bg-dark); color: var(--text-dark); }
    .page-header { background: var(--surface-dark); border-color: var(--border-dark); }
    .breadcrumb { color: var(--text-muted-dark); }
    .breadcrumb a { color: var(--text-secondary-dark); }
    .breadcrumb a:hover { color: var(--primary-dark-mode); }
    .breadcrumb-current { color: var(--text-dark); }
    .category-hero { background: linear-gradient(135deg, #0c0f1a 0%, #1a1445 50%, #2d1a5e 100%); }
    .filters-bar { background: var(--surface-dark); border-color: var(--border-dark); }
    .filter-chip { background: var(--surface-dark); border-color: var(--border-dark); color: var(--text-secondary-dark); }
    .filter-chip:hover { background: var(--primary-light-dark); border-color: var(--primary-dark-mode); color: var(--primary-dark-mode); }
    .filter-chip.active { background: var(--primary-dark-mode); border-color: var(--primary-dark-mode); color: white; }
    .filter-select { background-color: var(--surface-dark); border-color: var(--border-dark); color: var(--text-secondary-dark); }
    .product-card { background: var(--surface-dark); border-color: var(--border-dark); }
    .product-card:hover { border-color: var(--border-dark); }
    .product-image { background: var(--bg-dark); }
    .product-title { color: var(--text-dark); }
    .product-price { color: var(--text-dark); }
    .product-brand { color: var(--text-muted-dark); }
    .product-category { color: var(--primary-dark-mode); }
    .product-meta { border-color: var(--border-dark); }
    .product-shipping { color: var(--text-muted-dark); }
    .subcategory-chip { background: var(--surface-dark); border-color: var(--border-dark); color: var(--text-dark); }
    .subcategory-chip:hover { background: var(--primary-light-dark); border-color: var(--primary-dark-mode); color: var(--primary-dark-mode); }
    .subcategory-card { background: var(--surface-dark); border-color: var(--border-dark); color: var(--text-dark); }
    .subcategory-card:hover { background: var(--primary-light-dark); border-color: var(--primary-dark-mode); color: var(--primary-dark-mode); }
    .category-description-section { background: var(--surface-dark); border-color: var(--border-dark); }
    .category-description-title { color: var(--text-dark); }
    .category-description-content { color: var(--text-secondary-dark); }
    .category-description-content h2, .category-description-content h3 { color: var(--text-dark); }
    .category-description-content strong { color: var(--text-dark); }
    .category-description-content a { color: var(--primary-dark-mode); }
    .seo-highlight { background: var(--bg-dark); border-color: var(--border-dark); }
    .seo-highlight-title { color: var(--text-dark); }
    .seo-highlight-text { color: var(--text-muted-dark); }
    .loading-overlay { background: var(--bg-dark); }
    .loading-text { color: var(--text-muted-dark); }
    .empty-icon { background: linear-gradient(145deg, var(--primary-light-dark), var(--bg-dark)); }
    .empty-title { color: var(--text-dark); }
    .empty-text { color: var(--text-secondary-dark); }
    .toast { background: var(--surface-dark); border-color: var(--border-dark); color: var(--text-dark); }
    
    /* FAQ Dark Mode */
    .faq-icon { background: linear-gradient(145deg, var(--primary-light-dark), var(--bg-dark)); }
    .faq-title { color: var(--text-dark); }
    .faq-subtitle { color: var(--text-muted-dark); }
    .faq-item { background: var(--surface-dark); border-color: var(--border-dark); }
    .faq-item:hover { border-color: var(--border-dark); }
    .faq-item.active { border-color: var(--primary-dark-mode); box-shadow: var(--shadow-md), 0 0 0 3px var(--primary-light-dark); }
    .faq-question:hover { background: var(--bg-dark); }
    .faq-question:focus { background: var(--primary-light-dark); }
    .faq-question-text { color: var(--text-dark); }
    .faq-toggle { background: var(--bg-dark); color: var(--text-muted-dark); }
    .faq-item.active .faq-toggle { background: var(--primary-dark-mode); }
    .faq-answer-content { color: var(--text-secondary-dark); }
    .faq-answer-content a { color: var(--primary-dark-mode); }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .product-card:hover { transform: none; }
    .seo-highlight:hover { transform: none; }
    html { scroll-behavior: auto; }
}

/* Print */
@media print {
    .loading-overlay, .wishlist-btn, .filters-bar, .toast-container { display: none !important; }
    .product-card { break-inside: avoid; page-break-inside: avoid; box-shadow: none; border: 1px solid #ddd; }
    body { background: white; color: black; }
    .category-hero { background: #f0f0f0; color: black; }
    .category-name { color: black; text-shadow: none; }
    .category-tagline { color: #333; }
    .faq-section { page-break-inside: avoid; }
    .faq-item { border: 1px solid #ddd; margin-bottom: 10px; }
    .faq-answer { max-height: none !important; }
    .faq-toggle { display: none; }
}