/* Корзина Сруб-Завод: плавающая кнопка, анимация и страница заказа */
body .header-cart {
    position: fixed !important;
    top: 214px;
    right: 18px;
    right: max(18px, calc((100vw - 1200px) / 2 + 18px));
    z-index: 10050;
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    min-width: 132px;
    box-sizing: border-box;
    padding: 8px 11px 8px 9px;
    color: #3b2517 !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #fffdf6 0%, #f3ffe4 100%);
    border: 1px solid rgba(122, 190, 14, 0.48);
    border-left: 4px solid #78c40d;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(45, 61, 13, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body .header-cart:hover {
    color: #2b1a10 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    border-color: rgba(242, 83, 3, 0.55);
    box-shadow: 0 14px 30px rgba(45, 61, 13, 0.24);
}

body .header-cart__icon {
    position: relative;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #78c40d;
    color: #fff;
    font-size: 17px;
    line-height: 1;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

body .header-cart__body {
    display: block;
    min-width: 0;
    line-height: 1.05;
}

body .header-cart__label {
    display: block;
    margin-bottom: 2px;
    color: #3b2517;
    font-size: 13px;
    line-height: 1.05;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

body .header-cart__hint {
    display: block;
    color: #7b6a5e;
    font-size: 11px;
    line-height: 1.05;
    white-space: nowrap;
}

body .header-cart__count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 21px;
    height: 21px;
    box-sizing: border-box;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f25303;
    color: #fff;
    border: 2px solid #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(242, 83, 3, 0.28);
}

body .header-cart.is-not-empty .header-cart__icon {
    background: #f25303;
}

body .header-cart.header-cart--pulse {
    animation: srubHeaderCartPulse 0.65s ease;
}

body .header-cart.header-cart--pulse .header-cart__count {
    background: #78c40d;
}

@keyframes srubHeaderCartPulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.basket-fly-img {
    object-fit: cover;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card-order-btn.is-loading,
.js-add-srub-to-cart.is-loading {
    opacity: .72;
    pointer-events: none;
}

.card-order-btn.is-added,
.js-add-srub-to-cart.is-added {
    background: #78c40d !important;
    border-color: #78c40d !important;
    color: #fff !important;
}

.basket-page {
    width: min(1160px, calc(100% - 30px));
    margin: 26px auto 54px;
    color: #332014;
}

.basket-page * {
    box-sizing: border-box;
}

.basket-page__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin: 0 0 22px;
    padding: 24px 26px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 15% 0%, rgba(120,196,13,.16), transparent 30%),
        linear-gradient(135deg, #fffdf8 0%, #f7fbe9 100%);
    border: 1px solid #e5ead2;
    box-shadow: 0 12px 35px rgba(54, 70, 20, .08);
}

.basket-page__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 9px;
    color: #598f08;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.basket-page__top h1 {
    margin: 0;
    color: #2e1d13;
    font-size: 34px;
    line-height: 1.12;
}

.basket-page__lead {
    margin: 8px 0 0;
    max-width: 650px;
    color: #6c5b50;
    font-size: 15px;
    line-height: 1.45;
}

.basket-page__back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    color: #3b2517 !important;
    text-decoration: none !important;
    background: #fff;
    border: 1px solid #dfe7ca;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(54, 70, 20, .07);
}

.basket-page__back:hover {
    border-color: #78c40d;
    text-decoration: none !important;
}

.basket-empty {
    display: none;
    padding: 34px 26px;
    text-align: center;
    background: #fff;
    border: 1px solid #eadfd7;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(54, 70, 20, .08);
}

.basket-empty__icon {
    width: 62px;
    height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 12px;
    border-radius: 22px;
    background: #f3ffe4;
    color: #78c40d;
    font-size: 28px;
}

.basket-empty h2 {
    margin: 0 0 8px;
    color: #2e1d13;
    font-size: 24px;
}

.basket-empty p {
    margin: 0 0 18px;
    color: #6f6259;
}

.basket-empty a,
.basket-empty__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 20px;
    color: #fff !important;
    text-decoration: none !important;
    background: #78c40d;
    border-radius: 999px;
    font-weight: 800;
}

.basket-page--empty .basket-empty {
    display: block;
}

.basket-page--empty .basket-page__grid {
    display: none;
}

.basket-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 24px;
    align-items: start;
}

.basket-page__list,
.basket-page__form {
    background: #fff;
    border: 1px solid #eadfd7;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(54, 70, 20, .08);
    overflow: hidden;
}

.basket-page__list-head,
.basket-page__form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fbf8f4;
    border-bottom: 1px solid #eee4dc;
}

.basket-page__list-head h2,
.basket-page__form-head h2 {
    margin: 0;
    color: #2e1d13;
    font-size: 20px;
    line-height: 1.2;
}

.basket-page__secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #598f08;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.basket-page__items {
    padding: 0 20px;
}

.basket-page__item {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr) 132px 122px 42px;
    gap: 15px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #f0e8e2;
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.basket-page__item:last-child {
    border-bottom: 0;
}

.basket-page__item.is-updating {
    opacity: .68;
}

.basket-page__item.is-removing {
    opacity: .25;
    transform: translateX(12px);
}

.basket-page__img {
    width: 126px;
    height: 92px;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f0ea;
}

.basket-page__img a,
.basket-page__img img {
    display: block;
    width: 100%;
    height: 100%;
}

.basket-page__img img {
    object-fit: cover;
}

.basket-page__info {
    min-width: 0;
}

.basket-item-title {
    margin: 0 0 8px;
    color: #2e1d13;
    font-size: 16px;
    line-height: 1.28;
    font-weight: 800;
}

.basket-item-title a {
    color: inherit;
    text-decoration: none;
}

