/* Mobile Responsive Optimization - Phase 1 Foundation */
/* Bee Local Platform - Complete Screen Size Optimization */

/* ==========================================
   PHASE 1: CRITICAL MOBILE FOUNDATION
   ========================================== */

/* Mobile-First Responsive Breakpoints */
:root {
    --mobile-xs: 320px;  /* Minimum supported width */
    --mobile-sm: 375px;  /* iPhone SE and similar */
    --mobile-md: 414px;  /* iPhone 12/13/14 Pro Max */
    --tablet-sm: 576px;  /* Small tablets/large phones landscape */
    --tablet-md: 768px;  /* iPad portrait */
    --tablet-lg: 992px;  /* iPad landscape */
    --desktop: 1200px;   /* Desktop and up */
    
    /* Mobile-specific spacing */
    --mobile-padding: 16px;
    --mobile-margin: 12px;
    --mobile-gap: 8px;
    
    /* Touch target standards */
    --touch-target-min: 44px;
    --touch-spacing: 8px;
    
    /* Mobile typography */
    --mobile-font-base: 16px;  /* Prevents iOS zoom */
    --mobile-font-small: 14px;
    --mobile-font-large: 18px;
    --mobile-line-height: 1.5;
}

/* ==========================================
   MOBILE VIEWPORT & BASE STYLES
   ========================================== */

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Mobile-optimized container padding */
@media (max-width: 575.98px) {
    .container, .container-fluid {
        padding-left: var(--mobile-padding);
        padding-right: var(--mobile-padding);
    }
}

/* ==========================================
   MOBILE NAVIGATION OPTIMIZATION
   ========================================== */

/* Mobile navbar optimization */
@media (max-width: 991.98px) {
    .navbar-brand img {
        height: 32px; /* Optimized logo size for mobile */
    }
    
    .navbar-toggler {
        padding: 8px 12px;
        font-size: 1.1rem;
        border: 2px solid var(--bee-yellow);
        border-radius: 8px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25);
    }
}

/* Off-canvas mobile menu enhancements */
.offcanvas.offcanvas-start {
    width: 320px;
    z-index: 1060;
}

@media (max-width: 375px) {
    .offcanvas.offcanvas-start {
        width: 280px; /* Smaller width for very small screens */
    }
}
@media (max-width: 767.98px) {
    .offcanvas {
        width: 85%; /* Slightly narrower for better usability */
    }
    
    .offcanvas-header {
        padding: 1rem var(--mobile-padding);
        border-bottom: 2px solid var(--bee-yellow);
    }
    
    .offcanvas-body {
        padding: 0;
    }
    
    .offcanvas .nav-link {
        padding: 16px var(--mobile-padding);
        font-size: var(--mobile-font-base);
        min-height: var(--touch-target-min);
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    }
    
    .offcanvas .nav-link:hover,
    .offcanvas .nav-link:focus {
        background-color: rgba(255, 215, 0, 0.1);
        color: var(--bee-yellow);
    }
    
    .offcanvas .nav-link i {
        width: 24px;
        margin-right: 12px;
        text-align: center;
    }
}

/* ==========================================
   MOBILE BUTTON & TOUCH TARGET STANDARDS
   ========================================== */

/* Mobile button optimization */
@media (max-width: 767.98px) {
    .btn {
        min-height: var(--touch-target-min);
        padding: 12px 20px;
        font-size: var(--mobile-font-base);
        border-radius: 8px;
        margin: 4px;
    }
    
    .btn-lg {
        min-height: 52px;
        padding: 16px 24px;
        font-size: 18px;
    }
    
    .btn-sm {
        min-height: 40px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* Yellow button mobile optimization */
    .btn-yellow {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
        transition: all 0.2s ease;
    }
    
    .btn-yellow:active {
        transform: translateY(1px);
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
}

/* ==========================================
   MOBILE FORM OPTIMIZATION
   ========================================== */

/* Mobile form controls */
@media (max-width: 767.98px) {
    .form-control,
    .form-select {
        min-height: var(--touch-target-min);
        font-size: var(--mobile-font-base); /* Prevents iOS zoom */
        padding: 12px 16px;
        border-radius: 8px;
        border: 2px solid #ddd;
        transition: border-color 0.2s ease;
    }
    
    .form-control:focus,
    .form-select:focus {
        border-color: var(--bee-yellow);
        box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    }
    
    .form-label {
        font-size: var(--mobile-font-base);
        font-weight: 600;
        margin-bottom: 8px;
        color: #333;
    }
    
    .input-group {
        margin-bottom: var(--mobile-margin);
    }
    
    .input-group .btn {
        border-left: none;
        border-radius: 0 8px 8px 0;
    }
}

/* ==========================================
   MOBILE SEARCH MODAL OPTIMIZATION
   ========================================== */

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }
    
    .modal-content {
        height: 100vh;
        border-radius: 0;
        border: none;
    }
    
    .modal-header {
        padding: var(--mobile-padding);
        border-bottom: 2px solid var(--bee-yellow);
    }
    
    .modal-body {
        padding: var(--mobile-padding);
        flex: 1;
        overflow-y: auto;
    }
    
    .modal-title {
        font-size: var(--mobile-font-large);
    }
    
    .btn-close {
        width: var(--touch-target-min);
        height: var(--touch-target-min);
        padding: 0;
        margin: 0;
    }
}

