/* TCL Pakistan - Responsive Styles */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
    :root {
        --spacing-lg: 40px;
        --spacing-xl: 48px;
    }

    .hero-wrapper {
        gap: var(--spacing-lg);
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-image img {
        max-height: 450px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .new-arrivals-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .arrival-card-featured {
        grid-column: span 2;
        grid-row: span 1;
    }

    .new-arrivals-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .category-layout {
        grid-template-columns: 1fr;
    }

    .shopping-options {
        position: static;
        margin-bottom: var(--spacing-md);
    }

    .category-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .store-locations-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-showcase {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-top .container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        max-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header h2 {
        font-size: 32px;
    }

    .product-hero-title {
        font-size: 36px;
    }

    .product-hero-image {
        width: 40%;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 32px;
        --spacing-xl: 40px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .site-header {
        box-shadow: none;
    }

    .main-nav {
        box-shadow: none;
        border-bottom: none;
    }

    .nav-content {
        position: relative;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        transform: translateX(100%);
        width: 86%;
        max-width: 420px;
        min-width: 280px;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-left: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: -12px 0 32px rgba(15, 23, 42, 0.12);
        transition: transform 0.3s ease;
        max-height: none;
        overflow-y: auto;
        z-index: 2000;
    }

    .nav-menu.active {
        transform: translateX(0);
        padding: 12px 0 24px;
    }

    .nav-menu > li {
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    }

    .nav-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 22px;
        font-size: 17px;
        font-weight: 600;
        color: #111827;
    }

    .nav-menu > li > a::after {
        content: '›';
        font-size: 22px;
        color: #9CA3AF;
        margin-left: 16px;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .has-dropdown.active > a::after {
        transform: rotate(90deg);
        color: var(--primary-color);
    }

    .nav-actions {
        display: none;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0 14px;
        background: #F8FAFC;
    }

    .has-dropdown.active .dropdown {
        max-height: 500px;
        padding: var(--spacing-sm);
    }

    .dropdown li a {
        padding: 12px 12px;
        border-radius: 8px;
        font-weight: 500;
        color: #374151;
    }

    .dropdown li a:hover {
        background: rgba(227, 6, 19, 0.08);
        color: var(--primary-color);
    }

    .mobile-only {
        display: block;
    }

    .top-bar-content {
        flex-direction: row;
        justify-content: center;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .site-header {
        --topbar-height: 34px;
    }

    .top-bar {
        height: var(--topbar-height);
        padding: 0;
        display: flex;
        align-items: center;
        overflow: hidden;
        transition: height 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
    }

    .contact-info {
        flex-direction: row;
        gap: 12px;
        flex-wrap: nowrap;
        white-space: nowrap;
        font-size: 12px;
        max-width: 100%;
        overflow: hidden;
    }

    .site-header.top-bar-hidden .top-bar {
        height: 0;
        opacity: 0;
        transform: translateY(-100%);
        pointer-events: none;
    }

    /* Hero */
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        min-height: auto;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-image {
        order: -1;
        max-height: 300px;
    }

    .hero-image img {
        max-height: 300px;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }

    /* Grids */
    .category-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .new-arrivals-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .arrival-card-featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .arrival-image,
    .arrival-card-featured .arrival-image {
        height: 220px;
    }

    .arrival-title {
        font-size: 20px;
    }

    .arrival-card-featured .arrival-title {
        font-size: 24px;
    }

    .new-arrivals-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .category-layout {
        grid-template-columns: 1fr;
    }

    .category-products-grid {
        grid-template-columns: 1fr;
    }

    .store-locations-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .categories-showcase {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .category-showcase-image {
        height: 220px;
    }

    .category-showcase-title {
        font-size: 22px;
    }

    .category-showcase-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .footer-top .container {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        padding-right: 0;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-column {
        text-align: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        max-width: 100%;
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
        justify-content: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Typography */
    .section-header h2 {
        font-size: 28px;
    }

    .category-header h1 {
        font-size: 28px;
    }

    .product-hero {
        min-height: 400px;
    }

    .product-hero-title {
        font-size: 28px;
    }

    .product-hero-description {
        font-size: 16px;
    }

    .product-hero-image {
        width: 100%;
        opacity: 0.2;
    }

    .product-hero-features li {
        font-size: 14px;
    }

    /* Variants */
    .variant-card {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .variant-actions {
        width: 100%;
        flex-direction: column;
    }

    .variant-actions .btn {
        width: 100%;
    }

    /* Specifications */
    .specs-table td {
        display: block;
        width: 100%;
        padding: var(--spacing-xs);
    }

    .spec-name {
        font-weight: 600;
        border-bottom: none;
    }

    .spec-value {
        padding-bottom: var(--spacing-sm);
        border-bottom: 1px solid var(--border-color);
    }

    /* Search */
    .search-form {
        padding: 0 var(--spacing-md);
    }

    .search-form input {
        padding: 16px;
        font-size: 16px;
    }

    .search-form button[type="submit"] {
        position: static;
        transform: none;
        width: 100%;
        margin-top: var(--spacing-sm);
    }

    .close-search {
        top: -40px;
        right: 0;
        color: var(--white);
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .product-name {
        font-size: 18px;
    }

    .product-price {
        font-size: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .category-card {
        padding: var(--spacing-md);
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }

    .category-card h3 {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .search-overlay,
    .hero-cta,
    .nav-actions,
    .mobile-menu-toggle {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-light: #000;
    }
}
