/**
 * Dragon Spice Hub - Granular Responsive Stylesheet
 * Mobile-First Design (320px to 4K Displays)
 */

/* ==========================================================================
   MOBILE NAVIGATION DRAWER & BACKDROP
   ========================================================================== */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.mobile-nav-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: var(--bg-dark-surface);
    border-right: 1px solid var(--border-fire);
    z-index: 1501;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    overflow-y: auto;
}

.mobile-nav-drawer.open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-pure-white);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(230, 40, 40, 0.15);
    color: var(--flame-orange);
}

.mobile-nav-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==========================================================================
   STICKY MOBILE BOTTOM ORDER BAR
   ========================================================================== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-bar-height);
    background: rgba(18, 18, 24, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-fire);
    z-index: 998;
    padding: 0.4rem 0.75rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
}

.mobile-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 0.5rem;
    height: 100%;
    align-items: center;
}

.bottom-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bottom-bar-btn svg {
    margin-bottom: 2px;
}

.bottom-btn-call {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-pure-white);
}

.bottom-btn-wa {
    background: rgba(37, 211, 102, 0.2);
    border: 1px solid rgba(37, 211, 102, 0.4);
    color: #25D366;
}

.bottom-btn-cart {
    background: var(--gradient-fire);
    color: var(--text-pure-white);
    position: relative;
    box-shadow: 0 2px 10px var(--primary-red-glow);
}

.bottom-cart-badge {
    position: absolute;
    top: 4px;
    right: 14px;
    background: var(--gold-yellow);
    color: #0d0d0f;
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   BREAKPOINTS
   ========================================================================== */

/* Large Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .nav-desktop {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .footer-top-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

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

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

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    body {
        padding-bottom: calc(var(--bottom-bar-height) + 10px);
    }

    .mobile-bottom-bar {
        display: block;
    }

    .floating-whatsapp-btn {
        bottom: calc(var(--bottom-bar-height) + 1.25rem);
        right: 1.25rem;
        width: 50px;
        height: 50px;
    }

    .back-to-top-btn {
        bottom: calc(var(--bottom-bar-height) + 1.25rem);
        left: 1.25rem;
    }

    .quick-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-banner-frame {
        margin-bottom: 1.5rem;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-group .btn {
        width: 100%;
    }

    .food-grid {
        grid-template-columns: 1fr;
    }

    .combos-grid {
        grid-template-columns: 1fr;
    }

    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-drawer {
        max-width: 100%;
    }
}

/* Small Phones (<= 480px) */
@media (max-width: 480px) {
    .brand-name {
        font-size: 1.15rem;
    }

    .brand-tagline {
        font-size: 0.68rem;
    }

    .brand-logo-img {
        width: 40px;
        height: 40px;
    }

    .quick-action-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .quick-action-card {
        padding: 0.85rem 0.65rem;
        gap: 0.6rem;
    }

    .action-icon-wrap {
        width: 38px;
        height: 38px;
    }

    .action-card-body h4 {
        font-size: 0.95rem;
    }

    .action-card-body p {
        font-size: 0.75rem;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-img-wrap {
        height: 110px;
    }

    .category-card-name {
        font-size: 0.95rem;
        padding: 0.6rem 0.5rem;
    }

    .filter-meta-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Ultra Small Phones (<= 360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.85rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .card-actions-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-btn-group {
        width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
   ACCESSIBILITY & PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
