/* 📱 MOBILE & TABLET RESPONSIVENESS FIXES */

/* Base Hamburger & Mobile Cart styles (hidden on desktop) */
.hamburger-menu,
.mobile-floating-cart {
    display: none;
}

@media (max-width: 1024px) {
    /* 5. NAVIGATION FIX */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #090910; /* Solid dark background */
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        z-index: 9999; /* Highest z-index */
        box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 0 !important;
    }
    .nav-links li a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
    }
    .hamburger-menu {
        display: flex !important;
        background: transparent;
        border: none;
        color: var(--text-primary);
        cursor: pointer;
        padding: 10px;
        z-index: 101;
        align-items: center;
        justify-content: center;
    }
    nav {
        flex-wrap: wrap;
        position: relative;
    }

    /* 3. LAYOUT ADJUSTMENTS - TABLET */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 6rem 1.5rem 3rem;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-visual {
        width: 100%;
        height: 300px;
        margin-top: 2rem;
    }
    .about-hero {
        flex-direction: column;
    }
    .footer-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }
    .pdp-body {
        grid-template-columns: 1fr !important;
        display: flex;
        flex-direction: column;
    }
    .checkout-location-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    /* 1. MOBILE RESPONSIVENESS */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* 3. LAYOUT ADJUSTMENTS - MOBILE */
    .products-grid {
        grid-template-columns: 1fr !important;
    }
    .footer-grid-new {
        grid-template-columns: 1fr !important;
    }
    .footer-trust-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    /* 4. UI CLEANUP */
    .hero h1 {
        font-size: 3.8rem !important;
        line-height: 1.1;
    }
    .hero-subtitle {
        font-size: 1rem !important;
    }
    .section-title {
        font-size: 1.8rem !important;
    }
    
    /* 1. Make buttons touch-friendly (min 44px) */
    button, 
    .btn-primary, 
    .btn-secondary, 
    .hero-cta-primary, 
    .hero-cta-secondary, 
    .pdp-add-btn,
    .checkout-btn,
    input,
    select,
    textarea {
        min-height: 48px;
        font-size: 16px !important; /* Prevents iOS auto-zoom */
    }
    
    /* Fix overflowing content */
    img, video, canvas {
        max-width: 100%;
        height: auto;
    }
    
    .checkout-form {
        padding: 1.5rem !important;
    }
    
    .payment-details-card {
        padding: 1rem !important;
    }
    
    .qr-code-container img {
        width: 200px !important;
    }
    
    /* Horizontal scrolling fix for long hashes/addresses */
    .value.wallet-address,
    .crypto-proof-input {
        word-break: break-all;
    }

    /* Mobile Floating Cart Button */
    .mobile-floating-cart {
        display: flex;
        position: fixed;
        bottom: 90px;
        right: 24px;
        width: 60px;
        height: 60px;
        background: var(--accent-gold);
        color: #000;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 25px rgba(232, 185, 49, 0.4);
        z-index: 999;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .mobile-floating-cart:active {
        transform: scale(0.95);
    }
    .mobile-floating-cart svg {
        width: 26px;
        height: 26px;
    }
    .mobile-floating-cart-count {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #ff4757;
        color: white;
        font-size: 12px;
        font-weight: bold;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #000;
    }
}
