/* Desktop-first ordering layout. Loaded last to override legacy breakpoints. */
@media (min-width: 1024px) {
    .page-shell {
        width: min(1600px, calc(100% - 32px));
        grid-template-columns: 180px minmax(0, 1fr) 320px;
        gap: 20px;
    }

    .desktop-sidebar,
    .desktop-cart {
        display: block;
        min-width: 0;
        padding-top: 0;
    }

    .sidebar-box,
    .cart-panel {
        position: sticky;
        top: 20px;
    }

    .mobile-bottom-bar {
        display: none;
    }

    .menu-tools {
        position: relative;
        top: auto;
    }

    .menu-tools .category-strip.mobile-only {
        display: none;
    }

    .products-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }

    .product-card {
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 340px;
        padding: 12px;
    }

    .product-info {
        order: 2;
        flex: 1;
        width: 100%;
        min-height: 0;
        padding-top: 12px;
    }

    .product-info h3 {
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .product-media {
        order: 1;
        position: relative;
        display: block;
        width: 100%;
        align-self: auto;
    }

    .product-img {
        display: block;
        width: 100%;
        max-width: none;
        height: 150px;
        border-radius: 15px;
    }

    .add-btn {
        position: absolute;
        right: 9px;
        bottom: 9px;
        min-width: 92px;
        width: auto;
        height: 38px;
        padding: 0 12px;
        border-radius: 999px;
        background: rgba(25, 25, 25, .94);
        color: #fff;
        font-size: 13px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    body {
        padding-bottom: 92px;
    }

    .page-shell {
        width: min(100%, calc(100% - 24px));
        grid-template-columns: minmax(0, 1fr);
    }

    .desktop-sidebar,
    .desktop-cart {
        display: none;
    }

    .menu-tools {
        top: 12px;
    }

    .menu-tools .category-strip.mobile-only {
        display: flex;
    }

    .products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-bottom-bar {
        display: flex;
        gap: 10px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    }

    .bottom-icon-btn {
        width: 68px;
        height: 54px;
        flex: 0 0 68px;
        flex-direction: column;
        gap: 2px;
        font-size: 22px;
        text-decoration: none;
    }

    .bottom-icon-btn small {
        font-size: 11px;
        font-weight: 800;
    }

    .bottom-order-btn {
        max-width: none;
        height: 54px;
        flex-direction: column;
        gap: 2px;
        font-size: 16px;
        text-transform: none;
        text-decoration: none;
    }

    .bottom-order-btn span {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .page-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .desktop-sidebar,
    .desktop-cart {
        display: none;
    }

    .menu-tools .category-strip.mobile-only {
        display: flex;
    }

    .products-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .mobile-bottom-bar {
        display: flex;
    }
}