/* ==========================================
   MOBILE HOMEPAGE OPTIMIZATION
   ========================================== */

/* Video banner mobile optimization */
@media (max-width: 767.98px) {
    .video-frame {
        margin-bottom: 2rem;
    }
    
    .video-border {
        padding: 12px !important;
    }
    
    .ratio-16x9 {
        /* Switch to 4:3 ratio on mobile for better visibility */
        --bs-aspect-ratio: calc(3 / 4 * 100%);
    }
    
    .video-label {
        top: 8px !important;
        left: 8px !important;
    }
    
    .video-label .badge {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Category showcase mobile optimization */
@media (max-width: 991.98px) {
    .category-showcase-card {
        margin-bottom: 2rem;
    }
    
    .category-showcase-card .card-body {
        padding: 1.5rem;
    }
    
    .category-icon-large {
        margin-bottom: 1rem;
    }
    
    .category-icon-large i {
        font-size: 2.5rem !important;
    }
    
    .subcategory-grid {
        text-align: center;
    }
    
    .subcategory-grid .btn {
        margin: 4px 2px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ==========================================
   MOBILE BUSINESS LISTING CARDS
   ========================================== */

@media (max-width: 767.98px) {
    .business-card,
    .listing-card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .business-card .card-body {
        padding: 1rem;
    }
    
    .business-card .card-title {
        font-size: var(--mobile-font-large);
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .business-card .card-text {
        font-size: var(--mobile-font-small);
        line-height: var(--mobile-line-height);
        margin-bottom: 1rem;
    }
    
    .business-card .btn-group {
        width: 100%;
        gap: 8px;
    }
    
    .business-card .btn-group .btn {
        flex: 1;
        font-size: 14px;
        padding: 10px 8px;
    }
}

/* ==========================================
   MOBILE MARKETPLACE OPTIMIZATION
   ========================================== */

@media (max-width: 767.98px) {
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .product-card .card-img-top {
        height: 200px;
        object-fit: cover;
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    .product-card .card-title {
        font-size: var(--mobile-font-base);
        margin-bottom: 0.5rem;
    }
    
    .product-price {
        font-size: var(--mobile-font-large);
        font-weight: bold;
        color: var(--bee-yellow);
        margin-bottom: 0.5rem;
    }
    
    .add-to-cart-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ==========================================
   MOBILE FLOATING SEARCH OPTIMIZATION
   ========================================== */

@media (max-width: 767.98px) {
    .floating-search-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 20px;
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    }
    
    .floating-search-container {
        width: 95%;
        max-width: none;
        margin: 10px;
        padding: 20px;
        border-radius: 16px;
        max-height: 90vh;
    }
    
    .floating-search-title {
        font-size: var(--mobile-font-large);
    }
    
    .floating-search-input {
        padding: 14px 16px 14px 45px;
        font-size: var(--mobile-font-base);
    }
    
    .suggestion-chips {
        justify-content: center;
        gap: 6px;
    }
    
    .suggestion-chip {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .search-result-item {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 8px;
    }
    
    .search-result-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .search-result-title {
        font-size: var(--mobile-font-base);
    }
    
    .search-result-description {
        font-size: var(--mobile-font-small);
    }
}

/* ==========================================
   MOBILE FOOTER OPTIMIZATION
   ========================================== */

@media (max-width: 767.98px) {
    footer {
        padding: 2rem 0;
    }
    
    footer .container {
        padding: 0 var(--mobile-padding);
    }
    
    footer .footer-column {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    footer .footer-column h6 {
        font-size: var(--mobile-font-base);
        margin-bottom: 1rem;
    }
    
    footer .footer-links {
        text-align: center;
    }
    
    footer .footer-links li {
        margin-bottom: 0.5rem;
    }
    
    footer .footer-links a {
        font-size: var(--mobile-font-small);
        padding: 8px 0;
        display: inline-block;
    }
    
    footer .social-links {
        justify-content: center;
        gap: 1rem;
        margin: 1rem 0;
    }
    
    footer .social-links a {
        width: var(--touch-target-min);
        height: var(--touch-target-min);
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 215, 0, 0.1);
        border-radius: 50%;
        color: var(--bee-yellow);
        transition: all 0.2s ease;
    }
    
    footer .social-links a:hover {
        background: var(--bee-yellow);
        color: #000;
        transform: scale(1.1);
    }
}

/* ==========================================
   MOBILE TYPOGRAPHY OPTIMIZATION
   ========================================== */

@media (max-width: 767.98px) {
    h1, .h1 { 
        font-size: 2rem; 
        line-height: 1.2; 
        margin-bottom: 1rem; 
    }
    
    h2, .h2 { 
        font-size: 1.75rem; 
        line-height: 1.3; 
        margin-bottom: 0.75rem; 
    }
    
    h3, .h3 { 
        font-size: 1.5rem; 
        line-height: 1.3; 
        margin-bottom: 0.75rem; 
    }
    
    h4, .h4 { 
        font-size: 1.25rem; 
        line-height: 1.4; 
        margin-bottom: 0.5rem; 
    }
    
    h5, .h5 { 
        font-size: 1.1rem; 
        line-height: 1.4; 
        margin-bottom: 0.5rem; 
    }
    
    h6, .h6 { 
        font-size: 1rem; 
        line-height: 1.4; 
        margin-bottom: 0.5rem; 
    }
    
    p, .lead {
        font-size: var(--mobile-font-base);
        line-height: var(--mobile-line-height);
        margin-bottom: 1rem;
    }
    
    .display-1 { font-size: 3rem; }
    .display-2 { font-size: 2.5rem; }
    .display-3 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    .display-5 { font-size: 1.5rem; }
    .display-6 { font-size: 1.25rem; }
}

/* ==========================================
   MOBILE ACCESSIBILITY ENHANCEMENTS
   ========================================== */

@media (max-width: 767.98px) {
    /* Focus states for mobile */
    .btn:focus,
    .form-control:focus,
    .form-select:focus,
    a:focus {
        outline: 3px solid var(--bee-yellow);
        outline-offset: 2px;
    }
    
    /* Skip to content link for mobile screen readers */
    .skip-to-content {
        position: absolute;
        top: -40px;
        left: 6px;
        background: var(--bee-yellow);
        color: #000;
        padding: 8px;
        border-radius: 4px;
        text-decoration: none;
        z-index: 1000;
        font-size: var(--mobile-font-base);
    }
    
    .skip-to-content:focus {
        top: 6px;
    }
    
    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .btn-yellow {
            background-color: #000;
            color: #FFD700;
            border: 2px solid #FFD700;
        }
        
        .text-yellow {
            color: #FFD700 !important;
            font-weight: bold;
        }
    }
    
    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* ==========================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ========================================== */

/* Critical CSS for above-the-fold content on mobile */
@media (max-width: 767.98px) {
    /* Optimize fonts for mobile performance */
    body {
        font-display: swap;
    }
    
    /* Reduce paint complexity on mobile */
    .card,
    .btn,
    .modal-content {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Optimize scrolling performance */
    .offcanvas-body,
    .modal-body {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
}

/* ==========================================
   PHASE 2: CONTENT & LAYOUT MOBILE OPTIMIZATION
   ========================================== */

/* Mobile Business Listing Cards Enhancement */
@media (max-width: 767.98px) {
    .business-listing-card {
        margin-bottom: 1.5rem;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        border: 2px solid rgba(255, 215, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .business-listing-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
        border-color: rgba(255, 215, 0, 0.3);
    }
    
    .business-listing-card .card-img-top {
        height: 180px;
        object-fit: cover;
        border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    }
    
    .business-listing-card .card-body {
        padding: 1.25rem;
        background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    }
    
    .business-listing-card .business-title {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: #1a1a1a;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .business-listing-card .business-description {
        font-size: 0.9rem;
        color: #666;
        line-height: 1.4;
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .business-listing-card .business-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
        font-size: 0.8rem;
    }
    
    .business-listing-card .meta-item {
        display: flex;
        align-items: center;
        color: #888;
        background: rgba(255, 215, 0, 0.1);
        padding: 4px 8px;
        border-radius: 12px;
        border: 1px solid rgba(255, 215, 0, 0.2);
    }
    
    .business-listing-card .meta-item i {
        margin-right: 4px;
        color: var(--bee-yellow);
    }
    
    .business-listing-card .action-buttons {
        display: flex;
        gap: 0.5rem;
    }
    
    .business-listing-card .btn-primary-mobile {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 8px;
        border: none;
        background: var(--bee-yellow);
        color: #000;
        transition: all 0.2s ease;
    }
    
    .business-listing-card .btn-secondary-mobile {
        flex: 1;
        padding: 10px 12px;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 8px;
        border: 2px solid var(--bee-yellow);
        background: transparent;
        color: var(--bee-yellow);
        transition: all 0.2s ease;
    }
    
    .business-listing-card .btn-primary-mobile:active {
        transform: translateY(1px);
        background: var(--hover-yellow);
    }
    
    .business-listing-card .btn-secondary-mobile:active {
        transform: translateY(1px);
        background: rgba(255, 215, 0, 0.1);
    }
}

/* Mobile Search Results Grid */
@media (max-width: 767.98px) {
    .search-results-container {
        padding: 1rem;
    }
    
    .search-results-header {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .search-results-count {
        font-size: 0.9rem;
        color: #666;
        margin-bottom: 0.5rem;
    }
    
    .search-results-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 1rem;
    }
    
    .search-filters-mobile {
        background: rgba(255, 215, 0, 0.05);
        border: 2px solid rgba(255, 215, 0, 0.2);
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .filter-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .filter-chip {
        padding: 6px 12px;
        font-size: 0.8rem;
        font-weight: 600;
        border-radius: 20px;
        border: 2px solid rgba(255, 215, 0, 0.3);
        background: transparent;
        color: var(--bee-yellow);
        transition: all 0.2s ease;
        min-height: 36px;
        display: flex;
        align-items: center;
    }
    
    .filter-chip.active,
    .filter-chip:active {
        background: var(--bee-yellow);
        color: #000;
        transform: translateY(1px);
    }
}

/* Mobile Blog Post Cards */
@media (max-width: 767.98px) {
    .blog-post-card {
        margin-bottom: 1.5rem;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(255, 215, 0, 0.1);
        background: #fff;
    }
    
    .blog-post-card .featured-image {
        height: 200px;
        object-fit: cover;
        width: 100%;
        border-bottom: 2px solid rgba(255, 215, 0, 0.1);
    }
    
    .blog-post-card .card-body {
        padding: 1.25rem;
    }
    
    .blog-post-card .post-category {
        display: inline-block;
        padding: 4px 12px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #000;
        background: var(--bee-yellow);
        border-radius: 20px;
        margin-bottom: 0.75rem;
    }
    
    .blog-post-card .post-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 0.75rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .blog-post-card .post-excerpt {
        font-size: 0.9rem;
        color: #666;
        line-height: 1.5;
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .blog-post-card .post-meta {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.8rem;
        color: #888;
        margin-bottom: 1rem;
    }
    
    .blog-post-card .read-more-btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 8px;
        border: 2px solid var(--bee-yellow);
        background: transparent;
        color: var(--bee-yellow);
        transition: all 0.2s ease;
    }
    
    .blog-post-card .read-more-btn:active {
        background: var(--bee-yellow);
        color: #000;
        transform: translateY(1px);
    }
}

/* Mobile Marketplace Product Grid */
@media (max-width: 767.98px) {
    .marketplace-products-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .product-card-mobile {
        background: #fff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        border: 2px solid rgba(255, 215, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .product-card-mobile:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
        border-color: rgba(255, 215, 0, 0.3);
    }
    
    .product-card-mobile .product-image {
        height: 220px;
        object-fit: cover;
        width: 100%;
        border-bottom: 2px solid rgba(255, 215, 0, 0.1);
    }
    
    .product-card-mobile .card-body {
        padding: 1.25rem;
    }
    
    .product-card-mobile .product-vendor {
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--bee-yellow);
        margin-bottom: 0.5rem;
        letter-spacing: 0.5px;
    }
    
    .product-card-mobile .product-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 0.5rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-card-mobile .product-description {
        font-size: 0.85rem;
        color: #666;
        line-height: 1.4;
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-card-mobile .product-price {
        font-size: 1.3rem;
        font-weight: 800;
        color: var(--bee-yellow);
        margin-bottom: 1rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .product-card-mobile .product-actions {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    
    .product-card-mobile .add-to-cart-btn {
        flex: 1;
        padding: 12px;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 8px;
        border: none;
        background: var(--bee-yellow);
        color: #000;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .product-card-mobile .add-to-cart-btn:active {
        transform: translateY(1px);
        background: var(--hover-yellow);
    }
    
    .product-card-mobile .favorite-btn {
        width: 44px;
        height: 44px;
        border-radius: 8px;
        border: 2px solid rgba(255, 215, 0, 0.3);
        background: transparent;
        color: var(--bee-yellow);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    
    .product-card-mobile .favorite-btn:active {
        background: rgba(255, 215, 0, 0.1);
        transform: translateY(1px);
    }
}

/* Mobile Homepage Enhancements */
@media (max-width: 767.98px) {
    /* Pricing cards mobile optimization */
    .pricing-card {
        margin-bottom: 2rem;
        border-radius: 20px;
        padding: 1.5rem !important;
    }
    
    .pricing-title {
        font-size: 1.5rem !important;
        margin-bottom: 1rem;
    }
    
    .pricing-price {
        font-size: 2.5rem !important;
    }
    
    .pricing-period {
        font-size: 1rem !important;
    }
    
    .pricing-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .popular-badge {
        top: -8px;
        right: -8px;
        left: auto;
        transform: none;
    }
    
    .popular-badge-text {
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
    }
    
    /* Feature list mobile optimization */
    .feature-list {
        font-size: 0.9rem;
        margin-bottom: 1.5rem !important;
    }
    
    .feature-list li {
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }
    
    /* CTA buttons mobile optimization */
    .pricing-card .btn {
        font-size: 1rem;
        padding: 14px 20px;
        margin-bottom: 1rem !important;
    }
    
    /* Video frame mobile optimization */
    .video-frame {
        margin-bottom: 2rem;
    }
    
    .video-border {
        padding: 8px !important;
        border-radius: 16px !important;
    }
    
    .video-label {
        top: 12px !important;
        left: 12px !important;
    }
    
    .video-label .badge {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    /* Business owner CTA mobile optimization */
    .business-owner-cta {
        padding: 3rem 0;
        text-align: center;
    }
    
    .business-owner-cta .display-4 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .business-owner-cta .lead {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .business-owner-cta .btn-lg {
        width: 100%;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        padding: 16px 24px;
    }
    
    /* Featured products carousel mobile */
    .carousel-inner {
        border-radius: 16px;
        overflow: hidden;
    }
    
    .carousel-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
        border: 2px solid rgba(255, 215, 0, 0.3);
        top: 50%;
        transform: translateY(-50%);
    }
    
    .carousel-control-prev {
        left: 10px;
    }
    
    .carousel-control-next {
        right: 10px;
    }
    
    .carousel-indicators {
        bottom: -40px;
    }
    
    .carousel-indicators button {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        margin: 0 4px;
        background: rgba(255, 215, 0, 0.3);
        border: 2px solid rgba(255, 215, 0, 0.6);
    }
    
    .carousel-indicators button.active {
        background: var(--bee-yellow);
    }
}

/* ==========================================
   PHASE 3: FORMS & INTERACTION MOBILE UX
   ========================================== */

/* Mobile-Optimized Business Registration Forms */
@media (max-width: 767.98px) {
    /* Submit Business Page Mobile */
    .pricing-cards-mobile {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .pricing-card-mobile {
        background: #2C2C2C;
        border-radius: 20px;
        padding: 1.5rem;
        position: relative;
        border: 2px solid rgba(255, 215, 0, 0.2);
        transition: all 0.3s ease;
    }
    
    .pricing-card-mobile:hover {
        border-color: rgba(255, 215, 0, 0.5);
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(255, 215, 0, 0.1);
    }
    
    .basic-plan {
        border-color: rgba(40, 167, 69, 0.3);
    }
    
    .premium-plan {
        border-color: rgba(0, 123, 255, 0.3);
        background: linear-gradient(135deg, #2C2C2C 0%, #1E3A8A 5%, #2C2C2C 95%);
    }
    
    .popular-badge-mobile {
        position: absolute;
        top: -8px;
        right: 16px;
        z-index: 10;
    }
    
    .badge-text {
        background: #0d6efd;
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .plan-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .plan-title {
        color: white;
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 1rem;
    }
    
    .plan-price {
        margin-bottom: 1rem;
    }
    
    .price-amount {
        font-size: 2.5rem;
        font-weight: 800;
        color: var(--bee-yellow);
    }
    
    .basic-plan .price-amount {
        color: #28a745;
    }
    
    .premium-plan .price-amount {
        color: #0d6efd;
    }
    
    .price-period {
        font-size: 1rem;
        color: #aaa;
        margin-left: 4px;
    }
    
    .plan-description {
        color: #bbb;
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .plan-features {
        margin-bottom: 1.5rem;
    }
    
    .feature-item {
        display: flex;
        align-items: center;
        margin-bottom: 0.75rem;
        color: white;
        font-size: 0.9rem;
    }
    
    .feature-icon {
        margin-right: 12px;
        width: 16px;
        color: #28a745;
    }
    
    .premium-icon {
        color: #0d6efd;
    }
    
    .plan-button {
        width: 100%;
        padding: 16px 24px;
        border: none;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 600;
        transition: all 0.3s ease;
        margin-bottom: 1rem;
        cursor: pointer;
    }
    
    .basic-button {
        background: #28a745;
        color: white;
    }
    
    .basic-button:hover {
        background: #218838;
        transform: translateY(-1px);
    }
    
    .premium-button {
        background: #0d6efd;
        color: white;
    }
    
    .premium-button:hover {
        background: #0b5ed7;
        transform: translateY(-1px);
    }
    
    .plan-note {
        text-align: center;
        font-size: 0.8rem;
        color: #aaa;
        margin: 0;
        line-height: 1.3;
    }
}

/* Mobile Shopping Cart & Marketplace */
@media (max-width: 767.98px) {
    /* Cart Header Mobile */
    .cart-header {
        padding: 2rem 0 !important;
    }
    
    .cart-header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .cart-header p {
        font-size: 1rem;
    }
    
    /* Cart Items Mobile */
    .cart-item {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
    }
    
    /* Mobile cart item layout */
    .cart-item-row .row {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .cart-item-row .col-auto,
    .cart-item-row .col {
        flex: none;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }
    
    .cart-item-row .col-auto:first-child {
        width: auto;
        align-self: center;
    }
    
    /* Mobile cart item content */
    .cart-item-row h6 a {
        color: white;
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    .cart-item-row .text-muted {
        color: #bbb !important;
    }
    
    .cart-item-row .fw-bold {
        color: var(--bee-yellow) !important;
        font-size: 1.2rem;
    }
    
    .cart-item-row .badge {
        margin: 0.25rem;
    }
    
    .cart-item-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 80px !important;
        height: 80px !important;
        border-radius: 8px;
        align-self: flex-start;
    }
    
    .cart-item-details {
        flex: 1;
    }
    
    .cart-item-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: white;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }
    
    .cart-item-vendor {
        font-size: 0.85rem;
        color: var(--bee-yellow);
        margin-bottom: 0.5rem;
    }
    
    .cart-item-price {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--bee-yellow);
    }
    
    /* Quantity Controls Mobile */
    .quantity-controls {
        justify-content: center;
        background: rgba(255, 215, 0, 0.1);
        padding: 8px;
        border-radius: 20px;
        gap: 12px !important;
    }
    
    .quantity-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 2px solid var(--bee-yellow);
        background: transparent;
        color: var(--bee-yellow);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .quantity-btn:hover,
    .quantity-btn:active {
        background: var(--bee-yellow);
        color: #1A1A1A;
        transform: scale(1.05);
    }
    
    .quantity-input {
        width: 60px;
        text-align: center;
        background: transparent;
        border: 2px solid var(--bee-yellow);
        border-radius: 8px;
        color: white;
        font-weight: 600;
        padding: 8px;
    }
    
    /* Remove Button Mobile */
    .remove-item-btn {
        background: #dc3545;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        align-self: flex-end;
    }
    
    .remove-item-btn:hover {
        background: #c82333;
        transform: translateY(-1px);
    }
    
    /* Cart Summary Mobile */
    .cart-summary {
        background: #2C2C2C;
        border: 2px solid rgba(255, 215, 0, 0.3);
        border-radius: 16px;
        padding: 1.5rem;
        margin-top: 2rem;
        position: sticky;
        bottom: 1rem;
        z-index: 100;
    }
    
    .cart-summary h3 {
        color: white;
        font-size: 1.3rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .summary-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .summary-row.total {
        border-top: 2px solid rgba(255, 215, 0, 0.3);
        padding-top: 1rem;
        margin-top: 1rem;
        font-size: 1.2rem;
        font-weight: 700;
    }
    
    .summary-label {
        color: #bbb;
    }
    
    .summary-value {
        color: white;
        font-weight: 600;
    }
    
    .summary-value.total {
        color: var(--bee-yellow);
        font-size: 1.4rem;
    }
    
    /* Checkout Button Mobile */
    .checkout-btn {
        width: 100%;
        background: linear-gradient(135deg, var(--bee-yellow) 0%, #FFA500 100%);
        color: #1A1A1A;
        border: none;
        padding: 16px 24px;
        border-radius: 12px;
        font-size: 1.2rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 1rem;
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    }
    
    .checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    }
    
    .checkout-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }
}

/* Mobile Checkout Process */
@media (max-width: 767.98px) {
    .checkout-header {
        padding: 2rem 0 !important;
    }
    
    .checkout-steps {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-bottom: 2rem !important;
    }
    
    .step {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 0.5rem 1rem;
        background: rgba(255, 215, 0, 0.1);
        border-radius: 25px;
        margin-bottom: 0.5rem;
    }
    
    .step.active {
        background: rgba(255, 215, 0, 0.2);
        border: 2px solid var(--bee-yellow);
    }
    
    .step-number {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem;
        margin-right: 12px !important;
    }
    
    .step-title {
        color: white;
        font-weight: 600;
        font-size: 0.9rem;
    }
    
    .step.active .step-title {
        color: var(--bee-yellow);
    }
    
    .step-arrow {
        display: none;
    }
    
    /* Checkout Form Mobile */
    .checkout-form {
        background: #2C2C2C;
        border-radius: 16px;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-section {
        margin-bottom: 2rem;
    }
    
    .form-section h4 {
        color: white;
        font-size: 1.2rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        color: #bbb;
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    .form-control {
        width: 100%;
        padding: 12px 16px;
        background: #1A1A1A;
        border: 2px solid #444;
        border-radius: 8px;
        color: white;
        font-size: 16px; /* Prevent iOS zoom */
        transition: all 0.2s ease;
    }
    
    .form-control:focus {
        outline: none;
        border-color: var(--bee-yellow);
        box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    }
    
    .form-control::placeholder {
        color: #666;
    }
    
    /* Form Validation Mobile */
    .form-control.is-invalid {
        border-color: #dc3545;
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    }
    
    .form-control.is-valid {
        border-color: #28a745;
        box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
    }
    
    .invalid-feedback {
        color: #dc3545;
        font-size: 0.8rem;
        margin-top: 0.25rem;
        display: block;
    }
    
    .valid-feedback {
        color: #28a745;
        font-size: 0.8rem;
        margin-top: 0.25rem;
        display: block;
    }
}

/* ==========================================
   DEVICE-SPECIFIC OPTIMIZATIONS
   ========================================== */

/* iPhone X+ Safe Area Support */
@supports (padding: max(0px)) {
    .navbar,
    .offcanvas,
    .modal-content,
    .footer {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .offcanvas,
    .modal-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
}

/* iOS Safari Specific Fixes */
@supports (-webkit-touch-callout: none) {
    /* Prevent zoom on input focus */
    input, textarea, select {
        font-size: 16px !important;
    }
    
    /* Fix viewport height on iOS */
    .vh-100 {
        height: -webkit-fill-available;
    }
}

/* Android Chrome Specific Optimizations */
@media screen and (max-width: 767.98px) and (min-resolution: 2dppx) {
    /* High DPI Android devices */
    .btn,
    .card,
    .modal-content {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* ==========================================
   MOBILE LOADING STATES
   ========================================== */

@media (max-width: 767.98px) {
    .loading-skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: loading 1.5s infinite;
        border-radius: 8px;
        height: 20px;
        margin-bottom: 10px;
    }
    
    @keyframes loading {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
    
    .loading-spinner-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 200px;
        color: var(--bee-yellow);
    }
    
    .loading-spinner-mobile i {
        font-size: 2rem;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
}