@media (min-width: 980px) {
    body {
        padding-bottom: 0;
    }

    .menu-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
    }

    .desktop-cart {
        display: block;
    }

    .bottom-cartbar {
        display: none;
    }

    .overlay-modal__panel {
        top: 4vh;
        bottom: 4vh;
        border-radius: 28px;
    }

    .overlay-modal__panel--product {
        left: 50%;
        transform: translateX(-50%);
    }

    .overlay-modal__panel--cart {
        left: auto;
        right: 24px;
        width: min(560px, calc(100% - 48px));
        transform: none;
    }
}

@media (max-width: 760px) {
    .top-tab {
        min-height: 72px;
        font-size: 0.84rem;
    }

    .top-tab span {
        display: block;
        max-width: 82px;
        line-height: 1.1;
        text-align: center;
    }

    .store-panel {
        grid-template-columns: 68px minmax(0, 1fr);
        padding: 12px;
    }

    .store-panel__logo {
        width: 68px;
        height: 68px;
    }

    .menu-category__header {
        padding: 22px 16px 10px;
    }

    .menu-item {
        grid-template-columns: 60px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 16px;
    }

    .menu-item__thumb img,
    .menu-item__thumb-fallback {
        width: 60px;
        height: 60px;
    }

    .menu-item__action button {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 1.4rem;
    }

    .category-tab {
        min-height: 38px;
        padding: 9px 14px;
        font-size: 0.875rem;
    }

    .product-modal__hero {
        grid-template-columns: 1fr;
        padding: 8px 16px 0;
    }

    .info-modal__header,
    .customer-order-status,
    .customer-order-type-switch,
    .customer-form,
    .info-modal__grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .customer-order-type-switch {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin: 16px 16px 0;
        padding: 5px;
        border-radius: 16px;
        background: #fff;
    }

    .customer-order-type-switch button {
        min-height: 44px;
        padding: 0 8px;
        border-radius: 12px;
        background-color: #f6efe1;
        color: #3b3326;
        font-size: 0.86rem;
        line-height: 1.1;
    }

    .customer-order-type-switch button.is-active {
        border-color: var(--brand-red);
        background-color: var(--brand-red);
        color: #fff;
        box-shadow: 0 8px 16px rgba(196, 35, 45, 0.22);
    }

    .info-modal__grid,
    .customer-form__grid {
        grid-template-columns: 1fr;
    }

    .store-hours-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .customer-form__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .order-gate__panel {
        align-content: start;
        padding-top: 34px;
        gap: 18px;
    }

    .order-gate__brand img,
    .order-gate__brand-fallback {
        width: 84px;
        height: 84px;
        border-radius: 22px;
    }

    .order-gate__copy h2 {
        font-size: clamp(1.8rem, 9vw, 2.8rem);
    }

    .order-gate__copy p {
        font-size: 0.95rem;
    }

    .order-gate__options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .order-option {
        padding: 16px;
        border-radius: 22px;
    }

    .order-option__icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .order-option__icon svg {
        width: 22px;
        height: 22px;
    }

    .order-option strong {
        font-size: 1rem;
    }

    .order-option small {
        font-size: 0.88rem;
    }

    .product-modal__content {
        padding: 18px 16px 20px;
    }

    .product-modal__progress {
        padding-left: 16px;
        padding-right: 16px;
    }

    .product-modal__footer {
        padding: 16px;
    }

    .product-modal__footer-actions {
        grid-template-columns: 1fr 1fr;
    }

    .product-modal__final-actions {
        grid-template-columns: minmax(132px, 0.45fr) minmax(0, 1fr);
    }

    .product-modal__final-actions .qty-stepper {
        grid-template-columns: 36px minmax(36px, 1fr) 36px;
        min-height: 48px;
    }

    .product-modal__step-button,
    .product-modal__submit {
        min-height: 48px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 0.92rem;
    }

    .cart-drawer__header,
    .cart-drawer__content,
    .cart-drawer__footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cart-drawer__scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 0 16px 12px;
        padding: 10px 12px;
        border: 1px solid rgba(199, 154, 24, 0.2);
        border-radius: 14px;
        background: #fff;
        color: #8b650f;
        font-size: 0.84rem;
        font-weight: 800;
    }

    .cart-drawer__scroll-hint[hidden] {
        display: none;
    }

    .cart-drawer__scroll-hint strong {
        display: inline-grid;
        place-items: center;
        width: 22px;
        height: 22px;
        border-radius: 999px;
        background: var(--brand-red);
        color: #fff;
        font-size: 0.9rem;
        line-height: 1;
        animation: cartScrollHintNudge 1.35s ease-in-out infinite;
    }

    .cart-address-alert--drawer {
        margin-left: 16px;
        margin-right: 16px;
    }

    .qr-reader {
        margin-left: 16px;
        margin-right: 16px;
        padding: 12px;
    }

    .qr-reader video {
        min-height: 160px;
    }

    .qr-reader__fallback {
        min-height: 72px;
    }

    .cart-item__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-item__buttons {
        justify-content: stretch;
    }

.cart-item__buttons button {
        flex: 1;
    }
}

@media (max-width: 420px) {
    body {
        padding-bottom: 68px;
    }

    .bottom-cartbar {
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    }

    .bottom-cartbar__button {
        min-height: 44px;
        padding: 0 8px;
        font-size: 0.92rem;
    }

    .bottom-cartbar__icon svg {
        width: 20px;
        height: 20px;
    }
}

@keyframes cartScrollHintNudge {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}
