/*
 * Кастомные стили корзины и оформления заказа — Сограда
 * Путь: your-theme/assets/css/woocommerce-cart.css
 *
 * Переменные сайта:
 *   Акцент:       #FFCF3D
 *   Текст тёмный: rgba(3,3,6,0.88)
 *   Фон тёмный:   #030306
 *   Шрифт:        'Unbounded', sans-serif
 *   Радиус:       12px (кнопки), 16px (карточки)
 */

/* ─────────────────────────────────────────────────
   0. RESET / BASE
───────────────────────────────────────────────── */
.sgr-cart *,
.sgr-checkout * {
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────
   1. КНОПКИ
───────────────────────────────────────────────── */
.sgr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
    white-space: nowrap;
    line-height: 1;
}

/* Основная — жёлтая */
.sgr-btn--primary {
    background: #FFCF3D;
    color: rgba(3, 3, 6, 0.88);
    border-color: #FFCF3D;
}
.sgr-btn--primary:hover {
    background: #f0c030;
    border-color: #f0c030;
    color: rgba(3, 3, 6, 0.88);
}

/* Контурная */
.sgr-btn--outline {
    background: transparent;
    color: rgba(3, 3, 6, 0.88);
    border-color: rgba(3, 3, 6, 0.2);
}
.sgr-btn--outline:hover {
    border-color: rgba(3, 3, 6, 0.5);
    background: rgba(3, 3, 6, 0.04);
}

/* Ghost / текстовая */
.sgr-btn--ghost {
    background: transparent;
    color: rgba(3, 3, 6, 0.55);
    border-color: transparent;
    font-size: 13px;
    padding: 12px 16px;
}
.sgr-btn--ghost:hover {
    color: rgba(3, 3, 6, 0.88);
    background: rgba(3, 3, 6, 0.05);
    border-radius: 12px;
}

/* ─────────────────────────────────────────────────
   2. ОБЁРТКА
───────────────────────────────────────────────── */
.sgr-cart,
.sgr-checkout {
    /* max-width: 1200px;
    margin: 0 auto; */
    margin-top: 20px;
    /* padding: 48px 24px 80px; */
    font-family: 'Unbounded', sans-serif;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-cart {
    display: flex;
    gap: 30px;
}

.sgr-cart-collaterals {
    min-width: 350px;
}


/* ─────────────────────────────────────────────────
   3. ПУСТАЯ КОРЗИНА
───────────────────────────────────────────────── */
.sgr-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    gap: 20px;
}

