/* SLADGARD — отдельные стили страницы корзины */
.cart-page {
    width: min(1540px, calc(100% - 56px));
    margin: 0 auto;
    padding: 126px 0 70px;
    color: #321c12;
}

.cart-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 38px 42px;
    border: 1px solid #ead2b5;
    border-radius: 30px;
    background: #fffaf4;
}

.cart-kicker {
    margin: 0 0 7px;
    color: #d92722;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cart-heading h1,
.cart-order__intro h2 {
    margin: 0;
    color: #321c12;
    font-size: clamp(38px, 4vw, 62px);
    line-height: .98;
}

.cart-heading p:not(.cart-kicker),
.cart-order__intro p:not(.cart-kicker) {
    max-width: 720px;
    margin: 15px 0 0;
    color: #7a6a5e;
    line-height: 1.55;
}

.cart-clear-all {
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(210,45,38,.3);
    border-radius: 15px;
    color: #c92823;
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 22px;
    margin-top: 22px;
    align-items: start;
}

.cart-products,
.cart-summary,
.cart-order,
.cart-empty {
    border: 1px solid #ead8c4;
    border-radius: 28px;
    background: rgba(255,252,248,.96);
}

.cart-products {
    padding: 28px;
}

.cart-products__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.cart-products__head h2 {
    margin: 0;
    font-size: 25px;
}

.cart-products__head span {
    color: #9a887a;
    font-size: 13px;
    font-weight: 700;
}

.cart-items {
    display: grid;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 150px minmax(180px, 1fr) 130px 190px 140px;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid #edddcb;
    border-radius: 22px;
    background: #fff;
}

.cart-item__image {
    display: grid;
    place-items: center;
    height: 118px;
    padding: 8px;
    border-radius: 16px;
    background: #fff9f1;
    overflow: hidden;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item__info,
.cart-item__price,
.cart-item__quantity,
.cart-item__total {
    min-width: 0;
}

.cart-item__name {
    display: block;
    color: #321c12;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.18;
    text-decoration: none;
}

.cart-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.cart-item__meta span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #765f50;
    background: #f8eee2;
    font-size: 11px;
    font-weight: 800;
}

.cart-item__remove {
    margin-top: 11px;
    padding: 0;
    border: 0;
    color: #c92b25;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.cart-item__price span,
.cart-item__quantity > span,
.cart-item__total span {
    display: block;
    margin-bottom: 7px;
    color: #9a887a;
    font-size: 11px;
    font-weight: 700;
}

.cart-item__price strong,
.cart-item__total strong {
    font-size: 17px;
    white-space: nowrap;
}

.cart-item__total strong {
    color: #d92722;
    font-size: 19px;
}

.cart-qty {
    display: grid;
    grid-template-columns: 42px 62px 42px;
    width: max-content;
    border: 1px solid #e3cdb5;
    border-radius: 14px;
    overflow: hidden;
}

.cart-qty button,
.cart-qty input {
    height: 42px;
    border: 0;
    color: #321c12;
    background: #fff;
    font: inherit;
    font-weight: 850;
    text-align: center;
}

.cart-qty button {
    cursor: pointer;
    font-size: 19px;
}

.cart-qty input {
    width: 62px;
    appearance: textfield;
    border-left: 1px solid #eee0d1;
    border-right: 1px solid #eee0d1;
}

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

.cart-summary {
    position: sticky;
    top: 112px;
    padding: 27px;
}

.cart-summary__kicker {
    margin: 0 0 18px;
    color: #d92722;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid #eee0d1;
    color: #806e60;
}

.cart-summary__row strong {
    color: #321c12;
}

.cart-summary__row--total {
    margin-top: 4px;
    border-bottom: 0;
}

.cart-summary__row--total strong {
    color: #d92722;
    font-size: 27px;
}

.cart-minimum {
    margin-top: 17px;
    padding: 15px;
    border: 1px solid rgba(217,39,34,.22);
    border-radius: 16px;
    background: #fff4ef;
}

.cart-minimum strong,
.cart-minimum span {
    display: block;
}

.cart-minimum strong {
    font-size: 13px;
}

.cart-minimum span {
    margin-top: 6px;
    color: #806e60;
    font-size: 12px;
    line-height: 1.4;
}

.cart-minimum.is-ready {
    border-color: #d8d0b9;
    background: #faf8ed;
}

.cart-continue {
    display: inline-block;
    margin-top: 20px;
    color: #9b6544;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.cart-order {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 38px;
    margin-top: 22px;
    padding: 36px;
}

.cart-order__intro h2 {
    font-size: 34px;
}

.cart-order-form {
    min-width: 0;
}

.cart-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cart-field {
    display: grid;
    gap: 7px;
}

.cart-field--wide {
    grid-column: 1 / -1;
}

.cart-field span {
    color: #654d3e;
    font-size: 12px;
    font-weight: 850;
}

.cart-field b {
    color: #d92722;
}

.cart-field input,
.cart-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e4d1bc;
    border-radius: 15px;
    outline: none;
    color: #321c12;
    background: #fff;
    font: inherit;
    font-size: 15px;
}

.cart-field input {
    min-height: 50px;
    padding: 0 15px;
}

.cart-field textarea {
    min-height: 110px;
    padding: 14px 15px;
    resize: vertical;
}

.cart-field input:focus,
.cart-field textarea:focus {
    border-color: rgba(217,39,34,.6);
}

.cart-order-form__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 18px;
}

