/* ═══════════════════════════════════════════════════════════
   Sydney Ironing — Cart Page
   ═══════════════════════════════════════════════════════════ */

body.woocommerce-cart .woocommerce { max-width: 100% !important; }

.cart-page {
    background: var(--bg);
    min-height: 70vh;
    padding: 2rem 1.5rem 5rem;
}

.cart-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Breadcrumb */
.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-hint);
    margin-bottom: 1rem;
}

.cart-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.cart-breadcrumb a:hover { color: var(--primary); }
.cart-breadcrumb span { color: var(--text-body); font-weight: 600; }

/* Page heading */
.cart-page-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.cart-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.cart-add-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.cart-add-more:hover { color: var(--primary-dark); }

/* Card base */
.cart-card {
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Layout (Bootstrap row/col-lg-8/col-lg-4 in markup) */
.cart-right { position: sticky; top: 88px; }

/* Item rows */
.cart-row {
    display: grid;
    grid-template-columns: 64px 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 0.5px solid var(--border-light);
    transition: opacity .2s, transform .2s;
}

.cart-row:last-child { border-bottom: none; }

.cart-row.cart-row-removing {
    opacity: 0;
    transform: translateX(8px);
}

.cart-row-img,
.cart-row-img-placeholder {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-row-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-row-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.cart-row-name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
}

.cart-row-name:hover { color: var(--primary); }

.cart-row-price {
    font-size: 12px;
    color: var(--text-hint);
    font-weight: 500;
}

/* Qty stepper */
.cart-row-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 6px;
}

.cart-qty-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--border-light);
    border-radius: 6px;
    color: var(--text-body);
    cursor: pointer;
    transition: background .15s, color .15s;
}

.cart-qty-btn:hover { background: var(--primary); color: #fff; }
.cart-qty-btn:disabled { opacity: .5; cursor: not-allowed; }

.cart-qty-val {
    min-width: 18px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}

.cart-row-subtotal {
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.cart-row-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-hint);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.cart-row-remove:hover { background: #FEF2F2; color: #EF4444; }

/* Summary card */
.cart-summary-card { padding: 20px; }

.cart-summary-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    color: var(--text-muted);
    padding: 9px 0;
    border-bottom: 0.5px solid var(--border-light);
}

.cart-summary-row span:last-child { font-weight: 600; color: var(--text-body); }

.cart-summary-total {
    border-bottom: none;
    padding-top: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.cart-summary-total span:last-child {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    color: var(--primary);
}

.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    background: var(--cta);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Mulish', sans-serif;
    padding: 13px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s;
}

.cart-checkout-btn:hover { background: var(--cta-dark); color: #fff; }
.cart-checkout-btn[disabled],
.cart-checkout-btn.is-disabled {
    pointer-events: none;
    opacity: .5;
}

/* Empty state */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
}

.cart-reset-btn {
    background: var(--cta);
    color: #fff;
    border-radius: var(--radius);
    padding: 10px 22px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
}

.cart-reset-btn:hover { background: var(--cta-dark); color: #fff; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .cart-right { position: static; }
}

@media (max-width: 540px) {
    .cart-page { padding: 1.25rem 1rem 3rem; }

    .cart-row {
        grid-template-columns: 48px 1fr auto;
        grid-template-areas:
            "img name remove"
            "img qty subtotal";
        row-gap: 8px;
    }

    .cart-row-img,
    .cart-row-img-placeholder { width: 48px; height: 48px; grid-area: img; }
    .cart-row-body { grid-area: name; }
    .cart-row-remove { grid-area: remove; }
    .cart-row-qty { grid-area: qty; justify-self: start; }
    .cart-row-subtotal { grid-area: subtotal; justify-self: end; }
}
