/**
 * Professional Hardware Store Theme
 * Complete Design System for B2B E-commerce Platform
 * Inspired by Amazon, Leroy Merlin, and Modern SaaS Dashboards
 */

/* ===== DESIGN SYSTEM VARIABLES ===== */
:root {
    /* Primary Colors */
    --color-primary: #1E3A8A;
    --color-primary-light: #3B82F6;
    --color-primary-dark: #1E40AF;
    --color-accent: #F97316;
    --color-accent-dark: #EA580C;
    --color-accent-darker: #DC2626;

    /* Neutral Colors */
    --color-bg: #F9FAFB;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F3F4F6;
    --color-border: #E5E7EB;
    --color-border-dark: #D1D5DB;
    --color-text-primary: #111827;
    --color-text-secondary: #6B7280;
    --color-text-muted: #9CA3AF;
    --color-text-light: #D1D5DB;

    /* Status Colors */
    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-danger: #EF4444;
    --color-danger-light: #FEE2E2;
    --color-info: #3B82F6;
    --color-info-light: #DBEAFE;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #F97316, #EA580C);
    --gradient-primary-hover: linear-gradient(135deg, #EA580C, #DC2626);
    --gradient-dark: linear-gradient(135deg, #1E3A8A, #1E40AF);
    --gradient-success: linear-gradient(135deg, #10B981, #059669);
    --gradient-danger: linear-gradient(135deg, #B91C1C, #DC2626);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* 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;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    --shadow-orange: 0 8px 30px rgba(249, 115, 22, 0.15);
    --shadow-primary: 0 8px 30px rgba(30, 58, 138, 0.15);

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Container */
    --container-max-width: 1400px;
    --header-height: 72px;
    --header-height-mobile: 60px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-accent-dark);
}

/* ===== HEADER ===== */
.top-banner {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
}

.top-banner a {
    color: rgba(255, 255, 255, 0.9);
}

.top-banner a:hover {
    color: white;
}

.main-header {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid var(--color-border);
}

.header-main {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    min-height: var(--header-height);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    transition: opacity var(--transition-base);
}

.brand-logo:hover {
    opacity: 0.9;
}

.brand-logo .logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-logo .logo-icon i,
.brand-logo .logo-icon svg {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Fix icon sizes throughout the site */
i, svg {
    max-width: 1.5em;
    max-height: 1.5em;
}

/* Header icons */
.header-actions i,
.header-actions svg,
.search-btn i,
.search-btn svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Cart icon */
.cart-btn i,
.cart-btn svg {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.cart-btn .cart-count {
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
}

/* Category icons */
.category-icon i,
.category-icon svg {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Benefit icons */
.benefit-icon i,
.benefit-icon svg {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Large icon placeholders */
.hero-image-placeholder {
    width: 240px;
    height: 240px;
}

.hero-image-placeholder i,
.hero-image-placeholder svg {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

/* Category icons */
.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.2));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-accent);
    transition: transform var(--transition-base);
}

/* Benefit icons */
.benefit-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-4);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.2));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon i,
.benefit-icon svg {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--color-accent);
}

/* Brand icon placeholders */
.brand-logo-placeholder {
    width: 80px;
    height: 80px;
}

.brand-logo-placeholder i,
.brand-logo-placeholder svg {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.brand-logo .brand-name {
    font-weight: 700;
    font-size: var(--text-lg);
    line-height: 1.2;
}

.brand-logo .brand-tagline {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ===== SEARCH BAR ===== */
.search-wrapper {
    display: flex;
    align-items: stretch;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    max-width: 600px;
    width: 100%;
}

.search-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.search-category-select {
    padding: var(--space-3) var(--space-4);
    border: none;
    background: var(--color-surface-alt);
    font-size: var(--text-sm);
    color: var(--color-text-primary);
    cursor: pointer;
    border-right: 1px solid var(--color-border);
    transition: background var(--transition-base);
}

.search-category-select:hover {
    background: var(--color-border);
}

.search-input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: none;
    font-size: var(--text-base);
    outline: none;
    background: var(--color-surface);
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-btn {
    padding: var(--space-3) var(--space-5);
    border: none;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    transition: background var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--gradient-primary-hover);
}

/* ===== CATEGORY NAVIGATION ===== */
.category-nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-2) 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav a,
.category-nav button {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--transition-base);
}

.category-nav a:hover,
.category-nav button:hover {
    color: var(--color-accent);
}

.category-nav button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.category-nav button:hover {
    background: var(--color-surface-alt);
}

/* ===== MEGA MENU ===== */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-xl);
    border-top: 1px solid var(--color-border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-slow);
    z-index: var(--z-dropdown);
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
    padding: var(--space-8);
}

.mega-menu-column h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.mega-menu-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mega-menu-column a {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    transition: color var(--transition-base);
}

.mega-menu-column a:hover {
    color: var(--color-accent);
}