.sgr-cart-empty__icon {
    width: 112px;
    height: 112px;
    background: rgba(255, 207, 61, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgr-cart-empty__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-cart-empty__text {
    font-size: 14px;
    color: rgba(3, 3, 6, 0.5);
    margin: 0;
    max-width: 320px;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────
   4. ТАБЛИЦА КОРЗИНЫ
───────────────────────────────────────────────── */
.sgr-cart-table {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(3, 3, 6, 0.07);
    /* margin-bottom: 24px; */
}

.sgr-cart-table__head {
    display: grid;
    grid-template-columns: 1fr 120px 140px 120px 48px;
    gap: 0;
    background: #030306;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sgr-cart-table__head .sgr-cart-table__col {
    padding: 16px 20px;
}

.sgr-cart-table__row {
    display: grid;
    grid-template-columns: 1fr 120px 140px 120px 48px;
    align-items: center;
    border-bottom: 1px solid rgba(3, 3, 6, 0.07);
    transition: background 0.15s;
}
.sgr-cart-table__row:last-child {
    border-bottom: none;
}
.sgr-cart-table__row:hover {
    background: rgba(255, 207, 61, 0.04);
}

.sgr-cart-table__col {
    padding: 20px;
}

.sgr-cart-table__col--price,
.sgr-cart-table__col--total {
    font-weight: 600;
    font-size: 15px;
}

.sgr-cart-table__col--total {
    color: rgba(3, 3, 6, 0.88);
}

/* ─────────────────────────────────────────────────
   5. ЭЛЕМЕНТ КОРЗИНЫ (товар)
───────────────────────────────────────────────── */
.sgr-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sgr-cart-item__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

.sgr-cart-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sgr-cart-item__thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.sgr-cart-item__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-cart-item__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}
.sgr-cart-item__name a:hover {
    color: #030306;
    text-decoration: unset;
}

.sgr-cart-item__price-mobile {
    display: none;
    font-size: 13px;
    color: rgba(3, 3, 6, 0.5);
    margin-top: 4px;
}

/* ─────────────────────────────────────────────────
   6. КНОПКА УДАЛЕНИЯ
───────────────────────────────────────────────── */
.sgr-cart-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: rgba(3, 3, 6, 0.35);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.sgr-cart-remove:hover {
    background: rgba(220, 60, 60, 0.1);
    color: #dc3c3c;
}

/* ─────────────────────────────────────────────────
   7. КОЛИЧЕСТВО
───────────────────────────────────────────────── */
.sgr-cart-table .quantity {
    display: flex;
    align-items: center;
}

.sgr-cart-table .qty {
    width: 72px;
    padding: 8px 12px;
    border: 1.5px solid rgba(3, 3, 6, 0.15);
    border-radius: 10px;
    font-family: 'Unbounded', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(3, 3, 6, 0.88);
    text-align: center;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}
.sgr-cart-table .qty::-webkit-outer-spin-button,
.sgr-cart-table .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.sgr-cart-table .qty:focus {
    border-color: #FFCF3D;
}

/* ─────────────────────────────────────────────────
   8. ДЕЙСТВИЯ КОРЗИНЫ (купон + обновить)
───────────────────────────────────────────────── */
.sgr-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 0px;
}

.sgr-cart-coupon {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 380px;
}

.sgr-cart-coupon__input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid rgba(3, 3, 6, 0.15);
    border-radius: 12px;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    color: rgba(3, 3, 6, 0.88);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.sgr-cart-coupon__input:focus {
    border-color: #FFCF3D;
}
.sgr-cart-coupon__input::placeholder {
    color: rgba(3, 3, 6, 0.35);
}

/* ─────────────────────────────────────────────────
   9. ИТОГИ КОРЗИНЫ
───────────────────────────────────────────────── */
.sgr-cart-collaterals {
    /* display: flex; */
    /* justify-content: flex-end; */
}

.sgr-cart-totals {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(3, 3, 6, 0.07);
    padding: 32px;
    width: 100%;
    max-width: 420px;
}

.sgr-cart-totals__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 24px;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-cart-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid rgba(3, 3, 6, 0.07);
    font-size: 14px;
    gap: 16px;
}
.sgr-cart-totals__row:last-child {
    border-bottom: none;
}

