/* ===== MOBILE OPTIMIZATION STYLES ===== */

/* Ensure proper viewport handling */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Prevent horizontal scrolling on mobile */
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Mobile-specific container adjustments */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: var(--mobile-padding);
    padding-right: var(--mobile-padding);
    box-sizing: border-box;
}

/* Mobile-specific section adjustments */
section {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    box-sizing: border-box;
}

/* Mobile-specific grid adjustments */
.products-grid,
.category-grid {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Mobile-specific card adjustments */
.product-card,
.category-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Mobile-specific image adjustments */
.product-image img,
.category-card img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Mobile-specific text adjustments */
h1, h2, h3, h4, h5, h6,
p, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Mobile-specific button adjustments */
.btn, button, .buy-button, .action-btn {
    min-height: 44px; /* iOS touch target minimum */
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile-specific form adjustments */
input, textarea, select {
    font-size: 16px; /* Prevent zoom on iOS */
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile-specific navigation adjustments */
.mobile-nav {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
}

/* Mobile-specific modal adjustments */

.modal {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
}

/* Mobile-specific footer adjustments */
.footer {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

/* Mobile-specific category pills adjustments */
.category-pills {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

/* Mobile-specific sort controls adjustments */
.sort-controls {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.sort-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

/* Mobile-specific scroll controls adjustments */
.scroll-controls {
    width: 100%;
    justify-content: center;
    margin-top: var(--spacing-sm);
}

/* Mobile-specific hero section adjustments */
.hero {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding: var(--spacing-lg) 0;
}

.hero-content {
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 0 var(--mobile-padding);
}

.hero-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Mobile-specific testimonials adjustments */
.testimonials-grid {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.testimonial-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile-specific newsletter adjustments */
.newsletter-container {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.newsletter-form {
    width: 100%;
    max-width: 100%;
}

.newsletter-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile-specific trust badges adjustments */
.trust-badges {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
}

.trust-badge {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
    text-align: center;
}

/* Mobile-specific footer links adjustments */
.footer-links-section {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.footer-links-column {
    width: 100%;
    max-width: 100%;
    text-align: center;
}

/* Mobile-specific social links adjustments */
.footer-social {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    gap: var(--spacing-md);
}

.social-link {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

/* Mobile-specific search adjustments */
.search-container {
    width: 100%;
    max-width: 100%;
}

.search-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile-specific header adjustments */
.header {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.header-container {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

/* Mobile-specific logo adjustments */
.logo {
    flex-shrink: 0;
}

.logo h1 {
    font-size: var(--mobile-font-size-lg);
    line-height: 1.2;
}

/* Mobile-specific navigation adjustments */
.main-nav {
    display: none;
}

.mobile-menu-toggle {
    display: block;
}

/* Mobile-specific section header adjustments */
.section-header {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
}

.section-controls {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

/* Mobile-specific filter adjustments */
.filter-controls {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: var(--spacing-md);
}

.filter-group {
    width: 100%;
    max-width: 100%;
}

.filter-buttons {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
}

.filter-btn {
    min-height: 44px;
    min-width: 44px;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

/* Mobile-specific carousel adjustments */
.carousel-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.carousel-track {
    width: 100%;
    max-width: 100%;
}

.carousel-slide {
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

/* Mobile-specific back-to-top adjustments */
.back-to-top {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    right: var(--mobile-padding);
    bottom: var(--mobile-padding);
}

/* Mobile-specific progress bar adjustments */
.progress-bar {
    width: 100%;
    max-width: 100vw;
    height: 3px;
}

/* Mobile-specific custom cursor adjustments */
.custom-cursor {
    display: none;
}

@media (min-width: 768px) {
    .custom-cursor {
        display: block;
    }
}

/* Mobile-specific animation adjustments */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile-specific focus adjustments */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mobile-specific hover adjustments */
@media (hover: none) {
    .product-card:hover,
    .category-card:hover,
    .category-pill:hover,
    .sort-btn:hover,
    .scroll-btn:hover,
    .action-btn:hover,
    .btn:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
}

/* Mobile-specific print adjustments */
@media print {
    .header,
    .footer,
    .mobile-nav-toggle,
    .back-to-top,
    .progress-bar,
    .custom-cursor {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Mobile-specific high contrast adjustments */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-color: rgba(0, 0, 0, 0.8);
        --text-color: #000000;
        --background-color: #ffffff;
    }
}



/* Mobile-specific landscape adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        padding: var(--spacing-md) 0;
    }
    
    .hero-content h1 {
        font-size: var(--mobile-font-size-2xl);
    }
    
    .hero-content p {
        font-size: var(--mobile-font-size-base);
    }
}

/* Mobile-specific portrait adjustments */
@media (orientation: portrait) and (max-width: 500px) {
    .container {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
    
    .hero {
        padding: var(--spacing-md) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-md);
    }
    
    .section-title {
        font-size: var(--mobile-font-size-xl);
    }
}

/* Mobile-specific accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        animation: none !important;
        transform: none !important;
    }
}

/* Mobile-specific touch improvements */
@media (pointer: coarse) {
    .btn, button, .buy-button, .action-btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .category-pill,
    .sort-btn {
        min-height: 44px;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Mobile-specific performance improvements */
@media (max-width: 767px) {
    .product-card,
    .category-card {
        will-change: auto;
        transform: none;
    }
    
    .product-card:hover,
    .category-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
}
