/* =============================================================================
   СТРАНИЦА КОРЗИНЫ — cart page styles
   Добавить в конец main.css
   Единицы: em (desktop) / vw (mobile 767px) / vw (tiny 479px)
   Все новые классы с префиксом cart-
============================================================================= */

/* ── Секция ─────────────────────────────────────────────────────────────────── */
.cart-section {
    padding-right: 1.04em;
    padding-left: 1.04em;
    margin-top: 5.04em;
}

.cart-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Заголовок ───────────────────────────────────────────────────────────────── */
.cart-head {
    display: flex;
    align-items: baseline;
    gap: 1.56em;
    margin-bottom: 2.08em;
}

.cart-back-link {
    color: #0006;
    font-size: .83em;
    text-decoration: none;
    transition: color .2s;
}

.cart-back-link:hover {
    color: #000;
}

/* ── Список товаров ──────────────────────────────────────────────────────────── */
.cart-items {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #0002;
}

/* ── Один товар ──────────────────────────────────────────────────────────────── */
.cart-item {
    display: grid;
    grid-template-columns: 10em 1fr;
    gap: 1.56em;
    padding: 1.56em 0;
    border-bottom: 1px solid #0002;
    align-items: start;
}

/* Колонка 1: фото */
.cart-item-col-img {
    width: 10em;
    aspect-ratio: 7 / 10;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: .52em;
}

/* Колонка 2: информация */
.cart-item-col-info {
    display: flex;
    flex-direction: column;
    gap: .52em;
    padding-top: .26em;
}

.cart-item-name {
	font-family: 'Pl 99 Delo 2';
    font-size: 1.54em;    text-decoration: none;
    color: #000;
    font-weight: 400;
    line-height: 1.3;
    transition: opacity .2s;
}

.cart-item-variation {
    font-size: .83em;
    color: #0006;
}

.cart-item-price {
    font-size: .94em;
    line-height: 100%;
}

/* Количество + удалить в строку — переиспользуем .count--btn и .remuve */
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: .83em;
    margin-top: .26em;
    flex-wrap: wrap;
}

/* Переопределяем ширину .count--btn для страницы корзины */
.cart-item-controls .count--btn {
    padding-left: 1.56em;
    padding-right: 1.56em;
    width: auto;
	min-width: 15vw;
}

/* ── Нижняя панель ────────────────────────────────────────────────────────────── */
.cart-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.17em;
    margin-top: 2.08em;
    padding-top: 1.56em;
    align-items: start;
}

/* Левая колонка: промокод */
.cart-bottom-col-left {
    display: flex;
    flex-direction: column;
    gap: .83em;
}

.cart-coupon-form {
    display: flex;
    gap: .52em;
    align-items: flex-end;
}

.cart-coupon-form .checkout-input {
    flex: 1;
    margin-bottom: 0;
}

/* Сообщение купона */
.cart-coupon-msg {
    font-size: .83em;
    min-height: 1.2em;
    line-height: 1.2;
}

.cart-coupon-msg.coupon-success { color: #3a7a3a; }
.cart-coupon-msg.coupon-error   { color: #b03030; }

/* Применённые купоны */
.cart-applied-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: .52em;
}

.cart-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: .42em;
    padding: .31em .62em;
    background-color: #eaeaea;
    border-radius: .52em;
    font-size: .83em;
}

.cart-coupon-tag-remove {
    cursor: pointer;
    opacity: .5;
    transition: opacity .2s;
    font-size: .78em;
    line-height: 1;
}

.cart-coupon-tag-remove:hover { opacity: 1; }

/* Доступные промокоды */
.cart-available-coupons {
    display: flex;
    flex-direction: column;
    gap: .52em;
    margin-top: .52em;
}

.cart-available-coupons-title {
    font-size: .83em;
    color: #0006;
}

.cart-available-coupon-item .coupon-btn {
    border: 1px dashed #0004;
    background: transparent;
    transition: border-style .2s, background .2s;
    gap: .52em;
}

.cart-available-coupon-item .coupon-btn:hover {
    border-style: solid;
    background-color: #eaeaea;
}

.cart-coupon-discount {
    color: #0006;
    font-size: .83em;
}

