/* ============================================
   КОРЗИНА - CART (Блочная структура)
   оба состояния корзины, с товарами и пустая
   В редакторе страницы Корзина удали блок woocommerce/product-new и добавь вместо него:

   Блок "Шорткод" (Shortcode)
   Вставь: [products limit="4" columns="4" orderby="date"]
   ============================================ */
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button{
    min-width: auto;
}
.wc-block-components-sidebar{
    width: 100%;
}
.wc-block-components-sidebar-layout .wc-block-components-main{
    width: 100%;
}
.woocommerce .products, .woocommerce-page .products, ul.products.columns-3{
    max-width: 1800px;
}

.wc-block-cart {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 5%;
}

.wc-block-components-sidebar-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Таблица товаров в корзине */
.wc-block-cart-items {
    background: white;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    width: 100%;
}

.wc-block-cart-items thead {
    border-bottom: 2px solid #f5f5f7;
}

.wc-block-cart-items__header th {
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6e6e73;
    text-align: left;
}

.wc-block-cart-items__row {
    border-bottom: 1px solid #f5f5f7;
}

.wc-block-cart-items__row td {
    padding: 24px 16px;
    vertical-align: middle;
}

/* Изображение товара */
.wc-block-cart-item__image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f5f5f7;
}

/* Название товара */
.wc-block-components-product-name {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
}

.wc-block-components-product-name:hover {
    color: #0066cc;
}

/* Цена */
.wc-block-components-product-price__value {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
}

/* Описание товара */
.wc-block-components-product-metadata__description {
    font-size: 14px;
    color: #6e6e73;
    margin-top: 8px;
}

/* Количество */
.wc-block-components-quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.wc-block-components-quantity-selector__input {
    width: 70px;
    text-align: center;
    padding: 10px;
    background-color: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
}

.wc-block-components-quantity-selector__input:focus {
    background-color: white;
    border-color: #0066cc;
    outline: none;
}

.wc-block-components-quantity-selector__button {
    width: 32px;
    height: 32px;
    background-color: #f5f5f7;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wc-block-components-quantity-selector__button:hover {
    background-color: #e8e8ed;
}

/* Кнопка удаления */
.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link, table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
    color: #ff3b30;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.wc-block-cart-item__remove-link:hover {
    color: #ff3b30 !important;
    opacity: 0.8 !important;
}

/* Итоги корзины (sidebar) */
.wc-block-components-sidebar {
    position: sticky;
    top: 100px;
}

.wp-block-woocommerce-cart-order-summary-block {
    background: white;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.wc-block-cart__totals-title {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 24px 0;
}

/* Купоны */
.wc-block-components-totals-coupon {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f5f5f7;
}

.wc-block-components-panel__button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #0066cc;
    cursor: pointer;
}

/* Итоговая сумма */
.wc-block-components-totals-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 15px;
    color: #1d1d1f;
}

.wc-block-components-totals-footer-item {
    display: flex;
    padding-top: 24px;
    border-top: 2px solid #f5f5f7;
    font-size: 21px;
    font-weight: 600;
}

/* Кнопка оформления */
.wc-block-cart__submit-button {
    width: 100%;
    margin-top: 24px;
    padding: 16px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wc-block-cart__submit-button:hover {
    background-color: #0055b3;
}

@media (max-width: 767px) {
    .wc-block-components-sidebar-layout {
        grid-template-columns: 1fr;
    }

    .wc-block-components-sidebar {
        position: static;
    }
    .wc-block-components-totals-footer-item{
        flex-direction: column;
    }
    .wc-block-cart {
        padding: 20px 5%;
    }

    .wc-block-cart-items {
        padding: 20px;
    }

    .wc-block-cart-item__image img {
        width: 60px;
        height: 60px;
    }

    .wc-block-components-product-name {
        font-size: 15px;
    }
}

/* Пустая корзина */
.entry-title{
    padding-left: 4rem;
}
h1.wp-block-heading{
    padding-top: 2rem;
}
p.has-text-align-center{
    font-size: 1.5rem;
    color: #6e6e73;
    font-weight: 500;
    margin-bottom: 3rem;
}