.mega-menu-banner {
    grid-column: span 4;
    background: var(--gradient-dark);
    color: white;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    margin-top: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.header-action-btn:hover {
    background: var(--color-surface-alt);
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gradient-primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
}

.mobile-menu-btn:hover {
    background: var(--color-surface-alt);
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .category-nav {
        display: none;
    }

    .search-wrapper {
        max-width: 300px;
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--gradient-dark);
    color: white;
    padding: var(--space-16) 0;
    position: relative;
    overflow: hidden;
}

/* Fix large icon sizes in hero section */
.hero-cta i,
.hero-cta svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.hero-badge i,
.hero-badge svg {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.hero-text h1 {
    font-size: var(--text-5xl);
    font-weight: 800;
    margin-bottom: var(--space-6);
    line-height: 1.1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}

.hero-subtitle {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-cta {
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-base);
}

.hero-cta-primary {
    background: white;
    color: var(--color-primary);
}

.hero-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-cta-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

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

.hero-image-placeholder {
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.hero-image-placeholder i {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: var(--text-3xl);
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-image-placeholder {
        width: 240px;
        height: 240px;
    }
}

/* ===== CATEGORIES SECTION ===== */
.categories-section {
    padding: var(--space-8) 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.section-title {
    font-size: var(--text-2xl);
    font-weight: 700;
}

.section-link {
    color: var(--color-accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: gap var(--transition-base);
}

.section-link:hover {
    gap: var(--space-3);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-4);
}

.category-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-orange);
}

.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.2));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--color-accent);
    transition: transform var(--transition-base);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-name {
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
}

.category-count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== FEATURED PRODUCTS ===== */
.featured-section {
    padding: var(--space-8) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== PRODUCT CARD ===== */
.product-card {
    position: relative;
}

.product-card-inner {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover .product-card-inner {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-orange);
    transform: translateY(-8px);
}

.product-image-container {
    position: relative;
    padding: var(--space-6);
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.product-image {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-badges {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    right: var(--space-3);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.product-badge {
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 700;
    color: white;
    line-height: 1;
}

.product-badge-sale {
    background: var(--gradient-danger);
}

.product-badge-new {
    background: var(--gradient-success);
}

.product-badge-featured {
    background: var(--gradient-primary);
}

.product-stock-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.9);
    color: white;
    text-align: center;
    padding: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
}

.product-info {
    padding: var(--space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: var(--space-3);
}

.product-title a {
    color: var(--color-text-primary);
    transition: color var(--transition-base);
}

.product-title a:hover {
    color: var(--color-accent);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-3);
}

.product-rating-stars {
    display: flex;
    gap: 2px;
    color: #FBBF24;
    font-size: var(--text-xs);
}

.product-rating-count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.product-price-current {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-danger);
}

.product-price-old {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.product-price-savings {
    font-size: var(--text-xs);
    color: var(--color-success);
    font-weight: 600;
    background: var(--color-success-light);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.product-actions {
    margin-top: auto;
}

.product-add-btn {
    width: 100%;
    padding: var(--space-3);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.product-add-btn:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.product-add-btn:disabled {
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== DEALS SECTION ===== */
.deals-section {
    padding: var(--space-8) 0;
}

.deals-banner {
    background: var(--gradient-danger);
    color: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    overflow: hidden;
}

.deals-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.deals-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.deals-countdown {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.countdown-timer {
    display: flex;
    gap: var(--space-2);
}

.countdown-unit {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 48px;
}

.countdown-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1;
}

.countdown-label {
    font-size: var(--text-xs);
    opacity: 0.9;
}

.deals-cta {
    background: white;
    color: var(--color-danger);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-base);
}

.deals-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===== BENEFITS SECTION ===== */
.benefits-section {
    padding: var(--space-8) 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.benefit-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--transition-base);
}

/* Fix icon sizes in benefit cards */
.benefit-card i,
.benefit-card svg {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.benefit-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.benefit-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-4);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.2));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-accent);
}

.benefit-title {
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.benefit-description {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

@media (max-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== BRANDS MARQUEE ===== */
.brands-section {
    padding: var(--space-8) 0;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-6);
    align-items: center;
}

.brand-item {
    text-align: center;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.brand-item:hover {
    background: var(--color-surface-alt);
}

.brand-logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-2);
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-text-muted);
}

.brand-item:hover .brand-logo-placeholder {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.2));
    color: var(--color-accent);
}

.brand-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

@media (max-width: 1024px) {
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== FILTERS SIDEBAR ===== */
.filters-sidebar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.filter-header h4 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.filter-section {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color var(--transition-base);
}

.filter-item:hover {
    color: var(--color-accent);
}

.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
    margin-right: var(--space-2);
}

