/* ============================================================
   EliteMart - Responsive Breakpoints
   Mobile First Responsive Design
   ============================================================ */

/* ============================================================
   LARGE DESKTOP (max-width: 1400px)
   ============================================================ */
@media (max-width: 1400px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   DESKTOP (max-width: 1200px)
   ============================================================ */
@media (max-width: 1200px) {
    .hero-slide {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .dashboard-layout {
        grid-template-columns: 240px 1fr;
    }
}

/* ============================================================
   TABLET LANDSCAPE (max-width: 992px)
   ============================================================ */
@media (max-width: 992px) {
    .top-bar-left {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-right {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mega-menu-wrapper {
        display: none !important;
    }
    
    .hero-slide {
        height: 360px;
    }
    
    .hero-content {
        padding: 0 30px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: static;
    }
    
    .mega-menu {
        grid-template-columns: 1fr;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
    }
    
    .product-list-item {
        flex-direction: column;
    }
    
    .product-list-item .product-image {
        width: 100%;
        height: 200px;
    }
    
    .footer-main .row > div {
        margin-bottom: 24px;
    }
    
    .checkout-steps {
        flex-wrap: wrap;
    }
    
    .step-connector {
        width: 30px;
    }
}

/* ============================================================
   TABLET PORTRAIT (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    body {
        font-size: 13px;
    }
    
    .top-bar {
        display: none;
    }
    
    .main-header .container-fluid {
        gap: 10px;
        padding: 0 12px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .search-category-select {
        display: none;
    }
    
    .search-form {
        border-width: 1px;
    }
    
    .search-btn {
        padding: 8px 14px;
    }
    
    .header-action-btn {
        padding: 6px 8px;
    }
    
    .header-action-btn span {
        display: none;
    }
    
    .header-user-btn span {
        display: none;
    }
    
    .nav-categories-btn span {
        display: none;
    }
    
    .hero-slide {
        height: 300px;
    }
    
    .hero-content {
        padding: 0 20px;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .hero-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
    
    .hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .hero-arrow.prev { left: 10px; }
    .hero-arrow.next { right: 10px; }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .section-padding {
        padding: 30px 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .flash-sale-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .countdown-unit {
        min-width: 50px;
        padding: 6px 10px;
    }
    
    .countdown-unit .count-value {
        font-size: 1.1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card-body {
        padding: 10px;
    }
    
    .product-title {
        font-size: 0.82rem;
    }
    
    .product-price .current-price {
        font-size: 0.95rem;
    }
    
    .product-add-cart {
        padding: 8px;
        font-size: 0.75rem;
    }
    
    .products-scroll .product-card {
        min-width: 180px;
        max-width: 180px;
    }
    
    .promo-banner {
        height: 180px;
    }
    
    .promo-banner-content h3 {
        font-size: 1.1rem;
    }
    
    .feature-box {
        padding: 14px;
        gap: 10px;
    }
    
    .feature-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .newsletter-content h2 {
        font-size: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        border-radius: var(--radius);
    }
    
    .newsletter-form input {
        border-radius: var(--radius);
    }
    
    .newsletter-form button {
        border-radius: var(--radius);
    }
    
    .footer-main {
        padding: 30px 0 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .auth-card {
        padding: 28px;
        margin: 10px;
    }
    
    .auth-card h2 {
        font-size: 1.3rem;
    }
    
    .cart-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .elite-table {
        display: block;
        overflow-x: auto;
    }
    
    /* Modal full-width on mobile */
    .modal-dialog {
        margin: 10px;
    }
    
    .category-card {
        padding: 14px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .testimonial-card {
        padding: 20px;
    }
    
    .blog-card-image {
        height: 160px;
    }
    
    .blog-card-body {
        padding: 14px;
    }
    
    .blog-card-title {
        font-size: 0.95rem;
    }
}

/* ============================================================
   MOBILE (max-width: 576px)
   ============================================================ */
@media (max-width: 576px) {
    .main-header .container-fluid {
        gap: 6px;
    }
    
    .logo-icon {
        display: none;
    }
    
    .search-input {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .search-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .header-actions {
        gap: 2px;
    }
    
    .header-action-btn {
        padding: 4px 6px;
    }
    
    .header-action-btn i {
        font-size: 1.15rem;
    }
    
    .header-user-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .hero-slide {
        height: 250px;
    }
    
    .hero-content h1 {
        font-size: 1.2rem;
    }
    
    .hero-content p {
        font-size: 0.8rem;
        margin-bottom: 16px;
    }
    
    .btn-elite {
        padding: 10px 20px;
        font-size: 0.82rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .product-card-body {
        padding: 8px;
    }
    
    .product-category-label {
        font-size: 0.65rem;
    }
    
    .product-title {
        font-size: 0.78rem;
        -webkit-line-clamp: 1;
    }
    
    .product-rating {
        margin-bottom: 4px;
    }
    
    .product-rating .bi {
        font-size: 0.65rem;
    }
    
    .product-price .current-price {
        font-size: 0.88rem;
    }
    
    .product-price .original-price {
        font-size: 0.72rem;
    }
    
    .product-add-cart {
        padding: 7px;
        font-size: 0.72rem;
    }
    
    .product-actions {
        display: none;
    }
    
    .product-quick-view {
        display: none;
    }
    
    .flash-sale-title h2 {
        font-size: 1.1rem;
    }
    
    .countdown-timer {
        gap: 4px;
    }
    
    .countdown-unit {
        min-width: 42px;
        padding: 4px 8px;
    }
    
    .countdown-unit .count-value {
        font-size: 0.95rem;
    }
    
    .countdown-unit .count-label {
        font-size: 0.55rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .newsletter-section {
        padding: 30px 0;
    }
    
    .newsletter-content h2 {
        font-size: 1.2rem;
    }
    
    .footer-social a {
        width: 34px;
        height: 34px;
    }
    
    .checkout-steps {
        gap: 4px;
    }
    
    .checkout-step .step-label {
        display: none;
    }
    
    .step-connector {
        width: 20px;
    }
    
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
    
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .mobile-menu {
        width: 280px;
    }
}

/* ============================================================
   EXTRA SMALL (max-width: 400px)
   ============================================================ */
@media (max-width: 400px) {
    .hero-slide {
        height: 220px;
    }
    
    .hero-content h1 {
        font-size: 1.05rem;
    }
    
    .hero-arrow {
        display: none;
    }
    
    .products-grid {
        gap: 6px;
    }
    
    .product-card-body {
        padding: 6px;
    }
    
    .product-price .current-price {
        font-size: 0.82rem;
    }
    
    .product-add-cart {
        font-size: 0.68rem;
        padding: 6px;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .top-bar,
    .main-header,
    .nav-bar,
    .site-footer,
    .scroll-to-top,
    .toast-container,
    .mobile-menu,
    .mobile-menu-overlay,
    .page-loader,
    .hero-slider,
    .newsletter-section {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .product-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* ============================================================
   LANDSCAPE PHONE
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-slide {
        height: 200px;
    }
    
    .hero-content h1 {
        font-size: 1.2rem;
    }
    
    .hero-content p {
        display: none;
    }
}

/* ============================================================
   HIGH DPI DISPLAYS
   ============================================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-card-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}
