/* ================================================
   MANGAL THEME - Mobile Responsive CSS
   ================================================ */

/* ---- Tablet (≤ 1024px) ---- */
@media (max-width: 1024px) {
    .mg-container {
        padding: 0 15px;
    }

    /* Header - compact single row */
    .mg-header-main {
        gap: 12px;
        padding: 10px 0;
    }

    .mg-logo-img {
        height: 42px;
    }

    /* Gold chip - shorten on tablet */
    .mg-gold-chip {
        padding: 4px 10px;
        font-size: 0.72rem;
    }

    /* Search */
    .mg-search-wrap {
        max-width: 400px;
    }

    /* Hide Desktop Nav on tablet */
    .mg-nav {
        display: none;
    }

    .mg-mobile-menu-btn {
        display: flex;
    }

    /* Hero */
    .mg-hero-inner {
        grid-template-columns: 1fr;
    }

    .mg-hero-img-panel {
        display: none;
    }

    .mg-hero-text-panel {
        padding: 40px 20px;
    }

    .mg-hero-title {
        font-size: 2.2rem;
    }

    .mg-hero-slide {
        min-height: 340px;
    }

    /* Products */
    .mg-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    /* Category Grid */
    .mg-cat-circle {
        width: 90px;
        height: 90px;
    }

    /* Wedding */
    .mg-wedding-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .mg-wedding-card:last-child {
        grid-column: 1 / -1;
        height: 200px;
    }

    /* Plan */
    .mg-plan-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .mg-plan-visual {
        display: none;
    }

    .mg-plan-steps {
        text-align: left;
        display: inline-flex;
        flex-direction: column;
        width: 100%;
        max-width: 500px;
    }

    /* Gifting */
    .mg-gifting-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 160px 160px;
    }

    .mg-gift-card.main {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    /* Testimonials */
    .mg-testimonial-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* Instagram */
    .mg-insta-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Footer */
    .mg-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

/* ---- Mobile (≤ 768px) ---- */
@media (max-width: 768px) {

    /* Top Bar - collapse */
    .mg-top-bar-inner {
        flex-direction: column;
        gap: 4px;
        font-size: 0.75rem;
    }

    .mg-top-links {
        display: none;
    }

    /* Header */
    .mg-header-main {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 8px 0;
    }

    .mg-logo-img {
        height: 38px;
    }

    .mg-gold-chip {
        display: none;
    }

    /* Actions - icons only */
    .mg-header-action .mg-action-label {
        display: none;
    }

    .mg-header-action i {
        font-size: 1.1rem;
    }

    .mg-btn-login .mg-action-label {
        display: none;
    }

    .mg-header-actions {
        gap: 12px;
    }

    /* Search - full width below */
    .mg-search-wrap {
        order: 99;
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 8px;
    }

    /* Products */
    .mg-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mg-product-img {
        padding-top: 110%;
    }

    /* Mobile Filters */
    .mg-mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: var(--mg-navy);
        color: var(--mg-white);
        border: none;
        padding: 8px 16px;
        border-radius: var(--mg-radius);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        margin-right: auto;
    }

    .mg-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 300px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: var(--mg-white) !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        transition: left 0.3s ease !important;
        padding: 20px !important;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1) !important;
    }

    .mg-sidebar.active {
        left: 0 !important;
    }

    .mg-sidebar-close {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        background: transparent;
        border: none;
        font-size: 1.2rem;
        color: var(--mg-text);
        cursor: pointer;
    }

    .mg-filter-group {
        border-bottom: 1px solid var(--mg-border);
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .mg-toolbar-inner {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: space-between;
    }

    .mg-results-count {
        display: none;
    }

    .mg-product-info {
        padding: 10px;
    }

    .mg-price {
        font-size: 0.95rem;
    }

    .mg-cart-btn {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    /* Hero */
    .mg-hero-title {
        font-size: 1.7rem;
    }

    .mg-hero-subtitle {
        font-size: 0.88rem;
        padding: 0 10px;
    }

    .mg-hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .mg-btn-coral,
    .mg-btn-outline-coral {
        width: 100%;
        justify-content: center;
    }

    /* Section Titles */
    .mg-section-title {
        font-size: 1.8rem;
    }

    /* Wedding */
    .mg-wedding-grid {
        grid-template-columns: 1fr;
    }

    .mg-wedding-card {
        height: 200px;
    }

    /* Testimonials */
    .mg-testimonial-grid {
        grid-template-columns: 1fr;
    }

    /* Instagram */
    .mg-insta-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Promise Bar */
    .mg-promise-list {
        gap: 12px;
        justify-content: flex-start;
    }

    .mg-promise-item {
        font-size: 0.8rem;
    }

    /* Footer */
    .mg-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mg-footer {
        padding: 40px 0 0;
    }

    /* Promo Banner */
    .mg-promo-inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .mg-promo-text h2 {
        font-size: 1.6rem;
    }

    .mg-promo-cta {
        justify-content: center;
    }

    /* Gifting */
    .mg-gifting-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 160px 130px 130px;
    }
}

/* ---- Small Mobile (≤ 480px) ---- */
@media (max-width: 480px) {
    .mg-section-title {
        font-size: 1.5rem;
    }

    .mg-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .mg-cat-circle {
        width: 75px;
        height: 75px;
    }

    .mg-cat-item h4 {
        font-size: 0.72rem;
    }

    .mg-hero-title {
        font-size: 1.4rem;
    }

    .mg-insta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mg-header-actions {
        gap: 8px;
    }
}