/* =============================================================================
   WC ORDER REVIEW — стили для стандартных элементов внутри #order_review
   Добавить в конец main.css
   Эти стили нужны потому что WC рендерит таблицу и оплату через свои шаблоны
============================================================================= */

/* ── Таблица товаров ─────────────────────────────────────────────────────── */

.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .83em;
    line-height: 1.4;
    margin-bottom: 1.04em;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: .52em .26em;
    border-bottom: 1px solid #0001;
    vertical-align: middle;
}

.woocommerce-checkout-review-order-table thead th {
    font-weight: 400;
    color: #0006;
    font-size: .83em;
    border-bottom: 1px solid #0002;
    padding-bottom: .52em;
}

/* Скрываем заголовок таблицы — у нас нет места для него */
.woocommerce-checkout-review-order-table thead {
    display: none;
}

/* Строка товара */
.woocommerce-checkout-review-order-table .cart_item td {
    padding: .52em 0;
}

.woocommerce-checkout-review-order-table .product-name {
    text-align: left;
    color: #000;
}

.woocommerce-checkout-review-order-table .product-total {
    text-align: right;
    white-space: nowrap;
}

/* Количество товара */
.woocommerce-checkout-review-order-table .product-quantity {
    color: #0006;
    font-weight: 400;
}

/* Вариации товара */
.woocommerce-checkout-review-order-table .variation {
    font-size: .83em;
    color: #0006;
    margin-top: .26em;
}
.woocommerce-checkout-review-order-table .variation dt,
.woocommerce-checkout-review-order-table .variation dd {
    display: inline;
    margin: 0;
}
.woocommerce-checkout-review-order-table .variation dd::after {
    content: ', ';
}
.woocommerce-checkout-review-order-table .variation dd:last-child::after {
    content: '';
}

/* ── Подытог, скидки, доставка, итого (tfoot) ────────────────────────────── */

.woocommerce-checkout-review-order-table tfoot tr th,
.woocommerce-checkout-review-order-table tfoot tr td {
    padding: .42em 0;
    border-bottom: 1px solid #0001;
    font-size: .83em;
    font-weight: 400;
}

.woocommerce-checkout-review-order-table tfoot tr th {
    text-align: left;
    color: #0007;
}

.woocommerce-checkout-review-order-table tfoot tr td {
    text-align: right;
}

/* Строка «Итого» — крупнее */
.woocommerce-checkout-review-order-table tfoot .order-total th,
.woocommerce-checkout-review-order-table tfoot .order-total td {
    font-size: 1em;
    color: #000;
    border-top: 1px solid #0002;
    border-bottom: none;
    padding-top: .73em;
}

/* ── Способы доставки ────────────────────────────────────────────────────── */

.woocommerce-shipping-totals td {
    padding: .42em 0 !important;
}

/* Список методов */
.woocommerce-shipping-methods {
    list-style: none !important;
    padding: 0 !important;
    margin: .52em 0 0 !important;
    display: flex;
    flex-direction: column;
    gap: .42em;
}

.woocommerce-shipping-methods li {
    display: flex;
    align-items: center;
    gap: .52em;
    padding: .62em .83em;
    border: 1px solid #0002;
    border-radius: .52em;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-size: .83em;
    line-height: 1.2;
    list-style: none !important;
}

.woocommerce-shipping-methods li:has(input:checked) {
    border-color: #0005;
    background: #0000000a;
}

.woocommerce-shipping-methods li label {
    cursor: pointer;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: .52em;
    flex: 1;
    margin: 0;
}

.woocommerce-shipping-methods li input[type="radio"] {
    accent-color: #000;
    width: .83em;
    height: .83em;
    flex-shrink: 0;
}

/* Нет методов доставки */
.woocommerce-shipping-methods .shipping-unavailable {
    color: #0006;
    font-style: italic;
    padding: .52em 0;
    border: none;
    background: none;
}

/* ── Способы оплаты ──────────────────────────────────────────────────────── */

/* WC добавляет заголовок через хук — скрываем т.к. у нас свой h2 нет, но это стандартно */
.wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1.04em !important;
    display: flex;
    flex-direction: column;
    gap: .52em;
}

.wc_payment_methods li {
    padding: 0;
    border: none;
    background: none;
    list-style: none !important;
}

