/* ANDROID SPECIFIC FIXES */

/* Fix for Android Chrome input zoom */
@media screen and (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents zoom on focus in Android */
    }
}

/* Android Chrome address bar fix */
@supports (-webkit-touch-callout: none) {
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Fix for Android viewport height issues */
@media screen and (max-width: 768px) {
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }

    html {
        height: -webkit-fill-available;
    }
}

/* Android tap highlight removal */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Smooth scrolling for Android */
* {
    -webkit-overflow-scrolling: touch;
}

/* Fix for Android keyboard pushing content */
@media screen and (max-width: 768px) {

    .chat-container,
    .modal {
        position: fixed !important;
        bottom: 0 !important;
    }
}

/* Android safe area insets */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(env(safe-area-inset-bottom), 10px);
    }

    .container {
        padding-left: max(env(safe-area-inset-left), 15px);
        padding-right: max(env(safe-area-inset-right), 15px);
    }
}

/* Fix for Android Chrome bottom bar */
@media screen and (max-width: 768px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* Android specific button fixes */
button,
.btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 8px;
}

/* Fix for Android select dropdowns */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

/* Android Chrome autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #3D3229 !important;
}

/* Fix for Android image rendering */
img {
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Android performance optimization */
.product-card,
.btn,
.nav-item {
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Fix for Android touch events */
a,
button,
.clickable {
    touch-action: manipulation;
}