/* =====================================================================
   GENZLO - shopping cart
   ===================================================================== */

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.cart-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cart-store { overflow: hidden; }
.cart-store .card-head a { color: var(--c-brand-dark); font-weight: 700; font-size: .87rem; }
.cart-items { display: flex; flex-direction: column; }
.cart-item {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 100px 130px 100px 34px;
    gap: 12px; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--c-border);
}
.cart-item:last-child { border-bottom: 0; }
.cart-thumb { width: 74px; height: 74px; border-radius: var(--r-md); overflow: hidden; background: var(--c-surface-2); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-item-name { font-size: .87rem; font-weight: 600; line-height: 1.35; }
.cart-item-name:hover { color: var(--c-brand); }
.cart-item-price { text-align: right; }
.cart-line-total { text-align: right; font-weight: 800; font-size: .95rem; }
.cart-item .qty {
    display: inline-flex; border: 1px solid var(--c-border-2); border-radius: var(--r-md);
    overflow: hidden; background: var(--c-surface); transform: scale(.92);
}
.cart-item .qty button { width: 34px; border: 0; background: var(--c-surface-2); cursor: pointer; font-size: 1.05rem; color: var(--c-text-2); }
.cart-item .qty button:hover { background: var(--c-brand-soft); color: var(--c-brand); }
.cart-item .qty input { width: 44px; text-align: center; border: 0; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); border-radius: 0; padding: 7px 2px; -moz-appearance: textfield; }
.cart-item .qty input::-webkit-outer-spin-button, .cart-item .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-remove { color: var(--c-muted); }
.cart-remove:hover { color: var(--c-danger); background: var(--c-danger-soft); }
.cart-store-foot {
    display: flex; justify-content: flex-end; gap: 20px; padding: 10px 15px;
    background: var(--c-surface-2); border-top: 1px solid var(--c-border);
}

.cart-summary { position: sticky; top: 132px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: .86rem; color: var(--c-text-2); }
.summary-row.total { font-size: 1.05rem; color: var(--c-text); }
.summary-row.total strong { color: var(--c-brand-dark); font-size: 1.22rem; }

@media (max-width: 940px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .cart-item { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "thumb info remove" "price qty total"; row-gap: 8px; }
    .cart-thumb { grid-area: thumb; width: 64px; height: 64px; }
    .cart-item-info { grid-area: info; }
    .cart-item-price { grid-area: price; text-align: left; }
    .cart-item .qty { grid-area: qty; }
    .cart-line-total { grid-area: total; }
    .cart-remove { grid-area: remove; }
}
