/**
 * Homepage Styles - Modern Preisvergleich Homepage
 * 
 * This file contains all styles for the modernized homepage including:
 * - CSS Custom Properties (CSS Variables)
 * - Hero Section
 * - Top Deal Section
 * - Category Grid
 * - Modern Footer
 * - CSS Animations
 * - Responsive Breakpoints
 * - Dark Mode Support
 */

/* ============================================
   CSS CUSTOM PROPERTIES (CSS VARIABLES)
   ============================================ */

:root {
    /* Primary Colors */
    --primary-blue: #0d6efd;
    --primary-blue-dark: #0b5ed7;
    --primary-blue-light: #3d8bfd;
    
    /* Background Colors */
    --bg-light-blue: rgba(227, 242, 253, 0.3);
    --bg-white: #ffffff;
    --bg-gray: #f8f9fa;
    
    /* Text Colors */
    --text-dark: #212529;
    --text-muted: #6c757d;
    --text-light: #ffffff;
    
    /* Accent Colors */
    --accent-yellow: #ffc107;
    --accent-red: #dc3545;
    --accent-green: #198754;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 2rem;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* ============================================
   DARK MODE COLORS - IMPROVED CONTRAST
   ============================================ */

[data-theme="dark"] {
    /* Primary Colors - Lighter variants for better contrast (WCAG AA compliant) */
    --primary-blue: #6ba3ff;
    --primary-blue-dark: #5a9fff;
    --primary-blue-light: #8bb8ff;
    
    /* Background Colors - Darker variants with proper contrast */
    --bg-light-blue: rgba(107, 163, 255, 0.1);
    --bg-white: #1a1d20;
    --bg-gray: #2d3238;
    --bg-card: #252830;
    
    /* Text Colors - Light colors for readability (minimum 4.5:1 contrast) */
    --text-dark: #f0f2f5;
    --text-muted: #c5cdd5;
    --text-light: #ffffff;
    
    /* Border Colors - More visible borders */
    --border-color: rgba(255, 255, 255, 0.2);
    
    /* Shadows - Enhanced shadows for better depth perception */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.6);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.8);
    
    /* Gradient Backgrounds - Darker with better contrast */
    --gradient-hero: linear-gradient(135deg, #1a1d20 0%, #2d3238 100%);
    --gradient-header: linear-gradient(135deg, #1e2329 0%, #2d3238 100%);
    --gradient-footer: linear-gradient(135deg, #1e2329 0%, #252830 100%);
    --gradient-top-deal: linear-gradient(135deg, #3d3420 0%, #2d2518 100%);
    
    /* Accent Colors - Adjusted for dark mode */
    --accent-yellow: #ffd54f;
    --accent-red: #ef5350;
    --accent-green: #66bb6a;
}

/* ============================================
   MODERN HEADER STYLES
   ============================================ */

.modern-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .modern-header {
    background: var(--gradient-header);
}

.modern-header .navbar {
    padding: 0.75rem 0;
}

.modern-header .navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-light);
    transition: opacity var(--transition-fast);
}

.modern-header .navbar-brand:hover {
    opacity: 0.9;
    color: var(--text-light);
}

.modern-header .navbar-brand i {
    margin-right: 0.5rem;
}

.modern-header .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color var(--transition-fast);
    padding: 0.5rem 1rem;
}

.modern-header .nav-link:hover,
.modern-header .nav-link:focus {
    color: var(--text-light);
}

.modern-header .dropdown-menu {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: none;
}

[data-theme="dark"] .modern-header .dropdown-menu {
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
}

.modern-header .dropdown-item {
    transition: background-color var(--transition-fast);
}

.modern-header .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

[data-theme="dark"] .modern-header .dropdown-item {
    color: var(--text-dark);
}

[data-theme="dark"] .modern-header .dropdown-item:hover {
    background-color: rgba(107, 163, 255, 0.2);
    color: var(--text-light);
}

/* Header Search Bar - Inline with Navigation */
.header-search {
    max-width: 400px;
    margin: 0;
    padding: 0;
}

