/* ============================================
   HJKCollections - Responsive Styles
   ============================================ */

/* Large Desktops (1400px+) */
@media (min-width: 1400px) {
    .container-custom { max-width: 1320px; }
}

/* Laptops (1200px - 1399px) */
@media (max-width: 1399px) {
    .container-custom { max-width: 1140px; }
    .hero-title { font-size: 2.8rem; }
}

/* Tablets Landscape (992px - 1199px) */
@media (max-width: 1199px) {
    .container-custom { max-width: 960px; }
    .hero-title { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1rem; }

    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid { grid-template-columns: repeat(3, 1fr); }

    .product-detail-layout { gap: 30px; }

    .cart-layout { grid-template-columns: 1fr 320px; }
    .checkout-layout { grid-template-columns: 1fr 320px; }

    .profile-layout { gap: 24px; }
}

/* Tablets Portrait (768px - 991px) */
@media (max-width: 991px) {
    .container-custom { max-width: 720px; padding: 0 20px; }

    /* Header */
    .navbar-custom .nav-links { display: none; }
    .navbar-custom .mobile-menu-btn { display: flex; }

    /* Hero */
    .hero-section { min-height: 400px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 0.95rem; }

    /* Features bar */
    .features-bar { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    /* Category */
    .category-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

    /* Products */
    .products-page-layout { flex-direction: column; }
    .filter-sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        bottom: 0;
        z-index: 1050;
        background: #fff;
        max-width: 320px;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }
    .filter-sidebar.open { left: 0; }
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    .filter-overlay.show { display: block; }
    .filter-toggle-btn { display: inline-flex !important; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }

    /* Product Detail */
    .product-detail-layout {
        flex-direction: column;
        gap: 24px;
    }
    .product-gallery { max-width: 100%; }
    .product-info { max-width: 100%; }

    /* Cart */
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .cart-summary { position: static; }

    /* Checkout */
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .checkout-summary { position: static; order: -1; }

    /* Profile */
    .profile-layout {
        flex-direction: column;
        gap: 20px;
    }
    .profile-sidebar {
        width: 100%;
        position: static;
    }
    .profile-sidebar .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .profile-sidebar .sidebar-nav a {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    /* Wishlist */
    .wishlist-grid { grid-template-columns: repeat(2, 1fr); }

    /* Testimonials */
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }

    /* Footer */
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

/* Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
    .container-custom { padding: 0 16px; }

    /* Hero */
    .hero-section { min-height: 350px; }
    .hero-title { font-size: 1.8rem; }

    /* Category */
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .category-card .category-name { font-size: 0.85rem; }

    /* Products */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card .product-name { font-size: 0.82rem; }

    /* Product Detail */
    .product-gallery-main { height: 350px; }
    .product-gallery-thumbs { gap: 6px; }
    .product-gallery-thumbs img { width: 55px; height: 55px; }

    /* Cart table */
    .cart-table { font-size: 0.85rem; }
    .cart-table th:nth-child(1),
    .cart-table td:nth-child(1) { min-width: 200px; }

    /* Order cards */
    .order-card-header { flex-direction: column; gap: 8px; align-items: flex-start; }
    .order-card-footer { flex-direction: column; gap: 10px; align-items: flex-start; }

    /* Status timeline */
    .status-timeline { overflow-x: auto; padding-bottom: 10px; }
    .timeline-step { min-width: 80px; }
    .timeline-label { font-size: 0.65rem; }

    /* Wishlist */
    .wishlist-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

    /* Checkout steps */
    .checkout-steps .step-label { display: none; }
    .checkout-steps .step-number { width: 36px; height: 36px; font-size: 0.85rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

    /* Auth pages */
    .auth-card { padding: 24px 20px; }

    /* Confirmation page */
    .confirmation-card { padding: 24px 20px; }
}

/* Mobile Portrait (max 575px) */
@media (max-width: 575px) {
    body { font-size: 14px; }
    .container-custom { padding: 0 12px; }

    /* Header */
    .navbar-custom { padding: 12px 0; }
    .header-actions { gap: 10px; }
    .header-actions .action-btn { width: 34px; height: 34px; font-size: 0.85rem; }

    /* Hero */
    .hero-section { min-height: 300px; padding: 40px 16px; }
    .hero-title { font-size: 1.5rem; line-height: 1.3; }
    .hero-subtitle { font-size: 0.88rem; }
    .hero-buttons { flex-direction: column; gap: 10px; }
    .hero-buttons a { width: 100%; text-align: center; }

    /* Features */
    .features-bar { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feature-item { padding: 14px; }
    .feature-item i { font-size: 20px; }
    .feature-item span { font-size: 0.75rem; }

    /* Section headings */
    .section-title { font-size: 1.5rem; }

    /* Category */
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-card { border-radius: var(--radius-md); }
    .category-card img { height: 120px; }

    /* Products */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card { border-radius: var(--radius-md); }
    .product-card .product-image { height: 160px; }
    .product-card .product-actions { gap: 4px; }
    .product-card .product-action-btn { width: 30px; height: 30px; font-size: 0.7rem; }
    .product-card .card-body { padding: 10px; }
    .product-card .product-name { font-size: 0.8rem; }
    .product-card .product-price .selling { font-size: 0.9rem; }
    .product-card .product-price .original { font-size: 0.72rem; }

    /* Product Detail */
    .product-gallery-main { height: 280px; }
    .product-info h1 { font-size: 1.3rem; }
    .share-buttons { flex-wrap: wrap; }

    /* Cart */
    .cart-table { display: block; overflow-x: auto; }
    .qty-control { gap: 4px; }
    .qty-control button { width: 28px; height: 28px; }

    /* Profile */
    .content-card { padding: 16px; }
    .content-header h4 { font-size: 1.1rem; }

    /* Tabs */
    .tabs-custom { overflow-x: auto; white-space: nowrap; gap: 4px; }
    .tab-btn { padding: 8px 14px; font-size: 0.8rem; }

    /* Address cards */
    .address-cards-grid { grid-template-columns: 1fr; }

    /* Breadcrumbs */
    .breadcrumbs { font-size: 0.78rem; }

    /* Modals */
    .modal-custom .modal-content { margin: 10px; padding: 20px; }

    /* Toast */
    .toast-container { left: 10px; right: 10px; bottom: 10px; max-width: none; }

    /* Back to top */
    .back-to-top { width: 40px; height: 40px; right: 12px; bottom: 12px; }

    /* Contact info cards */
    .contact-info-card { padding: 20px !important; }

    /* FAQ */
    .faq-question { padding: 12px 16px !important; font-size: 0.88rem !important; }

    /* Promo section */
    .promo-section { padding: 40px 16px; }
    .promo-section h2 { font-size: 1.5rem; }

    /* Testimonials */
    .testimonials-grid { grid-template-columns: 1fr; }

    /* Newsletter */
    .newsletter-form { flex-direction: column; }
    .newsletter-form input { min-width: auto; }
}

/* Utility classes for responsive show/hide */
@media (max-width: 991px) {
    .hide-tablet { display: none !important; }
}
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 992px) {
    .show-tablet-only { display: none !important; }
}
@media (min-width: 768px) {
    .show-mobile-only { display: none !important; }
}

/* Print styles */
@media print {
    #header,
    #footer,
    #announcement-bar,
    .navbar-custom,
    .footer-custom,
    .back-to-top,
    .toast-container,
    .breadcrumbs,
    .profile-sidebar,
    .confirmation-page .d-flex.gap-3.justify-content-center,
    .confirmation-page .alert {
        display: none !important;
    }
    body { background: #fff; }
    .container-custom { max-width: 100%; padding: 0; }
    .content-card, .card-custom { box-shadow: none; border: 1px solid #ddd; }
    .confirmation-page { padding-top: 0; }
    .confirmation-icon { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