.wc_payment_methods li label {
    display: flex;
    align-items: center;
    gap: .62em;
    padding: .73em .83em;
    border: 1px solid #0002;
    border-radius: .52em;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-size: .83em;
    font-weight: 400;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.wc_payment_methods li.payment_method_selected label,
.wc_payment_methods li:has(input:checked) label {
    border-color: #0005;
    background: #0000000a;
}

.wc_payment_methods li input[type="radio"] {
    accent-color: #000;
    flex-shrink: 0;
}

/* Логотип платёжного метода */
.wc_payment_methods li label img {
    max-height: 1.25em;
    vertical-align: middle;
}

/* Описание метода оплаты */
.payment_box {
    margin: .42em 0 .52em;
    font-size: .83em;
    color: #0009;
    background: #eaeaea;
    border-radius: .52em;
    padding: .73em .83em;
    line-height: 1.4;
}

/* ── Условия использования ───────────────────────────────────────────────── */

.woocommerce-terms-and-conditions-wrapper {
    margin: .83em 0;
    font-size: .73em;
    color: #0007;
    line-height: 1.4;
}

.woocommerce-privacy-policy-text {
    font-size: .73em;
    color: #0006;
    margin-bottom: .52em;
}

/* ── Кнопка «Оформить заказ» ─────────────────────────────────────────────── */

#place_order {
    width: 100%;
    margin-top: .52em;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .83em 2.08em;
    background-color: #c7c7c7;
    border-radius: .52em;
    color: #000;
    font-size: .94em;
    font-weight: 400;
    line-height: 100%;
    cursor: pointer;
    border: none;
    transition: background-color .2s;
    box-sizing: border-box;
}

#place_order:hover {
    background-color: #b0b0b0;
}

#place_order:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Уведомления WC (ошибки валидации) ───────────────────────────────────── */

.woocommerce-NoticeGroup,
.woocommerce-NoticeGroup-checkout {
    margin-bottom: 1.04em;
}

.woocommerce-error {
    background: #fde8e8;
    color: #c0392b;
    border-radius: .52em;
    padding: .73em .83em;
    margin-bottom: 1.04em;
    list-style: none !important;
    font-size: .83em;
    line-height: 1.3;
}

.woocommerce-error li {
    list-style: none !important;
    padding: .26em 0;
}

/* ── Заголовок секции оплаты (рендерится через хук WC) ───────────────────── */

/* Если плагин добавляет h3 через woocommerce_review_order_before_payment — стилизуем */
.wcc-payment-title,
.wcc-section-title {
    font-family: "Pl 99 Delo 2", Impact, sans-serif;
    font-size: 1.25em;
    font-weight: 400;
    line-height: 110%;
    margin: .83em 0 .52em;
    border-bottom: 1px solid #0002;
    padding-bottom: .52em;
}

/* ── Адаптив 767px ───────────────────────────────────────────────────────── */

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

    .woocommerce-checkout-review-order-table {
        font-size: 3.08vw;
    }

    .woocommerce-shipping-methods li {
        font-size: 3.08vw;
        padding: 2.56vw 3.08vw;
        border-radius: 1.28vw;
    }

    .wc_payment_methods li label {
        font-size: 3.08vw;
        padding: 2.56vw 3.08vw;
        border-radius: 1.28vw;
    }

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

    #place_order {
        font-size: 3.59vw;
        padding: 3.08vw 5.13vw;
        border-radius: 1.28vw;
    }

    .woocommerce-terms-and-conditions-wrapper,
    .woocommerce-privacy-policy-text {
        font-size: 3.08vw;
    }
}

/* ── Адаптив 479px ───────────────────────────────────────────────────────── */

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

    .woocommerce-shipping-methods li {
        border-radius: 1.54vw;
    }

    .wc_payment_methods li label {
        border-radius: 1.54vw;
    }

    .payment_box {
        border-radius: 1.54vw;
    }

    #place_order {
        border-radius: 1.54vw;
    }
}

/* =============================================================================
   ЧЕКАУТ — uco- (umysel checkout)
   Добавить в конец main.css, заменив предыдущий блок чекаута
============================================================================= */

.uco-page {
    padding: var(--1-04em);
    margin-top: 5.04em;
}

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

.uco-col--left {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 2.08em;
}

.uco-col--right {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 1.56em;
    position: sticky;
    top: 6.08em;
    max-height: calc(100vh - 8em);
    overflow-y: auto;
    scrollbar-width: none;
}
.uco-col--right::-webkit-scrollbar { display: none; }

.uco-block {
    display: flex;
    flex-direction: column;
    gap: 1.04em;
}
.uco-block > .h2 {
    border-bottom: 1px solid #0002;
    padding-bottom: .52em;
}

