/**
 * Olanzu — Cart Page
 * Global resets + utilities → style.css
 * Only cart-specific styles here.
 */

/* Hide theme page title — breadcrumb is used instead */
.woocommerce-cart .entry-title,
.woocommerce-cart h1.page-title,
.woocommerce-cart .page-header { display: none !important; }

/* Hide WC default cart table (we render our own item cards) */
.woocommerce-cart-form .shop_table { display: none !important; }

/* ── Breadcrumb border override ──────────────────────────────────────────────── */
/* Global breadcrumb styles live in style.css; this just overrides the border color */
.olz-cart-bc { border-bottom: 1px solid var(--olz-gray-200); }

/* ── Notices ─────────────────────────────────────────────────────────────────── */
.olz-cart-notices {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1.25rem var(--page-px) 0;
}

/* ── Main grid ───────────────────────────────────────────────────────────────── */
.olz-cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 2.5rem var(--page-px) 5rem;
}
/* Two-column layout on desktop: items (8fr) + order summary (4fr) */
@media (min-width: 1024px) {
    .olz-cart-grid { grid-template-columns: 8fr 4fr; }
}

.olz-cart-left  { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
/* Sticky summary panel — stays in view while scrolling the item list */
.olz-cart-right { position: sticky; top: 2rem; align-self: flex-start; min-width: 0; }

/* ── Item list ───────────────────────────────────────────────────────────────── */
.olz-cart-items-list { display: flex; flex-direction: column; gap: 0.875rem; }

/* ── Item card ───────────────────────────────────────────────────────────────── */
.olz-cart-item-card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius);
    padding: 1.125rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: border-color 0.2s;
}
.olz-cart-item-card:hover { border-color: rgba(17, 24, 39, 0.15); }
@media (max-width: 640px) {
    .olz-cart-item-card { padding: 0.875rem; gap: 0.75rem; }
}

/* Image wrapper */
.olz-ci-img-wrap {
    position: relative;
    width: 5.5rem;
    min-width: 5.5rem;
    height: 5.5rem;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .olz-ci-img-wrap { width: 4.5rem; min-width: 4.5rem; height: 4.5rem; }
}

/* Pack/quantity badge — 7px is intentionally tiny; badge sits in a small image corner */
.olz-ci-pack-badge {
    position: absolute;
    top: 0; left: 0;
    background: var(--olz-gray-900);
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 6px;
    border-radius: var(--radius) 0 4px 0;
    z-index: 2;
    white-space: nowrap;
    line-height: 1.4;
}

.olz-ci-img {
    width: 100%; height: 100%;
    border-radius: var(--radius);
    border: 1px solid rgba(229, 231, 235, 0.5);
    background: var(--olz-gray-50);
    overflow: hidden;
}
.olz-ci-img a   { display: block; width: 100%; height: 100%; }
.olz-ci-img img { width: 100%; height: 100%; object-fit: cover; display: block; mix-blend-mode: multiply; opacity: 0.9; }

/* Item body */
.olz-ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.olz-ci-row1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }

.olz-ci-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--olz-gray-900);
    margin: 0;
    line-height: 1.3;
    flex: 1; min-width: 0;
}
.olz-ci-name a { color: inherit; text-decoration: none; transition: color 0.2s; }
.olz-ci-name a:hover { color: var(--olz-red); }

.olz-ci-remove {
    background: none !important;
    color: var(--olz-gray-300) !important;
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0.125rem;
    transition: color 0.2s;
}
.olz-ci-remove:hover { color: var(--olz-red) !important; background: none !important; }
.olz-ci-remove svg  { width: 1.1rem; height: 1.1rem; }

/* Variation / SKU meta — shown as uppercase abbreviation e.g. "K-1695 · 7x10 · ALUMINUM" */
.olz-ci-meta {
    display: block;
    font-size: 0.675rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--olz-gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.olz-ci-row3 { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.375rem; }
/* Push line total to the far right of the qty stepper row */
.olz-ci-row3 .olz-ci-line-total { margin-left: auto; }

.olz-ci-line-total {
    font-weight: 800;
    font-size: 1rem;
    color: var(--olz-gray-900);
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.olz-ci-line-total .woocommerce-Price-amount { font-weight: 800; }

/* Qty stepper */
.olz-ci-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--olz-gray-300);
    border-radius: var(--radius);
    background: #fff;
    height: 34px;
    overflow: hidden;
}
.olz-ci-qty-btn {
    width: 30px; height: 100%;
    background: #fff;
    border: none;
    cursor: pointer;
    color: var(--olz-gray-700);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s;
}
.olz-ci-qty-btn:hover { background: var(--olz-gray-50); }
.olz-ci-qty-val {
    width: 40px !important;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--olz-gray-900);
    background: #fff;
    border: none !important;
    border-left: 1px solid var(--olz-gray-300) !important;
    border-right: 1px solid var(--olz-gray-300) !important;
    outline: none;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0;
    -moz-appearance: textfield;
    font-variant-numeric: tabular-nums;
}
.olz-ci-qty-val::-webkit-outer-spin-button,
.olz-ci-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Continue shopping ───────────────────────────────────────────────────────── */
.olz-cart-continue a {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--olz-gray-500);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s;
}
.olz-cart-continue a:hover { color: var(--olz-red); }