.cart-form-note {
    margin: 0;
    color: #8c796b;
    font-size: 12px;
    line-height: 1.4;
}

.cart-submit,
.cart-catalog-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: #cf312a;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
}

.cart-submit {
    min-width: 240px;
    cursor: pointer;
}

.cart-submit:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.cart-form-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: #c92b25;
    font-size: 12px;
    font-weight: 800;
}

.cart-empty {
    margin-top: 22px;
    padding: 70px 24px;
    text-align: center;
}

.cart-empty__icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border: 1px solid #edc9a7;
    border-radius: 50%;
    color: #d92722;
    font-size: 34px;
}

.cart-empty h2 {
    margin: 0;
    font-size: 34px;
}

.cart-empty p {
    margin: 10px 0 22px;
    color: #887568;
}

@media (max-width: 1200px) {
    .cart-item {
        grid-template-columns: 120px minmax(170px, 1fr) 120px 170px;
    }

    .cart-item__total {
        grid-column: 2 / -1;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
    }

    .cart-item__total span {
        margin: 0;
    }
}

@media (max-width: 900px) {
    .cart-page {
        width: calc(100% - 28px);
        padding-top: 104px;
    }

    .cart-layout,
    .cart-order {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .cart-order {
        gap: 24px;
    }

    .cart-item {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .cart-item__price,
    .cart-item__quantity,
    .cart-item__total {
        grid-column: 2;
    }

    .cart-item__total {
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .cart-page {
        width: calc(100% - 20px);
        padding-top: 92px;
    }

    .cart-heading {
        align-items: flex-start;
        padding: 25px 20px;
        flex-direction: column;
        border-radius: 22px;
    }

    .cart-heading h1 {
        font-size: 43px;
    }

    .cart-clear-all {
        min-height: 42px;
    }

    .cart-products,
    .cart-summary,
    .cart-order,
    .cart-empty {
        border-radius: 21px;
    }

    .cart-products {
        padding: 14px;
    }

    .cart-item {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .cart-item__image {
        height: 88px;
    }

    .cart-item__name {
        font-size: 16px;
    }

    .cart-item__price,
    .cart-item__quantity,
    .cart-item__total {
        grid-column: 1 / -1;
    }

    .cart-item__price {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-item__price span {
        margin: 0;
    }

    .cart-item__quantity {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-item__quantity > span {
        margin: 0;
    }

    .cart-item__total {
        justify-content: space-between;
        padding-top: 10px;
        border-top: 1px solid #eee0d1;
    }

    .cart-form-grid {
        grid-template-columns: 1fr;
    }

    .cart-field--wide {
        grid-column: auto;
    }

    .cart-order {
        padding: 23px 18px;
    }

    .cart-order-form__bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .cart-submit {
        width: 100%;
        min-width: 0;
    }
}


/* === Stage 42: правки корзины === */

/* Фото подарка показываем целиком, без обрезки */
.cart-item__image {
    padding: 10px;
    overflow: hidden;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}


/* === Stage 43: телефон в формате +375 + локальный номер и исправление фото === */

/* Гарантированно показываем фотографию подарка ЦЕЛИКОМ. */
.cart-page .cart-item__image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 118px;
    padding: 8px;
    overflow: visible;
    box-sizing: border-box;
}

.cart-page .cart-item__image img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    flex: 0 1 auto;
}

/* Единое поле телефона: 🇧🇾 +375 | (29) 123-45-67 */
.cart-phone {
    display: grid;
    grid-template-columns: 146px minmax(0, 1fr);
    min-height: 50px;
    overflow: hidden;
    border: 1px solid #e4d1bc;
    border-radius: 15px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.cart-phone:focus-within {
    border-color: rgba(217,39,34,.6);
    box-shadow: 0 0 0 3px rgba(217,39,34,.06);
}

.cart-phone__prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 15px;
    border-right: 1px solid #e4d1bc;
    color: #20375e;
    background: #fffaf4;
    white-space: nowrap;
}

.cart-phone__flag {
    font-size: 22px;
    line-height: 1;
}

.cart-phone__prefix strong {
    font-size: 18px;
    font-weight: 900;
}

.cart-field .cart-phone__input {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    outline: none;
    color: #321c12;
    background: #fff;
    font: inherit;
    font-size: 16px;
    box-sizing: border-box;
}

.cart-field .cart-phone__input:focus {
    border: 0;
}

.cart-phone__input::placeholder {
    color: #91867e;
    opacity: 1;
}

@media (max-width: 680px) {
    .cart-page .cart-item__image {
        height: 88px;
        padding: 6px;
    }

    .cart-phone {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .cart-phone__prefix {
        gap: 7px;
        padding: 0 10px;
    }

    .cart-phone__flag {
        font-size: 19px;
    }

    .cart-phone__prefix strong {
        font-size: 16px;
    }

    .cart-field .cart-phone__input {
        padding: 0 12px;
        font-size: 16px;
    }
}




/* === Stage 56: подтверждение успешного заказа === */
.cart-success {
    display: none;
    max-width: 780px;
    margin: 34px auto 0;
    padding: 46px 38px;
    text-align: center;
    border: 1px solid #e8d2b8;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 0%, rgba(211,151,61,.10), transparent 34%),
        linear-gradient(180deg, #fffdf9, #fff8ef);
    box-shadow: 0 18px 42px rgba(75,47,27,.07);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .45s ease, transform .45s ease;
}

.cart-success:not([hidden]) {
    display: block;
}

.cart-success.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cart-success__mark {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    border: 1px solid rgba(52,128,72,.28);
    border-radius: 50%;
    color: #347f48;
    background: rgba(70,151,91,.08);
    font-size: 31px;
    font-weight: 900;
}

.cart-success__kicker {
    margin: 0 0 8px;
    color: #b06e35;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cart-success h2 {
    margin: 0;
    color: #382218;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.03em;
}

.cart-success > p:not(.cart-success__kicker) {
    max-width: 580px;
    margin: 15px auto 0;
    color: #77685d;
    font-size: 16px;
    line-height: 1.6;
}

.cart-success a {
    display: inline-flex;
    align-items: center;
    gap: 26px;
    min-height: 50px;
    margin-top: 25px;
    padding: 0 22px;
    border-radius: 15px;
    color: #fff;
    background: #ce322b;
    font-weight: 900;
    text-decoration: none;
}

@media (max-width: 680px) {
    .cart-success {
        margin-top: 22px;
        padding: 34px 20px;
        border-radius: 22px;
    }
}
