body.has-home-product-modal {
    overflow: hidden;
}

.home-product-modal {
    position: fixed;
    inset: 0;
    z-index: 76;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(var(--shadow-warm-rgb), 0.48);
}

.home-product-modal[hidden] {
    display: none;
}

.home-product-dialog {
    position: relative;
    width: min(920px, calc(100vw - 36px));
    max-height: calc(100dvh - 36px);
    overflow: hidden;
    border: 1px solid var(--line-accent-strong);
    border-radius: var(--radius-panel);
    background: rgb(var(--surface-rgb));
    box-shadow: var(--shadow-modal);
}

.home-product-dialog-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;
    line-height: 1;
}

.home-product-dialog-body {
    max-height: calc(100dvh - 36px);
    overflow: auto;
}

.home-product-dialog-loading {
    display: grid;
    min-height: 260px;
    place-items: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.home-product-dialog .order-builder {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.home-product-dialog .order-builder-card {
    padding: 20px;
}

.home-product-dialog .order-builder-header {
    padding-right: 48px;
}

.home-product-dialog .order-builder-title > .button {
    display: none;
}

.home-product-dialog .order-builder-layout {
    grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
    gap: 16px;
}

.home-product-dialog .product-payment-confirm-modal {
    z-index: 84;
}

@media (max-width: 820px) {
    .home-product-modal {
        align-items: end;
        padding: 10px;
    }

    .home-product-dialog {
        width: 100%;
        max-height: calc(100dvh - 20px);
    }

    .home-product-dialog-body {
        max-height: calc(100dvh - 20px);
    }

    .home-product-dialog .order-builder-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .home-product-modal {
        padding: 6px;
    }

    .home-product-dialog {
        max-height: calc(100dvh - 12px);
    }

    .home-product-dialog-body {
        max-height: calc(100dvh - 12px);
    }

    .home-product-dialog .order-builder-card {
        padding: 12px;
    }

    .home-product-dialog .order-builder-header {
        padding-right: 38px;
    }
}
