/* ========================================
   WooCommerce — стили для Saulgrad Theme
   Версия: 1.0
   Совместимо: WooCommerce 10.7+, Bootstrap 5.3+
   ======================================== */

/* ========================================
   1. КАРТОЧКИ ТОВАРОВ — фиксированная высота
   ======================================== */

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* 🔹 Заголовок — максимум 2 строки, перенос слов */
.product-title {
    min-height: 2.8em; /* 2 строки * 1.4 line-height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    word-wrap: break-word;
    hyphens: auto;
}

/* 🔹 Кнопка — перенос текста, фиксированная высота */
.product-button,
.product-card .add_to_cart_button,
.product-card .button {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-weight: 500;
    text-align: center;
    white-space: normal; /* 🔹 Разрешаем перенос */
    overflow: hidden;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
}

.product-button:hover,
.product-card .add_to_cart_button:hover {
    transform: scale(1.02);
}

.product-cart-row .product-qty-button {
    align-items: center;
    align-self: center;
    display: inline-flex;
    flex: 0 0 48px;
    font-size: 1.25rem;
    font-weight: 600;
    height: 48px;
    justify-content: center;
    line-height: 1;
    max-height: 48px;
    min-height: 48px;
    min-width: 48px;
    padding-left: 0;
    padding-right: 0;
    width: 48px;
}

.product-cart-row .product-button {
    hyphens: none;
    white-space: nowrap;
    word-break: normal;
}

.product-card .product-cart-row .product-qty-button {
    flex-basis: 48px;
    width: 48px;
}

/* 🔹 Изображение — фон через CSS (не bg-light) */
.product-image-wrapper {
    background-color: #f8f9fa;
}

/* ========================================
   2. СЕЛЕКТОР СОРТИРОВКИ — Bootstrap стиль
   ======================================== */

.woocommerce-ordering select,
.woocommerce-ordering .orderby {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    padding-left: 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    height: 42px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.woocommerce-ordering select:focus,
.woocommerce-ordering .orderby:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.woocommerce-ordering {
    position: relative;
}

/* ========================================
   3. СЧЁТЧИК ТОВАРОВ
   ======================================== */

.woocommerce-result-count {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* ========================================
   4. ПАГИНАЦИЯ — Bootstrap стиль
   ======================================== */

.woocommerce nav.woocommerce-pagination {
    margin: 0;
}

.woocommerce nav.woocommerce-pagination ul {
    display: flex;
    gap: 0.375rem;
    padding: 0;
    margin: 0;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.woocommerce nav.woocommerce-pagination ul li {
    margin: 0;
    padding: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #0d6efd;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #0a58ca;
}

.woocommerce nav.woocommerce-pagination ul li .current,
.woocommerce nav.woocommerce-pagination ul li .current:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.woocommerce nav.woocommerce-pagination ul li .prev,
.woocommerce nav.woocommerce-pagination ul li .next {
    font-weight: 600;
}

/* ========================================
   5. ЦЕНЫ
   ======================================== */

.product-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 0;
}

.product-card .price del {
    color: #6c757d;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.product-card .price ins {
    text-decoration: none;
}

/* ========================================
   6. РЕЙТИНГ (звёзды)
   ======================================== */

.star-rating {
    color: #ffc107;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.star-rating::before {
    content: "★★★★★";
}

.star-rating span {
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    padding-top: 1.5em;
}

.star-rating span::before {
    content: "★★★★★";
    position: absolute;
    top: 0;
    left: 0;
    color: #ffc107;
}

/* ========================================
   7. КАТЕГОРИИ ТОВАРОВ
   ======================================== */

.product-card .text-muted.small {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   8. ИЗОБРАЖЕНИЯ ТОВАРОВ
   ======================================== */

.product-card .ratio {
    background-color: #f8f9fa;
}

.product-card img {
    transition: transform 0.3s ease;
}


/* ========================================
   9. ТЁМНАЯ ТЕМА (Bootstrap 5.3+)
   ======================================== */

/* Фон карточки */
[data-bs-theme="dark"] .product-card {
    background-color: #2b2b2b;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .product-card .card-body {
    background-color: #2b2b2b;
    color: #e0e0e0;
}

/* 🔹 Заголовок продукта */
[data-bs-theme="dark"] .product-title a {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .product-title a:hover {
    color: #fff !important;
}

/* 🔹 Цена */
[data-bs-theme="dark"] .product-price {
    color: #6ea8fe !important;
}

[data-bs-theme="dark"] .product-price del {
    color: #6c757d !important;
}

/* 🔹 Фон изображения */
[data-bs-theme="dark"] .product-image-wrapper {
    background-color: #3a3a3a !important;
}

/* Категории */
[data-bs-theme="dark"] .product-card .text-muted {
    color: #adb5bd !important;
}

/* Селектор сортировки */
[data-bs-theme="dark"] .woocommerce-ordering select,
[data-bs-theme="dark"] .woocommerce-ordering .orderby {
    background-color: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e0e0e0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .woocommerce-ordering select:focus,
[data-bs-theme="dark"] .woocommerce-ordering .orderby:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Счётчик товаров */
[data-bs-theme="dark"] .woocommerce-result-count {
    color: #adb5bd;
}

/* Пагинация */
[data-bs-theme="dark"] .woocommerce nav.woocommerce-pagination ul li a,
[data-bs-theme="dark"] .woocommerce nav.woocommerce-pagination ul li span {
    background-color: #3a3a3a;
    border-color: #555;
    color: #6ea8fe;
}

[data-bs-theme="dark"] .woocommerce nav.woocommerce-pagination ul li a:hover,
[data-bs-theme="dark"] .woocommerce nav.woocommerce-pagination ul li span:hover {
    background-color: #4a4a4a;
    border-color: #777;
}

[data-bs-theme="dark"] .woocommerce nav.woocommerce-pagination ul li .current,
[data-bs-theme="dark"] .woocommerce nav.woocommerce-pagination ul li .current:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* Рейтинг */
[data-bs-theme="dark"] .star-rating {
    color: #ffc107;
}

/* ========================================
   10. АДАПТИВНОСТЬ (мобильные)
   ======================================== */

@media (max-width: 767px) {
    .product-title {
        min-height: 2.4em; /* 2 строки на мобильных */
        font-size: 0.95rem;
    }

    .product-button,
    .product-card .add_to_cart_button {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .woocommerce-ordering select,
    .woocommerce-ordering .orderby {
        width: 100%;
        max-width: 100%;
    }

    .woocommerce nav.woocommerce-pagination ul {
        gap: 0.25rem;
    }

    .woocommerce nav.woocommerce-pagination ul li a,
    .woocommerce nav.woocommerce-pagination ul li span {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }
}

/* ========================================
   11. ЗАГРУЗКА / AJAX СОСТОЯНИЯ
   ======================================== */

.product-card .add_to_cart_button.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.product-card .add_to_cart_button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wc-spinner-rotate 0.6s linear infinite;
}

@keyframes wc-spinner-rotate {
    to { transform: rotate(360deg); }
}

.product-card .add_to_cart_button.added {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

/* ========================================
   12. НЕТ ТОВАРОВ
   ======================================== */

.woocommerce-no-products-found {
    color: #6c757d;
    font-size: 1.1rem;
    padding: 3rem 0;
}

[data-bs-theme="dark"] .woocommerce-no-products-found {
    color: #adb5bd;
}


/* ========================================
   СТРАНИЦА ТОВАРА (Single Product)
   ======================================== */

/* Заголовок товара */
.product-single-title {
    line-height: 1.3;
    word-wrap: break-word;
}

/* Краткое описание */
.product-short-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
}

.product-short-description p {
    margin-bottom: 1rem;
}

.product-short-description ul,
.product-short-description ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Галерея товара */
.woocommerce-product-gallery {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}

.woocommerce-product-gallery__image {
    border-radius: 0.5rem;
}

.woocommerce-product-gallery__image img {
    border-radius: 0.5rem;
    box-shadow: none;
}

/* Миниатюры галереи */
.flex-control-thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0;
    list-style: none;
}

.flex-control-thumbs li {
    flex: 1;
    cursor: pointer;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.flex-control-thumbs li:hover,
.flex-control-thumbs li.flex-active {
    border-color: #a0b2a6;
}

.flex-control-thumbs img {
    width: 100%;
    height: auto;
    display: block;
}

/* Кнопка "В корзину" */
.single_add_to_cart_button {
    background-color: #a0b2a6;
    border: none;
    color: #ffffff;
    border-radius: 50rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    transition: all 0.2s ease;
    width: auto;
}

.single_add_to_cart_button:hover {
    background-color: #8a9b8e;
    color: #ffffff;
    transform: scale(1.02);
}

/* Количество товара */
.quantity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity .qty {
    width: 80px;
    padding: 0.625rem;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Вкладки товара */
.woocommerce-tabs {
    margin-top: 3rem;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0 0 2rem;
    list-style: none;
    border-bottom: 2px solid #dee2e6;
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.woocommerce-tabs ul.tabs li a:hover {
    color: #a0b2a6;
    border-bottom-color: #a0b2a6;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #333;
    border-bottom-color: #ffdd44;
    font-weight: 600;
}

.woocommerce-tabs .panel {
    padding: 2rem 0;
}

/* Таблица характеристик */
.shop_attributes {
    width: 100%;
    border-collapse: collapse;
}

.shop_attributes th,
.shop_attributes td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

.shop_attributes th {
    width: 30%;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.shop_attributes td {
    color: #6c757d;
}

/* Отзывы */
.woocommerce-Reviews-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.commentlist li {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.commentlist .avatar {
    border-radius: 50%;
    margin-right: 1rem;
}

.commentlist .meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.commentlist .description p {
    margin-bottom: 0;
}

/* Связанные товары */
.related.products {
    margin-top: 4rem;
}

.related.products > h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.related.products > ul {
    list-style: none;
}

/* ========================================
   ТЁМНАЯ ТЕМА — страница товара
   ======================================== */

[data-bs-theme="dark"] .product-single-title {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .product-short-description {
    color: #adb5bd;
}

[data-bs-theme="dark"] .product-short-description a {
    color: #a0b2a6;
}

[data-bs-theme="dark"] .woocommerce-product-gallery__image img {
    box-shadow: none;
}

[data-bs-theme="dark"] .shop_attributes th {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .shop_attributes td {
    color: #adb5bd;
}

[data-bs-theme="dark"] .shop_attributes th,
[data-bs-theme="dark"] .shop_attributes td {
    border-bottom-color: #555;
}

[data-bs-theme="dark"] .commentlist li {
    background-color: #3a3a3a;
}

[data-bs-theme="dark"] .commentlist .meta {
    color: #adb5bd;
}

[data-bs-theme="dark"] .woocommerce-tabs ul.tabs {
    border-bottom-color: #555;
}

[data-bs-theme="dark"] .woocommerce-tabs ul.tabs li a {
    color: #adb5bd;
}

[data-bs-theme="dark"] .woocommerce-tabs ul.tabs li a:hover {
    color: #a0b2a6;
    border-bottom-color: #a0b2a6;
}

[data-bs-theme="dark"] .woocommerce-tabs ul.tabs li.active a {
    color: #e0e0e0;
    border-bottom-color: #ffdd44;
}

[data-bs-theme="dark"] .quantity .qty {
    background-color: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

/* Кнопка в тёмной теме */
[data-bs-theme="dark"] .single_add_to_cart_button {
    background-color: #a0b2a6;
    color: #1a1a1a;
}

[data-bs-theme="dark"] .single_add_to_cart_button:hover {
    background-color: #8a9b8e;
    color: #1a1a1a;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */

@media (max-width: 767px) {
    .woocommerce-product-gallery {
        margin-bottom: 2rem;
    }

    .flex-control-thumbs {
        gap: 0.5rem;
    }

    .quantity {
        flex-direction: column;
        align-items: stretch;
    }

    .quantity .qty {
        width: 100%;
    }

    .single_add_to_cart_button {
        width: 100%;
    }

    .woocommerce-tabs ul.tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 0;
    }

    .woocommerce-tabs ul.tabs li a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 0;
    }

    [data-bs-theme="dark"] .woocommerce-tabs ul.tabs li a {
        border-bottom-color: #555;
    }
}

/* ========================================
   КНОПКА "В КОРЗИНЕ" — акцентные цвета сайта
   ======================================== */

/* Базовое состояние: товар уже в корзине */
.woocommerce a.button.in-cart,
.product-button.in-cart {
    background-color: #8a9b8e !important;
    border-color: #8a9b8e !important;
    color: #ffffff !important;
    cursor: default !important;
    pointer-events: auto !important;
    font-weight: 600 !important;
}

/* Ховер: акцентный жёлтый с тёмным текстом */
.woocommerce a.button.in-cart:hover,
.product-button.in-cart:hover {
    background-color: #ffdd44 !important;
    border-color: #ffdd44 !important;
    color: #1a1a1a !important;
    transform: scale(1.02);
}

/* Активное состояние (нажатие) */
.woocommerce a.button.in-cart:active,
.product-button.in-cart:active {
    background-color: #7d8f7f !important;
    border-color: #7d8f7f !important;
    transform: scale(0.98);
}

/* Тёмная тема */
[data-bs-theme="dark"] .woocommerce a.button.in-cart,
[data-bs-theme="dark"] .product-button.in-cart {
    background-color: #8a9b8e !important;
    border-color: #8a9b8e !important;
    color: #1a1a1a !important;
}

[data-bs-theme="dark"] .woocommerce a.button.in-cart:hover,
[data-bs-theme="dark"] .product-button.in-cart:hover {
    background-color: #ffdd44 !important;
    border-color: #ffdd44 !important;
    color: #1a1a1a !important;
}

/* Кнопка "Нет в наличии" */
.woocommerce .product-button.disabled,
.product-button.disabled {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.7 !important;
}

/* Тёмная тема */
[data-bs-theme="dark"] .woocommerce .product-button.disabled,
[data-bs-theme="dark"] .product-button.disabled {
    background-color: #3a3a3a !important;
    border-color: #555 !important;
    color: #adb5bd !important;
}

/* ========================================
   КНОПКА НА СТРАНИЦЕ ТОВАРА
   ======================================== */

.single-product .product-button {
    padding: 0.875rem 1.5rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    min-height: 52px !important;
}

.single-product .product-cart-row .product-qty-button {
    flex-basis: 52px;
    height: 52px;
    max-height: 52px;
    min-height: 52px;
    min-width: 52px;
    width: 52px;
}

/* Состояние: В корзине */
.single-product .product-button.in-cart {
    background-color: #8a9b8e !important;
    border-color: #8a9b8e !important;
    color: #fff !important;
}
.single-product .product-button.in-cart:hover {
    background-color: #ffdd44 !important;
    border-color: #ffdd44 !important;
    color: #1a1a1a !important;
}

/* Состояние: Нет в наличии */
.single-product .product-button.disabled {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

/* Поле количества */
.single-product .quantity {
    margin-bottom: 0 !important;
}
.single-product .quantity .qty {
    width: 80px !important;
    height: 52px !important;
    padding: 0.75rem !important;
    text-align: center;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    font-weight: 600 !important;
}

/* Тёмная тема */
[data-bs-theme="dark"] .single-product .product-button.disabled {
    background-color: #3a3a3a !important;
    border-color: #555 !important;
    color: #adb5bd !important;
}
[data-bs-theme="dark"] .single-product .quantity .qty {
    background-color: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

/* Адаптив для мобильных */
@media (max-width: 576px) {
    .single-product .cart .d-flex {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    .single-product .quantity .qty {
        width: 100% !important;
    }
}

/* ========================================
   КОНТРОЛ КОЛИЧЕСТВА (+ / −)
   ======================================== */

.quantity-control {
    background: #f8f9fa;
    transition: all 0.2s ease;
}

/* Скрываем стандартные стрелки input[type="number"] */
.quantity-control .qty {
    -moz-appearance: textfield;
    appearance: textfield;
}
.quantity-control .qty::-webkit-outer-spin-button,
.quantity-control .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Кнопки + и − */
.quantity-control .qty-btn {
    width: 40px;
    height: 48px;
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s;
    text-decoration: none !important;
    color: #495057 !important;
}

.quantity-control .qty-btn:hover {
    background-color: #e9ecef;
    color: #000 !important;
}

.quantity-control .qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Тёмная тема */
[data-bs-theme="dark"] .quantity-control {
    background: #2b2b2b;
    border-color: #444 !important;
}
[data-bs-theme="dark"] .quantity-control .qty {
    background: #2b2b2b;
    color: #e0e0e0;
}
[data-bs-theme="dark"] .quantity-control .qty-btn:hover {
    background-color: #3a3a3a;
    color: #e0e0e0 !important;
}

/* Адаптив для мобильных */
@media (max-width: 576px) {
    .single-product .cart .d-flex {
        flex-direction: column;
        gap: 0.75rem !important;
    }
    .quantity-control {
        width: 100% !important;
        max-width: 100% !important;
    }
    .quantity-control .qty {
        flex: 1;
    }
}

/* ========================================
   КОРЗИНА
   ======================================== */

.sg-cart-header {
    align-items: flex-end;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.sg-cart-kicker {
    color: #8a9b8e;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sg-cart-content .woocommerce-notices-wrapper:not(:empty) {
    margin-bottom: 1rem;
}

.sg-cart-content .woocommerce-message,
.sg-cart-content .woocommerce-info,
.sg-cart-content .woocommerce-error {
    border: 1px solid #dee2e6;
    border-left: 4px solid #8a9b8e;
    border-radius: 0.5rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
}

.sg-cart-content .woocommerce-error {
    border-left-color: #dc3545;
}

.sg-cart-page {
    min-height: calc(100svh - 4rem);
}

.sg-cart-stage {
    --sg-cart-summary-gap: 1.5rem;
    --sg-cart-summary-width: 390px;
    min-height: 640px;
    position: relative;
}

.sg-cart-layout {
    display: block;
}

.sg-cart-items,
.sg-cart-summary .cart_totals,
.sg-cart-empty {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 2rem rgba(33, 37, 41, 0.08);
}

.sg-cart-items {
    min-width: 0;
    overflow: hidden;
}

.sg-cart-table {
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
    width: 100%;
}

.sg-cart-table th,
.sg-cart-table td {
    border-bottom: 1px solid #e9ecef;
    padding: 0.9rem;
    vertical-align: middle;
}

.sg-cart-table thead th {
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sg-cart-table .product-thumbnail {
    position: relative;
    width: 92px;
}

.sg-cart-table .product-price {
    width: 126px;
}

.sg-cart-table .product-quantity {
    width: 132px;
}

.sg-cart-table .product-subtotal {
    width: 142px;
}

.sg-cart-table .product-thumbnail img {
    aspect-ratio: 1;
    background: #f8f9fa;
    border-radius: 0.5rem;
    display: block;
    height: 76px;
    object-fit: cover;
    width: 76px;
}

.sg-cart-table .product-thumbnail .product-remove {
    left: 0.45rem;
    position: absolute;
    top: 0.45rem;
    z-index: 1;
}

.sg-cart-table .product-name a {
    color: #212529;
    font-weight: 600;
    text-decoration: none;
}

.sg-cart-table .product-name a:hover {
    color: #8a9b8e;
}

.sg-cart-table .product-price,
.sg-cart-table .product-subtotal {
    font-weight: 600;
    white-space: nowrap;
}

.sg-cart-table .product-subtotal {
    color: #8a9b8e;
    font-size: 1.05rem;
}

.sg-cart-table .remove {
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    color: #6c757d;
    display: inline-flex;
    font-size: 1.15rem;
    height: 30px;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    width: 30px;
}

.sg-cart-table .remove:hover {
    background: #fff2f3;
    border-color: #dc3545;
    color: #dc3545;
}

.sg-cart-page .quantity {
    margin: 0;
}

.sg-cart-page .quantity .qty {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    height: 46px;
    max-width: 86px;
    padding: 0.55rem 0.75rem;
    text-align: center;
}

.sg-cart-table .actions {
    border-bottom: 0;
    padding: 1rem;
}

.sg-cart-actions,
.sg-cart-table .coupon {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.sg-cart-actions {
    justify-content: flex-end;
    width: 100%;
}

.sg-cart-table .coupon {
    flex: 1;
    margin-right: auto;
    min-width: 0;
}

.sg-cart-table .coupon .input-text,
.sg-cart-summary .shipping-calculator-form input,
.sg-cart-summary .shipping-calculator-form select {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    min-height: 46px;
    padding: 0.65rem 0.85rem;
}

.sg-cart-table .coupon .input-text {
    max-width: 240px;
    width: 100%;
}

.sg-cart-page .button {
    align-items: center;
    background: #a0b2a6;
    border: 1px solid #a0b2a6;
    border-radius: 50rem;
    color: #fff;
    display: inline-flex;
    font-weight: 600;
    justify-content: center;
    min-height: 46px;
    padding: 0.65rem 1.2rem;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sg-cart-page .button:hover {
    background: #ffdd44;
    border-color: #ffdd44;
    color: #1a1a1a;
    transform: translateY(-1px);
}

.sg-cart-page .button:disabled,
.sg-cart-page .button:disabled:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.sg-cart-page .sg-cart-update {
    background: #fff;
    border-color: #8a9b8e;
    color: #495057;
    min-height: 42px;
    padding: 0.55rem 1rem;
    white-space: nowrap;
}

.sg-cart-page .sg-cart-update:hover {
    background: #ffdd44;
    border-color: #ffdd44;
    color: #1a1a1a;
}

.sg-cart-page .sg-cart-update:disabled,
.sg-cart-page .sg-cart-update:disabled:hover {
    background: transparent;
    border-color: #dee2e6;
    color: #6c757d;
}

.sg-cart-summary {
    bottom: 0;
    left: calc(100% + var(--sg-cart-summary-gap));
    overflow: visible;
    position: absolute;
    right: auto;
    top: 0;
    width: var(--sg-cart-summary-width);
    z-index: 2;
}

.sg-cart-summary .cart-collaterals {
    display: block;
    position: sticky;
    top: 6.5rem;
}

.sg-cart-summary .cart-collaterals .cart_totals {
    float: none;
    max-width: none;
    overflow: hidden;
    width: 100%;
}

.sg-cart-summary .cart_totals h2,
.sg-cart-summary .cross-sells h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    padding: 1.25rem 1.25rem 0;
}

.sg-cart-summary .cart_totals .shop_table {
    border-collapse: collapse;
    margin: 1rem 0 0;
    width: 100%;
}

.sg-cart-summary .cart_totals th,
.sg-cart-summary .cart_totals td {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.sg-cart-summary .cart_totals th {
    color: #6c757d;
    font-weight: 500;
}

.sg-cart-summary .woocommerce-shipping-methods {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.sg-cart-summary .woocommerce-shipping-methods li {
    margin: 0;
    padding: 0;
}

.sg-cart-summary .woocommerce-shipping-methods label {
    display: block;
    font-weight: 600;
}

.sg-cart-summary .woocommerce-shipping-destination {
    margin: 0 0 0.75rem;
}

.sg-cart-summary .cart_totals td {
    font-weight: 600;
    text-align: right;
}

.sg-cart-summary .cart_totals .order-total th,
.sg-cart-summary .cart_totals .order-total td {
    color: #212529;
    font-size: 1.15rem;
}

.sg-cart-summary .cart_totals .order-total td {
    color: #8a9b8e;
}

.sg-cart-summary .wc-proceed-to-checkout {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 1.25rem;
}

.sg-cart-summary .checkout-button {
    background: #8a9b8e;
    border-color: #8a9b8e;
    font-size: 1rem;
    width: 100%;
}

.sg-cart-summary .cross-sells {
    border-top: 1px solid #dee2e6;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.sg-cart-summary .cross-sells .products {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.sg-cart-empty {
    margin: 0 auto;
    max-width: 640px;
    padding: clamp(1.5rem, 4vw, 3rem);
    text-align: center;
}

.sg-cart-empty-icon {
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    color: #8a9b8e;
    display: inline-flex;
    font-size: 2rem;
    height: 82px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 82px;
}

.sg-cart-empty .cart-empty {
    color: #495057;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

[data-bs-theme="dark"] .sg-cart-header {
    border-bottom-color: #444;
}

[data-bs-theme="dark"] .sg-cart-content .woocommerce-message,
[data-bs-theme="dark"] .sg-cart-content .woocommerce-info,
[data-bs-theme="dark"] .sg-cart-content .woocommerce-error,
[data-bs-theme="dark"] .sg-cart-items,
[data-bs-theme="dark"] .sg-cart-summary .cart_totals,
[data-bs-theme="dark"] .sg-cart-empty {
    background: #2b2b2b;
    border-color: #444;
    box-shadow: none;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sg-cart-table th,
[data-bs-theme="dark"] .sg-cart-table td,
[data-bs-theme="dark"] .sg-cart-summary .cart_totals th,
[data-bs-theme="dark"] .sg-cart-summary .cart_totals td {
    border-color: #444;
}

[data-bs-theme="dark"] .sg-cart-table thead th,
[data-bs-theme="dark"] .sg-cart-summary .wc-proceed-to-checkout {
    background: #343434;
}

[data-bs-theme="dark"] .sg-cart-table thead th,
[data-bs-theme="dark"] .sg-cart-summary .cart_totals th {
    color: #adb5bd;
}

[data-bs-theme="dark"] .sg-cart-table .product-name a,
[data-bs-theme="dark"] .sg-cart-summary .cart_totals .order-total th {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sg-cart-table .product-thumbnail img,
[data-bs-theme="dark"] .sg-cart-empty-icon {
    background: #343434;
    border-color: #444;
}

[data-bs-theme="dark"] .sg-cart-table .remove {
    background: #343434;
    border-color: #555;
    color: #adb5bd;
}

[data-bs-theme="dark"] .sg-cart-page .quantity .qty,
[data-bs-theme="dark"] .sg-cart-table .coupon .input-text,
[data-bs-theme="dark"] .sg-cart-summary .shipping-calculator-form input,
[data-bs-theme="dark"] .sg-cart-summary .shipping-calculator-form select {
    background: #343434;
    border-color: #555;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sg-cart-page .button:disabled,
[data-bs-theme="dark"] .sg-cart-page .button:disabled:hover {
    background: #343434;
    border-color: #555;
    color: #adb5bd;
}

[data-bs-theme="dark"] .sg-cart-page .sg-cart-update {
    background: transparent;
    border-color: #8a9b8e;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sg-cart-page .sg-cart-update:hover {
    background: #ffdd44;
    border-color: #ffdd44;
    color: #1a1a1a;
}

[data-bs-theme="dark"] .sg-cart-page .sg-cart-update:disabled,
[data-bs-theme="dark"] .sg-cart-page .sg-cart-update:disabled:hover {
    background: transparent;
    border-color: #555;
    color: #adb5bd;
}

[data-bs-theme="dark"] .sg-cart-empty .cart-empty {
    color: #ced4da;
}

@media (max-width: 1919px) {
    .sg-cart-stage {
        min-height: 0;
    }

    .sg-cart-summary .cart-collaterals .cart_totals {
        margin-left: auto;
        margin-right: auto;
        max-width: 480px;
    }

    .sg-cart-summary {
        bottom: auto;
        left: auto;
        margin-top: 1.5rem;
        position: static;
        width: auto;
    }

    .sg-cart-summary .cart-collaterals {
        position: static;
    }
}

@media (max-width: 767px) {
    .sg-cart-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 1.5rem;
    }

    .sg-cart-table,
    .sg-cart-table tbody,
    .sg-cart-table tr,
    .sg-cart-table td {
        display: block;
        width: 100%;
    }

    .sg-cart-table thead {
        display: none;
    }

    .sg-cart-table tr.cart_item {
        display: grid;
        gap: 0.75rem 1rem;
        grid-template-columns: 76px minmax(0, 1fr);
        padding: 1rem;
        position: relative;
    }

    .sg-cart-table tr.cart_item td {
        border: 0;
        padding: 0;
    }

    .sg-cart-table tr.cart_item .product-remove {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }

    .sg-cart-table tr.cart_item .product-thumbnail {
        grid-row: 1 / span 4;
        width: 76px;
    }

    .sg-cart-table tr.cart_item .product-name {
        padding-right: 44px;
    }

    .sg-cart-table tr.cart_item .product-price,
    .sg-cart-table tr.cart_item .product-quantity,
    .sg-cart-table tr.cart_item .product-subtotal {
        align-items: center;
        display: flex;
        gap: 1rem;
        justify-content: space-between;
    }

    .sg-cart-table tr.cart_item .product-price::before,
    .sg-cart-table tr.cart_item .product-quantity::before,
    .sg-cart-table tr.cart_item .product-subtotal::before {
        color: #6c757d;
        content: attr(data-title);
        font-size: 0.9rem;
        font-weight: 500;
    }

    .sg-cart-actions,
    .sg-cart-table .coupon {
        align-items: stretch;
        flex-direction: column;
    }

    .sg-cart-table .actions {
        padding: 1rem;
    }

    .sg-cart-table .coupon .input-text,
    .sg-cart-table .actions .button {
        max-width: none;
        width: 100%;
    }

    .sg-cart-summary .cart-collaterals .cart_totals {
        max-width: none;
    }
}

/* ========================================
   ОФОРМЛЕНИЕ ЗАКАЗА
   ======================================== */

.sg-checkout-page {
    min-height: calc(100svh - 4rem);
}

.sg-checkout-header {
    align-items: flex-end;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.sg-checkout-kicker {
    color: #8a9b8e;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sg-checkout-content .woocommerce-notices-wrapper:not(:empty),
.sg-checkout-content .woocommerce-form-coupon-toggle,
.sg-checkout-content .woocommerce-form-login-toggle {
    margin-bottom: 1rem;
}

.sg-checkout-content .woocommerce-info,
.sg-checkout-content .woocommerce-message,
.sg-checkout-content .woocommerce-error,
.sg-checkout-content .woocommerce-form-login,
.sg-checkout-content .checkout_coupon {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #8a9b8e;
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 2rem rgba(33, 37, 41, 0.06);
    list-style: none;
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
}

.sg-checkout-content .woocommerce-error {
    border-left-color: #dc3545;
}

.sg-checkout-content .woocommerce-info a,
.sg-checkout-content .woocommerce-message a {
    color: #495057;
    font-weight: 600;
}

.sg-checkout-layout {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.sg-checkout-details {
    min-width: 0;
}

.sg-checkout-panel {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 2rem rgba(33, 37, 41, 0.08);
    overflow: hidden;
    padding: clamp(1rem, 2vw, 1.5rem);
}

.sg-checkout-panel h2,
.sg-checkout-panel h3 {
    color: #212529;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
}

.sg-checkout-summary {
    min-width: 0;
    position: sticky;
    top: 6.5rem;
}

.sg-checkout-summary .sg-checkout-panel {
    padding: 0;
}

.sg-checkout-summary #order_review_heading {
    border-bottom: 1px solid #e9ecef;
    margin: 0;
    padding: 1.25rem;
}

.sg-checkout-page #customer_details,
.sg-checkout-page #customer_details .col-1,
.sg-checkout-page #customer_details .col-2 {
    float: none;
    width: 100%;
}

.sg-checkout-page #customer_details {
    display: grid;
    gap: 1.5rem;
}

.sg-checkout-page .woocommerce-shipping-fields,
.sg-checkout-page .woocommerce-additional-fields,
.sg-checkout-page .woocommerce-account-fields {
    border-top: 1px solid #e9ecef;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.sg-checkout-page #ship-to-different-address {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.sg-checkout-page .form-row {
    float: none;
    margin: 0 0 1rem;
    padding: 0;
    width: 100%;
}

.sg-checkout-page .woocommerce-billing-fields__field-wrapper,
.sg-checkout-page .woocommerce-shipping-fields__field-wrapper,
.sg-checkout-page .woocommerce-additional-fields__field-wrapper {
    column-gap: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sg-checkout-page .form-row-wide,
.sg-checkout-page .address-field,
.sg-checkout-page #billing_address_1_field,
.sg-checkout-page #billing_address_2_field,
.sg-checkout-page #shipping_address_1_field,
.sg-checkout-page #shipping_address_2_field,
.sg-checkout-page #order_comments_field {
    grid-column: 1 / -1;
}

.sg-checkout-page label {
    color: #495057;
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.sg-checkout-page .required {
    color: #dc3545;
}

.sg-checkout-page input.input-text,
.sg-checkout-page textarea,
.sg-checkout-page select,
.sg-checkout-page .select2-container--default .select2-selection--single,
.sg-checkout-content .woocommerce-form-login input.input-text,
.sg-checkout-content .checkout_coupon input.input-text {
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    box-shadow: none;
    color: #212529;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    width: 100%;
}

.sg-checkout-page textarea {
    min-height: 120px;
    resize: vertical;
}

.sg-checkout-page .select2-container {
    width: 100% !important;
}

.sg-checkout-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: inherit;
    line-height: 1.5;
    overflow: hidden;
    padding: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-checkout-page .select2-container--default .select2-selection--single {
    align-items: center;
    display: flex;
}

.sg-checkout-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 0.5rem;
    top: 0;
}

.sg-checkout-page .input-checkbox,
.sg-checkout-page input[type="checkbox"],
.sg-checkout-page input[type="radio"] {
    accent-color: #8a9b8e;
    margin-right: 0.45rem;
}

.sg-checkout-page .woocommerce-form__label-for-checkbox {
    align-items: flex-start;
    display: inline-flex;
    gap: 0.25rem;
    margin-bottom: 0;
}

.sg-checkout-page .woocommerce-invalid input.input-text,
.sg-checkout-page .woocommerce-invalid select,
.sg-checkout-page .woocommerce-invalid textarea {
    border-color: #dc3545;
}

.sg-checkout-page .woocommerce-validated input.input-text {
    border-color: #8a9b8e;
}

.sg-checkout-page .shop_table {
    border-collapse: collapse;
    margin: 0;
    width: 100%;
}

.sg-checkout-page .shop_table th,
.sg-checkout-page .shop_table td {
    border-bottom: 1px solid #e9ecef;
    padding: 0.95rem 1.25rem;
    vertical-align: top;
}

.sg-checkout-page .shop_table thead th {
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sg-checkout-page .shop_table .product-total,
.sg-checkout-page .shop_table tfoot td {
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.sg-checkout-page .shop_table .product-quantity {
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}

.sg-checkout-page .shop_table tfoot th {
    color: #6c757d;
    font-weight: 500;
}

.sg-checkout-page .shop_table .order-total th,
.sg-checkout-page .shop_table .order-total td {
    color: #212529;
    font-size: 1.1rem;
}

.sg-checkout-page .shop_table .order-total td {
    color: #8a9b8e;
}

.sg-checkout-page .woocommerce-shipping-methods,
.sg-checkout-page .wc_payment_methods {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sg-checkout-page .woocommerce-shipping-methods li,
.sg-checkout-page .wc_payment_methods li {
    margin: 0;
    padding: 0;
}

.sg-checkout-page .woocommerce-shipping-methods label {
    margin: 0;
}

.sg-checkout-page #payment {
    background: #f8f9fa;
}

.sg-checkout-page .wc_payment_methods {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.25rem 0;
}

.sg-checkout-page .wc_payment_method {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background: #fff;
    margin-bottom: 0.75rem;
    padding: 0.9rem;
}

.sg-checkout-page .wc_payment_method > label {
    display: inline;
    font-size: 1rem;
    margin: 0;
}

.sg-checkout-page .payment_box {
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.sg-checkout-page .payment_box p:last-child {
    margin-bottom: 0;
}

.sg-checkout-page .place-order {
    background: #f8f9fa;
    margin: 0;
    padding: 1.25rem;
}

.sg-checkout-page .woocommerce-terms-and-conditions-wrapper {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.sg-checkout-page .button,
.sg-checkout-content .woocommerce-form-login button.button,
.sg-checkout-content .checkout_coupon button.button {
    align-items: center;
    background: #a0b2a6;
    border: 1px solid #a0b2a6;
    border-radius: 50rem;
    color: #fff;
    display: inline-flex;
    font-weight: 600;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1.25rem;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sg-checkout-page .button:hover,
.sg-checkout-content .woocommerce-form-login button.button:hover,
.sg-checkout-content .checkout_coupon button.button:hover {
    background: #ffdd44;
    border-color: #ffdd44;
    color: #1a1a1a;
    transform: translateY(-1px);
}

.sg-checkout-page #place_order {
    background: #8a9b8e;
    border-color: #8a9b8e;
    font-size: 1rem;
    width: 100%;
}

.sg-checkout-page .blockUI.blockOverlay {
    border-radius: 0.5rem;
}

[data-bs-theme="dark"] .sg-checkout-header {
    border-bottom-color: #444;
}

[data-bs-theme="dark"] .sg-checkout-content .woocommerce-info,
[data-bs-theme="dark"] .sg-checkout-content .woocommerce-message,
[data-bs-theme="dark"] .sg-checkout-content .woocommerce-error,
[data-bs-theme="dark"] .sg-checkout-content .woocommerce-form-login,
[data-bs-theme="dark"] .sg-checkout-content .checkout_coupon,
[data-bs-theme="dark"] .sg-checkout-panel {
    background: #2b2b2b;
    border-color: #444;
    box-shadow: none;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sg-checkout-panel h2,
[data-bs-theme="dark"] .sg-checkout-panel h3,
[data-bs-theme="dark"] .sg-checkout-page .shop_table .order-total th,
[data-bs-theme="dark"] .sg-checkout-page .wc_payment_method > label {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sg-checkout-page #customer_details .woocommerce-shipping-fields,
[data-bs-theme="dark"] .sg-checkout-page #customer_details .woocommerce-additional-fields,
[data-bs-theme="dark"] .sg-checkout-page #customer_details .woocommerce-account-fields,
[data-bs-theme="dark"] .sg-checkout-summary #order_review_heading,
[data-bs-theme="dark"] .sg-checkout-page .shop_table th,
[data-bs-theme="dark"] .sg-checkout-page .shop_table td,
[data-bs-theme="dark"] .sg-checkout-page .wc_payment_methods,
[data-bs-theme="dark"] .sg-checkout-page .payment_box {
    border-color: #444;
}

[data-bs-theme="dark"] .sg-checkout-page label,
[data-bs-theme="dark"] .sg-checkout-page .shop_table tfoot th,
[data-bs-theme="dark"] .sg-checkout-page .shop_table .product-quantity,
[data-bs-theme="dark"] .sg-checkout-page .payment_box {
    color: #adb5bd;
}

[data-bs-theme="dark"] .sg-checkout-page input.input-text,
[data-bs-theme="dark"] .sg-checkout-page textarea,
[data-bs-theme="dark"] .sg-checkout-page select,
[data-bs-theme="dark"] .sg-checkout-page .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .sg-checkout-content .woocommerce-form-login input.input-text,
[data-bs-theme="dark"] .sg-checkout-content .checkout_coupon input.input-text {
    background: #343434;
    border-color: #555;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sg-checkout-page .shop_table thead th,
[data-bs-theme="dark"] .sg-checkout-page #payment,
[data-bs-theme="dark"] .sg-checkout-page .place-order {
    background: #343434;
}

[data-bs-theme="dark"] .sg-checkout-page .wc_payment_method {
    background: #2b2b2b;
    border-color: #555;
}

@media (max-width: 1199px) {
    .sg-checkout-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-checkout-summary {
        position: static;
    }
}

@media (max-width: 767px) {
    .sg-checkout-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 1.5rem;
    }

    .sg-checkout-page .woocommerce-billing-fields__field-wrapper,
    .sg-checkout-page .woocommerce-shipping-fields__field-wrapper,
    .sg-checkout-page .woocommerce-additional-fields__field-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-checkout-page .shop_table th,
    .sg-checkout-page .shop_table td {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .sg-checkout-page .wc_payment_methods,
    .sg-checkout-page .place-order {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
