/* ==========================================================================
   Интернет-магазин: цена и кнопки в карточках, корзина в шапке, «Купить в 1 клик»,
   страница корзины, уведомления
   ========================================================================== */

/* Цена */
.price {
    color: #333;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.price__from {
    margin-right: 2px;
    color: #8a8a8a;
    font-size: 15px;
    font-weight: 400;
}
.price--request {
    color: #8a8a8a;
    font-size: 16px;
    font-weight: 500;
    white-space: normal;
}

/* Анонс товара в листинге, поиске, «Других товарах» */
.products__item .products__name {
    margin-bottom: 16px;
}
.products__item .price {
    margin: 0 0 18px;
    text-align: center;
}
.shop-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.shop-actions--list .products__orangeBtn {
    width: 100%;
}
.shop-actions__oneclick {
    margin-top: 14px;
    padding: 2px 0;
    border: 0;
    border-bottom: 1px dashed currentColor;
    background: none;
    color: #ea6032;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s;
}
.shop-actions__oneclick:hover {
    color: #dd4817;
}
.js-add2cart.is-in-cart {
    background: #fff;
    box-shadow: inset 0 0 0 2px #ea6032;
    color: #ea6032;
}
.js-add2cart.is-in-cart::after {
    content: "\00a0→";
}
.js-add2cart.is-in-cart:hover {
    background: #fdefea;
}
.shop-actions button[disabled] {
    cursor: progress;
    opacity: .6;
}

/* Карточка товара */
.shop-buy {
    margin: 0 0 50px;
}
.shop-buy .price {
    margin: 0 0 24px;
    font-size: 34px;
    text-align: center;
}
.shop-buy .price__from {
    font-size: 20px;
}
.shop-buy .price--request {
    font-size: 20px;
}
.shop-actions--detail {
    flex-flow: row wrap;
    justify-content: center;
    gap: 16px;
}
.shop-actions--detail .products__orangeBtn {
    width: 260px;
    max-width: 100%;
    margin: 0;
}
.shop-actions--detail .shop-actions__oneclick {
    height: 76px;
    margin: 0;
    padding: 0 32px;
    border: 1px solid #ea6032;
    background: #fff;
    font-size: 16px;
    letter-spacing: .78px;
    transition: background-color .3s, color .3s;
}
.shop-actions--detail .shop-actions__oneclick:hover {
    background: #ea6032;
    color: #fff;
}
@media (max-width: 638px) {
    /* количество и «В корзину» в одну строку, «Купить в 1 клик» — под ними на всю ширину */
    .shop-actions--detail {
        gap: 12px;
    }
    .shop-actions--detail .shop-qty {
        height: 64px;
    }
    .shop-actions--detail .shop-qty__btn {
        width: 38px;
    }
    .shop-actions--detail .products__orangeBtn {
        flex: 1 1 160px;
        width: auto;
        height: 64px;
    }
    .shop-actions--detail .shop-actions__oneclick {
        width: 100%;
        height: 64px;
    }
}
@media (min-width: 639px) {
    /* количество, «В корзину» и «Купить в 1 клик» — в одну строку, кнопки делят место поровну */
    .shop-actions--detail {
        flex-wrap: nowrap;
    }
    .shop-actions--detail .shop-qty {
        flex-shrink: 0;
    }
    .shop-actions--detail .shop-qty__btn {
        width: 36px;
    }
    .shop-actions--detail .shop-qty__input {
        width: 46px;
    }
    .shop-actions--detail .products__orangeBtn,
    .shop-actions--detail .shop-actions__oneclick {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        max-width: 240px;
        padding: 0 10px;
        line-height: 1.2;
    }
    .shop-actions--detail .shop-actions__oneclick {
        font-size: 14px;
        letter-spacing: .5px;
    }
}
@media (min-width: 1329px) {
    .shop-buy .price {
        text-align: left;
    }
    .shop-actions--detail {
        justify-content: flex-start;
    }
}
.cartBox__img--noimage {
    width: 100%;
    max-width: 360px;
    height: auto;
    object-fit: contain;
}