.header-search .input-group {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.header-search .form-control {
    height: 38px;
    font-size: 0.875rem;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    padding: 0 0.75rem;
}

.header-search .form-control:focus {
    background: var(--bg-white);
    box-shadow: none;
}

.header-search .form-control::placeholder {
    color: rgba(33, 37, 41, 0.5);
}

[data-theme="dark"] .header-search .form-control {
    background: var(--bg-gray);
    color: var(--text-dark);
}

[data-theme="dark"] .header-search .form-control:focus {
    background: var(--bg-card);
}

[data-theme="dark"] .header-search .form-control::placeholder {
    color: var(--text-muted);
}

.header-search .btn {
    height: 38px;
    padding: 0 1rem;
    border: none;
    background: var(--bg-white);
    color: var(--primary-blue);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.header-search .btn:hover {
    background: #f8f9fa;
    color: var(--primary-blue-dark);
}

[data-theme="dark"] .header-search .btn {
    background: var(--bg-card);
    color: var(--primary-blue-light);
}

[data-theme="dark"] .header-search .btn:hover {
    background: var(--bg-gray);
    color: var(--text-light);
}

/* Mobile Header Styles */
@media (max-width: 991px) {
    .modern-header .navbar-collapse {
        background-color: rgba(0, 0, 0, 0.1);
        padding: var(--spacing-sm);
        margin-top: var(--spacing-sm);
        border-radius: var(--radius-md);
    }
    
    [data-theme="dark"] .modern-header .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .modern-header .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    .modern-header .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }
    
    .modern-header .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .header-search {
        max-width: 100%;
        padding: 0.5rem 0;
    }
}

/* Desktop: Suchleiste inline mit Navigation */
@media (min-width: 992px) {
    .header-search {
        margin-right: 1rem;
    }
    
    .navbar-nav.me-auto {
        align-items: center;
    }
}

@media (max-width: 575px) {
    .modern-header .navbar-brand {
        font-size: 1.1rem;
    }
    
    .header-search .form-control {
        font-size: 0.85rem;
    }
    
    .header-search .btn {
        padding: 0 1rem;
    }
}

/* ============================================
   HERO SECTION STYLES
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    padding: 4rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

[data-theme="dark"] .hero-section {
    background: var(--gradient-hero);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

[data-theme="dark"] .hero-title {
    color: var(--primary-blue-light);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

[data-theme="dark"] .hero-icon {
    color: var(--primary-blue-light);
}

.hero-search {
    max-width: 700px;
    margin: 0 auto;
}

.hero-search .input-group {
    background: transparent;
    border: none;
    box-shadow: none;
}

.hero-search .form-control {
    height: 60px;
    font-size: 1.1rem;
    border-radius: 50px 0 0 50px;
    border: 2px solid var(--primary-blue);
    padding: 0 1.5rem;
    transition: all var(--transition-normal);
    background: white;
    outline: none;
}

.hero-search .form-control:focus {
    border-color: var(--primary-blue-dark);
    box-shadow: none;
    background: white;
    outline: none;
}

[data-theme="dark"] .hero-search .form-control {
    background: var(--bg-gray);
    border-color: var(--primary-blue);
    color: var(--text-dark);
}

[data-theme="dark"] .hero-search .form-control:focus {
    background: var(--bg-gray);
}

.hero-search .btn {
    height: 60px;
    padding: 0 2.5rem;
    font-size: 1.1rem;
    border-radius: 0 50px 50px 0;
    font-weight: 600;
    border: 2px solid var(--primary-blue);
    border-left: none;
}

[data-theme="dark"] .hero-search .btn {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--text-light);
}

[data-theme="dark"] .hero-search .btn:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
}

.hero-search-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   TOP DEAL SECTION STYLES
   ============================================ */

.top-deal-section {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--accent-yellow);
    margin: var(--spacing-xl) auto;
    max-width: 900px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.top-deal-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.top-deal-section:hover {
    transform: translateY(-6px);
    box-shadow: 0 1.5rem 4rem rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .top-deal-section {
    background: var(--gradient-top-deal);
    border-color: var(--accent-yellow);
}

[data-theme="dark"] .top-deal-section:hover {
    box-shadow: 0 1.5rem 4rem rgba(255, 213, 79, 0.2);
}

.deal-badge {
    background: var(--accent-red);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    display: inline-block;
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.top-deal-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .top-deal-content {
        flex-direction: row;
        text-align: left;
        gap: var(--spacing-xl);
    }
}

.top-deal-image-wrapper {
    flex-shrink: 0;
    width: 100%;
    max-width: 280px;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .top-deal-image-wrapper {
    background: rgba(255, 255, 255, 0.1);
}

.top-deal-image {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.top-deal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .top-deal-details {
        align-items: flex-start;
    }
}

.top-deal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d2518;
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

[data-theme="dark"] .top-deal-title {
    color: var(--text-light);
}

.top-deal-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-red);
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .top-deal-price {
    color: var(--accent-red);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.top-deal-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--primary-blue);
    color: var(--text-light);
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.top-deal-cta:hover {
    background: var(--primary-blue-dark);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

[data-theme="dark"] .top-deal-cta {
    background: var(--primary-blue);
    color: var(--text-light);
}

[data-theme="dark"] .top-deal-cta:hover {
    background: var(--primary-blue-light);
    color: var(--bg-color);
    box-shadow: 0 6px 20px rgba(107, 163, 255, 0.4);
}

.top-deal-fallback {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

/* ============================================
   CATEGORY GRID STYLES
   ============================================ */

.category-section {
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
}

.category-section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
}

[data-theme="dark"] .category-section-title {
    color: var(--text-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
}

@media (min-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.category-button {
    background: var(--bg-white);
    border: 2px solid #e9ecef;
    border-radius: var(--radius-full);
    width: 100%;
    aspect-ratio: 1;
    max-width: 150px;
    min-height: 120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    padding: 1rem 0.75rem;
    box-shadow: var(--shadow-sm);
    /* Touch-friendly minimum size */
    min-width: 100px;
    overflow: hidden;
}

.category-button:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.2);
    border-color: var(--primary-blue);
    text-decoration: none;
}

[data-theme="dark"] .category-button {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .category-button:hover {
    border-color: var(--primary-blue);
    background: var(--bg-gray);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    transition: transform var(--transition-normal);
    flex-shrink: 0;
}

.category-button:hover .category-icon {
    transform: scale(1.1);
}

[data-theme="dark"] .category-icon {
    color: var(--primary-blue-light);
}

.category-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.2;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

[data-theme="dark"] .category-name {
    color: var(--text-light);
}

/* ============================================
   MODERN FOOTER STYLES
   ============================================ */

.modern-footer {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: var(--spacing-xl) 0 var(--spacing-sm);
    margin-top: var(--spacing-xxl);
    border-top: 3px solid var(--primary-blue);
}

[data-theme="dark"] .modern-footer {
    background: var(--gradient-footer);
    border-top-color: var(--primary-blue);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section {
    margin-bottom: var(--spacing-lg);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
}

[data-theme="dark"] .footer-title {
    color: var(--primary-blue-light);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: #495057;
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-blue);
    transform: translateX(4px);
}

[data-theme="dark"] .footer-links a {
    color: var(--text-muted);
}

[data-theme="dark"] .footer-links a:hover {
    color: var(--primary-blue-light);
}

.footer-social {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-full);
    color: var(--primary-blue);
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.footer-social a:hover {
    background: var(--primary-blue);
    color: var(--text-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .footer-social a {
    background: var(--bg-card);
    color: var(--primary-blue-light);
}

[data-theme="dark"] .footer-social a:hover {
    background: var(--primary-blue);
    color: var(--text-light);
}

.footer-copyright {
    text-align: center;
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

[data-theme="dark"] .footer-copyright {
    border-top-color: var(--border-color);
}

/* ============================================
   CSS ANIMATIONS
   ============================================ */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation Delays */
.animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.5s; }
.animate-on-scroll:nth-child(6) { transition-delay: 0.6s; }

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Visually Hidden - For screen readers only */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-spacing {
    padding: var(--spacing-xl) 0;
}

.card-hover {
    transition: all var(--transition-normal);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Mobile-specific styles (< 576px) */
@media (max-width: 575.98px) {
    /* Hero Section Mobile */
    .hero-section {
        padding: 2rem 0 3rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    /* Hero Search Mobile - Touch Optimized */
    .hero-search .form-control,
    .hero-search .btn {
        height: 50px;
        font-size: 1rem;
    }
    
    .hero-search .btn {
        padding: 0 1.5rem;
    }
    
    .hero-search-hint {
        font-size: 0.85rem;
    }
    
    /* Top Deal Section Mobile */
    .top-deal-section {
        padding: var(--spacing-sm);
        margin: var(--spacing-lg) 0;
    }
    
    .deal-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .top-deal-title {
        font-size: 1.25rem;
    }
    
    .top-deal-price {
        font-size: 1.75rem;
    }
    
    .top-deal-cta {
        padding: 0.65rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }
    
    /* Category Grid Mobile - Touch Optimized */
    .category-button {
        max-width: 120px;
        min-height: 120px;
        padding: 0.75rem 0.5rem;
    }
    
    .category-icon {
        font-size: 2rem;
        margin-bottom: 0.35rem;
    }
    
    .category-name {
        font-size: 0.7rem;
        line-height: 1.1;
        padding: 0 0.25rem;
    }
    
    /* Category Section Mobile */
    .category-section {
        padding: var(--spacing-lg) 0;
    }
    
    .category-section-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    /* Footer Mobile */
    .modern-footer {
        padding: var(--spacing-lg) 0 var(--spacing-sm);
    }
    
    .footer-section {
        margin-bottom: var(--spacing-md);
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* Small Mobile (< 400px) - Extra small screens */
@media (max-width: 399.98px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-search .form-control {
        font-size: 0.9rem;
    }
    
    .hero-search .btn {
        padding: 0 1rem;
    }
    
    .hero-search .btn i {
        display: none;
    }
    
    .category-button {
        max-width: 95px;
        min-height: 95px;
        padding: 0.5rem 0.35rem;
    }
    
    .category-icon {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .category-name {
        font-size: 0.65rem;
        line-height: 1.1;
    }
}

/* Tablet-specific styles (576px - 991px) */
@media (min-width: 576px) and (max-width: 991.98px) {
    /* Hero Section Tablet */
    .hero-section {
        padding: 3rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .hero-icon {
        font-size: 2.75rem;
    }
    
    /* Hero Search Tablet */
    .hero-search .form-control,
    .hero-search .btn {
        height: 55px;
        font-size: 1.05rem;
    }
    
    /* Top Deal Section Tablet */
    .top-deal-section {
        padding: var(--spacing-md);
    }
    
    .top-deal-title {
        font-size: 1.35rem;
    }
    
    .top-deal-price {
        font-size: 1.85rem;
    }
    
    /* Category Grid Tablet */
    .category-button {
        max-width: 140px;
        min-height: 140px;
    }
    
    .category-icon {
        font-size: 2.75rem;
    }
    
    .category-name {
        font-size: 0.85rem;
    }
    
    .category-section-title {
        font-size: 1.75rem;
    }
}

/* Desktop-specific styles (≥ 992px) */
@media (min-width: 992px) {
    /* Hero Section Desktop */
    .hero-section {
        padding: 5rem 0 6rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    /* Top Deal Section Desktop */
    .top-deal-section {
        padding: var(--spacing-lg);
    }
    
    .top-deal-content {
        gap: var(--spacing-xl);
    }
    
    /* Category Grid Desktop */
    .category-button {
        max-width: 150px;
        min-height: 150px;
    }
    
    .category-section-title {
        font-size: 2rem;
    }
}

/* Large Desktop (≥ 1200px) */
@media (min-width: 1200px) {
    .hero-section {
        padding: 6rem 0 7rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .category-grid {
        gap: var(--spacing-lg);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for better mobile UX */
    .category-button {
        min-height: 130px;
        padding: var(--spacing-sm);
    }
    
    .top-deal-cta,
    .hero-search .btn,
    .header-search .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .category-button:hover {
        transform: none;
    }
    
    /* Add active state for touch feedback */
    .category-button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .top-deal-cta:active {
        transform: scale(0.98);
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 991.98px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0 2.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .top-deal-section {
        margin: var(--spacing-lg) 0;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .modern-header,
    .hero-section,
    .top-deal-section,
    .modern-footer {
        display: none;
    }
}