/* Правая колонка: итог + кнопка */
.cart-bottom-col-right {
    display: flex;
    flex-direction: column;
    gap: .83em;
    align-items: flex-end;
}

.cart-footer-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: .94em;
    color: #0009;
    line-height: 100%;
}

.cart-footer-total {
    font-size: 1.25em;
    color: #000;
}

.cart-footer-label {
    margin-right: 2.08em;
}

/* Кнопка оформить заказ — в стиле сайта */
.cart-checkout-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: .83em 2.08em;
    background-color: #c7c7c7;
    border-radius: .52em;
    color: #000;
    text-decoration: none;
    font-size: .94em;
    font-weight: 400;
    line-height: 100%;
    margin-top: .52em;
    transition: background-color .2s;
    box-sizing: border-box;
}

.cart-checkout-btn:hover {
    background-color: #b0b0b0;
    color: #000;
}

.cart-checkout-btn div {
    color: #000;
}

/* Сообщение пустой корзины */
.cart-empty-msg {
    padding: 2.08em 0;
    color: #0006;
    font-size: .94em;
}

/* ── Пустая корзина ───────────────────────────────────────────────────────────── */
.cart-empty-wrap {
    display: flex;
    flex-direction: column;
    gap: 4.17em;
}

.cart-empty-section {
    display: flex;
    flex-direction: column;
    gap: 1.56em;
}

.cart-order-item {
    display: flex;
    flex-direction: column;
    gap: 1.04em;
    padding-bottom: 2.08em;
    border-bottom: 1px solid #0002;
}

.cart-order-meta {
    display: flex;
    align-items: center;
    gap: 1.04em;
    font-size: .83em;
    color: #0006;
}

.cart-order-num {
    color: #000;
    font-size: .94em;
}

.cart-order-status {
    background-color: #eaeaea;
    border-radius: .52em;
    padding: .2em .52em;
}

/* ── Адаптив 767px ───────────────────────────────────────────────────────────── */
@media screen and (max-width: 767px) {

    .cart-section {
        padding-right: 2.56vw;
        padding-left: 2.56vw;
        margin-top: 8vh;
    }

    .cart-head {
        gap: 3.08vw;
        margin-bottom: 5.13vw;
        flex-direction: column;
    }

    .cart-back-link {
        font-size: 3.59vw;
    }

    .cart-item {
        grid-template-columns: 20.51vw 1fr;
        gap: 3.08vw;
        padding: 3.85vw 0;
    }

    .cart-item-col-img {
        width: 20.51vw;
    }

    .cart-item-col-info {
        gap: 1.54vw;
    }

    .cart-item-name {
        font-size: 3.59vw;
    }

    .cart-item-variation {
        font-size: 3.08vw;
    }

    .cart-item-price {
        font-size: 3.59vw;
    }

    .cart-item-controls {
        gap: 2.56vw;
        margin-top: 1.54vw;
    }

    .cart-bottom {
        grid-template-columns: 1fr;
        gap: 6.15vw;
        margin-top: 5.13vw;
        padding-top: 3.85vw;
    }

    .cart-bottom-col-right {
        align-items: stretch;
    }

    .cart-coupon-form {
        flex-direction: column;
        gap: 2.05vw;
    }

    .cart-coupon-msg {
        font-size: 3.08vw;
    }

    .cart-coupon-tag {
        font-size: 3.08vw;
        padding: 1.28vw 2.05vw;
    }

    .cart-available-coupons-title {
        font-size: 3.08vw;
    }

    .cart-footer-row {
        font-size: 3.59vw;
    }

    .cart-footer-total {
        font-size: 4.62vw;
    }

    .cart-checkout-btn {
        font-size: 3.59vw;
        padding: 3.08vw 5.13vw;
    }

    .cart-order-meta {
        font-size: 3.08vw;
        flex-wrap: wrap;
        gap: 2.05vw;
    }

    .cart-order-num {
        font-size: 3.59vw;
    }
}