.sgr-cart-totals__label {
    color: rgba(3, 3, 6, 0.55);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sgr-cart-totals__value {
    font-weight: 600;
    text-align: right;
}

.sgr-cart-totals__value--discount {
    color: #2d9e5f;
}

.sgr-cart-totals__coupon-code {
    background: rgba(255, 207, 61, 0.18);
    color: rgba(3, 3, 6, 0.88);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.sgr-cart-totals__remove-coupon {
    display: inline-flex;
    align-items: center;
    color: rgba(3, 3, 6, 0.35);
    transition: color 0.15s;
    text-decoration: none;
}
.sgr-cart-totals__remove-coupon:hover {
    color: #dc3c3c;
}

.sgr-cart-totals__row--total {
    /* margin-top: 8px; */
    /* padding-top: 20px; */
    /* border-top: 2px solid rgba(3, 3, 6, 0.1); */
    border-bottom: none;
}

.sgr-cart-totals__row--total .sgr-cart-totals__label {
    font-size: 16px;
    font-weight: 700;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-cart-totals__value--total {
    font-size: 22px;
    font-weight: 700;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-cart-totals__footer {
    margin-top: 24px;
}

.woocommerce-message,
.woocommerce-notices-wrapper {
    outline:none;
}

.sgr-cart-totals__footer .checkout-button,
.sgr-cart-totals__footer a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 28px;
    background: #FFCF3D;
    color: rgba(3, 3, 6, 0.88);
    border-radius: 12px;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.sgr-cart-totals__footer .checkout-button:hover {
    background: #f0c030;
    transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────
   10. ОФОРМЛЕНИЕ ЗАКАЗА — LAYOUT
───────────────────────────────────────────────── */
.sgr-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

/* ─────────────────────────────────────────────────
   11. СЕКЦИИ ОФОРМЛЕНИЯ ЗАКАЗА
───────────────────────────────────────────────── */
.sgr-checkout-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(3, 3, 6, 0.07);
    padding: 32px;
    margin-bottom: 24px;
}

.sgr-checkout-section__title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(3, 3, 6, 0.88);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sgr-checkout-section__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #FFCF3D;
    color: rgba(3, 3, 6, 0.88);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────
   12. ПОЛЯ ФОРМ WOOCOMMERCE (billing/shipping)
───────────────────────────────────────────────── */
.sgr-checkout .woocommerce-billing-fields,
.sgr-checkout .woocommerce-shipping-fields,
.sgr-checkout .woocommerce-additional-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sgr-checkout .woocommerce-billing-fields h3,
.sgr-checkout .woocommerce-shipping-fields h3,
.sgr-checkout .woocommerce-additional-fields h3 {
    display: none; /* заменяем своими заголовками секций */
}

.sgr-checkout .form-row {
    margin: 0;
}

.sgr-checkout .form-row-wide,
.sgr-checkout .form-row-first + .form-row-wide,
.sgr-checkout .notes {
    grid-column: 1 / -1;
}

.sgr-checkout .form-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(3, 3, 6, 0.55);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sgr-checkout .form-row .required {
    color: #FFCF3D;
}

.sgr-checkout .form-row input[type="text"],
.sgr-checkout .form-row input[type="email"],
.sgr-checkout .form-row input[type="tel"],
.sgr-checkout .form-row input[type="number"],
.sgr-checkout .form-row input[type="password"],
.sgr-checkout .form-row select,
.sgr-checkout .form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(3, 3, 6, 0.15);
    border-radius: 10px;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    color: rgba(3, 3, 6, 0.88);
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.sgr-checkout .form-row input:focus,
.sgr-checkout .form-row select:focus,
.sgr-checkout .form-row textarea:focus {
    border-color: #FFCF3D;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 207, 61, 0.15);
}

.sgr-checkout .form-row input::placeholder,
.sgr-checkout .form-row textarea::placeholder {
    color: rgba(3, 3, 6, 0.3);
}

.sgr-checkout .form-row textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Ошибки */
.sgr-checkout .form-row.woocommerce-invalid input,
.sgr-checkout .form-row.woocommerce-invalid select {
    border-color: #dc3c3c;
}

.sgr-checkout .woocommerce-error {
    background: rgba(220, 60, 60, 0.08);
    border: 1.5px solid rgba(220, 60, 60, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #c0392b;
    list-style: none;
}

/* Успех */
.sgr-checkout .woocommerce-message {
    background: rgba(45, 158, 95, 0.08);
    border: 1.5px solid rgba(45, 158, 95, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #2d9e5f;
}

/* ─────────────────────────────────────────────────
   13. ЧЕКБОКС "ДОСТАВИТЬ НА ДРУГОЙ АДРЕС"
───────────────────────────────────────────────── */
.sgr-checkout-shipping-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: rgba(3, 3, 6, 0.88);
    margin-bottom: 24px;
    user-select: none;
}

.sgr-checkout-shipping-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sgr-checkout-shipping-toggle__box {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(3, 3, 6, 0.2);
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.sgr-checkout-shipping-toggle input:checked + .sgr-checkout-shipping-toggle__box {
    background: #FFCF3D;
    border-color: #FFCF3D;
}

.sgr-checkout-shipping-toggle input:checked + .sgr-checkout-shipping-toggle__box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 8px;
    height: 5px;
    border-left: 2px solid rgba(3, 3, 6, 0.88);
    border-bottom: 2px solid rgba(3, 3, 6, 0.88);
    transform: rotate(-45deg);
}

.sgr-checkout-shipping-fields {
    display: none;
}
.sgr-checkout-shipping-fields.active {
    display: block;
}

/* ─────────────────────────────────────────────────
   14. ОБЗОР ЗАКАЗА (правая колонка)
───────────────────────────────────────────────── */
.sgr-checkout-sidebar {
    position: sticky;
    top: 100px;
}

.sgr-checkout-order {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(3, 3, 6, 0.07);
    padding: 28px;
    overflow: hidden;
    margin-bottom: 40px;
}

.sgr-checkout-section,
.sgr-checkout-section .woocommerce-billing-fields {
    display: block;
}

.sgr-checkout .notes {
    display: block;
}

.sgr-checkout-section .woocommerce-billing-fields .form-row {
    align-items: center;
    margin-bottom: 10px;
}

.sgr-checkout-order .sgr-checkout-section__title {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(3, 3, 6, 0.07);
}

.sgr-order-review__products {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 320px;
    overflow-y: auto;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(3,3,6,0.15) transparent;
}

.sgr-order-review__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sgr-order-review__item-thumb {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    /* border-radius: 8px; */
    /* overflow: hidden; */
    background: #f5f5f5;
}

.sgr-order-review__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.sgr-order-review__item-qty {
    position: absolute;
    top: 5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    background: #030306;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.sgr-order-review__item-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sgr-order-review__item-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(3, 3, 6, 0.88);
    flex: 1;
}

.sgr-order-review__item-total {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-order-review__totals {
    border-top: 1px solid rgba(3, 3, 6, 0.08);
    padding-top: 16px;
}

.sgr-order-review__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    font-size: 13px;
    color: rgba(3, 3, 6, 0.6);
    border-bottom: 1px solid rgba(3, 3, 6, 0.05);
    gap: 12px;
}
.sgr-order-review__row:last-child {
    border-bottom: none;
}

.sgr-order-review__row--discount {
    color: #2d9e5f;
}

.sgr-order-review__row--total {
    font-size: 15px;
    font-weight: 700;
    color: rgba(3, 3, 6, 0.88);
    /* padding-top: 14px; */
    /* margin-top: 8px; */
    /* border-top: 2px solid rgba(3, 3, 6, 0.1); */
    margin-bottom: 20px;
}

.sgr-order-review__total-amount {
    font-size: 20px;
    font-weight: 700;
    color: rgba(3, 3, 6, 0.88);
}

/* ─────────────────────────────────────────────────
   15. ОПЛАТА
───────────────────────────────────────────────── */
.sgr-payment {
    margin-top: 20px;
}

.sgr-payment__title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(3, 3, 6, 0.55);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

/* Переопределяем стандартные стили WooCommerce для способов оплаты */
.sgr-checkout #payment ul.payment_methods {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sgr-checkout #payment ul.payment_methods li {
    background: #fafafa;
    border: 1.5px solid rgba(3, 3, 6, 0.1);
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.15s, background 0.15s;
}

.sgr-checkout #payment ul.payment_methods li:has(input:checked) {
    border-color: #FFCF3D;
    background: rgba(255, 207, 61, 0.06);
}

.sgr-checkout #payment ul.payment_methods li label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgba(3, 3, 6, 0.88);
}

.sgr-checkout #payment ul.payment_methods li input[type="radio"] {
    accent-color: #FFCF3D;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sgr-checkout #payment .payment_box {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(3, 3, 6, 0.03);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(3, 3, 6, 0.6);
    line-height: 1.6;
}

/* Кнопка оформить заказ */
.sgr-checkout #payment #place_order,
.sgr-checkout .wc_payment_methods + div #place_order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    padding: 16px 28px;
    background: #FFCF3D;
    color: rgba(3, 3, 6, 0.88);
    border-radius: 12px;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.sgr-checkout #payment #place_order:hover {
    background: #f0c030;
    transform: translateY(-1px);
}

