/* ===== Tablet & mobile (≤1023px) ===== */
@media (max-width:1023px) {
    main .all-height .box-banner img {
        width: 100%;
        max-width: unset;
    }
    main .all-height .logo-weber {
        position: absolute;
        top: 14px;
        right: 0;
        left: 0;
        margin: auto;
        width: clamp(150px, 26vw, 240px);
        z-index: 30;
        padding: 8px 12px;
        border-radius: 14px;
        background: #FFF;
        overflow: hidden;
    }
    main .all-height .box-content {
        top: max(20%, 115px); /* không để logo đè tiêu đề khi màn hình thấp */
    }
    main .all-height .box-content-title {
        margin-bottom: 1.6rem;
    }
    main .all-height .box-content-title img {
        width: min(100%, 620px);
    }

    /* nút đăng ký */
    main .all-height .box-content-dathang {
        margin-bottom: 1.4rem;
    }
    main .all-height .box-content-dathang .btn-site {
        width: auto;
        min-width: 260px;
        padding: 12px 34px;
        font-size: 20px;
        line-height: 1.2;
        white-space: nowrap;
        box-shadow: unset;
    }
    main .all-height .box-content-dathang .btn-site .text {
        display: inline-flex;
        align-items: center;
        gap: 10px;
    }
    main .all-height .box-content-dathang .btn-site .text img {
        width: 34px;
    }

    /* nút danh sách + bảng */
    main .all-height .box-content-btn-list {
        margin-bottom: 0;
    }
    main .all-height .box-content-btn-list .btn-list {
        width: auto;
        padding: 10px 26px;
        font-size: 15px;
        white-space: nowrap;
        box-shadow: unset;
        overflow: hidden;
    }
    main .all-height .box-content-btn-list .box-content-table {
        width: min(94vw, 620px);
        height: clamp(140px, calc(100vh - 790px), 320px);
        max-height: none;
        margin-top: 10px;
        overflow-y: auto;
    }
    main .all-height .box-content-table table thead tr th {
        font-size: 13px;
        padding: 10px 12px;
    }
    main .all-height .box-content-table table tbody tr td {
        font-size: 14px;
        padding: 10px 12px;
    }

    /* hộp tổng số lượng: cố định cuối màn hình, chừa chỗ cho thanh địa chỉ Safari */
    main .all-height .box-total-list {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
        margin: 0 auto;
        z-index: 11;
        width: min(92vw, 460px);
        height: auto;
        padding: 14px 18px;
        border-radius: 10px;
        font-size: 16px;
    }
    main .all-height .box-total-list .text {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 18px;
    }
    main .all-height .box-total-list .img-total {
        padding: 0;
    }
    main .all-height .box-total-list .img-total img {
        margin-right: 0;
        width: 84px;
    }
    main .all-height .box-total-list .box-total-list-text {
        font-size: 15px;
    }
    main .all-height .box-total-list .total-order {
        font-size: 30px;
        padding: 0;
    }
    main .all-height .box-total-list .box-total-list-donvi {
        font-size: 14px;
    }

    /* form đặt hàng */
    main .custom-model-main .form-container form .form-group input {
        font-size: 22px;
    }
    main .custom-model-main .form-container .title-form {
        font-size: 32px;
    }
    main .custom-model-main .form-container .btn-form {
        font-size: 28px;
    }
}

/* ===== Mobile (≤575px) ===== */
@media (max-width:575px) {
    main .all-height .logo-weber {
        top: 10px;
        width: 110px;
    }
    main .all-height .box-content {
        top: max(8%, 80px);
    }

    /* nút đăng ký thấp hơn, chữ căn giữa */
    main .all-height .box-content-dathang .btn-site {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        height: 40px;
        padding: 0 22px;
        font-size: 15px;
        line-height: 1;
    }
    main .all-height .box-content-dathang .btn-site .text {
        gap: 8px;
        line-height: 1;
    }
    main .all-height .box-content-dathang .btn-site .text img {
        width: 22px;
        height: 22px;
        object-fit: contain;
        flex-shrink: 0;
    }

    main .all-height .box-content-btn-list .btn-list {
        padding: 8px 18px;
        font-size: 12px;
    }
    main .all-height .box-content-btn-list .box-content-table {
        height: clamp(130px, calc(100vh - 510px), 260px);
    }
    main .all-height .box-content-table table thead tr th {
        font-size: 10px;
        padding: 8px 6px;
    }
    main .all-height .box-content-table table tbody tr td {
        font-size: 11px;
        padding: 8px 6px;
    }

    main .all-height .box-total-list {
        padding: 12px 14px;
    }
    main .all-height .box-total-list .img-total img {
        width: 64px;
    }
    main .all-height .box-total-list .box-total-list-text {
        font-size: 12px;
    }
    main .all-height .box-total-list .total-order {
        font-size: 24px;
    }
    main .all-height .box-total-list .box-total-list-donvi {
        font-size: 11px;
    }

    main .custom-model-main .form-container form .form-group input {
        font-size: 12px;
    }
    main .custom-model-main .form-container .title-form {
        font-size: 22px;
    }
    main .custom-model-main .form-container .btn-form {
        font-size: 18px;
    }
}

/* ===== Mobile/tablet: vừa đúng 1 màn hình, không cuộn ===== */
@media (max-width:1023px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
        overscroll-behavior: none;
    }
    main {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }
    main .all-height,
    main .all-height .box-banner {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }
}