/* ── Поля WooCommerce ────────────────────────────────────────────────────── */

.uco-form .form-row {
    margin: 0 0 .83em;
    padding: 0;
    position: relative;
}

.uco-form .form-row > label:not(.woocommerce-form__label-for-checkbox) {
    display: none !important;
}

.uco-form input[type="text"],
.uco-form input[type="email"],
.uco-form input[type="tel"],
.uco-form input[type="password"],
.uco-form select,
.uco-form textarea {
    color: #000;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #0006;
    border-radius: 0;
    width: 100%;
    padding: .42em .52em;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    margin-bottom: 0;
    display: block;
}

.uco-form input::placeholder,
.uco-form textarea::placeholder { color: #0009; }

.uco-form input:focus,
.uco-form textarea:focus,
.uco-form select:focus {
    border-bottom-color: #000;
    outline: none;
    box-shadow: none;
}

.uco-form .woocommerce-invalid input,
.uco-form .woocommerce-invalid select,
.uco-form .woocommerce-invalid textarea {
    border-bottom-color: #c0392b;
}

.uco-form .form-row-first,
.uco-form .form-row-last {
    display: inline-block;
    width: calc(50% - .52em);
    vertical-align: top;
}
.uco-form .form-row-first { margin-right: 1.04em; }
.uco-form .form-row-wide  { display: block; width: 100%; }

.uco-form textarea {
    border: 1px solid #0003;
    border-radius: .52em;
    min-height: 5em;
    padding: .52em .83em;
    resize: vertical;
}
.uco-form textarea:focus { border-color: #0006; }

.uco-form .woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center;
    gap: .52em;
    font-weight: 400;
    cursor: pointer;
    font-size: .83em;
}
.uco-form input[type="checkbox"] {
    width: auto;
    border-bottom: none;
    accent-color: #000;
    flex-shrink: 0;
    display: inline-block;
}
.uco-form .woocommerce-input-wrapper {
    display: block;
    width: 100%;
}

/* ── WC Notices ──────────────────────────────────────────────────────────── */
.woocommerce-NoticeGroup { margin-bottom: 1.04em; }

.woocommerce-error {
    background: #fde8e8;
    color: #c0392b;
    border-radius: .52em;
    padding: .73em .83em;
    padding-left: .83em !important;
    margin-bottom: .52em;
    list-style: none !important;
    font-size: .83em;
    line-height: 1.4;
}
.woocommerce-error li { list-style: none !important; }

.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info { display: none !important; }
.woocommerce-form-coupon-toggle,
.checkout_coupon { display: none !important; }

/* ── Товары ──────────────────────────────────────────────────────────────── */
.uco-items {
    display: flex;
    flex-direction: column;
    gap: 1.04em;
}

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

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

.uco-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .26em;
}
.uco-item-name { font-size: .83em; line-height: 1.3; color: #000; }
.uco-item-qty  { color: #0006; }
.uco-item-info .variation { font-size: .73em; color: #0006; }
.uco-item-info .variation dt,
.uco-item-info .variation dd { display: inline; margin: 0; }
.uco-item-info .variation dd::after { content: ', '; }
.uco-item-info .variation dd:last-child::after { content: ''; }
.uco-item-price { font-size: .83em; color: #000; }

/* ── Методы (доставка и оплата — единый компонент) ───────────────────────── */
.uco-methods,
.uco-gateways {
    display: flex;
    flex-direction: column;
    gap: .52em;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.uco-gateways li {
    list-style: none !important;
    padding: 0;
    border: none;
    background: none;
}

.uco-method {
    display: flex;
    align-items: center;
    gap: .73em;
    padding: .73em .83em;
    border: 1px solid #0002;
    border-radius: .52em;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    box-sizing: border-box;
    width: 100%;
    font-family: inherit;
    font-size: .83em;
    font-weight: 400;
    line-height: 1.2;
    background: transparent;
    margin: 0;
}
.uco-method.is-active {
    border-color: #0005;
    background: #0000000a;
}
.uco-method input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.uco-method-name  { flex: 1; text-align: left; }
.uco-method-price { color: #0008; white-space: nowrap; font-size: .9em; }
.uco-method.is-active .uco-method-price { color: #000; }
.uco-method-icon img { max-height: 1.2em; vertical-align: middle; opacity: .8; }

.uco-shipping-placeholder {
    font-size: .83em;
    color: #0006;
    margin: 0;
    font-style: italic;
}

.payment_box {
    margin: .26em 0 .52em;
    padding: .73em .83em;
    background: #eaeaea;
    border-radius: .52em;
    font-size: .83em;
    color: #0009;
    line-height: 1.4;
}

/* ── Итого ───────────────────────────────────────────────────────────────── */
.uco-totals { gap: .52em !important; }

.uco-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .83em;
    gap: 1em;
}
.uco-total-row > span:first-child { color: #0007; }
.uco-total-row > span:last-child  { text-align: right; }
.uco-total-discount > span:first-child,
.uco-total-discount > span:last-child { color: #3a7a3a; }
.uco-total-final {
    border-top: 1px solid #0002;
    padding-top: .73em;
    margin-top: .26em;
    font-size: 1em;
}
.uco-total-final > span:first-child { color: #000; }

/* ── Условия ─────────────────────────────────────────────────────────────── */
.woocommerce-terms-and-conditions-wrapper {
    margin: .52em 0;
    font-size: .73em;
    color: #0007;
    line-height: 1.4;
}
.woocommerce-privacy-policy-text { font-size: .73em; color: #0006; margin-bottom: .52em; }
.woocommerce-terms-and-conditions-wrapper a { color: #000; text-decoration: underline; }

/* ── Кнопка «Оформить заказ» ─────────────────────────────────────────────── */
#place_order {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: .83em 2.08em;
    background-color: #c7c7c7 !important;
    border-radius: .52em !important;
    color: #000 !important;
    font-size: .94em;
    font-weight: 400;
    line-height: 100%;
    cursor: pointer;
    border: none !important;
    font-family: inherit;
    transition: background-color .2s;
    box-sizing: border-box;
    margin-top: .52em;
}
#place_order:hover    { background-color: #b0b0b0 !important; }
#place_order:disabled { opacity: .6; cursor: not-allowed; }

/* =============================================================================
   АДАПТИВ 767px
============================================================================= */
@media screen and (max-width: 767px) {

    .uco-page { margin-top: 8vh; }

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

    .uco-col--left,
    .uco-col--right {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    .uco-col--right { order: -1; }

    .uco-block { gap: 3.08vw; }
    .uco-block > .h2 { padding-bottom: 1.54vw; }

    .uco-form .form-row-first,
    .uco-form .form-row-last { width: 100%; display: block; margin-right: 0; }
    .uco-form .form-row { margin-bottom: 2.56vw; }

    .uco-item-img  { flex: 0 0 13.85vw; width: 13.85vw; height: 17.31vw; }
    .uco-item-name { font-size: 3.08vw; }
    .uco-item-price { font-size: 3.08vw; }

    .uco-method { font-size: 3.08vw; padding: 2.56vw 3.08vw; border-radius: 1.28vw; gap: 2.05vw; }
    .payment_box { font-size: 3.08vw; border-radius: 1.28vw; }

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

    #place_order {
        font-size: 3.59vw !important;
        padding: 3.08vw 5.13vw !important;
        border-radius: 1.28vw !important;
    }

    .woocommerce-terms-and-conditions-wrapper,
    .woocommerce-privacy-policy-text { font-size: 3.08vw; }
}

/* =============================================================================
   АДАПТИВ 479px
============================================================================= */
@media screen and (max-width: 479px) {

    .uco-page    { margin-top: 20.51vw; }
    .uco-layout  { gap: 7.69vw; }
    .uco-block   { gap: 2.56vw; }
    .uco-form .form-row { margin-bottom: 3.85vw; }

    .uco-method  { border-radius: 1.54vw; }
    .payment_box { border-radius: 1.54vw; }
    #place_order { border-radius: 1.54vw !important; }
}

/* ── Хинт «уже есть аккаунт» ────────────────────────────────────────────── */
.uco-login-hint {
    flex-direction: row !important;
    align-items: center;
    gap: .52em;
    font-size: .83em;
    color: #0007;
    padding-bottom: .83em;
    border-bottom: 1px solid #0002;
}
.uco-login-link {
    color: #000;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity .2s;
}
.uco-login-link:hover { opacity: .6; }

/* ── Убираем заголовок «Платёжные реквизиты» от WC ─────────────────────── */
.uco-form .woocommerce-billing-fields > h3,
.uco-form .woocommerce-billing-fields__field-wrapper > h3 {
    display: none !important;
}

/* ── Плейсхолдер доставки (мобилка) ─────────────────────────────────────── */
@media screen and (max-width: 767px) {
    .uco-login-hint { font-size: 3.08vw; }
}

