/*
 * 8648.com.tr — Mobil Alt Menü
 * Yalnızca mobil ve tablette görünür.
 */

:root {
    --m8648-bg: #ffffff;
    --m8648-text: #172033;
    --m8648-muted: #6d778a;
    --m8648-accent: #ff6b35;
    --m8648-accent-soft: #fff1eb;
    --m8648-border: rgba(23, 32, 51, .10);
    --m8648-shadow: 0 -12px 40px rgba(23, 32, 51, .14);
}

.m8648-bottom-nav,
.m8648-sheet,
.m8648-overlay {
    display: none;
}

@media (max-width: 991px) {
    body {
        padding-bottom: calc(82px + env(safe-area-inset-bottom));
    }

    .m8648-bottom-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 9997;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
        background: rgba(255,255,255,.94);
        border: 1px solid var(--m8648-border);
        border-radius: 22px;
        box-shadow: 0 16px 48px rgba(23, 32, 51, .20);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .m8648-bottom-nav__item {
        appearance: none;
        border: 0;
        background: transparent;
        color: var(--m8648-muted);
        min-width: 0;
        min-height: 58px;
        padding: 7px 6px 6px;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        text-decoration: none;
        font: inherit;
        cursor: pointer;
        transition: background .2s ease, color .2s ease, transform .2s ease;
    }

    .m8648-bottom-nav__item:active {
        transform: scale(.96);
    }

    .m8648-bottom-nav__item.is-active {
        color: var(--m8648-accent);
        background: var(--m8648-accent-soft);
    }

    .m8648-bottom-nav__icon {
        width: 24px;
        height: 24px;
        display: grid;
        place-items: center;
    }

    .m8648-bottom-nav__icon svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .m8648-bottom-nav__icon svg rect {
        fill: none;
    }

    .m8648-bottom-nav__label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        font-weight: 750;
        line-height: 1;
    }

    .m8648-overlay {
        position: fixed;
        inset: 0;
        z-index: 9998;
        display: block;
        background: rgba(10, 15, 25, .48);
        opacity: 0;
        visibility: hidden;
        transition: opacity .24s ease, visibility .24s ease;
        backdrop-filter: blur(3px);
    }

    .m8648-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

    .m8648-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        display: block;
        max-height: min(78vh, 700px);
        overflow-y: auto;
        padding: 10px 18px calc(28px + env(safe-area-inset-bottom));
        background: var(--m8648-bg);
        border-radius: 26px 26px 0 0;
        box-shadow: var(--m8648-shadow);
        transform: translateY(105%);
        visibility: hidden;
        transition: transform .28s ease, visibility .28s ease;
        overscroll-behavior: contain;
    }

    .m8648-sheet.is-open {
        transform: translateY(0);
        visibility: visible;
    }

    .m8648-sheet__handle {
        width: 52px;
        height: 5px;
        margin: 2px auto 16px;
        background: #d9dde5;
        border-radius: 99px;
    }

    .m8648-sheet__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 18px;
    }

    .m8648-sheet__header h2 {
        margin: 2px 0 0;
        color: var(--m8648-text);
        font-size: clamp(23px, 6vw, 30px);
        line-height: 1.1;
    }

    .m8648-sheet__eyebrow {
        margin: 0;
        color: var(--m8648-accent);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    .m8648-sheet__close {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border: 0;
        border-radius: 50%;
        background: #f2f4f8;
        color: var(--m8648-text);
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    .m8648-category-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .m8648-category-card {
        min-width: 0;
        min-height: 128px;
        padding: 16px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        background: #f7f8fb;
        border: 1px solid var(--m8648-border);
        border-radius: 20px;
        color: var(--m8648-text);
        text-decoration: none;
    }

    .m8648-category-card--wide {
        grid-column: 1 / -1;
        min-height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .m8648-category-card__emoji {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        background: #fff;
        border-radius: 14px;
        font-size: 23px;
        box-shadow: 0 8px 20px rgba(23,32,51,.08);
    }

    .m8648-category-card strong,
    .m8648-category-card small {
        display: block;
    }

    .m8648-category-card strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .m8648-category-card small {
        margin-top: 5px;
        color: var(--m8648-muted);
        font-size: 11px;
        line-height: 1.4;
    }

    .m8648-search-form {
        margin-top: 8px;
    }

    .m8648-search-box {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 7px 7px 7px 16px;
        border: 1px solid var(--m8648-border);
        background: #f7f8fb;
        border-radius: 18px;
    }

    .m8648-search-box svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: var(--m8648-muted);
        stroke-width: 1.8;
        stroke-linecap: round;
    }

    .m8648-search-box input {
        width: 100%;
        min-width: 0;
        height: 46px;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--m8648-text);
        font: inherit;
        font-size: 15px;
    }

    .m8648-search-box button {
        height: 46px;
        padding: 0 19px;
        border: 0;
        border-radius: 14px;
        background: var(--m8648-accent);
        color: #fff;
        font-weight: 800;
        cursor: pointer;
    }

    .m8648-search-hints {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 14px;
    }

    .m8648-search-hints span {
        padding: 8px 11px;
        border-radius: 999px;
        background: var(--m8648-accent-soft);
        color: var(--m8648-accent);
        font-size: 11px;
        font-weight: 750;
    }

    body.m8648-sheet-open {
        overflow: hidden;
        touch-action: none;
    }

    .sr-only {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0,0,0,0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
}

@media (max-width: 420px) {
    .m8648-category-grid {
        grid-template-columns: 1fr;
    }

    .m8648-category-card--wide {
        grid-column: auto;
    }

    .m8648-category-card,
    .m8648-category-card--wide {
        min-height: auto;
        flex-direction: row;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .m8648-bottom-nav__item,
    .m8648-overlay,
    .m8648-sheet {
        transition: none !important;
    }
}