/* Количество */
.shop-qty {
    display: inline-flex;
    align-items: stretch;
    height: 76px;
    border: 1px solid #e3e3e3;
    background: #fff;
}
.shop-qty__btn {
    width: 44px;
    border: 0;
    background: none;
    color: #333;
    font-family: inherit;
    font-size: 22px;
    cursor: pointer;
    transition: color .2s;
}
.shop-qty__btn:hover {
    color: #ea6032;
}
.shop-qty__input {
    width: 52px;
    max-width: none;
    height: 100%;
    border: 0;
    background: transparent;
    color: #333;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
.shop-qty__input::-webkit-outer-spin-button,
.shop-qty__input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

/* Корзина в шапке */
.hcart {
    position: relative;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid #c1c1c1;
    border-radius: 50%;
    color: #fff;
    transition: background-color .2s, border-color .2s;
}
.hcart:hover,
.hcart:focus-visible {
    background-color: #ea6032;
    border-color: #ea6032;
    color: #fff;
}
.hcart__icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hcart__count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ea6032;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.hcart:hover .hcart__count {
    background: #fff;
    color: #ea6032;
}
.hcart__count[hidden] {
    display: none;
}

/* Телефоны: поиск, корзина и «Написать нам» — три круглые иконки */
@media (max-width: 638px) {
    .hcart {
        width: 44px;
        height: 44px;
    }
    .header__tools .social__title {
        display: none;
    }
    .header .header__tools .social {
        padding: 8px;
    }
}
@media (max-width: 370px) {
    .hcart {
        width: 40px;
        height: 40px;
    }
    .header .header__tools .social {
        padding: 6px;
    }
}

/* Уведомление */
.shop-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 10000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    max-width: calc(100% - 32px);
    padding: 16px 22px;
    background: #22282d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 150%);
    transition: transform .25s, opacity .25s;
}
.shop-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
.shop-toast__link {
    color: #ea6032;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* «Купить в 1 клик» */
.shop-modal .modal-content {
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}
.shop-oneclick__product {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 16px;
    padding: 12px;
    background: #fff;
}
.shop-oneclick__image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.shop-oneclick__name {
    margin-bottom: 6px;
    color: #333;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}
.shop-oneclick .price {
    font-size: 18px;
}
.shop-oneclick .price--request {
    font-size: 14px;
}
.shop-oneclick__text {
    margin: 0 0 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

/* Ошибки форм */
.shop-form__error {
    margin: -12px 0 16px;
    color: #d93025;
    font-size: 13px;
    line-height: 1.4;
}
.shop-form__error--common {
    margin: 16px 0 0;
}
.shop-form .is-error .myform__input,
.shop-form .is-error textarea {
    box-shadow: inset 0 0 0 1px #d93025;
}
.shop-form .checkbox.is-error .checkbox__label:before {
    box-shadow: inset 0 0 0 1px #d93025;
}

/* Спасибо за заказ */
.shop-thanks {
    padding: 10px 0;
    text-align: center;
}
.shop-thanks__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #ea6032 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 30px no-repeat;
}
.shop-thanks__title {
    margin-bottom: 16px;
    color: #333;
}
.shop-thanks__text {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.6;
}
.shop-thanks__phone {
    white-space: nowrap;
}

/* Страница корзины */
.cart-page {
    max-width: 1550px;
    margin: 0 auto 80px;
    padding: 30px 20px 40px;
    border: 1px solid #f5f5f5;
    background: #fff;
    box-shadow: 0 25px 150px #cbcbcb40;
}
@media (min-width: 639px) {
    .cart-page {
        padding: 50px 45px;
    }
}
.cart-empty {
    padding: 30px 0;
    text-align: center;
}
.cart-empty__text {
    margin: 0 0 24px;
    font-size: 18px;
}
.cart-empty__btn {
    height: 64px;
    padding: 0 40px;
}
.cart-list__head {
    display: none;
}
.cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas:
        "img name remove"
        "img price price"
        "qty qty sum";
    gap: 8px 16px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    transition: opacity .2s;
}
.cart-item.is-loading {
    opacity: .5;
}
.cart-item__image {
    grid-area: img;
    align-self: start;
}
.cart-item__image img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #f7f7f7;
}
.cart-item__name {
    grid-area: name;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}
