/* Корзина — два шага: товары и оформление */
.mz-cart-step[hidden] {
    display: none !important;
}

.mz-cart-layout {
    display: grid;
    gap: 28px;
    align-items: start;
}

.mz-cart-layout--basket {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}

.mz-cart-layout--checkout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
}

@media (max-width: 960px) {
    .mz-cart-layout--basket,
    .mz-cart-layout--checkout {
        grid-template-columns: 1fr;
    }
}

.mz-cart-summary__box {
    position: sticky;
    top: 16px;
    padding: 20px;
    border: 1px solid var(--mz-border);
    background: #fff;
}

.mz-cart-summary__title {
    margin: 0 0 12px;
    font-size: 18px;
}

.mz-cart-summary__count {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--mz-muted);
}

.mz-cart-summary__total-label {
    margin: 12px 0 4px;
    font-size: 13px;
    color: var(--mz-muted);
}

.mz-cart-summary__total {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 800;
    color: var(--mz-primary);
}

.mz-cart-summary__note {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--mz-muted);
    line-height: 1.4;
}

.mz-cart-summary__list {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 1.45;
    color: var(--mz-text);
    max-height: 200px;
    overflow-y: auto;
}

.mz-cart-summary__list li {
    padding: 4px 0;
    border-bottom: 1px solid var(--mz-border);
}

.mz-cart-summary__list li:last-child {
    border-bottom: 0;
}

.mz-cart-back {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--mz-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.mz-cart-back:hover {
    color: var(--mz-primary-hover);
}

.mz-cart-checkout {
    padding: 22px;
    border: 1px solid var(--mz-border);
    background: #fff;
}

.mz-cart-form .mz-field {
    margin-bottom: 14px;
}

.mz-cart-form select,
.mz-cart-form textarea,
.mz-cart-form input[type="text"],
.mz-cart-form input[type="tel"],
.mz-cart-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mz-border);
    font: inherit;
    font-size: 14px;
    background: #fff;
}

.mz-cart-form select:focus,
.mz-cart-form textarea:focus,
.mz-cart-form input:focus {
    outline: none;
    border-color: var(--mz-primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.12);
}

.mz-cart-legal {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.mz-cart-legal__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    padding: 0;
}

.mz-cart-legal__subtitle {
    margin: 16px 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--mz-text);
}

.mz-cart-legal__hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--mz-muted);
    line-height: 1.45;
}

.mz-cart-legal__hint--dadata {
    padding: 8px 10px;
    background: var(--mz-toolbar-bg);
    border-left: 3px solid var(--mz-primary);
}

.mz-checkout-accordions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.mz-checkout-spoiler {
    border: 1px solid var(--mz-border);
    background: #fff;
}

.mz-checkout-spoiler.is-open {
    border-color: var(--mz-primary);
}

.mz-checkout-spoiler__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--mz-text);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.mz-checkout-spoiler__head::-webkit-details-marker {
    display: none;
}

.mz-checkout-spoiler__head::after {
    content: '';
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--mz-primary);
    border-bottom: 2px solid var(--mz-primary);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -4px;
}

.mz-checkout-spoiler[open] .mz-checkout-spoiler__head::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.mz-checkout-spoiler__body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--mz-border);
}

.mz-checkout-spoiler__body .mz-field:first-of-type {
    margin-top: 14px;
}

.mz-checkout-spoiler__next {
    margin-top: 8px;
    width: 100%;
    max-width: 280px;
}

.mz-checkout-spoiler__error {
    margin: 8px 0 0;
    font-size: 13px;
    color: #b71c1c;
}

.mz-checkout-spoiler__error:not([hidden]) {
    display: block;
}

.mz-cart-checkout-footer {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--mz-border);
}

.mz-cart-form .mz-checkout-spoiler__next.mz-btn--primary {
    color: #fff;
}

.mz-cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--mz-border);
    background: #fff;
}

.mz-cart-qty__btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: var(--mz-toolbar-bg);
    color: var(--mz-primary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    font-weight: 600;
}

.mz-cart-qty__btn:hover {
    background: #e8ebf0;
}

.mz-cart-qty__input {
    width: 48px;
    height: 36px;
    border: 0;
    border-left: 1px solid var(--mz-border);
    border-right: 1px solid var(--mz-border);
    text-align: center;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.mz-cart-qty__input::-webkit-outer-spin-button,
.mz-cart-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mz-cart-remove {
    padding: 6px 10px;
    font-size: 13px;
    color: var(--mz-muted);
    background: transparent;
    border: 1px solid var(--mz-border);
    cursor: pointer;
    font: inherit;
}

.mz-cart-remove:hover {
    color: #b71c1c;
    border-color: #ef9a9a;
}

.mz-cart-table td {
    vertical-align: middle;
}

.mz-cart-table__price {
    white-space: nowrap;
}

.mz-auth-form {
    padding-bottom: var(--mz-page-end-gap);
}

.mz-auth-form__lead {
    max-width: 640px;
    margin: 0 0 20px;
    color: var(--mz-muted);
    line-height: 1.55;
    font-size: 14px;
}

.mz-auth-form__grid {
    margin-top: 8px;
}

.mz-auth-form__actions {
    margin: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
