/**
 * nvectors - Creative Market Inspired Design
 * Version 4.0 - Light/Dark Mode
 */

/* ============================================
   ROOT VARIABLES - Light Theme (Default)
   ============================================ */
:root {
    /* Primary */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --primary-50: #eef2ff;

    /* Accent - Warm Orange */
    --accent: #f97316;
    --accent-light: #fb923c;

    /* Semantic Colors */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #eab308;

    /* Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Light Theme */
    --bg-body: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ============================================
   DARK THEME
   ============================================ */
[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --border-light: #1e293b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Prevent horizontal scroll on mobile */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-body);
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
    /* Prevent horizontal scroll on mobile */
    max-width: 100vw;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-lg {
    max-width: 1440px;
}

.section {
    padding: var(--space-16) 0;
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1200px) {
    .grid-6 {
        grid-template-columns: repeat(4, 1fr);
    }

    .grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {

    .grid-6,
    .grid-5,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .grid-6,
    .grid-5,
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--space-4);
    }
}

/* ============================================
   HEADER - Creative Market Style
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header-top {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-light);
}

.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.header-main {
    padding: var(--space-4) 0;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
}

/* Search */
.search-box {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 var(--space-5);
    padding-left: 48px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-body);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Nav */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-link {
    padding: var(--space-2) var(--space-4);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-50);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    background: var(--bg-tertiary);
}

/* Header Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Theme Toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.theme-toggle .icon-sun {
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 44px;
    padding: 0 var(--space-6);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-light);
}

.btn-lg {
    height: 52px;
    padding: 0 var(--space-8);
    font-size: 1rem;
}

.btn-sm {
    height: 36px;
    padding: 0 var(--space-4);
    font-size: 0.875rem;
}

.btn-icon {
    width: 44px;
    padding: 0;
}

.btn-icon-sm {
    width: 36px;
    height: 36px;
    padding: 0;
}

/* ============================================
   HERO - Creative Market Style
   ============================================ */
.hero {
    padding: var(--space-16) 0 var(--space-20);
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-body) 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--space-6);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
    color: var(--primary);
}

.section-link:hover {
    text-decoration: underline;
}

/* ============================================
   CATEGORY CARDS - Creative Market Style
   ============================================ */
.categories-section {
    padding: var(--space-12) 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-4);
}

@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-8) var(--space-4);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s ease;
    transform-origin: left;
}

.category-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.category-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.category-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
    background: var(--bg-secondary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}

.category-card:hover .category-icon {
    background: var(--primary-50);
    color: var(--primary);
    transform: scale(1.1) rotate(6deg);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .category-card:hover .category-icon {
    background: rgba(99, 102, 241, 0.2);
}

.category-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.category-card:hover .category-name {
    color: var(--primary);
}

.category-count {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.category-card:hover .category-count {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ============================================
   PRODUCT CARDS - Creative Market Style
   ============================================ */
.product-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-secondary);
    padding: 12px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 0.4s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge.free {
    background: var(--success);
    color: white;
}

.card-badge.sale {
    background: var(--error);
    color: white;
}

.card-badge.featured {
    background: var(--accent);
    color: white;
}

.card-badge.bestseller {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: var(--space-1) var(--space-3);
    box-shadow: 0 4px 15px rgba(247, 147, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: bestseller-pulse 2s ease-in-out infinite;
}

.card-badge.bestseller::before {
    content: "🔥";
    font-size: 0.75rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

@keyframes bestseller-pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(247, 147, 30, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(247, 147, 30, 0.6);
    }
}

.card-actions {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
}

.product-card:hover .card-actions {
    opacity: 1;
    transform: translateX(0);
}

.card-actions .btn-icon-sm {
    background: white;
    border: none;
    box-shadow: var(--shadow-md);
    color: var(--text-secondary);
}

.card-actions .btn-icon-sm:hover {
    background: var(--primary);
    color: white;
}

.card-body {
    padding: var(--space-5);
}

.card-category {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a:hover {
    color: var(--primary);
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.card-price {
    font-size: 1.125rem;
    font-weight: 700;
}

.card-price.free {
    color: var(--success);
}

.card-price-old {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: var(--space-2);
}

.card-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 48px;
    padding: 0 var(--space-4);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-textarea {
    height: auto;
    padding: var(--space-4);
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    padding: var(--space-16);
    border-radius: var(--radius-2xl);
    text-align: center;
    color: white;
}

.cta-section h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: var(--space-4);
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: var(--space-6);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn {
    background: white;
    color: var(--primary);
}

.cta-section .btn:hover {
    background: var(--gray-100);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: var(--space-16) 0 var(--space-8);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-10);
    margin-bottom: var(--space-10);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: var(--space-4);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-title {
    font-weight: 600;
    margin-bottom: var(--space-4);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.footer-social a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary);
}

/* Footer Payment Methods */
.footer-payments {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-payments .payment-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-payments .payment-icons {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-payments .payment-icons img {
    height: 20px;
    width: auto;
    opacity: 0.7;
    transition: opacity var(--transition);
    filter: grayscale(100%);
}

.footer-payments .payment-icons img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

@media (max-width: 900px) {
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer-payments {
        order: -1;
    }
}

/* ============================================
   CART
   ============================================ */
.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-body);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius);
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

/* Notification */
#notification {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    padding: var(--space-4) var(--space-6);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 3000;
}

#notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-10);
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================
   UTILITIES
   ============================================ */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--text-muted);
}

main {
    min-height: 60vh;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .search-box {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .search-box {
        display: none;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-6);
    }

    .header-top {
        display: none;
    }
}

/* ============================================
   SLIDESHOW / CAROUSEL
   ============================================ */
.slideshow {
    position: relative;
    width: 100%;
    padding: var(--space-8) 0;
    background: var(--bg-secondary);
}

.slideshow>.container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
}

