/* ==================== MOBILE RESPONSIVENESS FIXES V2.1 ==================== */
/* This file contains comprehensive mobile fixes for Eskin Medicare website */

/* ========== MOBILE NAVIGATION FIX ========== */
@media (max-width: 968px) {
    /* Make hamburger menu work properly */
    .mobile-menu-toggle {
        display: flex !important;
        z-index: 1001;
        position: relative;
    }
    
    /* Hide menu by default on mobile */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    /* Show menu when active */
    .nav-menu.active {
        display: flex !important;
        transform: translateX(0);
    }
    
    /* Animate hamburger icon */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Mobile nav items */
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-menu .cta-button {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Reduce logo text size on mobile */
    .logo-text {
        font-size: 1.1rem !important;
    }
    
    .logo-img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .nav-container {
        padding: 0 1rem !important;
    }
}

/* ========== HERO SECTION MOBILE FIXES ========== */
@media (max-width: 968px) {
    .hero {
        min-height: auto;
        padding: 6rem 1.5rem 3rem !important;
    }
    
    .hero-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-content p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    
    .primary-btn,
    .secondary-btn {
        width: 100%;
        padding: 0.85rem 1.5rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Fix hero image overlapping */
    .hero-image {
        max-height: 300px;
        margin-top: 2rem;
    }
    
    .hero-image img {
        max-width: 80%;
        height: auto;
        margin: 0 auto;
        display: block;
    }
    
    /* Hide or reduce floating shapes on mobile */
    .floating-shapes .shape {
        opacity: 0.3;
        transform: scale(0.5);
    }
    
    /* Fix hero stats */
    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
        margin-top: 2rem;
    }
    
    .stat-item h3 {
        font-size: 1.5rem !important;
    }
    
    .stat-item p {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-stats {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* ========== SECTION HEADERS MOBILE ========== */
@media (max-width: 968px) {
    .section-header h2 {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .section-header p {
        font-size: 0.9rem !important;
    }
    
    section {
        padding: 3rem 1.5rem !important;
    }
}

@media (max-width: 640px) {
    .section-header h2 {
        font-size: 1.5rem !important;
    }
    
    .section-header p {
        font-size: 0.85rem !important;
    }
    
    section {
        padding: 2.5rem 1rem !important;
    }
}

/* ========== SERVICES GRID MOBILE ========== */
@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
    
    .service-card h3 {
        font-size: 1.25rem !important;
    }
    
    .service-card p {
        font-size: 0.9rem !important;
    }
    
    .service-card ul li {
        font-size: 0.85rem !important;
    }
}

/* ========== PRODUCTS PAGE MOBILE FIXES ========== */
@media (max-width: 968px) {
    .products-page {
        padding: 6rem 1rem 3rem !important;
    }
    
    /* Search box */
    .search-container {
        margin: 0 auto 1.5rem !important;
        padding: 0 0.5rem;
    }
    
    .search-box input {
        padding: 0.85rem 0.85rem 0.85rem 2.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .search-box::before {
        left: 0.75rem !important;
        font-size: 1rem !important;
    }
    
    /* Filter buttons */
    .filter-section {
        margin: 0 auto 2rem !important;
        gap: 0.5rem !important;
        padding: 0 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.85rem !important;
        flex: 1 1 auto;
        min-width: fit-content;
    }
    
    /* Products grid */
    .products-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 200px !important;
    }
    
    .product-info {
        padding: 1.25rem !important;
    }
    
    .product-name {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
    }
    
    .product-description {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }
    
    .product-category-tag {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.6rem !important;
    }
    
    .add-to-cart-btn {
        padding: 0.7rem !important;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 640px) {
    .filter-section {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.8rem !important;
    }
}

/* ========== CART SIDEBAR MOBILE ========== */
@media (max-width: 968px) {
    .cart-sidebar {
        width: 100% !important;
        right: -100% !important;
    }
    
    .cart-sidebar.open {
        right: 0 !important;
    }
    
    .cart-header h3 {
        font-size: 1.5rem !important;
    }
    
    .cart-items {
        padding: 1.5rem !important;
    }
    
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-image {
        width: 60px !important;
        height: 60px !important;
    }
    
    .cart-item-name {
        font-size: 0.9rem !important;
    }
    
    .cart-item-quantity button {
        width: 28px !important;
        height: 28px !important;
        font-size: 1rem !important;
    }
    
    .cart-footer {
        padding: 1.5rem !important;
    }
    
    .cart-total {
        font-size: 1.1rem !important;
    }
    
    .checkout-btn {
        padding: 0.85rem !important;
        font-size: 1rem !important;
    }
    
    /* Cart toggle button */
    .cart-toggle {
        width: 55px !important;
        height: 55px !important;
        top: 85px !important;
        right: 20px !important;
        font-size: 1.5rem !important;
    }
    
    .cart-badge {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.7rem !important;
    }
}

/* ========== CHECKOUT MODAL MOBILE ========== */
@media (max-width: 968px) {
    .checkout-modal {
        padding: 1rem !important;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 90vh !important;
        margin: 1rem !important;
    }
    
    .modal-header h2 {
        font-size: 1.5rem !important;
    }
    
    .modal-close {
        font-size: 1.75rem !important;
    }
    
    .modal-body {
        padding: 1.25rem !important;
    }
    
    .order-summary-section h3,
    .customer-details-section h3 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .summary-item {
        padding: 0.75rem !important;
    }
    
    .summary-item img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .summary-name {
        font-size: 0.85rem !important;
    }
    
    .summary-qty,
    .summary-price {
        font-size: 0.8rem !important;
    }
    
    .form-group label {
        font-size: 0.9rem !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }
    
    .modal-footer {
        padding: 1.25rem !important;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-cancel,
    .btn-confirm {
        width: 100% !important;
        padding: 0.85rem !important;
        font-size: 0.95rem !important;
    }
}

/* ========== PRICING SECTION MOBILE ========== */
@media (max-width: 968px) {
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .price-card {
        padding: 1.5rem !important;
    }
    
    .price-card h3 {
        font-size: 1.5rem !important;
    }
    
    .price-card .price {
        font-size: 2rem !important;
    }
    
    .price-card ul li {
        font-size: 0.85rem !important;
    }
}

/* ========== CONTACT SECTION MOBILE ========== */
@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .contact-info h3 {
        font-size: 1.25rem !important;
    }
    
    .contact-info p {
        font-size: 0.9rem !important;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        padding: 0.85rem !important;
        font-size: 0.9rem !important;
    }
    
    .contact-form button {
        padding: 0.85rem !important;
        font-size: 1rem !important;
    }
}

/* ========== FOOTER MOBILE ========== */
@media (max-width: 968px) {
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }
    
    .footer-section h4 {
        font-size: 1.1rem !important;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.9rem !important;
    }
    
    .footer-bottom {
        padding: 1.5rem 1rem !important;
    }
    
    .footer-bottom p {
        font-size: 0.85rem !important;
    }
}

/* ========== WHATSAPP FLOAT BUTTON MOBILE ========== */
@media (max-width: 968px) {
    .whatsapp-float {
        width: 55px !important;
        height: 55px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .whatsapp-float svg {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ========== BOOKING PAGE MOBILE ========== */
@media (max-width: 968px) {
    .booking-container {
        padding: 6rem 1rem 3rem !important;
    }
    
    .booking-form {
        padding: 1.5rem !important;
    }
    
    .booking-form h2 {
        font-size: 1.5rem !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .booking-form input,
    .booking-form select,
    .booking-form textarea {
        padding: 0.85rem !important;
        font-size: 0.9rem !important;
    }
    
    .booking-form button {
        padding: 0.85rem !important;
        font-size: 1rem !important;
    }
}

/* ========== SERVICES PAGE MOBILE ========== */
@media (max-width: 968px) {
    .services-page {
        padding: 6rem 1rem 3rem !important;
    }
    
    .service-detail {
        padding: 1.5rem !important;
    }
    
    .service-detail h3 {
        font-size: 1.25rem !important;
    }
    
    .service-detail p,
    .service-detail li {
        font-size: 0.9rem !important;
    }
}

/* ========== ABOUT SECTION MOBILE ========== */
@media (max-width: 968px) {
    .about-container {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .about-content h2 {
        font-size: 1.75rem !important;
    }
    
    .about-content p {
        font-size: 0.9rem !important;
    }
    
    .about-image {
        order: -1;
        max-height: 300px;
    }
    
    .about-image img {
        max-width: 100%;
        height: auto;
    }
}

/* ========== GENERAL MOBILE TYPOGRAPHY ========== */
@media (max-width: 968px) {
    body {
        font-size: 15px !important;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    h4 {
        font-size: 1.1rem !important;
    }
    
    p {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
    
    /* Reduce excessive spacing */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.35rem !important;
    }
    
    h3 {
        font-size: 1.15rem !important;
    }
}

/* ========== FIX OVERLAPPING IMAGES ========== */
@media (max-width: 968px) {
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix absolute positioned elements */
    .floating-shapes {
        display: none;
    }
    
    /* Fix background images */
    .hero::before {
        display: none;
    }
    
    /* Prevent horizontal scroll */
    body,
    html {
        overflow-x: hidden;
    }
    
    * {
        max-width: 100%;
    }
}

/* ========== IMPROVE TOUCH TARGETS ========== */
@media (max-width: 968px) {
    /* Make buttons easier to tap */
    button,
    a.cta-button,
    .primary-btn,
    .secondary-btn,
    .add-to-cart-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Increase tap targets for links */
    .nav-link {
        padding: 0.75rem 0 !important;
        display: block;
    }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
@media (max-width: 968px) {
    /* Reduce animations on mobile for performance */
    * {
        animation-duration: 0.3s !important;
    }
    
    /* Simplify transitions */
    .product-card:hover,
    .service-card:hover {
        transform: translateY(-2px);
    }
}
