/* ===== ANDROID MOBİL OPTİMİZASYONU ===== */
/* Android-specific mobile optimizations for better UX */

/* Android Chrome viewport fix */
@supports (-webkit-touch-callout: none) {
    .mobile-container {
        min-height: calc(100vh - env(keyboard-inset-height, 0px));
    }
}

/* Android keyboard handling */
@media screen and (max-height: 500px) {
    .mobile-header {
        position: fixed !important;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-hero {
        padding: var(--mobile-lg) 0;
    }
}

/* Android button optimization - Full width guarantee */
.mobile-btn,
.luxury-cta,
.cta-button,
.order-btn,
.checkout-btn {
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    /* Android touch optimization */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.3);
    touch-action: manipulation;
    /* Prevent zoom on focus */
    font-size: 16px !important;
}

/* Android specific button container */
.mobile-hero-buttons,
.button-container,
.cta-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 var(--mobile-container-padding) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: var(--mobile-base) !important;
}

/* Android viewport height fix */
.mobile-hero,
.mobile-section {
    min-height: calc(100vh - var(--mobile-header-height));
    min-height: calc(100dvh - var(--mobile-header-height));
}

/* Android Chrome URL bar handling */
@media screen and (max-width: 768px) {
    html {
        height: -webkit-fill-available;
    }
    
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
    }
}

/* Android density-specific optimizations */
@media screen and (-webkit-device-pixel-ratio: 2) {
    .mobile-btn {
        min-height: 48px !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
    }
}

@media screen and (-webkit-device-pixel-ratio: 3) {
    .mobile-btn {
        min-height: 52px !important;
        padding: 16px 24px !important;
        font-size: 17px !important;
    }
}

/* Android safe area optimizations */
.mobile-container {
    padding-left: max(var(--mobile-container-padding), env(safe-area-inset-left));
    padding-right: max(var(--mobile-container-padding), env(safe-area-inset-right));
    padding-bottom: max(var(--mobile-container-padding), env(safe-area-inset-bottom));
}

/* Android input focus optimization */
input, textarea, select {
    font-size: 16px !important;
    border-radius: 8px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Android gesture navigation support */
@media screen and (display-mode: standalone) {
    body {
        padding-bottom: calc(var(--mobile-container-padding) + env(safe-area-inset-bottom));
    }
}

/* Android WebView specific fixes */
@media screen and (max-width: 480px) {
    .mobile-btn {
        font-size: 16px !important;
        line-height: 1.4 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Container full width enforcement */
    .container,
    .mobile-container,
    .content-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }
}

/* Android landscape orientation fixes */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .mobile-hero {
        padding: var(--mobile-lg) 0;
        min-height: auto;
    }
    
    .mobile-hero-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .mobile-btn {
        width: auto !important;
        min-width: 160px !important;
        flex: 1;
        max-width: 200px !important;
    }
}

/* Android Chrome custom scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
}

/* Android performance optimizations */
.mobile-btn,
.mobile-nav-link,
.mobile-card {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* Android focus visible improvements */
.mobile-btn:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

/* Android specific animations performance */
@media (prefers-reduced-motion: no-preference) {
    .mobile-btn {
        transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-btn {
        transition: none;
    }
}

/* Android share menu optimization */
.share-button {
    display: block !important;
}

/* Android PWA specific styles */
@media (display-mode: standalone) {
    .mobile-header {
        padding-top: calc(var(--mobile-base) + env(safe-area-inset-top));
    }
    
    .mobile-hero {
        padding-top: calc(var(--mobile-3xl) + env(safe-area-inset-top));
    }
}

/* Android font rendering optimization */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

/* Android button hover states for touch */
@media (hover: none) and (pointer: coarse) {
    .mobile-btn:hover {
        transform: none;
    }
    
    .mobile-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}