.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100vw - 32px));
}

.toast {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 14px;
    background: #ffffff;
    border: 1px solid #e5e9ef;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(23, 32, 42, 0.15);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: 180ms ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
    background: #e8f7ee;
    color: #19723a;
}

.toast-error .toast-icon {
    background: #feecec;
    color: #b42318;
}

.toast-warning .toast-icon {
    background: #fff4d8;
    color: #8c6200;
}

.toast-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.toast-copy strong {
    font-size: 14px;
}

.toast-copy span {
    color: #66717c;
    font-size: 13px;
    line-height: 1.45;
}

.toast-close {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7d8791;
    font-size: 20px;
    cursor: pointer;
}

.toast-close:hover {
    background: #f3f5f7;
}

.ui-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 18, 26, 0.58);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: 180ms ease;
}

.ui-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.ui-modal-card {
    width: min(520px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
    padding: 24px;
    transform: translateY(12px) scale(0.98);
    transition: 180ms ease;
}

.ui-modal-backdrop.open .ui-modal-card {
    transform: translateY(0) scale(1);
}

.ui-confirm-card {
    text-align: center;
    width: min(430px, 100%);
}

.ui-modal-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 900;
}

.ui-modal-icon.danger {
    background: #feecec;
    color: #b42318;
}

.ui-modal-copy h3,
.product-modal h3 {
    margin: 0;
    font-size: 22px;
}

.ui-modal-copy p {
    margin: 9px auto 0;
    max-width: 330px;
    color: #68727d;
    line-height: 1.55;
}

.ui-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.ui-confirm-card .ui-modal-actions {
    justify-content: center;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    transition: 160ms ease;
}

.btn-primary {
    background: #17202a;
    color: #ffffff;
}

.btn-primary:hover {
    background: #0b1118;
}

.btn-secondary {
    background: #eef1f4;
    color: #27313b;
}

.btn-secondary:hover {
    background: #e2e6ea;
}

.btn-danger {
    background: #c93636;
    color: #ffffff;
}

.btn-danger:hover {
    background: #ac2929;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.modal-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #8a6500;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f1f3f5;
    color: #58636e;
    font-size: 23px;
    cursor: pointer;
}

.product-options,
.quantity-field {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.field-title {
    font-weight: 800;
    font-size: 13px;
    color: #3b4650;
}

.option-list {
    display: grid;
    gap: 8px;
}

.option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 13px;
    border: 1px solid #e4e8ed;
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
}

.option-row > span {
    display: flex;
    align-items: center;
    gap: 9px;
}

.option-row strong {
    white-space: nowrap;
    font-size: 13px;
}

.quantity-control {
    display: grid;
    grid-template-columns: 42px 76px 42px;
    width: max-content;
    border: 1px solid #dfe4e9;
    border-radius: 11px;
    overflow: hidden;
}

.quantity-control button,
.quantity-control input {
    height: 42px;
    border: 0;
    background: #ffffff;
    text-align: center;
    font: inherit;
}

.quantity-control button {
    background: #f3f5f7;
    font-size: 19px;
    cursor: pointer;
}

.quantity-control input {
    width: 76px;
    outline: none;
    border-left: 1px solid #e3e7eb;
    border-right: 1px solid #e3e7eb;
}

.muted-copy {
    color: #7a858f;
}

.server-toast-placeholder {
    display: none !important;
}

@media (max-width: 560px) {
    .toast-container {
        right: 16px;
        top: 16px;
    }

    .ui-modal-card {
        border-radius: 16px;
        padding: 20px;
    }

    .ui-modal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
