/* 
   JK Jewellers Chirawa - Responsive Stylesheet
   Author: Senior UI/UX Designer & Frontend Developer
   Breakpoints and Layout Adaptability
*/

/* --- Large Laptops / Desktops (1200px) --- */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .mega-menu {
        padding: 40px;
        grid-template-columns: repeat(4, 1fr) 200px;
    }
    
    .categories-grid {
        gap: 20px;
    }
    
    .about-grid, .inquiry-split {
        gap: 40px;
    }
}

/* --- Tablets Landscape & Laptops (992px) --- */
@media (max-width: 992px) {
    :root {
        --header-height: 80px;
        --header-shrink-height: 70px;
    }
    
    .section {
        padding: 80px 0;
    }
    
    /* Top bar hide or stack */
    .top-bar {
        display: none; /* Hide on mobile/tablet for simplicity and performance */
    }
    
    .header-wrapper {
        background: rgba(75, 15, 26, 0.85) !important;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    }
    
    /* Mobile Menu Hamburger Active */
    .hamburger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background-color: var(--color-dark);
        border-left: 2px solid var(--color-secondary);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 40px 40px 40px;
        transition: var(--transition-smooth);
        z-index: 1004;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px dashed rgba(232, 220, 196, 0.1);
    }
    
    .nav-link {
        font-size: 0.95rem;
        color: var(--color-bg-light);
        display: block;
    }
    
    /* Disable Mega Menu Hover on Mobile and stack options */
    .has-mega-menu {
        position: relative;
    }
    
    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 15px 0 0 15px;
        background: transparent;
        border: none;
        display: none; /* Toggled via JS in mobile menu */
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .has-mega-menu.open .mega-menu {
        display: grid;
    }
    
    .mega-column h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .mega-featured {
        display: none; /* Hide preview box in mobile view */
    }
    
    /* Grid system updates */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .best-sellers-slider, .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .about-grid, .inquiry-split {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .about-images {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .bridal-banner {
        grid-template-columns: 1fr;
    }
    
    .bridal-banner-content {
        padding: 50px 40px;
    }
    
    .bridal-banner-image {
        min-height: 350px;
    }
    
    .bridal-banner-image::before {
        background: linear-gradient(to top, var(--color-dark) 0%, transparent 100%);
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* --- Tablets Portrait (768px) --- */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .hero-content {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .about-signature {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .testimonial-card {
        padding: 40px 20px;
    }
    
    .testimonial-card::before {
        font-size: 6rem;
        left: 20px;
    }
    
    .inquiry-form-container {
        padding: 30px 20px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .post-header h1 {
        font-size: 2.2rem;
    }
}

/* --- Mobile Phones (480px) --- */
@media (max-width: 480px) {
    :root {
        --header-height: 70px;
        --header-shrink-height: 60px;
    }
    
    .navbar {
        padding: 0 20px;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .logo-text span {
        font-size: 0.55rem;
        letter-spacing: 2px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .hero-btns .btn {
        width: 100%;
    }
    
    /* 2-Column Grid Layout for Products and Categories on Mobile */
    .categories-grid, 
    .best-sellers-slider {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    
    .features-grid, 
    .stats-container,
    .masonry-grid,
    .footer-top {
        grid-template-columns: 1fr;
    }
    
    .about-img-tall {
        height: 350px;
    }
    
    .about-img-wide {
        height: 180px;
    }
    
    /* Adjust category card styling for 2 columns */
    .category-card {
        height: 200px !important;
        padding: 15px !important;
    }
    
    .category-card h3 {
        font-size: 1.15rem !important;
        margin-bottom: 4px !important;
    }
    
    .category-card p {
        font-size: 0.65rem !important;
        margin-bottom: 10px !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    .category-card .btn-category {
        font-size: 0.65rem !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    /* Adjust product card styling for 2 columns */
    .product-image {
        height: 160px !important;
    }
    
    .product-details {
        padding: 15px 12px !important;
    }
    
    .product-details h3 {
        font-size: 0.95rem !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }
    
    .product-details p {
        font-size: 0.72rem !important;
        margin-bottom: 12px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.4 !important;
    }
    
    /* Stack WhatsApp and Call buttons vertically inside product cards */
    .product-actions {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
    
    .product-actions a {
        padding: 8px 0 !important;
        font-size: 0.65rem !important;
        width: 100% !important;
    }
    
    .floating-actions {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .success-modal {
        padding: 40px 20px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .faq-question {
        font-size: 1.15rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center !important;
        padding-left: 0 !important;
        margin-top: 10px !important;
    }
}
