/* Asansör Market — PWA mobile app shell */

:root {
    --am-pwa-nav-height: calc(64px + env(safe-area-inset-bottom, 0px));
    --am-pwa-header-height: 56px;
}

@media (max-width: 1023px), (display-mode: standalone) {
    html {
        -webkit-tap-highlight-color: transparent;
    }

    body.am-pwa-mobile {
        padding-bottom: var(--am-pwa-nav-height);
    }

    body.am-pwa-mobile #about-footer {
        padding-bottom: calc(24px + var(--am-pwa-nav-height));
    }

    body.am-pwa-mobile #top-bar {
        display: none !important;
    }

    body.am-pwa-mobile #main-navigation {
        display: none !important;
    }

    body.am-pwa-mobile #main-header {
        position: sticky;
        top: 0;
        z-index: 90;
        background: #fff;
        border-bottom: 1px solid rgba(11, 30, 63, 0.08);
        box-shadow: 0 4px 20px rgba(11, 30, 63, 0.06);
    }

    body.am-pwa-mobile .mavi-header-shell {
        min-height: var(--am-pwa-header-height) !important;
        padding-top: max(8px, env(safe-area-inset-top, 0px));
        padding-bottom: 8px;
        gap: 10px;
    }

    body.am-pwa-mobile .mavi-header-logo-img {
        width: 160px !important;
        height: 52px !important;
        max-width: 160px !important;
        max-height: 52px !important;
    }

    body.am-pwa-mobile #search-wrapper {
        order: 3;
        width: 100%;
    }

    body.am-pwa-mobile #search-wrapper .border {
        border-radius: 12px !important;
        height: 44px !important;
        background: #f4f7fb !important;
    }

    body.am-pwa-mobile #mobile-nav-toggle {
        display: inline-flex !important;
    }

    body.am-pwa-mobile #mobile-cart-toggle {
        display: none !important;
    }

    body.am-pwa-mobile[data-page="home"] #mobile-cart-toggle {
        display: inline-flex !important;
    }

    /* legacy home category styles removed — see am-pwa-home.css */
}

/* Bottom navigation */
.am-pwa-bottom-nav {
    display: none;
}

@media (max-width: 1023px), (display-mode: standalone) {
    .am-pwa-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 120;
        height: var(--am-pwa-nav-height);
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #e8edf3;
        box-shadow: 0 -6px 24px rgba(15, 35, 65, 0.08);
    }

    .am-pwa-bottom-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        text-decoration: none;
        color: #94a3b8;
        font-size: 10px;
        font-weight: 700;
        border-radius: 12px;
        transition: color 0.15s ease;
    }

    .am-pwa-bottom-nav__item.is-active {
        color: var(--ac, #F2B705);
        background: transparent;
    }

    .am-pwa-bottom-nav__icon {
        position: relative;
        width: 24px;
        height: 24px;
    }

    .am-pwa-bottom-nav__icon svg {
        width: 24px;
        height: 24px;
    }

    .am-pwa-bottom-nav__badge {
        position: absolute;
        top: -6px;
        right: -10px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--ac, #F2B705);
        color: var(--pc, #0B1E3F);
        font-size: 9px;
        font-weight: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .am-pwa-bottom-nav__badge.hidden {
        display: none !important;
    }
}

/* Install banner */
.am-pwa-install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 130;
}

body.am-pwa-mobile:has(.am-pwa-bottom-nav) .am-pwa-install-banner {
    bottom: calc(var(--am-pwa-nav-height, 64px) + 12px);
}

.am-pwa-install-banner.hidden {
    display: none !important;
}

.am-pwa-install-banner__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0B1E3F 0%, #17457c 100%);
    color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.am-pwa-install-banner__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.am-pwa-install-banner__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.am-pwa-install-banner__icon svg {
    width: 22px;
    height: 22px;
}

.am-pwa-install-banner__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.am-pwa-install-banner__text strong {
    font-size: 13px;
}

.am-pwa-install-banner__text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
}

.am-pwa-install-banner__btn {
    border: 0;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    background: var(--ac, #F2B705);
    color: var(--pc, #0B1E3F);
    cursor: pointer;
    flex-shrink: 0;
}

.am-pwa-install-banner__close {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.am-pwa-ios-hint {
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.am-pwa-ios-hint.hidden {
    display: none !important;
}

.am-pwa-android-hint {
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.am-pwa-android-hint.hidden {
    display: none !important;
}

/* Android install sheet (Vivo vb.) */
.am-pwa-android-install {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.am-pwa-android-install.hidden {
    display: none !important;
}

.am-pwa-android-install__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.am-pwa-android-install__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    color: #0B1E3F;
    text-align: center;
}

.am-pwa-android-install__icon {
    border-radius: 16px;
    margin: 0 auto 12px;
    display: block;
}

.am-pwa-android-install__panel h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
}

.am-pwa-android-install__lead {
    margin: 0 0 16px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.45;
}

.am-pwa-android-install__primary {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 900;
    background: #F2B705;
    color: #0B1E3F;
    cursor: pointer;
    margin-bottom: 16px;
}

.am-pwa-android-install__vivo {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
}

.am-pwa-android-install__vivo strong {
    display: block;
    margin-bottom: 8px;
    color: #0B1E3F;
    font-size: 13px;
}

.am-pwa-android-install__vivo ol {
    margin: 0;
    padding-left: 18px;
}

.am-pwa-android-install__vivo li {
    margin-bottom: 4px;
}

.am-pwa-android-install__close {
    width: 100%;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    padding: 10px;
    cursor: pointer;
}

.am-pwa-ios-hint__inner {
    width: 100%;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    color: #0B1E3F;
}

.am-pwa-ios-hint__inner p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
}

.am-pwa-ios-hint__inner button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 14px;
    font-weight: 800;
    background: #F2B705;
    color: #0B1E3F;
    cursor: pointer;
}

@media (min-width: 1024px) and (not (display-mode: standalone)) {
    .am-pwa-install-banner,
    .am-pwa-ios-hint,
    .am-pwa-android-install {
        display: none !important;
    }
}