.cart-item__name:hover {
    color: #ea6032;
}
.cart-item__price {
    grid-area: price;
    color: #555;
    font-size: 15px;
}
.cart-item__label,
.cart-item__unit {
    color: #8a8a8a;
    font-size: 13px;
}
.cart-item__qty {
    grid-area: qty;
    justify-self: start;
    height: 48px;
}
.cart-item__qty .shop-qty__btn {
    width: 40px;
}
.cart-item__sum {
    grid-area: sum;
    color: #333;
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}
.cart-item__remove {
    position: relative;
    grid-area: remove;
    align-self: start;
    justify-self: end;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    cursor: pointer;
}
.cart-item__remove::before,
.cart-item__remove::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    margin: -1px 0 0 -8px;
    background: #b5b5b5;
    transform: rotate(45deg);
    transition: background-color .2s;
}
.cart-item__remove::after {
    transform: rotate(-45deg);
}
.cart-item__remove:hover::before,
.cart-item__remove:hover::after {
    background: #ea6032;
}
.cart-list__total {
    padding: 24px 0 0;
    text-align: right;
}
.cart-list__sum {
    color: #333;
    font-size: 20px;
}
.cart-list__sum b {
    font-size: 26px;
}
.cart-list__note {
    margin: 8px 0 0;
    color: #8a8a8a;
    font-size: 14px;
    line-height: 1.5;
}
@media (min-width: 940px) {
    .cart-list__head,
    .cart-item {
        grid-template-columns: 80px 1fr 170px 150px 170px 40px;
        column-gap: 24px;
    }
    .cart-list__head {
        display: grid;
        padding: 0 0 14px;
        border-bottom: 1px solid #eee;
        color: #8a8a8a;
        font-size: 13px;
        letter-spacing: .5px;
        text-transform: uppercase;
    }
    .cart-list__head span:first-child {
        grid-column: 1 / 3;
    }
    .cart-item {
        grid-template-areas: "img name price qty sum remove";
    }
    .cart-item__image,
    .cart-item__remove {
        align-self: center;
    }
    .cart-item__image img {
        width: 80px;
        height: 80px;
    }
    .cart-item__label {
        display: none;
    }
}

/* Оформление заказа */
.cart-checkout {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #f2f2f2;
}
.cart-checkout[hidden] {
    display: none;
}
.cart-checkout__title {
    margin: 0 0 10px;
    color: #333;
}
.cart-checkout__text {
    margin: 0 0 30px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}
.cart-checkout__fields {
    display: grid;
    column-gap: 28px;
}
@media (min-width: 768px) {
    .cart-checkout__fields {
        grid-template-columns: repeat(2, 1fr);
    }
    .cart-checkout__comment {
        grid-column: 1 / -1;
    }
}
.cart-checkout .myform__item {
    border: 1px solid #ececec;
    background: #f9f9f9;
}
.cart-checkout textarea {
    display: block;
    min-height: 120px;
    padding: 40px 35px 15px;
    background: transparent;
}
.cart-checkout__consent {
    margin: 4px 0 28px;
}
.cart-checkout__btn {
    height: 76px;
    padding: 0 48px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}
.cart-checkout__btn[disabled] {
    cursor: progress;
    opacity: .6;
}

/* Цена в подсказках поиска */
.hsearch__price {
    color: #333;
    font-size: 13px;
    font-weight: 700;
}
.hsearch__price--request {
    color: #8a8a8a;
    font-weight: 400;
}
