/* ================================
   Mobile Specific Fixes
   Additional fixes for mobile display
   ================================ */

/* Prevent horizontal scroll */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix images overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile Touch Improvements */
@media (max-width: 768px) {
    
    /* Better touch targets */
    a, button, input, select, textarea {
        -webkit-tap-highlight-color: rgba(255, 105, 180, 0.3);
    }
    
    /* Prevent text selection issues */
    .whatsapp-float,
    .order-float,
    .cta-button {
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }
    
    /* Fix WhatsApp button positioning - Left Bottom */
    .whatsapp-float {
        position: fixed !important;
        bottom: 20px !important;
        left: 20px !important;
        right: auto !important;
        width: 56px !important;
        height: 56px !important;
        z-index: 9999 !important;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    
    /* Fix Order button positioning - Right Bottom (far from WhatsApp) */
    .order-float {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        z-index: 9998 !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    /* Ensure notification doesn't overlap WhatsApp or Order button */
    .notification {
        bottom: 90px !important;
        left: 10px !important;
        right: 10px !important;
        max-width: calc(100% - 20px) !important;
        z-index: 9997 !important;
        margin: 0 auto !important;
    }
    
    /* Fix product badge positioning */
    .product-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 10;
        white-space: nowrap;
    }
    
    /* Improve button spacing */
    .cta-button {
        margin: 20px auto !important;
        max-width: calc(100% - 40px);
        white-space: nowrap;
    }
    
    /* Fix price box layout */
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .price-features {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Better countdown display */
    .countdown-box {
        padding: 15px;
    }
    
    .countdown {
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    /* Fix overlapping text in Hero */
    .hero-badge {
        margin-bottom: 15px;
        font-size: 0.85rem;
    }
    
    /* Product thumbnails spacing */
    .product-thumbnails {
        justify-content: center;
        padding: 0 10px;
    }
    
    /* Trust badges responsive */
    .trust-badges {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .badge-item {
        font-size: 0.9rem;
    }
    
    /* Fix form elements */
    .quantity-options {
        gap: 10px;
    }
    
    .quantity-option {
        margin-bottom: 0;
    }
    
    .option-content {
        padding: 12px;
    }
    
    /* Footer responsive */
    .footer-section {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* FAQ improvements */
    .faq-question {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        padding: 0 15px 12px;
        font-size: 0.9rem;
    }
    
    /* Testimonial cards */
    .testimonial-card {
        margin-bottom: 15px;
    }
    
    .author-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    /* Section spacing */
    section {
        padding: 30px 0;
    }
    
    /* Container padding */
    .container {
        padding: 0 15px;
    }
    
    /* Fix urgency header */
    .urgency-header {
        position: sticky;
        top: 0;
        z-index: 999;
    }
    
    .urgency-content {
        font-size: 0.85rem;
        padding: 5px 0;
    }
    
    .urgency-content strong {
        font-size: 1rem;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    
    /* Even smaller WhatsApp button */
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        bottom: 15px !important;
        left: 15px !important;
        font-size: 1.6rem !important;
    }
    
    /* Notification position */
    .notification {
        bottom: 75px !important;
        font-size: 0.8rem;
    }
    
    /* Hero title */
    .hero-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    /* Countdown smaller */
    .time-unit {
        min-width: 50px;
        padding: 8px 5px;
    }
    
    .time-value {
        font-size: 1.4rem;
    }
    
    .time-label {
        font-size: 0.7rem;
    }
    
    .time-separator {
        font-size: 1.4rem;
    }
    
    /* CTA buttons */
    .cta-button {
        font-size: 0.95rem;
        padding: 12px 20px;
    }
    
    /* Price display */
    .new-price .amount {
        font-size: 1.6rem;
    }
    
    .old-price .amount {
        font-size: 1rem;
    }
    
    /* Product images */
    .thumbnail {
        width: 65px;
        height: 65px;
    }
    
    /* Form inputs */
    input, select, textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.4rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    
    .hero {
        padding: 20px 0;
    }
    
    .whatsapp-float {
        bottom: 15px !important;
        left: 15px !important;
        width: 50px !important;
        height: 50px !important;
    }
    
    .order-float {
        bottom: 15px !important;
        right: 15px !important;
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    .notification {
        bottom: 75px !important;
    }
    
    .countdown-box {
        padding: 10px;
    }
    
    .time-unit {
        min-width: 50px;
        padding: 8px;
    }
}

/* Extra small screens (iPhone SE, small Android) */
@media (max-width: 360px) {
    
    .whatsapp-float {
        bottom: 15px !important;
        left: 15px !important;
        width: 50px !important;
        height: 50px !important;
    }
    
    .order-float {
        bottom: 15px !important;
        right: 15px !important;
        padding: 10px 18px !important;
        font-size: 12px !important;
    }
    
    .notification {
        bottom: 75px !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
}

/* Fix iOS Safari issues */
@supports (-webkit-touch-callout: none) {
    
    /* Fix position fixed on iOS */
    .whatsapp-float,
    .order-float {
        position: -webkit-sticky;
        position: fixed;
    }
    
    /* Prevent bounce scroll */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix input zoom */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Print styles */
@media print {
    .whatsapp-float,
    .order-float,
    .notification,
    .urgency-header {
        display: none !important;
    }
}