/* Соглашение с условиями */
.sgr-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-top: 16px;
    font-size: 11px;
    color: rgba(3, 3, 6, 0.45);
    line-height: 1.6;
    text-align: center;
    display: none;
}
.sgr-checkout .form-row.place-order {
    display: block;
}

.sgr-checkout .woocommerce-terms-and-conditions-wrapper a {
    color: rgba(3, 3, 6, 0.7);
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────
   16. АДАПТИВ
───────────────────────────────────────────────── */

@media screen and (max-width:1200px){
    .sgr-cart {
        display: block;
    }
    .sgr-cart-item__thumb {
        width: 100%;
        height: auto;
        margin-bottom: 10px;
    }
    .sgr-cart-table .quantity {
        margin-top: 10px;
    }
    .sgr-cart-table__col {
        width: 100%;
    }
    .sgr-cart-collaterals {
        min-width: auto;
        width: 100%;
        margin-bottom: 40px;
    }
    .sgr-cart-item {
        display: block;
    }
}

.sgr-cart-table__col--remove {
    padding: 0;
}
/* Планшет */
@media (max-width: 1024px) {
    .woocommerce-billing-fields__field-wrapper .form-row {
        display: block;
    }
    .sgr-checkout-layout {
        grid-template-columns: 1fr;
    }
    .sgr-checkout-main {
        width: 100%;
    }

    .sgr-checkout-sidebar {
        position: static;
    }

    /* Реверс: сначала итоги, потом форма на мобиле */
    .sgr-checkout-layout {
        display: flex;
        flex-direction: column-reverse;
    }

    .sgr-cart-totals {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sgr-cart,
    .sgr-checkout {
        /* padding: 0; */
    }

    /* Скрываем шапку таблицы */
    .sgr-cart-table__head {
        display: none;
    }

    /* Строки таблицы — стекируем вертикально */
    .sgr-cart-table__row {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 20px;
        border-bottom: 1px solid rgba(3, 3, 6, 0.07);
    }

    .sgr-cart-table__col {
        padding: 6px 0;
    }

    .sgr-cart-table__col--price {
        display: none; /* показываем цену в mobile-блоке */
    }

    .sgr-cart-item__price-mobile {
        display: block;
    }

    .sgr-cart-table__col--remove {
        position: absolute;
        bottom: 20px;
        right: 20px;
        width: auto;
    }

    .sgr-cart-table__row {
        position: relative;
    }

    .sgr-cart-table__col--qty::before {
        content: attr(data-label) ': ';
        font-size: 11px;
        font-weight: 600;
        color: rgba(3, 3, 6, 0.4);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-right: 8px;
    }

    .sgr-cart-table__col--total::before {
        content: attr(data-label) ': ';
        font-size: 11px;
        font-weight: 600;
        color: rgba(3, 3, 6, 0.4);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-right: 8px;
    }

    .sgr-cart-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sgr-cart-coupon {
        max-width: 100%;
    }

    .sgr-cart-totals {
        padding: 24px;
    }

    /* Форма оформления заказа — одна колонка */
    .sgr-checkout .woocommerce-billing-fields,
    .sgr-checkout .woocommerce-shipping-fields,
    .sgr-checkout .woocommerce-additional-fields {
        grid-template-columns: 1fr;
    }

    .sgr-checkout-section {
        padding: 20px;
    }

    .sgr-order-review__products {
        max-height: 240px;
    }
}

@media (max-width: 480px) {
    .sgr-cart-empty__title {
        font-size: 20px;
    }

    .sgr-cart-totals__value--total {
        font-size: 18px;
    }

    .sgr-order-review__total-amount {
        font-size: 17px;
    }
}


/* Убираем кастомный чекбокс — оставляем системный */
.sgr-checkout-shipping-toggle__box {
    display: none;
}
.sgr-checkout-shipping-toggle input[type="checkbox"] {
    position: static;
    opacity: 1;
    width: 16px;
    height: 16px;
    accent-color: #FFCF3D;
    cursor: pointer;
}

/* Убираем дублирование payment блока */
.sgr-checkout #payment {
    display: block !important;
}

/* Скрываем лишний terms текст который дублируется */
.woocommerce-checkout .woocommerce-privacy-policy-text {
    display: none;
}

/* Кнопка подтвердить заказ */
.woocommerce-checkout #place_order {
    display: block;
    width: 100%;
    padding: 16px 28px;
    background: #FFCF3D;
    color: rgba(3, 3, 6, 0.88);
    border-radius: 12px;
    font-family: 'Unbounded', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 16px;
}
.woocommerce-checkout #place_order:hover {
    background: #f0c030;
}