/* ═══════════════════════════════════════════════════════
   PROFESSIONAL MOBILE RESPONSIVE DESIGN
   Optimized for iPhone, Samsung, iPad, Samsung Tablets
   ═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════
   BASE MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════ */

/* Ensure proper touch targets (minimum 44x44px) */
a, button, input, select, textarea {
    -webkit-tap-highlight-color: rgba(201, 163, 85, 0.3);
    touch-action: manipulation;
}

/* Prevent text size adjustment on iOS */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Smooth scrolling for iOS */
* {
    -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════════════════════
   SMARTPHONES - iPhone & Samsung (320px - 767px)
   ═══════════════════════════════════════════════════════ */

@media screen and (max-width: 767px) {
    /* Container adjustments */
    .container {
        padding: 0 16px !important;
        max-width: 100% !important;
    }
    
    /* Typography - Optimized for mobile reading */
    body {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    h1 {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
    }
    
    h2 {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    h3 {
        font-size: 22px !important;
        line-height: 1.4 !important;
    }
    
    /* Trust Banner - Stack vertically */
    .trust-banner,
    div[style*="background: #2B1810"][style*="padding: 12px"] {
        padding: 10px 0 !important;
        font-size: 11px !important;
    }
    
    .trust-banner .container,
    div[style*="background: #2B1810"] .container {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 0 16px !important;
    }
    
    .trust-banner span[style*="color: rgba(255,255,255,0.3)"] {
        display: none !important;
    }
    
    /* Navigation - Full mobile optimization */
    .main-nav {
        padding: 12px 0 !important;
        top: 0 !important;
    }
    
    .main-nav .container {
        padding: 0 16px !important;
    }
    
    .logo {
        font-size: 24px !important;
        letter-spacing: 2px !important;
    }
    
    .nav-links {
        display: none !important;
    }
    
    .nav-actions {
        gap: 8px !important;
    }
    
    /* Mobile phone button - Make prominent */
    .nav-phone {
        display: flex !important;
        padding: 12px 20px !important;
        min-height: 44px !important;
        font-size: 16px !important;
        background: linear-gradient(135deg, #C9A355, #B8944A) !important;
        color: white !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
    }
    
    /* Click-to-call links - Make prominent */
    a[href^="tel:"] {
        font-size: 18px !important;
        font-weight: 700 !important;
        padding: 12px 16px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        color: #C9A355 !important;
        text-decoration: underline !important;
    }
    
    #mobile-menu-btn {
        display: flex !important;
    }
    
    .mobile-menu {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile Menu Items */
    .mobile-menu a {
        padding: 14px 0 !important;
        font-size: 16px !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Hero Section */
    .hero-section,
    section[style*="padding: 100px"] {
        padding: 60px 0 !important;
    }
    
    .hero-title {
        font-size: 36px !important;
        line-height: 1.2 !important;
        margin-bottom: 16px !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
        margin-bottom: 24px !important;
    }
    
    /* Buttons - Touch-friendly (44x44px minimum) */
    .btn-primary,
    .btn-secondary,
    button,
    a[role="button"],
    button[style*="padding"],
    a[style*="padding"] {
        padding: 14px 24px !important;
        font-size: 16px !important;
        min-height: 44px !important;
        min-width: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation !important;
    }
    
    /* Product buttons specifically */
    button[onclick*="addToCart"],
    button[onclick*="showReservationForm"],
    button[onclick*="updateCartQuantity"],
    button[onclick*="removeFromCart"] {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    /* Grid Layouts - Single column */
    .category-grid,
    .featured-grid,
    .showcase-grid,
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Product Cards */
    .product-card,
    .featured-card,
    .showcase-card {
        margin-bottom: 20px;
    }
    
    /* Images - Responsive */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Footer */
    .site-footer,
    .footer {
        padding: 40px 0 20px !important;
    }
    
    .footer-grid,
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .footer-section {
        margin-bottom: 24px;
    }
    
    /* Forms - Mobile optimized */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 16px !important;
        min-height: 44px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        -webkit-appearance: none !important;
        border-radius: 8px !important;
    }
    
    /* Prevent horizontal scrolling */
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    img, video, iframe {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Category Tabs - Scrollable */
    .category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tabs-container {
        display: flex;
        gap: 8px;
        padding: 0 16px;
        min-width: max-content;
    }
    
    .category-tab {
        white-space: nowrap;
        padding: 10px 16px !important;
        font-size: 14px !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ═══════════════════════════════════════════════════════
   SMALL SMARTPHONES - iPhone SE, Samsung Galaxy A (320px - 374px)
   ═══════════════════════════════════════════════════════ */

@media screen and (max-width: 374px) {
    .container {
        padding: 0 12px !important;
    }
    
    h1 {
        font-size: 28px !important;
    }
    
    h2 {
        font-size: 24px !important;
    }
    
    .hero-title {
        font-size: 32px !important;
    }
    
    .logo {
        font-size: 20px !important;
    }
}

/* ═══════════════════════════════════════════════════════
   LARGE SMARTPHONES - iPhone Pro Max, Samsung Galaxy S Ultra (375px - 480px)
   ═══════════════════════════════════════════════════════ */

@media screen and (min-width: 375px) and (max-width: 480px) {
    .container {
        padding: 0 20px !important;
    }
    
    .hero-title {
        font-size: 40px !important;
    }
}

/* ═══════════════════════════════════════════════════════
   TABLETS - iPad, Samsung Galaxy Tab (768px - 1024px)
   ═══════════════════════════════════════════════════════ */

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 0 32px !important;
        max-width: 100% !important;
    }
    
    /* Navigation - Show menu but optimize */
    .nav-links {
        gap: 24px !important;
    }
    
    .nav-links a {
        font-size: 14px !important;
    }
    
    /* Grid Layouts - 2 columns */
    .category-grid,
    .featured-grid,
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }
    
    /* Typography */
    h1 {
        font-size: 42px !important;
    }
    
    h2 {
        font-size: 36px !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 80px 0 !important;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ═══════════════════════════════════════════════════════
   LANDSCAPE ORIENTATION - Mobile & Tablet
   ═══════════════════════════════════════════════════════ */

@media screen and (max-width: 1024px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0 !important;
    }
    
    .trust-banner {
        padding: 8px 0 !important;
    }
    
    .main-nav {
        padding: 10px 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════
   SPECIFIC DEVICE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════ */

/* iPhone X and newer (notched devices) */
@supports (padding: max(0px)) {
    .main-nav,
    .trust-banner {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    
    .mobile-menu {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Samsung Galaxy Fold */
@media screen and (max-width: 280px) {
    .container {
        padding: 0 8px !important;
    }
    
    .logo {
        font-size: 18px !important;
    }
    
    h1 {
        font-size: 24px !important;
    }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ═══════════════════════════════════════════════════════
   TOUCH INTERACTIONS
   ═══════════════════════════════════════════════════════ */

/* Prevent double-tap zoom */
button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

/* Better tap feedback */
.nav-links a:active,
.mobile-menu a:active,
.btn-primary:active,
button:active {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all 0.1s;
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITY - Mobile
   ═══════════════════════════════════════════════════════ */

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #C9A355;
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2B1810;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* ═══════════════════════════════════════════════════════
   PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Keep light theme but ensure contrast */
    body {
        background: #FAF8F5;
        color: #2B1810;
    }
}