.filter-count {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    background: var(--color-surface-alt);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.price-range {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.price-range input {
    flex: 1;
    padding: var(--space-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}

.btn-apply-filters {
    width: 100%;
    padding: var(--space-3);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-4);
    transition: background var(--transition-base);
}

.btn-apply-filters:hover {
    background: var(--gradient-primary-hover);
}

/* ===== PAGINATION ===== */
.pagination-wrapper {
    margin-top: var(--space-8);
}

.pagination {
    display: flex;
    gap: var(--space-2;
    justify-content: center;
}

.page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all var(--transition-base);
    text-decoration: none;
}

.page-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.page-link.active {
    background: var(--gradient-primary);
    border-color: var(--color-accent);
    color: white;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: var(--space-20) var(--space-8);
}

.empty-icon {
    font-size: 80px;
    color: var(--color-border);
    margin-bottom: var(--space-8);
}

.empty-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.empty-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== BREADCRUMBS ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

.breadcrumb span {
    color: var(--color-text-muted);
}

.breadcrumb-current {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    text-decoration: none;
}

/* Fix icon sizes in buttons */
.btn i,
.btn svg {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

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

.btn-primary:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.btn-secondary:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-border-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

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

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

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

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

/* ===== ALERTS ===== */
.alert {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border: 1px solid;
}

/* Fix icon sizes in alerts */
.alert-icon {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
}

/* Fix icon sizes in badges */
.badge i,
.badge svg {
    font-size: 10px;
    width: 10px;
    height: 10px;
}

.alert-success {
    background: var(--color-success-light);
    color: #065F46;
    border-color: #A7F3D0;
}

.alert-danger {
    background: var(--color-danger-light);
    color: #991B1B;
    border-color: #FECACA;
}

.alert-warning {
    background: var(--color-warning-light);
    color: #92400E;
    border-color: #FDE68A;
}

.alert-info {
    background: var(--color-info-light);
    color: #1E40AF;
    border-color: #BFDBFE;
}

.alert-icon {
    font-size: 20px;
}

/* ===== CARDS ===== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: var(--space-6);
}

/* ===== GLOBAL ICON SIZE LIMITS ===== */
/* Prevent icons from being too large */
i.fas, i.far, i.fab,
i[class*=" fa-"] {
    max-width: 1.2em;
    max-height: 1.2em;
}

/* Fix Font Awesome icon sizes */
.fas, .far, .fab {
    font-size: inherit;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
}

svg {
    max-width: 1.5em;
    max-height: 1.5em;
}

/* Fix icon sizes in specific contexts */
.section-header i,
.section-header svg {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.filter-header i,
.filter-header svg {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ===== UTILITY CLASSES ===== */
.bg-white { background-color: var(--color-surface); }
.bg-gray-50 { background-color: var(--color-bg); }
.bg-gray-100 { background-color: var(--color-surface-alt); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.border { border: 1px solid var(--color-border); }
.border-t { border-top: 1px solid var(--color-border); }
.border-b { border-bottom: 1px solid var(--color-border); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.animate-slide-down {
    animation: slideDown 0.2s ease;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .filters-sidebar {
        position: static;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: var(--header-height-mobile);
    }

    .hero-section {
        padding: var(--space-12) 0;
    }

    .hero-text h1 {
        font-size: var(--text-3xl);
    }

    .hero-cta {
        padding: var(--space-3) var(--space-6);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .products-grid {
        gap: var(--space-4);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .product-image-container {
        min-height: 160px;
    }

    .product-title {
        height: 36px;
    }

    .btn {
        padding: var(--space-2) var(--space-4);
    }
}

/* ===== SVG ICONS ===== */
svg {
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    max-width: 1em;
    max-height: 1em;
}

/* Icon sizing overrides */
svg.icon-xs {
    width: 0.75em;
    height: 0.75em;
}

svg.icon-sm {
    width: 0.875em;
    height: 0.875em;
}

svg.icon-base {
    width: 1em;
    height: 1em;
}

svg.icon-lg {
    width: 1.25em;
    height: 1.25em;
}

svg.icon-xl {
    width: 1.5em;
    height: 1.5em;
}

svg.icon-2x {
    width: 2em;
    height: 2em;
}

svg.icon-3x {
    width: 3em;
    height: 3em;
}

svg.icon-4x {
    width: 4em;
    height: 4em;
}

/* Icon colors */
svg.text-primary {
    color: var(--color-text-primary);
}

svg.text-secondary {
    color: var(--color-text-secondary);
}

svg.text-muted {
    color: var(--color-text-muted);
}

svg.text-accent {
    color: var(--color-accent);
}

svg.text-success {
    color: var(--color-success);
}

svg.text-danger {
    color: var(--color-danger);
}

svg.text-warning {
    color: var(--color-warning);
}

svg.text-info {
    color: var(--color-info);
}

/* Icon utilities */
svg.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

svg.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== PRINT STYLES ===== */
@media print {
    .main-header,
    .top-banner,
    .filters-sidebar,
    .breadcrumb,
    .btn,
    .pagination {
        display: none;
    }

    .product-card {
        break-inside: avoid;
    }
}

/* ===== DARK MODE SUPPORT (Future) ===== */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here when needed */
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent);
    color: white;
    padding: var(--space-2) var(--space-4);
    z-index: 9999;
    transition: top var(--transition-base);
}

.skip-to-main:focus {
    top: 0;
}