/* ── Адаптив 479px ───────────────────────────────────────────────────────────── */
@media screen and (max-width: 479px) {

    .cart-section {
        padding-right: var(--1-04em);
        padding-left: var(--1-04em);
        margin-top: 20.51vw;
    }

    .cart-head {
        gap: 2.56vw;
        margin-bottom: 6.41vw;
    }

    .cart-back-link {
        font-size: 3.59vw;
    }

    .cart-item {
        grid-template-columns: 18vw 1fr;
        gap: 2.56vw;
        padding: 3.85vw 0;
    }

    .cart-item-col-img {
        width: 18vw;
    }

    .cart-item-name {
        font-size: 3.85vw;
    }

    .cart-item-price {
        font-size: 3.59vw;
    }

    .cart-item-controls .count--btn {
        padding-left: 2.56vw;
        padding-right: 2.56vw;
    }

    .cart-bottom {
        gap: 7.69vw;
        margin-top: 6.41vw;
        padding-top: 3.85vw;
    }

    .cart-footer-total {
        font-size: 5.13vw;
    }

    .cart-checkout-btn {
        font-size: 4.1vw;
        padding: 3.85vw 6.41vw;
        border-radius: 1.28vw;
    }

    .cart-coupon-tag {
        font-size: 3.08vw;
        border-radius: 1.28vw;
    }

    .cart-item-img {
        border-radius: 1.28vw;
    }
}

/* Применённый купон из списка — зелёный фон */
.cart-available-coupon-item .coupon-btn.coupon-applied {
    background-color: #d4edda;
    border-color: #3a7a3a;
    color: #3a7a3a;
    border-style: solid;
}

/* Крестик у применённого купона из списка */
.cart-coupon-tag {
    cursor: default;
}

/* =============================================================================
   WC Custom Checkout — стили в системе сайта умысел
   em на десктопе, vw на мобилке ≤767px
============================================================================= */

/* ── Layout ──────────────────────────────────────────────────────────────── */

.wcc-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3.13em;
}

.wcc-col--billing {
    display: flex;
    flex-direction: column;
    gap: 2.08em;
    width: 55%;
    box-sizing: border-box;
}

.wcc-col--order {
    display: flex;
    flex-direction: column;
    gap: 2.08em;
    width: 40%;
    box-sizing: border-box;
    position: sticky;
    top: 6.08em;
    max-height: calc(100vh - 8em);
    overflow-y: auto;
    scrollbar-width: none;
}

.wcc-col--order::-webkit-scrollbar { display: none; }

/* ── Секции ──────────────────────────────────────────────────────────────── */

.wcc-section {
    display: flex;
    flex-direction: column;
    gap: 1.04em;
}

.wcc-section > .h2 {
    border-bottom: 1px solid #0002;
    padding-bottom: .52em;
}

/* ── Поля левой колонки ──────────────────────────────────────────────────── */

.wcc-checkout .form-row { margin: 0 0 .83em; position: relative; }
.wcc-checkout .form-row label,
.wcc-checkout .wcc-hidden-label { display: none !important; }
.wcc-hidden-field,
.wcc-postcode-display { display: none !important; }

.wcc-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.04em;
}
.wcc-fields-grid .form-row { margin-bottom: .83em; }

