/**
 * FORDIPS TECH - Mobile Optimizations
 * Best-in-class mobile responsiveness for all devices
 */

/* ===== HERO HEADER IMAGES ===== */
.hero-header-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-header-desktop,
.hero-header-mobile {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Desktop: Show header.png, hide header1.png */
@media (min-width: 769px) {
    .hero-header-desktop {
        display: block;
    }

    .hero-header-mobile {
        display: none;
    }
}

/* Mobile: Show header1.png, hide header.png */
@media (max-width: 768px) {
    .hero-header-desktop {
        display: none;
    }

    .hero-header-mobile {
        display: block;
    }
}

/**
 * FORDIPS TECH - Mobile Optimizations
 * Best-in-class mobile responsiveness for all devices
 */

/* ===== MOBILE BREAKPOINTS ===== */
/*
  Extra Small: < 375px (iPhone SE, small phones)
  Small: 375px - 576px (iPhone 12/13/14, standard phones)
  Medium: 576px - 768px (Large phones, small tablets)
  Tablet: 768px - 992px (Tablets)
*/

/* ===== BASE MOBILE OPTIMIZATIONS ===== */
@media (max-width: 992px) {
    /* Improve tap targets */
    button, a, input, select, textarea {
        min-height: 44px; /* iOS recommended tap target */
    }

    /* Prevent text size adjustment on orientation change */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    /* Improve scrolling performance */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== NAVIGATION - MOBILE ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 0;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        box-shadow: 0 2px 16px rgba(44, 169, 161, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
        border-bottom: 1px solid rgba(44, 169, 161, 0.12);
        overflow: hidden;
    }

    .navbar .container {
        max-width: 100%;
        padding: 0 1rem;
        width: 100%;
    }

    .nav-wrapper {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 0.75rem;
        position: relative;
    }

    .logo {
        font-size: 1.1rem;
        flex-shrink: 0;
        order: 1;
    }

    .logo-circle {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        box-shadow:
            0 4px 12px rgba(44, 169, 161, 0.3),
            0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .logo-text {
        font-size: 1.05rem;
        font-weight: 800;
        letter-spacing: 0.02em;
    }

    /* Language Switcher - Mobile */
    .language-switcher-nav {
        order: 2;
        flex-shrink: 0;
        margin: 0;
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .lang-dropdown {
        min-width: 80px;
        max-width: 80px;
        padding: 0.6rem 0.7rem;
        font-size: 0.85rem;
        background: rgba(44, 169, 161, 0.08);
        border: 1.5px solid rgba(44, 169, 161, 0.2);
        font-weight: 600;
        color: #1e293b;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        width: 48px;
        height: 48px;
        padding: 10px;
        flex-shrink: 0;
        order: 3;
        z-index: 10000;
        position: relative;
        background: linear-gradient(135deg, rgba(44, 169, 161, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
        border-radius: 12px;
        border: 1.5px solid rgba(44, 169, 161, 0.15);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu-toggle span {
        background: #1e293b !important; /* darker for contrast on white background */
    }

    .mobile-menu-toggle:hover {
        background: linear-gradient(135deg, rgba(44, 169, 161, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
        border-color: rgba(44, 169, 161, 0.3);
        transform: scale(1.05);
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    /* Mobile Drawer Overlay */
    .mobile-drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Navigation Drawer */
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        padding: 0;
        margin: 0;
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    /* Mobile Drawer Search Bar */
    .mobile-drawer-search {
        padding: 1.5rem 1rem 1.25rem 1rem;
        border-bottom: 2px solid #e2e8f0;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        position: sticky;
        top: 0;
        z-index: 1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .mobile-drawer-search-input-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        background: #f1f5f9;
        border-radius: 14px;
        padding: 0.85rem 1.1rem;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }

    .mobile-drawer-search-input-wrapper:focus-within {
        background: #ffffff;
        border-color: rgba(44, 169, 161, 0.3);
        box-shadow: 0 0 0 4px rgba(44, 169, 161, 0.08);
    }

    .mobile-drawer-search-icon {
        width: 22px;
        height: 22px;
        color: #64748b;
        flex-shrink: 0;
        margin-right: 0.85rem;
        transition: color 0.3s ease;
    }

    .mobile-drawer-search-input-wrapper:focus-within .mobile-drawer-search-icon {
        color: #2ca9a1;
    }

    .mobile-drawer-search input {
        width: 100%;
        border: none;
        background: transparent;
        outline: none;
        font-size: 1rem;
        color: #1e293b;
        font-family: inherit;
        font-weight: 500;
    }

    .mobile-drawer-search input::placeholder {
        color: #64748b;
        font-weight: 400;
    }

    /* Mobile Drawer Navigation Links */
    .nav-menu li {
        width: 100%;
        margin: 0;
        list-style: none;
    }

    /* Cart Button Container - Don't Interfere with Fixed Positioning */
    .nav-menu li:has(.cart-button) {
        position: static !important;
        width: auto !important;
        height: 0 !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    /* Favorites Button - Keep in Drawer for Mobile Access */
    .nav-menu .favorites-button {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.5rem 0 !important;
        border-radius: var(--radius-md) !important;
        padding: 1rem 1.5rem !important;
        justify-content: flex-start !important;
        gap: 1rem !important;
        background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, rgba(255, 255, 255, 0) 100%) !important;
        border: 2px solid rgba(239, 68, 68, 0.15) !important;
        transition: all 0.3s ease !important;
    }

    .nav-menu .favorites-button:hover {
        background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0) 100%) !important;
        border-color: rgba(239, 68, 68, 0.3) !important;
        padding-left: 1.75rem !important;
    }

    .nav-menu .favorites-button svg {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0 !important;
    }

    .nav-menu .favorites-button::after {
        content: 'My Favorites' !important;
        font-size: 1.05rem !important;
        font-weight: 600 !important;
        color: #1e293b !important;
    }

    .nav-menu .favorites-count {
        position: static !important;
        margin-left: auto !important;
        background: rgba(239, 68, 68, 0.9) !important;
        color: white !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        min-width: 24px !important;
        height: 24px !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 0.5rem !important;
    }

    .nav-link {
        display: block;
        padding: 1.1rem 1.5rem;
        font-size: 1.05rem;
        color: #1e293b;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: 1px solid #f1f5f9;
        font-weight: 500;
        position: relative;
        overflow: hidden;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, #2ca9a1 0%, #6366f1 100%);
        transform: translateX(-4px);
        transition: transform 0.3s ease;
    }

    .nav-link:hover {
        background: linear-gradient(90deg, rgba(44, 169, 161, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
        color: #2ca9a1;
        padding-left: 1.75rem;
    }

    .nav-link:hover::before {
        transform: translateX(0);
    }

    .nav-link:active {
        background: linear-gradient(90deg, rgba(44, 169, 161, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    }

    /* Floating Cart Button - Always Visible on Mobile */
    .cart-button {
        position: fixed !important;
        bottom: 24px !important;
        right: 24px !important;
        width: 64px !important;
        height: 64px !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--secondary) 100%) !important;
        box-shadow:
            0 8px 28px rgba(44, 169, 161, 0.5),
            0 4px 12px rgba(0, 0, 0, 0.25),
            0 0 0 0 rgba(44, 169, 161, 0.7) !important;
        z-index: 9999 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 3px solid rgba(255, 255, 255, 0.3) !important;
        animation: cartPulse 2s ease-in-out infinite !important;
        cursor: pointer;
    }

    @keyframes cartPulse {
        0%, 100% {
            box-shadow:
                0 8px 28px rgba(44, 169, 161, 0.5),
                0 4px 12px rgba(0, 0, 0, 0.25),
                0 0 0 0 rgba(44, 169, 161, 0.7);
        }
        50% {
            box-shadow:
                0 8px 28px rgba(44, 169, 161, 0.6),
                0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 0 10px rgba(44, 169, 161, 0);
        }
    }

    .cart-button:active {
        transform: scale(0.95) !important;
    }

    .cart-button svg {
        width: 28px !important;
        height: 28px !important;
        color: white !important;
        stroke-width: 2.5 !important;
    }

    .cart-count {
        position: absolute !important;
        top: -8px !important;
        right: -8px !important;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
        color: white !important;
        font-size: 0.8rem !important;
        font-weight: 800 !important;
        min-width: 24px !important;
        height: 24px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 2px solid white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Smaller screens - adjust position to avoid blocking content */
@media (max-width: 480px) {
    .cart-button {
        bottom: 20px !important;
        right: 16px !important;
        width: 58px !important;
        height: 58px !important;
    }

    .cart-button svg {
        width: 26px !important;
        height: 26px !important;
    }
}

/* ===== HERO SECTION - MOBILE ===== */
@media (max-width: 768px) {
    .cinematic-hero {
        min-height: 60vh;
        padding: 2rem 0 1.5rem;
    }

    .cinematic-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .cinematic-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .cinematic-devices {
        margin: 1rem 0 0 0;
    }

    .device-info {
        margin-top: 0.75rem;
    }

    .device-info h3 {
        margin-bottom: 0.5rem;
    }

    .device-info p {
        margin-bottom: 0;
    }

    .btn-cinematic {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    /* Extra Small Mobile - Navigation */
    .navbar {
        padding: 0.85rem 0;
    }

    .navbar .container {
        padding: 0 0.85rem;
    }

    .nav-wrapper {
        gap: 0.5rem;
    }

    .logo-circle {
        width: 52px;
        height: 52px;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .lang-dropdown {
        min-width: 75px;
        max-width: 75px;
        padding: 0.55rem 0.6rem;
        font-size: 0.8rem;
    }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        padding: 8px;
    }

    /* Hero Section - Compact */
    .cinematic-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .cinematic-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .cinematic-devices {
        margin: 0.75rem 0 0 0;
    }

    .device-info {
        margin-top: 0.5rem;
    }

    .device-info h3 {
        font-size: 1.25rem;
        margin-bottom: 0.35rem;
    }

    .device-info p {
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .btn-cinematic {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Extra Extra Small Mobile - Ultra Compact */
@media (max-width: 375px) {
    .navbar .container {
        padding: 0 0.65rem;
    }

    .nav-wrapper {
        gap: 0.4rem;
    }

    .logo-circle {
        width: 48px;
        height: 48px;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .lang-dropdown {
        min-width: 70px;
        max-width: 70px;
        padding: 0.5rem 0.55rem;
        font-size: 0.75rem;
    }

    .language-switcher-nav {
        margin-right: 0.35rem;
    }

    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
        padding: 7px;
    }
}

/* ===== CATEGORY BLOCKS - MOBILE OPTIMIZED ===== */
@media (max-width: 768px) {
    .category-blocks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .category-block {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .category-block-icon {
        font-size: 2.5rem;
    }

    .category-block-title {
        font-size: 1rem;
        margin: 0.5rem 0 0.3rem;
    }

    .category-block-count {
        font-size: 0.85rem;
        margin: 0 0 1rem;
    }

    .category-block-badge {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .products-compact {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }
}

/* ===== CATEGORY MODAL - MOBILE OPTIMIZED ===== */
@media (max-width: 768px) {
    .category-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }

    .category-modal-header {
        padding: 1rem 1.5rem;
        border-radius: 0;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .category-modal-header h2 {
        font-size: 1.3rem;
    }

    .category-modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .category-modal-body {
        padding: 1rem;
        height: calc(100vh - 80px);
    }

    .products-grid-modal {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .category-modal-header {
        padding: 0.75rem 1rem;
    }

    .category-modal-header h2 {
        font-size: 1.1rem;
    }

    .category-modal-body {
        padding: 0.75rem;
    }
}

/* ===== PRODUCT CARDS - MOBILE ===== */
@media (max-width: 768px) {
    .product-card {
        border-radius: 12px;
    }

    .product-image {
        height: 220px;
    }

    .product-content {
        padding: 1rem;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-desc {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .btn-add-cart {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .product-image {
        height: 200px;
    }

    .product-name {
        font-size: 0.95rem;
    }

    .product-price {
        font-size: 1.2rem;
    }
}

/* ===== GLOBAL SEARCH - MOBILE ===== */
@media (max-width: 768px) {
    .global-search-section {
        padding: 1.5rem 0;
    }

    .global-search-input {
        padding: 0.9rem 0.9rem 0.9rem 3rem;
        font-size: 1rem;
    }

    .search-results-dropdown {
        max-height: 70vh;
        border-radius: 12px;
    }

    .search-item {
        padding: 0.75rem;
    }

    .search-item-image {
        width: 50px;
        height: 50px;
    }

    .search-item-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .global-search-input {
        font-size: 0.95rem;
        padding: 0.8rem 0.8rem 0.8rem 2.8rem;
    }

    .search-item-image {
        width: 45px;
        height: 45px;
    }
}

/* ===== CHECKOUT MODAL - MOBILE ===== */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        overflow-y: auto;
    }

    .checkout-content {
        padding: 1rem;
    }

    .checkout-section {
        margin-bottom: 1.5rem;
    }

    .checkout-section h3 {
        font-size: 1.2rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 1rem;
    }

    .checkout-summary {
        padding: 1.25rem;
    }

    .checkout-summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .checkout-currency-selector {
        width: 100%;
    }

    .currency-select-checkout {
        width: 100%;
        padding: 0.75rem 2.5rem 0.75rem 1rem;
        font-size: 1rem;
    }

    .checkout-actions {
        gap: 0.75rem;
    }

    .btn-place-order,
    .btn-help-me-pay {
        padding: 1rem;
        font-size: 1rem;
    }

    .payment-option {
        padding: 1rem;
    }

    .payment-option-content {
        gap: 0.75rem;
    }
}

@media (max-width: 576px) {
    .checkout-content {
        padding: 0.75rem;
    }

    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .checkout-section h3 {
        font-size: 1.1rem;
    }

    .btn-place-order,
    .btn-help-me-pay {
        padding: 0.9rem;
        font-size: 0.95rem;
    }
}

/* ===== CART MODAL - MOBILE ===== */
@media (max-width: 768px) {
    .cart-modal {
        align-items: flex-end;
    }

    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        height: 85vh;
        border-radius: 20px 20px 0 0;
    }

    .cart-header {
        padding: 1.25rem;
    }

    .cart-items {
        padding: 1rem;
    }

    .cart-footer {
        padding: 1.25rem;
    }

    .btn-checkout {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .cart-sidebar {
        height: 90vh;
    }

    .cart-header {
        padding: 1rem;
    }

    .cart-header h2 {
        font-size: 1.2rem;
    }
}

/* ===== LOCATION MODAL - MOBILE ===== */
@media (max-width: 768px) {
    .location-modal-content {
        width: 95%;
        padding: 2rem 1.5rem;
    }

    .location-icon {
        width: 70px;
        height: 70px;
    }

    .location-modal h2 {
        font-size: 1.5rem;
    }

    .location-modal p {
        font-size: 0.95rem;
    }

    .location-benefits {
        padding: 1.25rem;
    }

    .location-modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-allow-location,
    .btn-decline-location {
        width: 100%;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .location-modal-content {
        width: 95%;
        padding: 1.5rem 1rem;
    }

    .location-modal h2 {
        font-size: 1.3rem;
    }

    .location-icon {
        width: 60px;
        height: 60px;
    }

    .btn-allow-location,
    .btn-decline-location {
        font-size: 0.95rem;
    }
}

/* ===== FORMS - MOBILE OPTIMIZED ===== */
@media (max-width: 768px) {
    .contact-form,
    .newsletter-form {
        padding: 1.5rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 0.9rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}

/* ===== LOCATIONS SECTION - MOBILE ===== */
@media (max-width: 768px) {
    .locations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .location-card {
        padding: 1.5rem;
    }

    .location-flag {
        font-size: 3rem;
    }
}

/* ===== FOOTER - MOBILE ===== */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }

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

    .footer-column {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-list {
        text-align: center;
    }
}

/* ===== TOUCH IMPROVEMENTS ===== */
@media (max-width: 768px) {
    /* Larger tap targets */
    .btn,
    button,
    .category-card,
    .product-card,
    .nav-link {
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }

    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .category-block:hover,
        .product-card:hover {
            transform: none;
        }

        .category-block:active,
        .product-card:active {
            transform: scale(0.98);
        }
    }

    /* Improve button press feedback */
    button:active,
    .btn:active {
        transform: scale(0.97);
    }
}

/* ===== SCROLLBAR - MOBILE ===== */
@media (max-width: 768px) {
    /* Hide scrollbar but keep functionality */
    ::-webkit-scrollbar {
        width: 4px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 4px;
    }
}

/* ===== EXTRA SMALL DEVICES ===== */
@media (max-width: 375px) {
    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    .category-block-icon {
        font-size: 2.2rem;
    }

    .category-block-title {
        font-size: 0.95rem;
    }

    .category-block-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
    }
}

/* ===== LANDSCAPE MODE - MOBILE ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .cinematic-hero {
        min-height: 100vh;
    }

    .category-modal-content {
        height: 100vh;
    }

    .cart-sidebar {
        height: 100vh;
    }
}

/* ===== SAFE AREA INSETS (iPhone X+) ===== */
@supports (padding: max(0px)) {
    .navbar,
    .cart-footer,
    .location-modal-actions,
    .checkout-actions {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .cart-sidebar,
    .modal-content {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .reduce-motion {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    /* Optimize images */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ===== ACCESSIBILITY - MOBILE ===== */
@media (max-width: 768px) {
    /* Ensure readable text */
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Increase link/button spacing */
    a, button {
        margin: 0.25rem;
    }

    /* Ensure sufficient contrast */
    .text-light {
        color: #f0f0f0;
    }
}

/* Desktop - Reset drawer to normal navigation */
@media (min-width: 769px) {
    .mobile-drawer-overlay {
        display: none !important;
    }

    .nav-menu {
        position: static;
        transform: none;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        display: flex;
        flex-direction: row;
        padding: 0;
    }

    .mobile-drawer-search {
        display: none !important;
    }

    .nav-menu li {
        width: auto;
        margin: 0;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        border-bottom: none;
    }
}

/* ===== MOBILE DRAWER QUICK LINKS ===== */
@media (max-width: 768px) {
    .mobile-drawer-quick-links {
        padding: 1.5rem 1rem;
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        border-bottom: 2px solid #e2e8f0;
    }

    .mobile-drawer-section-title {
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: #64748b;
        margin-bottom: 1rem;
        padding-left: 0.25rem;
    }

    .mobile-quick-links-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .mobile-quick-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem 0.5rem;
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        text-decoration: none;
        color: #1e293b;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0.5rem;
    }

    .mobile-quick-link:hover,
    .mobile-quick-link:active {
        background: linear-gradient(135deg, rgba(44, 169, 161, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
        border-color: #2ca9a1;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(44, 169, 161, 0.15);
    }

    .mobile-quick-link svg {
        color: #2ca9a1;
        flex-shrink: 0;
    }

    .mobile-quick-link span {
        font-size: 0.8rem;
        font-weight: 600;
        text-align: center;
        line-height: 1.2;
    }

    /* Adjust for extra small screens */
    @media (max-width: 375px) {
        .mobile-quick-links-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .mobile-quick-link {
            padding: 0.85rem 0.4rem;
        }

        .mobile-quick-link svg {
            width: 18px;
            height: 18px;
        }

        .mobile-quick-link span {
            font-size: 0.75rem;
        }
    }
}

/* ===== HAMBURGER MENU REMOVED ===== */
.mobile-menu-toggle {
    display: none !important;
}

/* ===== HIDE ALL MOBILE MENU COMPONENTS ===== */
.mobile-drawer-quick-links,
.mobile-drawer-overlay,
.mobile-drawer-search,
.mobile-quick-links-grid,
.mobile-quick-link {
    display: none !important;
    visibility: hidden !important;
}

/* ===== FIX NAVBAR COVERING HERO TEXT ===== */
.cinematic-hero {
    padding-top: 120px !important; /* Space for fixed navbar */
}

@media (max-width: 768px) {
    .cinematic-hero {
        padding-top: 100px !important; /* Less space on mobile */
    }
}

/* ===== REDUCE SLIDESHOW IMAGE HEIGHT ===== */
.device-3d-large {
    max-height: 350px !important; /* Reduced from default */
}

.device-img-large {
    max-height: 320px !important; /* Reduced image height */
    object-fit: contain !important;
}

.cinematic-devices {
    margin-top: 2rem !important;
}

@media (max-width: 768px) {
    .device-3d-large {
        max-height: 280px !important;
    }
    
    .device-img-large {
        max-height: 250px !important;
    }
}