/* ── Order summary card ──────────────────────────────────────────────────────── */
.olz-order-summary {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius);
    padding: 1.5rem 1.625rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}
.olz-summary-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--olz-gray-900);
    margin: 0 0 1.125rem;
}

/* Coupon */
.olz-coupon-form {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}
.olz-coupon-form > svg { width: 1rem; height: 1rem; color: var(--olz-gray-400); flex-shrink: 0; }
.olz-coupon-input {
    flex: 1;
    background: var(--olz-gray-50);
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    color: var(--olz-gray-900);
    font-size: 0.8125rem;
    border-radius: var(--radius) !important;
    outline: none !important;
    padding: 0.5rem 0.75rem !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    min-width: 0;
}
.olz-coupon-input:focus {
    border-color: var(--olz-red) !important;
    /* Focus ring uses brand red at 8% opacity — matches product page inputs */
    box-shadow: 0 0 0 3px rgba(228, 4, 20, 0.08) !important;
}
.olz-coupon-btn {
    background: var(--olz-gray-900);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.olz-coupon-btn:hover { background: var(--olz-red); }

/* Summary lines */
.olz-summary-lines { display: flex; flex-direction: column; gap: 0.75rem; }
.olz-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--olz-gray-500);
}
.olz-summary-row span:last-child { font-weight: 600; color: var(--olz-gray-900); }

/* Shipping value cell — displays cost, "Free", or "Calculated at checkout" */
.olz-shipping-val { font-weight: 600; color: var(--olz-gray-900); }

/* Coupon row — green to signal savings */
.olz-summary-coupon { color: var(--olz-green); }
.olz-summary-coupon span:last-child { color: var(--olz-green); }

.olz-summary-divider {
    width: 100%; height: 1px;
    background: rgba(229, 231, 235, 0.7);
    margin: 1rem 0;
}
.olz-summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}
.olz-summary-total-label { font-weight: 700; font-size: 1rem; color: var(--olz-gray-900); }
.olz-summary-total-val {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--olz-gray-900);
    font-variant-numeric: tabular-nums;
}
.olz-summary-total-val .woocommerce-Price-amount { font-weight: 800; font-size: inherit; }

/* Free shipping progress — cart-specific margin only; track/fill styles → style.css */
.olz-ship-progress-box { margin-bottom: 1.125rem; }

/* Checkout CTA — red primary button with subtle drop shadow */
.olz-cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--olz-red);
    color: #fff !important;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none !important;
    /* Shadow uses brand red RGB at 22% opacity */
    box-shadow: 0 8px 15px -3px rgba(228, 4, 20, 0.22);
    transition: background 0.2s;
    text-align: center;
}
.olz-cart-checkout-btn:hover { background: var(--olz-red-dark); color: #fff !important; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.olz-cart-empty {
    max-width: 46rem;
    margin: 3rem auto 5rem;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius);
    padding: 5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.olz-cart-empty-icon {
    width: 5rem; height: 5rem;
    background: var(--olz-gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(229, 231, 235, 0.5);
    margin-bottom: 1.5rem;
    color: var(--olz-gray-300);
}
.olz-cart-empty-icon svg { width: 2.5rem; height: 2.5rem; }
.olz-cart-empty h3 { font-weight: 800; font-size: 1.875rem; color: var(--olz-gray-900); margin: 0 0 0.875rem; }
.olz-cart-empty p  { color: var(--olz-gray-500); margin: 0 0 2rem; max-width: 26rem; line-height: 1.6; }

/* ── WC notices ──────────────────────────────────────────────────────────────── */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-info {
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.woocommerce-cart .woocommerce-error li::before { color: var(--olz-red) !important; }
