/* ── CART PAGE ── */
.cart-page {
    padding: 48px 5% 80px;
    min-height: 60vh;
}
.cart-page-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.cart-header {
    margin-bottom: 32px;
}
.cart-header h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -.5px;
}
.cart-header p {
    font-size: .9rem;
    color: var(--gray);
    margin-top: 4px;
}

/* ── EMPTY STATE ── */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
}
.cart-empty-icon {
    color: #d1d5db;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}
.cart-empty-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.cart-empty-desc {
    font-size: .9rem;
    color: var(--gray);
    margin-bottom: 28px;
}
.btn-to-catalog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: .95rem;
    transition: background .2s;
}
.btn-to-catalog:hover { background: var(--red-dark); }

/* ── LAYOUT ── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

/* ── ITEM LIST ── */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    transition: border-color .2s;
}
.cart-item:hover { border-color: #d1d5db; }

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--gray-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cart-item-img-placeholder {
    font-size: 2rem;
    color: #d1d5db;
}

.cart-item-info {
    min-width: 0;
}
.cart-item-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
    line-height: 1.35;
}
.cart-item-name:hover { color: var(--red); }
.cart-item-price-single {
    font-size: .8rem;
    color: var(--gray);
    margin-top: 4px;
}

.cart-item-qty {
    font-size: .9rem;
    font-weight: 600;
    color: var(--gray);
    white-space: nowrap;
}

.cart-item-subtotal {
    font-size: 1rem;
    font-weight: 800;
    color: var(--black);
    white-space: nowrap;
}
.cart-item-subtotal span {
    font-size: .75rem;
    font-weight: 500;
    color: var(--gray);
    margin-left: 2px;
}

.cart-item-remove-form { display: flex; }
.btn-remove-item {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
    flex-shrink: 0;
}
.btn-remove-item:hover {
    border-color: var(--red);
    color: var(--red);
    background: #fff5f5;
}

/* ── SUMMARY ── */
.cart-summary {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 80px;
}
.cart-summary-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
}
.cart-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .88rem;
    color: var(--gray);
}
.cart-summary-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--black);
    padding-top: 12px;
    border-top: 1.5px solid var(--border);
    margin-top: 4px;
}
.cart-summary-total small {
    font-size: .75rem;
    font-weight: 500;
    color: var(--gray);
    margin-left: 2px;
}

.btn-continue-shopping {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: 16px;
    transition: color .2s;
}
.btn-continue-shopping:hover { color: var(--red); }

.btn-clear-cart {
    width: 100%;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    font-family: 'Inter', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.btn-clear-cart:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    .cart-summary {
        position: static;
    }
}
@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 64px 1fr auto;
        grid-template-rows: auto auto;
    }
    .cart-item-img { width: 64px; height: 64px; }
    .cart-item-info { grid-column: 2 / 4; }
    .cart-item-qty { grid-row: 2; grid-column: 1 / 2; justify-self: center; }
    .cart-item-subtotal { grid-row: 2; grid-column: 2 / 3; }
    .cart-item-remove-form { grid-row: 2; grid-column: 3 / 4; }
}
