/* ============================================================
   cart_popup.css — попап корзина
   /catalog/view/theme/custom/stylesheet/cart_popup.css
   ============================================================ */

/* ── Контейнер попапа ── */
.cart-popup {
    width: 360px;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
    border: 1.5px solid #ddd;
    overflow: visible;
    font-family: 'Inter', sans-serif;
}
/* Скругляем края через дочерние блоки, не через overflow:hidden на родителе */
.cart-popup-items {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
    border-radius: 12px 12px 0 0;
    background: #fff;
}
.cart-popup-totals {
    padding: 10px 16px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}
.cart-popup-actions {
    padding: 14px 16px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    border-radius: 0 0 12px 12px;
}
.cart-popup-empty {
    padding: 28px 16px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
}
.cart-popup-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 16px;
    gap: 10px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}
.cart-popup-row:last-child {
    border-bottom: none;
}

/* ── Фото ── */
.cart-popup-thumb-wrap {
    flex-shrink: 0;
}
.cart-popup-thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* ── Инфо о товаре ── */
.cart-popup-info {
    flex: 1;
    min-width: 0;
    padding-right: 24px;
}
.cart-popup-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 3px;
    white-space: normal;
}
.cart-popup-name:hover {
    color: #d35400;
    text-decoration: none;
}
.cart-popup-option {
    font-size: 11px;
    color: #999;
}
.cart-popup-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}
.cart-popup-qty {
    font-size: 12px;
    color: #aaa;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 1px 6px;
}
.cart-popup-price {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
}

/* ── Кнопка удаления ── */
.cart-popup-remove {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}
.cart-popup-remove:hover {
    color: #e74c3c;
    background: #fdf0ee;
}

/* ── Строки итогов ── */
.cart-popup-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #777;
    padding: 3px 0;
}
.cart-popup-total-row.is-last {
    font-size: 15px;
    font-weight: 800;
    color: #d35400;
    border-top: 1px solid #eee;
    margin-top: 6px;
    padding-top: 8px;
}

/* ── Кнопки ── */
.cart-popup-btn-cart {
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    text-decoration: none;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.15s, color 0.15s;
}
.cart-popup-btn-cart:hover {
    color: #333;
    border-color: #aaa;
    text-decoration: none;
}
.cart-popup-btn-checkout {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #3A9E5F;
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.15s;
}
.cart-popup-btn-checkout:hover {
    background: #2e8a50;
    color: #fff;
    text-decoration: none;
}

/* ── Пустая корзина ── */
.cart-popup-empty {
    padding: 28px 16px;
    text-align: center;
}
.cart-popup-empty-icon {
    font-size: 2.2em;
    color: #ddd;
    display: block;
    margin-bottom: 10px;
}
.cart-popup-empty p {
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

/* ── Адаптив на мобиле ── */
@media (max-width: 480px) {
    .cart-popup {
        width: calc(100vw - 30px);
    }
}
/* ── Кнопка-плашка корзины ── */
#cart > button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}