.slideshow-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

/* Slide Animation - Slide */
.slideshow[data-animation="slide"] .slideshow-track {
    display: flex;
    transition: transform 0.5s ease;
}

.slideshow[data-animation="slide"] .slide {
    position: relative;
    flex-shrink: 0;
    opacity: 1;
    visibility: visible;
}

/* Slide Image */
.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slide Content Overlay */
.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-12) 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: white;
}

.slide-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: white;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
    margin-left: var(--space-8);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slide-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--space-6);
    max-width: 600px;
}

.slide-btn {
    background: white;
    color: var(--primary);
    font-weight: 600;
}

.slide-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Navigation Arrows */
.slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    color: var(--text-primary);
}

.slideshow-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.slideshow-prev {
    left: var(--space-6);
}

.slideshow-next {
    right: var(--space-6);
}

/* Navigation Dots */
.slideshow-dots {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-3);
    z-index: 10;
}

.slideshow-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slideshow-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Slideshow Responsive */
@media (max-width: 1024px) {
    .slideshow-wrapper {
        height: 400px;
    }

    .slideshow-arrow {
        width: 44px;
        height: 44px;
    }

    .slideshow-prev {
        left: var(--space-4);
    }

    .slideshow-next {
        right: var(--space-4);
    }
}

@media (max-width: 768px) {
    .slideshow-wrapper {
        height: 300px;
    }

    .slide-content {
        padding: var(--space-8) 0;
    }

    .slide-title {
        font-size: 1.5rem;
    }

    .slide-subtitle {
        font-size: 0.9375rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .slideshow-arrow {
        width: 40px;
        height: 40px;
    }

    .slideshow-arrow svg {
        width: 20px;
        height: 20px;
    }

    .slideshow-prev {
        left: var(--space-2);
    }

    .slideshow-next {
        right: var(--space-2);
    }

    .slideshow-dots {
        bottom: var(--space-4);
    }

    .slideshow-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .slideshow-wrapper {
        height: 250px;
    }

    .slide-btn {
        height: 40px;
        padding: 0 var(--space-5);
        font-size: 0.875rem;
    }
}

/* ============================================
   MOBILE DRAWER
   ============================================ */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-body);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-body);
    z-index: 10;
}

.mobile-drawer-header .logo {
    font-size: 1.25rem;
}

.mobile-drawer-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-drawer-close:hover {
    background: var(--primary);
    color: white;
}

.mobile-drawer-search {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-search form {
    position: relative;
}

.mobile-drawer-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.mobile-search-input {
    width: 100%;
    height: 48px;
    padding: 0 var(--space-4) 0 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.mobile-search-input::placeholder {
    color: var(--text-muted);
}

.mobile-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-body);
}

.mobile-nav {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
    margin-bottom: var(--space-1);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--bg-secondary);
    color: var(--primary);
}

.mobile-nav-link svg {
    flex-shrink: 0;
}

.mobile-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: var(--space-4) var(--space-4) var(--space-2);
}

.mobile-categories {
    padding: 0 var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.mobile-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
}

.mobile-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--text-primary);
    transition: var(--transition);
    text-align: center;
    min-width: 0;
}

.mobile-category-item:hover {
    background: var(--primary-50);
    color: var(--primary);
}

[data-theme="dark"] .mobile-category-item:hover {
    background: var(--bg-tertiary);
}

.mobile-category-icon {
    font-size: 1.125rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.mobile-category-name {
    font-weight: 500;
    font-size: 0.6875rem;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-resources {
    padding: 0 var(--space-5) var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.mobile-resources .mobile-nav-link span {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.mobile-user-actions {
    padding: var(--space-5);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mobile-btn-full {
    width: 100%;
    justify-content: center;
}

.mobile-cart-badge {
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: var(--space-2);
}

/* ============================================
   ENHANCED MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

    /* Header Mobile Adjustments */
    .header-inner {
        gap: var(--space-4);
    }

    .logo span {
        display: none;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Buttons - Better touch targets */
    .btn {
        min-height: 48px;
    }

    .btn-icon,
    .theme-toggle {
        width: 44px;
        height: 44px;
    }

    /* Hero Mobile */
    .hero {
        padding: var(--space-10) 0 var(--space-12);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        padding: 0 var(--space-4);
    }

    .hero-actions .btn {
        width: 100%;
    }

    /* Section Padding */
    .section {
        padding: var(--space-10) 0;
    }

    /* Section Headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }

    .section-title {
        font-size: 1.375rem;
    }

    /* Product Cards Mobile */
    .card-body {
        padding: var(--space-4);
    }

    .card-title {
        font-size: 0.9375rem;
    }

    .card-price {
        font-size: 1rem;
    }

    /* Footer Mobile */
    .footer {
        padding: var(--space-10) 0 var(--space-6);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer-social {
        order: -1;
    }
}

@media (max-width: 480px) {

    /* Container Mobile */
    .container {
        padding: 0 var(--space-4);
    }

    /* Typography Mobile */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Category Cards Mobile */
    .category-card {
        padding: var(--space-5) var(--space-3);
    }

    .category-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }

    .category-name {
        font-size: 0.9375rem;
    }

    .category-count {
        font-size: 0.75rem;
        padding: 3px 10px;
    }

    /* Card Actions Always Visible on Mobile */
    .card-actions {
        opacity: 1;
        transform: translateX(0);
    }

    /* CTA Section Mobile */
    .cta-section {
        padding: var(--space-10);
        border-radius: var(--radius-xl);
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}

/* Body scroll lock when drawer is open */
body.drawer-open {
    overflow: hidden;
}