/* Enhanced Responsive Design - Car Charger Theme */

/* Mobile-first approach with improved breakpoints */
@media (max-width: 1200px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .chargers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 900px) {
    .chargers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .hero-title {
        font-size: clamp(2rem, 4vw, 3.5rem);
    }
    
    .hero-description {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 768px) {
    .hero-section {
        overflow: visible;
    }
    .hero-visual,
    .electric-car-showcase,
    .logo-container {
        overflow: visible;
    }
    body {
        padding-top: 0;
        padding-bottom: 80px; /* Space for bottom navigation */
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Extra breathing room for hero on small screens */
    .hero-section .container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    /* Hero Section Mobile */
    .hero-section {
        min-height: 90vh;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
        min-height: auto;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-title {
        font-size: clamp(2.4rem, 8vw, 3rem);
        margin-bottom: var(--spacing-md);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-lg);
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-actions .btn {
        width: auto;
        max-width: none;
    }
    
    .hero-stats {
        justify-content: center;
        gap: var(--spacing-lg);
        flex-wrap: wrap;
    }
    
    .stat-item {
        min-width: 80px;
    }
    
    .stat-number {
        font-size: var(--font-size-xl);
    }
    
    .stat-label {
        font-size: var(--font-size-xs);
    }
    
    /* Electric Car Showcase Mobile */
    .electric-car-showcase {
        width: 100%;
        max-width: 350px;
        height: auto;
        padding: var(--spacing-lg);
    }
    
    .logo-container {
        width: 280px;
        height: 320px;
        padding: var(--spacing-lg);
    }
    
    .electric-logo {
        width: 150px;
        height: 150px;
    }
    
    .electric-logo img {
        width: 100px;
        max-height: 60px;
    }
    
    /* Sections Mobile */
    .chargers-section,
    .categories-section,
    .why-twizzle-section,
    .reviews-section,
    .brand-promise-section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
        padding: 0 var(--spacing-sm);
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .section-description {
        font-size: var(--font-size-sm);
    }
    
    /* Why Twizzle Mobile */
    .why-twizzle-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .why-twizzle-text {
        padding-right: 0;
    }
    
    .why-twizzle-title {
        font-size: var(--font-size-2xl);
    }
    
    .why-twizzle-description {
        font-size: var(--font-size-base);
    }
    
    .trust-indicators {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        gap: var(--spacing-md);
    }
    
    .trust-number {
        font-size: var(--font-size-xl);
    }
    
    .trust-label {
        font-size: var(--font-size-xs);
    }
    
    /* Product Grids Mobile */
    .chargers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Product Cards Mobile */
    .product-card {
        border-radius: var(--radius-md);
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: var(--spacing-sm);
    }
    
    .product-title {
        font-size: var(--font-size-sm);
        line-height: 1.3;
        margin-bottom: var(--spacing-xs);
    }
    
    .product-model {
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-xs);
    }
    
    .product-rating {
        margin-bottom: var(--spacing-xs);
    }
    
    .stars {
        gap: 1px;
    }
    
    .star {
        font-size: 10px;
    }
    
    .rating-text {
        font-size: var(--font-size-xs);
    }
    
    .current-price {
        font-size: var(--font-size-base);
    }
    
    .original-price {
        font-size: var(--font-size-xs);
    }
    
    .add-to-cart-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
        min-height: 32px;
    }
    
    /* Category Cards Mobile */
    .category-card {
        height: 200px;
        border-radius: var(--radius-md);
    }
    
    .category-overlay {
        padding: var(--spacing-sm);
    }
    
    .category-icon {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .category-name {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-xs);
    }
    
    .category-count {
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-sm);
    }
    
    .category-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
    }
    
    /* Footer Mobile */
    .footer {
        padding: var(--spacing-xl) 0 100px; /* Extra bottom padding for fixed nav */
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-section:first-child {
        grid-column: 1 / -1;
        margin-bottom: var(--spacing-lg);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .footer-certifications {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    /* Header Mobile */
    .main-header {
        padding: var(--spacing-sm) 0;
    }
    
    .header-content {
        gap: var(--spacing-sm);
    }
    
    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-sm);
    }
    
    .brand-name {
        font-size: var(--font-size-base);
    }
    
    .brand-tagline {
        font-size: var(--font-size-xs);
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .cart-count {
        top: -6px;
        right: -6px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }
}

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

    /* Extra breathing room for hero on very small screens */
    .hero-section .container {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
    
    /* Hero Mobile Small */
    .hero-section {
        padding: var(--spacing-lg) 0;
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: clamp(2.1rem, 8vw, 2.6rem);
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-md);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
        margin-top: var(--spacing-lg);
    }
    
    .stat-item {
        padding: var(--spacing-sm);
        background: rgba(255, 255, 255, 0.8);
        border-radius: var(--radius-md);
        min-width: 120px;
    }
    
    /* Electric Car Showcase Small */
    .electric-car-showcase {
        max-width: 300px;
        height: auto;
        padding: var(--spacing-md);
    }
    
    .logo-container {
        width: 240px;
        height: 280px;
        padding: var(--spacing-md);
    }
    
    .electric-logo {
        width: 120px;
        height: 120px;
    }
    
    .electric-logo img {
        width: 80px;
        max-height: 50px;
    }
    
    /* Sections Small */
    .section-header {
        margin-bottom: var(--spacing-md);
    }
    
    .section-title {
        font-size: var(--font-size-lg);
    }
    
    .section-description {
        font-size: var(--font-size-xs);
    }
    
    /* Why Twizzle Small */
    .why-twizzle-title {
        font-size: var(--font-size-xl);
    }
    
    .why-twizzle-description {
        font-size: var(--font-size-sm);
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        margin: 0 auto var(--spacing-sm);
        width: 40px;
        height: 40px;
        font-size: var(--font-size-base);
    }
    
    .feature-content h3 {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-xs);
    }
    
    .feature-content p {
        font-size: var(--font-size-xs);
    }
    
    .trust-indicators {
        grid-template-columns: 1fr;
        max-width: 200px;
        gap: var(--spacing-sm);
    }
    
    .trust-indicator {
        padding: var(--spacing-sm);
    }
    
    .trust-number {
        font-size: var(--font-size-lg);
    }
    
    .trust-label {
        font-size: var(--font-size-xs);
    }
    
    /* Product Grids Small */
    .chargers-grid,
    .categories-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Product Cards Small */
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: var(--spacing-xs);
    }
    
    .product-title {
        font-size: var(--font-size-xs);
        line-height: 1.2;
    }
    
    .current-price {
        font-size: var(--font-size-sm);
    }
    
    .add-to-cart-btn {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs);
        min-height: 28px;
    }
    
    /* Category Cards Small */
    .category-card {
        height: 160px;
    }
    
    .category-overlay {
        padding: var(--spacing-xs);
    }
    
    .category-icon {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    
    .category-name {
        font-size: var(--font-size-xs);
        margin-bottom: 4px;
    }
    
    .category-count {
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-xs);
    }
    
    .category-btn {
        padding: 4px var(--spacing-xs);
        font-size: var(--font-size-xs);
    }
    
    .subcategories {
        display: none;
    }
    
    /* Reviews Small */
    .review-card {
        padding: var(--spacing-md);
    }
    
    .review-text {
        font-size: var(--font-size-sm);
    }
    
    .review-author-info h4 {
        font-size: var(--font-size-sm);
    }
    
    .review-author-info p {
        font-size: var(--font-size-xs);
    }
    
    /* Brand Promise Small */
    .brand-promise-title {
        font-size: var(--font-size-2xl);
    }
    
    .brand-promise-subtitle {
        font-size: var(--font-size-base);
    }
    
    .brand-promise-description {
        font-size: var(--font-size-sm);
    }
    
    /* Footer Small */
    .footer {
        padding: var(--spacing-lg) 0 100px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-section:first-child {
        grid-column: 1;
    }
    
    .footer-brand {
        text-align: center;
        max-width: 100%;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .newsletter-btn {
        width: 100%;
    }
    
    .legal-links {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .footer-certifications {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Header Small */
    .main-header {
        padding: var(--spacing-xs) 0;
    }
    
    .brand-icon {
        width: 28px;
        height: 28px;
        font-size: var(--font-size-xs);
    }
    
    .brand-name {
        font-size: var(--font-size-sm);
    }
    
    .brand-tagline {
        display: none;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .cart-count {
        top: -4px;
        right: -4px;
        min-width: 14px;
        height: 14px;
        font-size: 8px;
    }
}

/* Tablet: make only the hero background layers transparent (keep tablet showcase design) */
@media screen and (min-width: 768px) and (max-width: 1366px) {
	.hero-section {
		background: transparent !important;
		background-image: none !important;
	}
	.hero-section .hero-background {
		background: transparent !important;
	}
	.hero-section .hero-gradient {
		background: transparent !important;
		background-image: none !important;
	}
}

/* Desktop: make only the hero background layers transparent (keep showcase design) */
@media screen and (min-width: 1024px) {
	.hero-section {
		background: transparent !important;
		background-image: none !important;
	}
	.hero-section .hero-background {
		background: transparent !important;
	}
	.hero-section .hero-gradient {
		background: transparent !important;
		background-image: none !important;
	}
}

/* Extra small screens */
@media (max-width: 360px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.8rem);
    }
    
    .hero-description {
        font-size: var(--font-size-sm);
    }
    
    .electric-car-showcase {
        max-width: 280px;
        height: 320px;
    }
    
    .logo-container {
        width: 220px;
        height: 260px;
    }
    
    .electric-logo {
        width: 100px;
        height: 100px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .category-card {
        height: 140px;
    }
    
    .section-title {
        font-size: var(--font-size-base);
    }
    
    .section-description {
        font-size: var(--font-size-xs);
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
        text-align: left;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .electric-car-showcase {
        max-width: 300px;
        height: 350px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .action-btn,
    .category-btn,
    .add-to-cart-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: var(--spacing-md);
    }
    
    .product-actions .action-btn {
        width: 40px;
        height: 40px;
    }
    
    .quick-view-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        min-height: 36px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .brand-icon,
    .category-icon,
    .feature-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-scroll-indicator .scroll-arrow {
        animation: none;
    }
    
    .electric-logo,
    .logo-container {
        animation: none;
    }
    
    .bg-circle {
        animation: none;
    }
    
    .product-card:hover,
    .category-card:hover {
        transform: none;
    }
}