/* ============================================================
   cart.css — современная корзина
   /catalog/view/theme/custom/stylesheet/cart.css
   ============================================================ */

.modern-cart-wrapper {
    margin-top: 20px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

/* ── Карточка товара ── */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}
.cart-item-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: box-shadow 0.2s ease;
}
.cart-item-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.cart-item-image {
    flex: 0 0 100px;
    padding-right: 15px;
}
.cart-item-image img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}
.cart-item-info {
    flex: 1;
    padding-right: 15px;
}
.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
}
.cart-item-name:hover {
    color: #d35400;
    text-decoration: none;
}
.cart-item-model,
.cart-item-option {
    font-size: 13px;
    color: #777;
}

/* ── Количество ── */
.cart-item-qty {
    flex: 0 0 170px;
    padding-right: 15px;
}
.qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
}
.qty-input {
    width: 50px !important;
    text-align: center;
    border-radius: 6px !important;
    border: 1px solid #ccc !important;
    height: 36px;
    box-shadow: none !important;
}
.btn-qty-action {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-update:hover {
    background: #e0f2f1;
    color: #00897b;
    border-color: #00897b;
}
.btn-remove:hover {
    background: #ffebee;
    color: #c62828;
    border-color: #c62828;
}

/* ── Цены ── */
.cart-item-price-wrap {
    flex: 0 0 120px;
    text-align: right;
}
.cart-item-price {
    font-size: 13px;
    color: #888;
    margin-bottom: 2px;
}
.cart-item-total {
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

/* ── Карточка итогов (sticky) ── */
.cart-summary-card {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 20px;
}
.summary-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    border-bottom: 2px solid #111;
    padding-bottom: 10px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
}
.summary-last {
    border-top: 1px solid #ddd;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 20px;
    font-weight: 800;
    color: #d35400;
}
.summary-actions {
    margin-top: 25px;
}

/* ── Кнопка оформления — зелёная ── */
.btn-checkout-main {
    display: block;
    width: 100%;
    background: #3A9E5F;
    color: #fff;
    text-align: center;
    padding: 14px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(58,158,95,0.3);
}
.btn-checkout-main:hover {
    background: #2e8a50;
    color: #fff;
    text-decoration: none;
}

/* ── Ссылка "Продолжить покупки" ── */
.btn-continue-shopping {
    display: block;
    text-align: center;
    color: #666;
    font-size: 14px;
    text-decoration: none;
}
.btn-continue-shopping:hover {
    color: #111;
    text-decoration: underline;
}

/* ── Адаптив ── */
@media (max-width: 768px) {
    .cart-item-card {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        padding: 14px;
        gap: 8px;
    }
    .cart-item-image {
        flex: none;
        width: auto;
        padding-right: 0;
        margin-bottom: 4px;
    }
    /* Скрываем блок изображения если картинки нет */
    .cart-item-image:empty {
        display: none;
    }
    .cart-item-info {
        flex: none;
        width: 100%;
        padding-right: 40px; /* место под кнопку удаления */
    }
    .cart-item-qty {
        flex: none;
        width: auto;
        padding-right: 0;
        margin-top: 4px;
    }
    .cart-item-price-wrap {
        flex: none;
        width: auto;
        text-align: left;
        margin-top: 4px;
    }
    .btn-remove {
        position: absolute;
        top: 14px;
        right: 14px;
    }
    .cart-summary-card {
        position: static;
        margin-top: 24px;
    }
}
/* Пустая корзина — убираем лишнее пространство */
#checkout-cart #content {
    min-height: 0 !important;
}
