/* ============================================
   COMPREHENSIVE RESPONSIVE STYLES
   All Breakpoints: 1200px, 992px, 768px, 576px, 480px
   ============================================ */

/* ============================================
   LARGE DESKTOP (max-width: 1200px)
   ============================================ */
@media (max-width: 1200px) {
    .container {
        max-width: 970px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-section {
        gap: 30px;
    }
    
    .sidebar-categories {
        width: 180px;
    }
    
    .new-arrival-grid {
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* ============================================
   TABLET LANDSCAPE (max-width: 992px)
   ============================================ */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    /* Header */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        font-size: 22px;
        cursor: pointer;
        order: -1;
    }
    
    .nav-menu {
        display: none;
    }

    .search-box {
        display: none;
    }
    
    .header .container {
        justify-content: space-between;
    }
    
    .logo {
        font-size: 20px;
    }
    
    /* Mobile Menu */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
    }
    
    .mobile-menu.active {
        left: 0;
    }
    
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        background: var(--gradient-primary);
    }
    
    .mobile-menu-header .logo {
        color: #fff;
        -webkit-text-fill-color: #fff;
    }
    
    .mobile-menu-close {
        background: rgba(255,255,255,0.2);
        border: none;
        color: #fff;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
    }

    .mobile-menu-nav {
        padding: 20px;
    }
    
    .mobile-menu-nav a {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px;
        border-radius: 10px;
        font-size: 16px;
        transition: all 0.3s;
    }
    
    .mobile-menu-nav a:hover {
        background: var(--bg-secondary);
        color: var(--primary-color);
    }
    
    .mobile-menu-nav a i {
        width: 24px;
        text-align: center;
        color: var(--primary-color);
    }
    
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Hero Section */
    .hero-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .sidebar-categories {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .sidebar-categories ul {
        display: flex;
        gap: 10px;
        white-space: nowrap;
    }
    
    .sidebar-categories ul li {
        padding: 0;
    }
    
    .sidebar-categories ul li a {
        padding: 10px 20px;
        background: var(--bg-secondary);
        border-radius: 25px;
        font-size: 13px;
    }
    
    .sidebar-categories ul li a .fa-chevron-right {
        display: none;
    }
    
    .hero-slider {
        min-height: 300px;
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    /* Auth Pages */
    .auth-page {
        flex-direction: column;
    }

    .auth-image {
        display: none;
    }
    
    .auth-form {
        padding: 40px 30px;
        width: 100%;
    }
    
    /* Shop Page */
    .shop-page > .container > div {
        flex-direction: column;
    }
    
    .shop-page aside {
        width: 100%;
        margin-bottom: 30px;
    }
    
    /* Product Detail */
    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    /* Gallery: Main image on TOP, thumbnails at BOTTOM */
    .product-gallery {
        flex-direction: column !important;
    }
    
    .gallery-main {
        order: 1 !important;
        min-height: 400px !important;
        cursor: default !important;
    }
    
    .gallery-thumbs-wrapper {
        order: 2 !important;
    }
    
    .gallery-thumbs {
        flex-direction: row !important;
        width: 100% !important;
        overflow-x: auto;
        gap: 10px;
    }
    
    .gallery-thumbs img {
        width: 70px !important;
        height: 70px !important;
        flex-shrink: 0;
    }
    
    .zoom-lens, .zoom-result {
        display: none !important;
    }
    
    /* Cart Page */
    .cart-summary {
        flex-direction: column;
    }
    
    .cart-total {
        width: 100%;
    }

    .coupon-form {
        flex-direction: column;
        width: 100%;
    }
    
    .coupon-form input {
        width: 100%;
    }
    
    /* Checkout Page */
    .checkout-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .order-summary {
        position: static !important;
    }
    
    /* Account Page */
    .account-page > .container > div {
        flex-direction: column;
    }
    
    .account-page aside {
        width: 100%;
    }
    
    /* Contact Page */
    .contact-page > .container > div {
        grid-template-columns: 1fr !important;
    }
    
    /* About Page */
    .about-page > .container > div:first-of-type {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .about-page > .container > div:nth-of-type(2) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* New Arrivals */
    .new-arrival-grid {
        grid-template-columns: 1fr !important;
    }
    
    .new-arrival-grid > div:first-child {
        min-height: 400px;
    }
    
    /* Promo Banner */
    .promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }

    .banner-content {
        max-width: 100%;
    }
    
    .banner-content h2 {
        font-size: 32px;
    }
    
    .banner-image {
        margin-top: 30px;
    }
    
    .banner-image img {
        max-width: 250px;
    }
    
    /* Order Detail */
    .order-detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   TABLET PORTRAIT (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }
    
    /* Top Bar */
    .top-bar {
        font-size: 12px;
        padding: 10px 0;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 5px;
    }
    
    .language-select {
        display: none;
    }
    
    /* Header */
    .header {
        padding: 15px 0;
    }
    
    .header-icons {
        gap: 10px;
    }
    
    .header-icons a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Section Styles */
    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 28px;
    }
    
    .section-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .countdown {
        gap: 10px;
    }
    
    .countdown-item span {
        font-size: 24px;
    }
    
    .nav-arrows {
        display: none;
    }
    
    /* Hero */
    .hero-slide {
        padding: 30px 20px;
        min-height: 280px;
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .hero-image {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        max-width: 80%;
        margin-top: 20px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-card {
        border-radius: 12px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .current-price {
        font-size: 16px;
    }

    .product-actions button,
    .product-actions a {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Categories Slider */
    .category-slider .category-card {
        flex: 0 0 calc(25% - 12px);
        min-width: 120px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .category-card {
        padding: 14px 10px;
    }
    
    .category-card .category-image {
        width: 70px;
        height: 70px;
    }
    
    .category-card i {
        font-size: 28px;
    }
    
    .category-card h4 {
        font-size: 12px;
    }
    
    .category-nav button {
        width: 36px;
        height: 36px;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .feature-item {
        padding: 30px 20px;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
    }
    
    .feature-icon .inner {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    /* Footer */
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-col h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* Cart Table */
    .cart-table {
        display: block;
        overflow-x: auto;
    }

    .cart-table th,
    .cart-table td {
        padding: 15px 10px;
        font-size: 14px;
    }
    
    .cart-product img {
        width: 50px;
        height: 50px;
    }
    
    .quantity-input {
        transform: scale(0.9);
    }
    
    /* Checkout */
    .checkout-form {
        padding: 25px !important;
    }
    
    .order-summary {
        padding: 25px !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    /* Account */
    .account-page aside {
        position: static;
    }
    
    /* About Stats */
    .about-stat {
        padding: 25px 20px;
    }
    
    .about-stat h2 {
        font-size: 28px;
    }
    
    /* Contact */
    .contact-form {
        padding: 30px !important;
    }
    
    .contact-form > div:first-of-type {
        grid-template-columns: 1fr !important;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 14px 30px;
        font-size: 14px;
    }
    
    /* Promo Banner */
    .banner-countdown {
        gap: 12px;
        justify-content: center;
    }
    
    .banner-countdown .time-box {
        width: 55px;
        height: 55px;
    }

    .banner-countdown .time-box span {
        font-size: 16px;
    }
    
    .banner-countdown .time-box small {
        font-size: 9px;
    }
    
    /* New Arrivals */
    .arrival-card {
        padding: 25px !important;
        min-height: 350px !important;
    }
    
    .arrival-card h3 {
        font-size: 22px !important;
    }
    
    .arrival-card p {
        font-size: 13px !important;
    }
}

/* ============================================
   MOBILE LANDSCAPE (max-width: 576px)
   ============================================ */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    /* Typography */
    h1, .gradient-text {
        font-size: 28px !important;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    /* Top Bar */
    .top-bar-text {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .top-bar-text a {
        display: block;
        margin-top: 5px;
        margin-left: 0;
    }
    
    /* Header */
    .logo {
        font-size: 18px;
    }
    
    .header-icons {
        gap: 8px;
    }
    
    .header-icons a {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .header-icons .badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
    
    /* Section */
    .section {
        padding: 30px 0;
    }
    
    .section-header {
        margin-bottom: 15px;
    }
    
    .section-tag {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .section-title {
        font-size: 24px !important;
    }
    
    .section-title-row {
        margin-bottom: 25px;
    }
    
    /* Hero */
    .hero-slide {
        padding: 25px 15px;
        min-height: 250px;
    }
    
    .hero-content h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .hero-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .hero-content .shop-now {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .hero-image img {
        max-height: 150px;
    }
    
    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .slider-dots .dot {
        width: 8px;
        height: 8px;
    }
    
    .slider-dots .dot.active {
        width: 18px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: 10px;
    }
    
    .product-badge {
        padding: 4px 10px;
        font-size: 10px;
        top: 8px;
        left: 8px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 13px;
        -webkit-line-clamp: 2;
        min-height: 2.6em;
    }
    
    .product-price {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .current-price {
        font-size: 14px;
    }
    
    .original-price {
        font-size: 12px;
    }
    
    .product-rating {
        gap: 5px;
    }
    
    .stars {
        font-size: 11px;
    }
    
    .rating-count {
        font-size: 11px;
    }
    
    .add-to-cart-btn {
        padding: 10px;
        font-size: 12px;
    }
    
    /* Categories Slider */
    .category-slider .category-card {
        flex: 0 0 calc(33.333% - 11px);
        min-width: 100px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .category-card {
        padding: 12px 8px;
        border-radius: 12px;
    }
    
    .category-card .category-image {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }
    
    .category-card i {
        font-size: 26px;
        margin-bottom: 10px;
    }
    
    .category-card h4 {
        font-size: 11px;
    }
    
    .category-nav button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    /* Countdown */
    .countdown {
        flex-wrap: wrap;
        justify-content: center;
    }

    .countdown-item {
        min-width: 50px;
    }
    
    .countdown-item span {
        font-size: 20px;
    }
    
    .countdown-item small {
        font-size: 10px;
    }
    
    /* Promo Banner */
    .promo-banner {
        padding: 30px 20px;
        border-radius: 15px;
        margin: 30px 0;
    }
    
    .banner-content h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .banner-countdown {
        margin-bottom: 25px;
    }
    
    .banner-countdown .time-box {
        width: 50px;
        height: 50px;
    }
    
    .btn-primary {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    /* Features */
    .features-grid {
        gap: 20px;
        padding: 40px 0;
    }
    
    .feature-item {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .feature-icon .inner {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .feature-item h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .feature-item p {
        font-size: 12px;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .footer-col h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .footer-col ul li {
        margin-bottom: 10px;
        font-size: 13px;
    }
    
    .subscribe-form {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .footer-bottom {
        font-size: 12px;
        padding-top: 15px;
    }
    
    /* Auth Pages */
    .auth-form {
        padding: 30px 20px;
    }
    
    .auth-form h2 {
        font-size: 26px !important;
    }
    
    .auth-form .form-group input {
        padding: 14px 16px;
    }
    
    /* Cart Page */
    .cart-page {
        padding: 40px 0;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .cart-total {
        padding: 25px;
    }
    
    .cart-total h3 {
        font-size: 18px;
    }
    
    /* Checkout */
    .checkout-page {
        padding: 40px 0;
    }
    
    .checkout-form,
    .order-summary {
        padding: 20px !important;
        border-radius: 16px !important;
    }

    .checkout-form h2 {
        font-size: 20px;
    }
    
    .order-summary h3 {
        font-size: 18px;
    }
    
    .order-item-info img {
        width: 45px;
        height: 45px;
    }
    
    /* Account Page */
    .account-page aside > div {
        border-radius: 15px;
    }
    
    .account-page aside > div > div:first-child {
        padding: 20px;
    }
    
    .account-page aside > div > div:first-child img {
        width: 70px;
        height: 70px;
    }
    
    .account-nav-link {
        padding: 12px 20px !important;
        font-size: 14px;
    }
    
    /* About Page */
    .about-page > .container > div:nth-of-type(2) {
        grid-template-columns: 1fr !important;
    }
    
    .about-stat {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .about-stat h2 {
        font-size: 28px;
    }
    
    /* Contact Page */
    .contact-info-card {
        padding: 25px !important;
        border-radius: 15px !important;
    }
    
    .contact-info-card > div:first-child {
        width: 50px;
        height: 50px;
    }
    
    .contact-info-card h4 {
        font-size: 18px;
    }
    
    .contact-form {
        padding: 25px !important;
        border-radius: 16px !important;
    }
    
    .contact-form h3 {
        font-size: 20px;
    }
}


/* ============================================
   MOBILE PORTRAIT (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Products - Single Column Option */
    .products-grid.single-col {
        grid-template-columns: 1fr;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    /* Product Detail */
    .product-detail-info h1 {
        font-size: 20px !important;
    }
    
    .product-buy {
        flex-direction: column;
    }
    
    .product-buy > * {
        width: 100%;
    }
    
    .product-buy .btn-outline,
    .product-buy .btn-secondary {
        justify-content: center;
    }
    
    .delivery-info {
        border-radius: 10px;
    }
    
    .delivery-item {
        padding: 15px !important;
        gap: 12px !important;
    }
    
    .delivery-item i {
        font-size: 24px !important;
    }
    
    .delivery-item h4 {
        font-size: 14px;
    }
    
    .delivery-item p {
        font-size: 11px !important;
    }
    
    /* Tabs */
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* Reviews */
    .star-rating label {
        font-size: 20px !important;
    }

    /* Order Success */
    .order-success > .container > div:first-child {
        width: 100px;
        height: 100px;
    }
    
    .order-success > .container > div:first-child i {
        font-size: 45px;
    }
    
    .order-success h1 {
        font-size: 32px !important;
    }
    
    .order-success h2 {
        font-size: 18px;
    }
    
    .order-success > .container > div:nth-child(4) {
        padding: 20px 30px;
    }
    
    .order-success > .container > div:nth-child(4) p:last-child {
        font-size: 22px;
    }
    
    /* Order Detail */
    .order-detail table {
        font-size: 13px;
    }
    
    .order-detail table img {
        width: 50px;
        height: 50px;
    }
    
    /* Empty State */
    .empty-state {
        padding: 50px 25px;
    }
    
    .empty-state i {
        font-size: 60px;
    }
    
    .empty-state h2 {
        font-size: 22px;
    }
    
    .empty-state p {
        font-size: 14px;
    }
    
    /* Alerts */
    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .alert i {
        font-size: 16px;
    }
    
    /* Toast */
    .toast {
        left: 15px;
        right: 15px;
        bottom: 20px;
        font-size: 13px;
    }
    
    /* Scroll Top */
    .scroll-top {
        width: 44px;
        height: 44px;
        right: 15px;
        bottom: 15px;
    }
}


/* ============================================
   EXTRA SMALL (max-width: 360px)
   ============================================ */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .header-icons a {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    .products-grid {
        gap: 10px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .current-price {
        font-size: 13px;
    }
    
    /* Categories Slider - Mobile */
    .category-slider .category-card {
        flex: 0 0 calc(50% - 8px);
        min-width: 90px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .category-card {
        padding: 10px 6px;
    }
    
    .category-card .category-image {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
        border-radius: 10px;
    }
    
    .category-card i {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .category-card h4 {
        font-size: 10px;
    }
    
    .category-nav {
        gap: 6px;
    }
    
    .category-nav button {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .footer-col h4 {
        font-size: 15px;
    }
    
    .footer-col ul li {
        font-size: 12px;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION FIXES
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slide {
        min-height: 200px;
        padding: 20px;
    }
    
    .hero-content h2 {
        font-size: 22px;
    }
    
    .mobile-menu {
        overflow-y: auto;
    }
}


/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Show actions always on touch devices */
    .product-actions {
        opacity: 1;
        transform: translateX(0);
    }
    
    .add-to-cart-btn {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Larger touch targets */
    .product-actions button,
    .product-actions a {
        width: 40px;
        height: 40px;
    }
    
    /* Remove hover effects */
    .product-card:hover {
        transform: none;
    }
    
    .category-card:hover::before {
        width: 0;
        height: 0;
    }
    
    .hover-lift:hover {
        transform: none;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --bg-color: #1a1a2e;
        --bg-secondary: #16213e;
        --text-color: #ffffff;
        --text-light: #a0a0a0;
        --border-color: #2d2d44;
    }
    
    .header,
    .product-card,
    .category-card,
    .feature-item,
    .cart-total,
    .checkout-form,
    .order-summary,
    .contact-form,
    .contact-info-card,
    .about-stat,
    .empty-state {
        background: var(--bg-secondary);
    }
    */
}


/* ============================================
   PAGE-SPECIFIC RESPONSIVE FIXES
   ============================================ */

/* Shop Page Sidebar Filters */
@media (max-width: 992px) {
    .shop-page aside {
        background: #fff;
        padding: 20px;
        border-radius: 16px;
        box-shadow: var(--shadow-md);
    }
    
    .shop-page aside h3 {
        font-size: 16px;
    }
    
    .shop-page aside ul li {
        padding: 6px 0;
        font-size: 14px;
    }
}

/* Product Detail Page */
@media (max-width: 768px) {
    .product-detail {
        padding: 40px 0 !important;
    }
    
    .product-detail-info .rating {
        flex-wrap: wrap;
    }
    
    .product-detail-info .price {
        font-size: 20px !important;
    }
    
    .color-btn {
        width: 24px;
        height: 24px;
    }
    
    .size-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Wishlist Page */
@media (max-width: 768px) {
    .wishlist-page .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wishlist-page .section-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}


/* Account Page Tabs */
@media (max-width: 768px) {
    .account-page aside nav {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        padding: 10px !important;
    }
    
    .account-page aside nav a {
        flex: 1 1 calc(50% - 5px);
        text-align: center;
        justify-content: center;
        padding: 10px !important;
        font-size: 12px !important;
    }
    
    .account-page aside nav a i {
        display: none;
    }
    
    .account-page .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Order Detail Timeline */
@media (max-width: 576px) {
    .order-detail > .container > div {
        grid-template-columns: 1fr !important;
    }
    
    .order-detail table th,
    .order-detail table td {
        padding: 12px 8px;
    }
}

/* Contact Page Form */
@media (max-width: 576px) {
    .contact-form form > div:first-of-type {
        grid-template-columns: 1fr !important;
    }
}

/* About Page Story Section */
@media (max-width: 768px) {
    .about-page > .container > div:first-of-type > div:last-child {
        display: none;
    }
}

/* Index Page New Arrivals Grid */
@media (max-width: 576px) {
    .new-arrival-grid > div:last-child {
        grid-template-rows: auto !important;
    }
    
    .new-arrival-grid > div:last-child > div:last-child {
        grid-template-columns: 1fr !important;
    }
}


/* Modal Responsive */
@media (max-width: 576px) {
    #addressModal > div {
        width: 95% !important;
        max-height: 85vh;
        margin: 20px;
    }
    
    #addressModal > div > div:first-child {
        padding: 15px;
    }
    
    #addressModal form {
        padding: 15px !important;
    }
    
    #addressModal form > div {
        grid-template-columns: 1fr !important;
    }
}

/* Pagination */
@media (max-width: 576px) {
    .shop-page .pagination {
        flex-wrap: wrap;
    }
    
    .shop-page .pagination a {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Price Filter */
@media (max-width: 992px) {
    #priceForm > div {
        flex-direction: row !important;
    }
}

/* Quick Filters */
@media (max-width: 992px) {
    .shop-page aside > div:last-of-type > div {
        flex-direction: row !important;
    }
    
    .shop-page aside > div:last-of-type > div a {
        flex: 1;
    }
}

/* Fix for iOS input zoom */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px !important;
    }
}


/* ============================================
   FULL WIDTH SECTIONS RESPONSIVE
   ============================================ */

/* Large Desktop */
@media (max-width: 1400px) {
    .section-inner {
        padding: 0 40px;
    }
    
    .promo-banner-inner {
        padding: 0 40px;
    }
    
    .products-grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet Landscape */
@media (max-width: 1200px) {
    .products-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .categories-grid-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .new-arrival-grid {
        gap: 20px;
    }
}


/* Tablet */
@media (max-width: 992px) {
    .section-fullwidth {
        padding: 60px 0;
    }
    
    .section-inner {
        padding: 0 30px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .products-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .promo-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 0 30px;
    }
    
    .promo-banner-fullwidth .banner-content {
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .promo-banner-fullwidth .banner-countdown {
        justify-content: center;
    }
    
    .new-arrival-grid {
        grid-template-columns: 1fr;
    }
    
    .arrival-card-large {
        min-height: 400px;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}


/* Mobile */
@media (max-width: 768px) {
    .section-fullwidth {
        padding: 40px 0;
    }
    
    .section-inner {
        padding: 0 20px;
    }
    
    .section-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .nav-arrows {
        display: none;
    }
    
    .products-grid-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .categories-grid-6 {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .category-card {
        padding: 12px;
    }
    
    .category-card .category-image {
        max-width: 70px;
        max-height: 70px;
    }
    
    .category-card i {
        font-size: 28px;
    }
    
    .promo-banner-fullwidth .banner-content h2 {
        font-size: 32px;
    }
    
    .promo-banner-fullwidth .time-box {
        width: 55px;
        height: 55px;
    }
    
    .arrival-right {
        grid-template-rows: auto auto;
    }
    
    .arrival-bottom {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        padding: 30px 20px;
    }
}


/* Small Mobile */
@media (max-width: 480px) {
    .section-inner {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .arrival-card-large {
        min-height: 350px;
        padding: 25px;
    }
    
    .arrival-card-large h3 {
        font-size: 22px;
    }
    
    .arrival-card-large .arrival-content {
        bottom: 25px;
        left: 25px;
    }
}

/* ============================================
   FULL WIDTH HERO BANNER RESPONSIVE
   ============================================ */

/* Large Desktop */
@media (max-width: 1200px) {
    .hero-content-fullwidth h2 {
        font-size: 44px;
        letter-spacing: 6px;
    }
}

/* Tablet Landscape */
@media (max-width: 992px) {
    .hero-slide-fullwidth {
        min-height: 400px;
    }
    
    .hero-content-fullwidth {
        left: 6%;
        max-width: 400px;
    }
    
    .hero-content-fullwidth h2 {
        font-size: 36px;
        letter-spacing: 4px;
    }
    
    .hero-btn {
        padding: 12px 30px;
        font-size: 12px;
    }
    
    .slider-arrow-fullwidth {
        width: 44px;
        height: 44px;
    }
    
    .slider-prev-fullwidth {
        left: 20px;
    }
    
    .slider-next-fullwidth {
        right: 20px;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    .hero-slide-fullwidth {
        min-height: 350px;
        background-position: center center;
    }
    
    .hero-overlay {
        width: 100%;
        background: linear-gradient(180deg, 
            rgba(245, 235, 225, 0.9) 0%, 
            rgba(245, 235, 225, 0.7) 50%, 
            rgba(245, 235, 225, 0.5) 100%);
    }
    
    .hero-content-fullwidth {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        max-width: 90%;
    }
    
    .hero-content-fullwidth h2 {
        font-size: 32px;
        letter-spacing: 4px;
        margin-bottom: 25px;
    }
    
    .hero-btn {
        padding: 12px 28px;
    }
    
    .slider-arrow-fullwidth {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .slider-prev-fullwidth {
        left: 15px;
    }
    
    .slider-next-fullwidth {
        right: 15px;
    }
    
    .slider-dots-fullwidth {
        bottom: 20px;
    }
    
    .dot-fullwidth {
        width: 10px;
        height: 10px;
    }
    
    .dot-fullwidth.active {
        width: 24px;
    }
}

/* Mobile Landscape */
@media (max-width: 576px) {
    .hero-slide-fullwidth {
        min-height: 300px;
    }
    
    .hero-content-fullwidth h2 {
        font-size: 26px;
        letter-spacing: 3px;
        margin-bottom: 20px;
    }
    
    .hero-btn {
        padding: 10px 24px;
        font-size: 11px;
        letter-spacing: 1.5px;
    }
    
    .slider-arrow-fullwidth {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .slider-prev-fullwidth {
        left: 10px;
    }
    
    .slider-next-fullwidth {
        right: 10px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .hero-slide-fullwidth {
        min-height: 280px;
    }
    
    .hero-content-fullwidth h2 {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .hero-btn {
        padding: 10px 20px;
        font-size: 10px;
    }
    
    .slider-dots-fullwidth {
        bottom: 15px;
        gap: 8px;
    }
    
    .dot-fullwidth {
        width: 8px;
        height: 8px;
    }
    
    .dot-fullwidth.active {
        width: 20px;
    }
}

/* Extra Small */
@media (max-width: 360px) {
    .hero-slide-fullwidth {
        min-height: 250px;
    }
    
    .hero-content-fullwidth h2 {
        font-size: 20px;
        letter-spacing: 1px;
    }
}
@media (max-width: 768px) {
    /* Hide top bar on mobile for cleaner look */
    .top-bar {
        display: none;
    }
    
    /* Simplify header on mobile */
    .header {
        padding: 12px 0;
    }
    
    .header .container {
        gap: 10px;
    }
}

/* ============================================
   PRODUCT PAGE MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Product detail mobile layout */
    .product-detail {
        padding: 10px 0 !important;
    }
    
    .product-detail .container {
        padding: 0 10px !important;
    }
    
    .product-detail .breadcrumb {
        font-size: 11px;
        margin-bottom: 10px !important;
        padding: 0 5px;
    }
    
    .product-detail-grid {
        padding: 0 !important;
        border-radius: 12px !important;
        gap: 15px !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    .product-gallery {
        margin: 0 !important;
        padding: 0 !important;
        flex-direction: column !important;
    }
    
    .gallery-main {
        order: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 12px !important;
    }
    
    .gallery-main img {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .gallery-thumbs-wrapper {
        order: 2 !important;
        margin: 10px 0 0 0 !important;
        padding: 0 !important;
    }
    
    .product-detail-info {
        padding: 15px !important;
        margin: 0 !important;
    }
    
    .product-detail-info h1 {
        font-size: 18px !important;
        line-height: 1.4;
    }
    
    .product-detail-info .rating {
        font-size: 13px;
        gap: 8px !important;
        flex-wrap: wrap;
    }
    
    .product-detail-info .price {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }
    
    .product-detail-info .description {
        font-size: 13px;
        margin-bottom: 16px !important;
        padding-bottom: 16px !important;
    }
    
    /* Size and color buttons */
    .size-btn {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
    
    .color-btn {
        width: 26px !important;
        height: 26px !important;
    }
    
    /* Quantity and buy buttons */
    .product-buy {
        gap: 12px !important;
        margin-bottom: 25px !important;
    }
    
    .quantity-input {
        width: 100%;
        justify-content: center;
    }
    
    .quantity-input button {
        width: 40px;
        height: 40px;
    }
    
    .quantity-input input {
        width: 60px;
        height: 40px;
        font-size: 16px;
    }
    
    .product-buy .btn-outline,
    .product-buy .btn-secondary {
        padding: 14px 20px !important;
        font-size: 14px;
    }
    
    /* Delivery info */
    .delivery-info {
        border-radius: 12px !important;
    }
    
    .delivery-item {
        padding: 16px !important;
    }
    
    .delivery-item i {
        font-size: 24px !important;
    }
    
    .delivery-item h4 {
        font-size: 14px;
    }
    
    /* Gallery thumbnails at bottom */
    .gallery-thumbs-wrapper {
        margin-top: 15px;
    }
    
    .gallery-thumbs img {
        width: 60px !important;
        height: 60px !important;
    }
    
    .thumb-nav {
        width: 30px !important;
        height: 30px !important;
        font-size: 12px;
    }
    
    /* Tabs */
    .tabs {
        margin-bottom: 20px !important;
    }
    
    .tab {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .product-detail-grid {
        padding: 15px !important;
    }
    
    .gallery-main {
        min-height: 300px !important;
    }
    
    .gallery-thumbs img {
        width: 50px !important;
        height: 50px !important;
    }
}

/* ============================================
   SHOP PAGE MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    .shop-page {
        padding: 20px 0;
    }
    
    .shop-page .section-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    /* Products grid - 2 columns on mobile */
    .shop-page .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Filter toggle button */
    .shop-page aside {
        display: none;
    }
}

/* ============================================
   CART PAGE MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    .cart-page {
        padding: 20px 0;
    }
    
    .cart-page h1 {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }
    
    /* Cart table as cards on mobile */
    .cart-table {
        display: block;
    }
    
    .cart-table thead {
        display: none;
    }
    
    .cart-table tbody {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .cart-table tr {
        display: flex;
        flex-wrap: wrap;
        background: #fff;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        position: relative;
    }
    
    .cart-table td {
        border: none !important;
        padding: 5px !important;
    }
    
    .cart-table td:first-child {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .cart-product img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .cart-table td:nth-child(2),
    .cart-table td:nth-child(3) {
        width: 50%;
    }
    
    .cart-table td:nth-child(4) {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
        padding-top: 10px !important;
        border-top: 1px solid #eee !important;
    }
    
    .cart-table td:last-child {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    .cart-total {
        padding: 20px !important;
        border-radius: 16px !important;
    }
}

/* ============================================
   INDEX PAGE MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    /* Hero slider */
    .hero-slider {
        border-radius: 0 !important;
        margin: 0 -15px;
    }
    
    .hero-slide {
        min-height: 220px !important;
        padding: 20px !important;
    }
    
    .hero-content h2 {
        font-size: 22px !important;
    }
    
    .hero-content p {
        font-size: 13px;
    }
    
    /* Section spacing */
    .section {
        padding: 30px 0 !important;
    }
    
    .section-header {
        margin-bottom: 20px;
    }
    
    .section-tag {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }
    
    .section-title {
        font-size: 20px !important;
    }
    
    /* Products grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .product-card {
        border-radius: 8px;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .product-image {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 8px 8px 0 0;
    }
    
    .product-image img {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .product-info {
        padding: 10px;
        margin: 0 !important;
    }
    
    .product-name {
        font-size: 13px;
        min-height: auto;
        -webkit-line-clamp: 2;
    }
    
    .current-price {
        font-size: 15px;
    }
    
    .original-price {
        font-size: 12px;
    }
    
    .add-to-cart-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    /* Features section */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .feature-item {
        padding: 20px 15px !important;
        flex-direction: row !important;
        text-align: left !important;
        gap: 15px;
    }
    
    .feature-icon {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0 !important;
    }
    
    .feature-icon .inner {
        width: 35px !important;
        height: 35px !important;
        font-size: 16px !important;
    }
    
    .feature-item h4 {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .feature-item p {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .hero-slide {
        min-height: 200px !important;
    }
    
    .hero-content h2 {
        font-size: 18px !important;
    }
    
    .products-grid {
        gap: 10px !important;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .current-price {
        font-size: 14px;
    }
}

/* ============================================
   CONTACT PAGE MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    .contact-page {
        padding: 20px 0;
    }
    
    .contact-hero {
        padding: 40px 20px !important;
        margin: 0 -15px 30px !important;
        border-radius: 0 !important;
    }
    
    .contact-hero h1 {
        font-size: 28px !important;
    }
    
    .contact-cards {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .contact-card {
        padding: 20px !important;
    }
    
    .contact-form-section {
        padding: 25px !important;
        border-radius: 16px !important;
    }
}

/* ============================================
   FOOTER MOBILE ENHANCEMENTS
   ============================================ */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 30px !important;
    }
    
    /* Use CSS Grid: first row full width, second row 4 columns */
    .footer-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 15px 10px !important;
    }
    
    /* First column - spans all 4 columns (full width) */
    .footer-col:first-child {
        grid-column: 1 / -1 !important;
        text-align: center;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 10px;
    }
    
    /* Last 4 columns - each takes 1 column */
    .footer-col:not(:first-child) {
        text-align: center;
    }
    
    .footer-col h4 {
        font-size: 11px;
        margin-bottom: 8px;
        white-space: nowrap;
    }
    
    .footer-col ul {
        display: block !important;
    }
    
    .footer-col ul li {
        margin-bottom: 5px;
        font-size: 10px;
        display: block !important;
    }
    
    .social-links {
        justify-content: center;
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .social-links a {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    
    .subscribe-form {
        max-width: 280px;
        margin: 0 auto;
        display: flex !important;
    }
}

/* Even smaller screens - 2x2 grid for last 4 columns */
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px 15px !important;
    }
    
    /* First column still full width */
    .footer-col:first-child {
        grid-column: 1 / -1 !important;
    }
    
    .footer-col h4 {
        font-size: 13px;
    }
    
    .footer-col ul li {
        font-size: 11px;
    }
}


/* ============================================
   PRODUCT CARD SIZE TAGS MOBILE
   ============================================ */
@media (max-width: 768px) {
    .product-sizes {
        margin-top: 8px;
        gap: 4px !important;
    }
    
    .size-tag {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}

/* ============================================
   HIDE ELEMENTS ON MOBILE FOR CLEANER UI
   ============================================ */
@media (max-width: 768px) {
    /* Hide rating count on very small screens */
    .product-rating .rating-count {
        display: none;
    }
    
    /* Simplify product card actions */
    .product-actions {
        display: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header,
    .footer,
    .scroll-top,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}