.wcc-checkout .form-row.woocommerce-invalid input,
.wcc-checkout .form-row.woocommerce-invalid select { border-bottom-color: #c0392b; }

/* ── Подсказка адреса ────────────────────────────────────────────────────── */

.wcc-address-field { position: relative; }

.wcc-suggest-dropdown {
    display: none;
    position: fixed;
    z-index: 99999;
    background: #fffffffa;
    border: 1px solid #0002;
    border-radius: .52em;
    box-shadow: 0 .52em 1.56em rgba(0,0,0,.12);
    list-style: none !important;
    padding: .26em 0 !important;
    margin: 0 !important;
    max-height: 16em;
    overflow-y: auto;
    scrollbar-width: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.wcc-suggest-dropdown::-webkit-scrollbar { display: none; }

.wcc-suggest-dropdown .wcc-suggest-item,
.wcc-suggest-dropdown .wcc-suggest-msg {
    display: block;
    padding: .52em .83em;
    font-size: .83em;
    line-height: 1.3;
    color: #000;
    list-style: none !important;
    background-image: none !important;
    margin: 0 !important;
    text-indent: 0 !important;
}
.wcc-suggest-item { cursor: pointer; transition: background .15s; }
.wcc-suggest-item:hover,
.wcc-suggest-item.wcc-suggest-active { background: #0000000a !important; }
.wcc-suggest-item + .wcc-suggest-item { border-top: 1px solid #0001; }
.wcc-suggest-msg { color: #0006; font-style: italic; cursor: default; text-align: center; }

.wcc-postcode-hint { font-size: .73em; margin: .26em 0 0; min-height: 1em; transition: color .2s; }
.wcc-hint--success { color: #3a7a3a; }
.wcc-hint--warning { color: #c07020; }

.wcc-manual-toggle { margin: .26em 0 .52em; }
.wcc-manual-link { font-size: .73em; color: #0006; text-decoration: none; border-bottom: 1px dashed #0003; transition: color .2s; }
.wcc-manual-link:hover { color: #000; }
.wcc-manual-fields { background: #eaeaea; border-radius: .52em; padding: .83em; }

/* ── ПРАВАЯ КОЛОНКА ──────────────────────────────────────────────────────── */

/* Промокод — полностью как на странице корзины */
.cart-coupon-applied-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .52em;
    min-height: 0;
}

.coupon-remove-x {
    cursor: pointer;
    opacity: .45;
    font-size: .83em;
    margin-left: .26em;
    transition: opacity .2s;
}
.coupon-remove-x:hover { opacity: 1; }

.cart-coupon-form {
    display: flex;
    gap: .52em;
    align-items: center;
}
.cart-coupon-form .input-text { flex: 1; }

.cart-coupon-msg {
    font-size: .73em;
    min-height: 1em;
    line-height: 1.2;
}
.coupon-success { color: #3a7a3a; }
.coupon-error   { color: #c0392b; }

.cart-available-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: .52em;
}
.cart-available-coupon-item {
    display: flex;
    align-items: center;
    gap: .52em;
}
.cart-available-coupon-desc {
    font-size: .73em;
    color: #0007;
}
/* применённый купон из списка */
.coupon-btn.coupon-applied {
    background-color: #d4edda;
    border-color: #3a7a3a !important;
    color: #3a7a3a !important;
    border-style: solid !important;
}

/* ── Список товаров ──────────────────────────────────────────────────────── */

.wcc-items {
    display: flex;
    flex-direction: column;
    gap: 1.04em;
}

.wcc-item {
    display: flex;
    align-items: flex-start;
    gap: 1.04em;
}

.wcc-item-img {
    flex: 0 0 4.69em;
    width: 4.69em;
    height: 4.69em;
    border-radius: .26em;
    overflow: hidden;
    background: #eaeaea;
}
.wcc-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wcc-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .26em;
    min-width: 0;
}
.wcc-item-name {
    font-size: .83em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wcc-item-var {
    font-size: .73em;
    color: #0007;
}
.wcc-item-qty {
    font-size: .73em;
    color: #0007;
}
.wcc-item-price {
    font-size: .83em;
}

/* ── Кнопки доставки ─────────────────────────────────────────────────────── */

.wcc-shipping-btns {
    display: flex;
    flex-direction: column;
    gap: .52em;
}

.wcc-method-btn {
    display: flex;
    align-items: center;
    gap: .83em;
    padding: .73em 1.04em;
    border: 1px solid #0002;
    border-radius: .52em;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    user-select: none;
    box-sizing: border-box;
    width: 100%;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
}
.wcc-method-btn input[type=radio] {
    display: none;
}
.wcc-method-btn.is-selected {
    border-color: #0006;
    background: #0000000a;
}
.wcc-method-btn.is-selected .wcc-method-name {
    font-weight: 400;
}
.wcc-method-name {
    flex: 1;
    font-size: .83em;
    line-height: 1.2;
    text-align: left;
}
.wcc-method-price {
    font-size: .83em;
    color: #0008;
    white-space: nowrap;
}
.wcc-method-btn.is-selected .wcc-method-price {
    color: #000;
}

/* ── Итог ────────────────────────────────────────────────────────────────── */

.wcc-totals {
    gap: .52em;
}
.wcc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .83em;
    gap: 1em;
}
.wcc-total-row span:first-child { color: #0007; }
.wcc-total-row span:last-child  { text-align: right; }

.wcc-total-final {
    border-top: 1px solid #0002;
    padding-top: .73em;
    margin-top: .26em;
    font-size: 1em;
}
.wcc-total-final span:first-child { color: #000; }

/* ── Кнопки оплаты ───────────────────────────────────────────────────────── */

.wcc-payment-btns {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .52em;
}
.wcc-payment-btns li { padding: 0; border: none; background: none; }
.wcc-payment-btns label.wcc-method-btn { margin: 0; }

/* payment_box */
.payment_box {
    margin-top: .52em;
    font-size: .83em;
    color: #0009;
    background: #eaeaea;
    border-radius: .52em;
    padding: .73em .83em;
}

/* ── Кнопка оформить ─────────────────────────────────────────────────────── */

#place_order {
    width: 100%;
    margin-top: .52em;
}

/* ── Уведомления WC ──────────────────────────────────────────────────────── */

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    border-radius: .52em;
    padding: .73em .83em;
    margin-bottom: 1.04em;
    list-style: none;
    font-size: .83em;
    line-height: 1.3;
}
.woocommerce-error   { background: #fde8e8; color: #c0392b; }
.woocommerce-message { background: #e8f5e9; color: #3a7a3a; }
.woocommerce-info    { background: #eaeaea; color: #000; }

/* Прячем WC купонные уведомления на странице чекаута */
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info { display: none !important; }

/* ── Скрываем системный купон-тоггл WC если вдруг появится ──────────────── */
.woocommerce-form-coupon-toggle,
.checkout_coupon { display: none !important; }

/* =============================================================================
   АДАПТИВ 767px
============================================================================= */

@media screen and (max-width: 767px) {

    .wcc-layout {
        flex-direction: column;
        gap: 5.13vw;
    }

    .wcc-col--billing,
    .wcc-col--order {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    /* Заказ идёт первым на мобилке */
    .wcc-col--order { order: -1; }

    .wcc-section { gap: 3.08vw; }
    .wcc-section > .h2 { padding-bottom: 1.54vw; }

    .wcc-fields-grid { grid-template-columns: 1fr; gap: 0; }
    .wcc-checkout .form-row { margin-bottom: 2.56vw; }

    .wcc-item-img { flex: 0 0 15.38vw; width: 15.38vw; height: 15.38vw; }
    .wcc-item-name  { font-size: 3.59vw; }
    .wcc-item-var,
    .wcc-item-qty   { font-size: 3.08vw; }
    .wcc-item-price { font-size: 3.59vw; }

    .wcc-method-btn { padding: 2.56vw 3.08vw; border-radius: 1.28vw; }
    .wcc-method-name  { font-size: 3.59vw; }
    .wcc-method-price { font-size: 3.08vw; }

    .wcc-total-row { font-size: 3.59vw; }
    .wcc-total-final { padding-top: 2.56vw; margin-top: 1.28vw; font-size: 4.1vw; }

    .payment_box { font-size: 3.08vw; border-radius: 1.28vw; }

    .wcc-suggest-dropdown .wcc-suggest-item,
    .wcc-suggest-dropdown .wcc-suggest-msg { font-size: 3.59vw; padding: 2.05vw 3.08vw; }

    .wcc-postcode-hint { font-size: 3.08vw; }
    .wcc-manual-link   { font-size: 3.08vw; }
    .cart-coupon-msg   { font-size: 3.08vw; }
}

/* =============================================================================
   АДАПТИВ 479px
============================================================================= */

@media screen and (max-width: 479px) {

    .wcc-layout { gap: 7.69vw; }
    .wcc-section { gap: 2.56vw; }
    .wcc-checkout .form-row { margin-bottom: 3.85vw; }

    .wcc-item-img { flex: 0 0 17.95vw; width: 17.95vw; height: 17.95vw; }
    .wcc-manual-fields { border-radius: 1.28vw; }

    .wcc-method-btn { border-radius: 1.54vw; }
}