.basket-item-title a:hover {
    color: #5b9408;
    text-decoration: underline;
}

.basket-item-price {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    color: #704b32;
    background: #fff8ed;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.basket-qty {
    display: inline-grid;
    grid-template-columns: 38px 52px 38px;
    align-items: center;
    justify-content: start;
    border: 1px solid #dccfc5;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.basket-qty button {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    color: #3b2517;
    background: #f7f3ef;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}

.basket-qty button:hover {
    background: #eef8dc;
}

.basket-qty-input {
    width: 52px;
    height: 38px;
    padding: 0 4px;
    border: 0;
    border-left: 1px solid #dccfc5;
    border-right: 1px solid #dccfc5;
    color: #2e1d13;
    background: #fff;
    text-align: center;
    font: 800 15px/38px Arial, sans-serif;
    outline: none;
}

.basket-row-sum {
    color: #2e1d13;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.basket-delete {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #f0ddd1;
    border-radius: 14px;
    color: #a73a13;
    background: #fff6f1;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.basket-delete:hover {
    color: #fff;
    background: #f25303;
    border-color: #f25303;
}

.basket-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 20px;
    background: #fbf8f4;
    border-top: 1px solid #eee4dc;
}

.basket-total__label {
    display: block;
    color: #7a6a60;
    font-size: 13px;
    line-height: 1.3;
}

.basket-total__label strong,
.basket-total-count {
    color: #2e1d13;
    font-weight: 900;
}

.basket-total-sum {
    color: #2e1d13;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 900;
    white-space: nowrap;
}

.basket-page__form {
    position: sticky;
    top: 18px;
}

.basket-page__form-body {
    padding: 20px;
}

.basket-order-form label,
.basket-order-form .cart-form-row {
    display: block;
    margin: 0 0 14px;
}

.basket-order-form label span,
.basket-order-form .cart-form-row > label {
    display: block;
    margin: 0 0 7px;
    color: #3b2517;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
}

.basket-order-form input,
.basket-order-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 12px 13px;
    color: #2e1d13;
    background: #fff;
    border: 1px solid #dccfc5;
    border-radius: 13px;
    font: 15px/1.35 Arial, sans-serif;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.basket-order-form input:focus,
.basket-order-form textarea:focus {
    border-color: #78c40d;
    box-shadow: 0 0 0 3px rgba(120, 196, 13, .15);
}

.basket-order-form textarea {
    min-height: 94px;
    resize: vertical;
}

.basket-form-note {
    display: flex;
    gap: 10px;
    margin: -2px 0 15px;
    padding: 12px 13px;
    color: #6f6259;
    background: #f8fbef;
    border: 1px solid #e2ebcc;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.35;
}

.delivery-map {
    width: 100%;
    height: 320px;
    margin: 10px 0 15px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #dccfc5;
    background: #f4f0ea;
}

.delivery-map__notice {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6f6259;
    text-align: center;
    font-weight: 700;
}

.basket-submit {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    color: #fff;
    background: linear-gradient(180deg, #f66a17 0%, #e34b00 100%);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(242, 83, 3, .22);
    font-size: 15px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.basket-submit:hover {
    background: linear-gradient(180deg, #ff741f 0%, #d94400 100%);
}

.basket-submit:disabled,
.basket-submit.is-loading {
    opacity: .7;
    cursor: wait;
}

.basket-order-message,
.basket-form-success,
.basket-form-error {
    display: none;
    margin-top: 13px;
    padding: 12px 13px;
    border-radius: 13px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
}

.basket-order-message--success,
.basket-form-success {
    display: block;
    color: #315f00;
    background: #f0fbe1;
    border: 1px solid #cfeaad;
}

.basket-order-message--error,
.basket-form-error {
    display: block;
    color: #8b2300;
    background: #fff1eb;
    border: 1px solid #ffd1bd;
}

.basket-order-form.is-sent .basket-submit {
    display: none;
}

@media only screen and (max-width: 1300px) {
    body .header-cart {
        top: 214px;
        right: 18px;
    }
}

@media only screen and (max-width: 1048px) {
    .basket-page__grid {
        grid-template-columns: 1fr;
    }

    .basket-page__form {
        position: static;
    }
}

@media only screen and (max-width: 770px) {
    body .header-cart {
        top: 74px;
        right: 10px;
        min-width: 0;
        padding: 7px;
        border-left-width: 1px;
        border-radius: 16px;
    }

    body .header-cart__body {
        display: none;
    }

    body .header-cart__icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .basket-page {
        width: min(100% - 18px, 1160px);
        margin-top: 16px;
    }

    .basket-page__top {
        display: block;
        padding: 20px 16px;
    }

    .basket-page__top h1 {
        font-size: 27px;
    }

    .basket-page__back {
        margin-top: 14px;
    }

    .basket-page__list-head,
    .basket-page__form-head,
    .basket-page__items,
    .basket-page__form-body,
    .basket-total {
        padding-left: 14px;
        padding-right: 14px;
    }

    .basket-page__item {
        grid-template-columns: 92px minmax(0, 1fr) 38px;
        gap: 11px;
        align-items: start;
    }

    .basket-page__img {
        width: 92px;
        height: 74px;
        border-radius: 13px;
    }

    .basket-qty {
        grid-column: 2 / 3;
        width: 128px;
        margin-top: 2px;
    }

    .basket-row-sum {
        grid-column: 2 / 3;
        text-align: left;
        margin-top: 4px;
    }

    .basket-delete {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        width: 34px;
        height: 34px;
        justify-self: end;
    }

    .basket-total {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .basket-total-sum {
        font-size: 23px;
    }

    .delivery-map {
        height: 270px;
    }
}
