/* Responsive Fixes CSS */

/* Base responsive improvements */
* {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    margin: 0;
    padding: 0;
}

/* Ensure all interactive elements have proper touch targets */
a, button, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
}

.container {
    overflow-x: hidden;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Text responsiveness */
h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* Hero section fixes for mobile */
.hero {
    padding-top: 140px; /* Increased padding to prevent overlap with header */
    min-height: 100vh;
    overflow: visible;
}

.hero-content {
    margin-bottom: 30px; /* Add space below content */
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.2;
    margin-top: 0;
}

.hero-content h2 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.hero-image {
    position: relative;
    z-index: 0;
    margin-bottom: 30px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

/* Footer fixes */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
    z-index: 10;
    overflow: hidden;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-bottom {
    width: 100%;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

/* Product cards improvements */
.product-card {
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .product-card {
        flex-direction: row;
    }
}

.product-details {
    padding: 20px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.product-details h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.product-info h4 {
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.product-info p, .product-info li {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.nutrition-list {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

/* Carousel navigation improvements */
.swiper-button-next, .swiper-button-prev {
    color: rgba(0, 184, 212, 0.7) !important;
    background-color: rgba(255, 255, 255, 0.5);
    width: 35px !important;
    height: 35px !important;
    border-radius: 50%;
    backdrop-filter: blur(2px);
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Fixed header and navigation */
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    body {
        padding-top: 70px; /* Add padding to account for fixed header */
    }
    
    .hero {
        padding-top: 30px;
        min-height: auto;
        padding-bottom: 40px;
    }
    
    .hero-content h1 {
        font-size: clamp(1.6rem, 4vw, 2.5rem);
        margin-top: 0;
    }
    
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .hero-image {
        margin-bottom: 30px;
    }
    
    .logo img {
        height: 50px;
        margin: 10px 0;
    }
    
    nav {
        padding: 5px 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Improved mobile menu */
    .nav-links {
        position: fixed;
        background: var(--dark-color);
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px;
        text-align: left;
        z-index: 1001;
        transition: 0.5s;
        overflow-y: auto;
        padding-top: 60px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .nav-links ul {
        padding: 20px;
    }
    
    .nav-links ul li {
        display: block;
        margin: 15px 0;
    }
    
    .nav-links ul li a {
        color: white;
        font-size: 16px;
    }
    
    .fa-times {
        position: absolute;
        top: 20px;
        right: 20px;
        color: white;
        font-size: 22px;
        cursor: pointer;
    }
    
    .fa-bars {
        display: block;
        color: var(--dark-color);
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
    }
}

@media (max-width: 576px) {
    .hero {
        padding-top: 20px;
        padding-bottom: 30px;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .hero-image img {
        max-width: 90%;
        margin: 0 auto;
    }
    
    /* Improve spacing and readability on very small screens */
    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    /* Fix container padding */
    .container {
        padding: 0 12px;
    }
    
    /* Ensure all sections have proper spacing */
    section {
        padding: 30px 0;
        margin-bottom: 0;
    }
    
    .product-image, .product-details {
        padding: 15px;
    }
    
    /* Improve touch targets for better mobile experience */
    .nav-links ul li a,
    .footer-links ul li a,
    .btn-small,
    .filter-btn {
        padding: 8px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Fix WhatsApp button position on small screens */
    .whatsapp-floating {
        bottom: 15px;
        right: 15px;
    }
    
    /* Ensure certification images are properly sized */
    .certification-images img,
    .iso-image-container img {
        max-width: 150px;
        margin: 0 auto 15px;
        display: block;
    }
    
    .product-info {
        font-size: 0.95rem;
    }
    
    .product-tagline {
        font-size: 0.9rem;
    }
}
    
    .product-info {
        font-size: 0.95rem;
    }
    
    .product-tagline {
        font-size: 0.9rem;
    }
    
    .swiper-button-next, .swiper-button-prev {
        width: 30px !important;
        height: 30px !important;
    }
    
    .swiper-button-next:after, .swiper-button-prev:after {
        font-size: 14px !important;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .gallery-item {
        margin-bottom: 15px;
    }
    
    .contact-form-container {
        padding: 0 10px;
    }
    
    .hero-content h1 {
        font-size: clamp(1.4rem, 3.5vw, 2rem);
    }
    
    .hero-content h2 {
        font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    }


/* Fix for pinch zoom issues */
@viewport {
    width: device-width;
    zoom: 1.0;
}

@-ms-viewport {
    width: device-width;
}

/* Swiper touch improvements */
.swiper-container {
    touch-action: pan-y;
}

.swiper-slide {
    height: auto !important;
}

/* Fix for scrolling issues and sticky elements */
html, body {
    overflow-x: hidden;
    position: relative;
    height: auto;
}

/* Fix for WhatsApp button */
.whatsapp-floating {
    position: fixed;
    z-index: 999;
    bottom: 20px;
    right: 20px;
}

/* Improve section spacing on mobile */
@media (max-width: 768px) {
    section {
        padding: 40px 0;
        overflow: hidden;
    }
    
    /* Adjust gallery items */
    .gallery-item {
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* Adjust footer layout */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links, .footer-contact {
        margin-top: 20px;
        width: 100%;
    }
    
    /* Fix for certification section */
    .certification-content {
        flex-direction: column;
    }
    
    .certification-image, .certification-text {
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* Fix for values section */
    .values-container {
        grid-template-columns: 1fr;
    }
    
    .value-card {
        margin-bottom: 20px;
    }
    
    /* Fix for about section */
    .about-content {
        flex-direction: column;
    }
    
    .about-image, .about-text {
        width: 100%;
        padding: 15px;
    }
}