/* ==========================================================================
   JLS COMPUTERS — CART PAGE (classic shortcode)
   Faithful build of the Claude Design "JLS Cart Page". Scoped under .jls-cart.
   ========================================================================== */

.jls-cart {
    --navy:   #2C5697;
    --navy-d: #234779;
    --ink:    #15203a;
    --muted:  #5d6781;
    --line:   #e4e8f0;
    --bg:     #f3f6fb;
    --ok:     #1f9d57;

    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 40px;
    color: var(--ink);
    font-family: var(--jls-font, 'Inter', sans-serif);
}
.jls-cart * { box-sizing: border-box; }
.jls-cart a { color: inherit; text-decoration: none; }

/* Neutralise GP article chrome on cart */
.woocommerce-cart .inside-article,
.woocommerce-page.woocommerce-cart .inside-article {
    border: none !important; box-shadow: none !important; background: transparent !important; padding: 0 !important;
}

/* WC notices, on-brand */
.jls-cart .woocommerce-message,
.jls-cart .woocommerce-error,
.jls-cart .woocommerce-info {
    border-radius: 10px; border-left: none; font-size: 13.5px; margin-bottom: 18px;
}

.jls-cart__crumbs { font-size: 12.5px; color: var(--muted); padding: 22px 0 6px; }
.jls-cart__crumbs a:hover { color: var(--navy); }
.jls-cart__crumbs .sep { opacity: .5; margin: 0 6px; }
.jls-cart__crumbs .current { color: var(--ink); font-weight: 600; }

.jls-cart__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.jls-cart__head h1 {
    font-family: var(--jls-font-heading, 'Poppins', sans-serif);
    font-size: 26px; font-weight: 700; color: var(--ink); text-transform: none; margin: 0;
}
.jls-cart__count { font-size: 14px; color: var(--muted); }

/* Grid */
.jls-cart-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
    gap: 40px; align-items: start;
}

/* Progress bar */
.jls-cart__progress { border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; margin-bottom: 18px; }
.jls-cart__progress-msg { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.jls-cart__progress-track { height: 7px; border-radius: 99px; background: #e4e8f0; overflow: hidden; }
.jls-cart__progress-fill { height: 100%; border-radius: 99px; transition: width .35s ease; }

/* Column header */
.jls-cart__col-head {
    display: grid; grid-template-columns: 1fr 120px 120px 32px; gap: 12px;
    padding: 0 4px 10px; font-size: 11px; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line);
}
.jls-cart__col-head .c { text-align: center; }
.jls-cart__col-head .r { text-align: right; }

/* Line item */
.jls-cart__item {
    display: grid; grid-template-columns: 1fr 120px 120px 32px; gap: 12px;
    align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line);
}
.jls-cart__item-main { display: flex; gap: 15px; align-items: center; min-width: 0; }
.jls-cart__item-thumb {
    width: 78px; height: 78px; flex: 0 0 auto; border: 1px solid var(--line);
    border-radius: 9px; overflow: hidden; background: var(--bg); display: block;
}
.jls-cart__item-thumb img { width: 100%; height: 100%; object-fit: contain; }
.jls-cart__item-info { min-width: 0; }
.jls-cart__item-info .brand { font-size: 11px; font-weight: 700; color: var(--navy); }
.jls-cart__item-info .title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; margin: 2px 0 5px; }
.jls-cart__item-info .title:hover { color: var(--navy); }
.jls-cart__item-info .meta { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.jls-cart__item-info .meta .sku { color: var(--navy); font-weight: 600; }
.jls-cart__item-info .meta .stock.in { color: var(--ok); font-weight: 700; }
.jls-cart__item-info .meta .stock.out { color: #c23a1c; font-weight: 700; }
.jls-cart__item-info .actions { display: flex; gap: 14px; font-size: 11.5px; }
.jls-cart__item-info .actions .save { color: var(--navy); font-weight: 600; }
.jls-cart__item-info .actions .rm { color: var(--muted); display: inline; width: auto; height: auto; border-radius: 0; text-indent: 0; line-height: inherit; }
.jls-cart__item-info .actions .rm:hover { color: #c23a1c; }

.jls-cart__item-qty { display: flex; justify-content: center; }
.jls-qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.jls-qty button { width: 34px; height: 38px; border: none; background: #fff; color: var(--navy); cursor: pointer; line-height: 1; }
.jls-qty button.minus { font-size: 17px; }
.jls-qty button.plus { font-size: 15px; }
.jls-qty__input {
    width: 38px; height: 38px; text-align: center; font-weight: 700; font-size: 14px;
    border: none; outline: none; -moz-appearance: textfield; color: var(--ink); background: #fff;
}
.jls-qty__input::-webkit-outer-spin-button, .jls-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.jls-cart__item-total { text-align: right; font-size: 15px; font-weight: 800; color: var(--ink); }
.jls-cart__item-total .woocommerce-Price-amount { font-size: 15px; font-weight: 800; }
.jls-cart__item-total .ea { font-size: 11px; font-weight: 500; color: var(--muted); }
.jls-cart__item-total .ea .woocommerce-Price-amount { font-size: 11px; font-weight: 500; color: var(--muted); }
.jls-cart__item-x { text-align: center; color: #c0c7d4; font-size: 18px; line-height: 1; }
.jls-cart__item-x:hover { color: #c23a1c; }

.jls-cart__below { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px 0; }
.jls-cart__below .continue { font-size: 13px; font-weight: 700; color: var(--navy); }
.jls-cart__below .empty { font-size: 12.5px; color: var(--muted); }
.jls-cart__below .empty:hover { color: #c23a1c; }

/* Hidden update button (drives the steppers) */
.jls-cart__update { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* Saved for later */
.jls-cart__saved { margin-top: 34px; }
.jls-cart__saved h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.jls-cart__saved-row { display: flex; align-items: center; gap: 15px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.jls-cart__saved-row .thumb { width: 58px; height: 58px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.jls-cart__saved-row .thumb img { width: 100%; height: 100%; object-fit: contain; }
.jls-cart__saved-row .info { flex: 1; min-width: 0; }
.jls-cart__saved-row .info .brand { font-size: 11px; font-weight: 700; color: var(--navy); }
.jls-cart__saved-row .info .title { font-size: 13px; font-weight: 600; color: var(--ink); }
.jls-cart__saved-row .price { font-size: 14px; font-weight: 800; color: var(--ink); }
.jls-cart__saved-row .move { background: #fff; border: 1.5px solid var(--navy); color: var(--navy); border-radius: 7px; padding: 8px 14px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.jls-cart__saved-row .move:hover { background: rgba(44,86,151,.05); }

/* Cross-sell */
.jls-cart__cross { margin-top: 34px; }
.jls-cart__cross h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.jls-cart__cross-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.jls-cart__cross-card { border: 1px solid var(--line); border-radius: 11px; padding: 13px; display: flex; flex-direction: column; gap: 9px; }
.jls-cart__cross-card .img { aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--bg); display: block; }
.jls-cart__cross-card .img img { width: 100%; height: 100%; object-fit: contain; }
.jls-cart__cross-card .t { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.35; min-height: 34px; }
.jls-cart__cross-card .row { display: flex; align-items: center; justify-content: space-between; }
.jls-cart__cross-card .p { font-size: 14px; font-weight: 800; color: var(--navy); }
.jls-cart__cross-card .add { background: var(--navy); color: #fff; border-radius: 7px; padding: 7px 13px; font-size: 12px; font-weight: 700; }
.jls-cart__cross-card .add:hover { background: var(--navy-d); }

/* ---------- Order summary ---------- */
.jls-cart__right { position: sticky; top: 18px; }
.jls-cart__summary { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.jls-cart__summary-head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.jls-cart__summary-head h2 { font-size: 17px; font-weight: 700; color: var(--ink); text-transform: none; margin: 0; }
.jls-cart__summary-body { padding: 18px 20px; }

.jls-cart__promo { display: flex; gap: 8px; margin-bottom: 16px; }
.jls-cart__promo input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; outline: none; text-transform: uppercase; }
.jls-cart__promo input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(44,86,151,.13); }
.jls-cart__promo button { background: var(--ink); color: #fff; border: none; border-radius: 8px; padding: 0 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.jls-cart__coupon-applied { display: flex; align-items: center; justify-content: space-between; background: #eaf6ef; border: 1px solid #d3ebdc; border-radius: 8px; padding: 9px 13px; margin-bottom: 16px; }
.jls-cart__coupon-applied span { font-size: 12.5px; font-weight: 700; color: #137a41; }
.jls-cart__coupon-applied .rm { font-size: 12px; color: var(--muted); }
.jls-cart__coupon-applied .rm:hover { color: #c23a1c; }

.jls-cart__row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); padding: 7px 0; }
.jls-cart__row .v { color: var(--ink); font-weight: 600; }
.jls-cart__row .v.free { color: var(--ok); font-weight: 800; }
.jls-cart__row.discount { color: var(--ok); }
.jls-cart__row.discount .v { color: var(--ok); font-weight: 700; }

.jls-cart__total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 13px; display: flex; justify-content: space-between; align-items: baseline; }
.jls-cart__total .label { font-size: 15px; font-weight: 700; color: var(--ink); }
.jls-cart__total .amount { font-family: var(--jls-font-heading, 'Poppins', sans-serif); font-size: 24px; font-weight: 700; color: var(--navy); }
.jls-cart__total .amount .woocommerce-Price-amount { font-size: 24px; font-weight: 700; color: var(--navy); }
.jls-cart__total .incl { font-size: 12px; color: var(--muted); font-weight: 500; }

.jls-cart__checkout {
    display: flex; align-items: center; justify-content: center;
    width: 100%; margin-top: 16px; background: var(--navy); color: #fff !important;
    border-radius: 9px; height: 52px; font-size: 15px; font-weight: 800;
    letter-spacing: .02em; text-transform: uppercase;
}
.jls-cart__checkout:hover { background: var(--navy-d); color: #fff !important; }
.jls-cart__quote-btn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; margin-top: 11px; background: #fff; color: var(--navy);
    border: 2px solid var(--navy); border-radius: 9px; height: 50px;
    font-size: 14px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; cursor: pointer;
}
.jls-cart__quote-btn:hover { background: rgba(44,86,151,.05); }
.jls-cart__quote-hint { text-align: center; margin-top: 9px; font-size: 11.5px; color: var(--muted); }

.jls-cart__trust { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.jls-cart__trust div { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink); }
.jls-cart__trust .tick { color: var(--ok); font-weight: 800; }

/* Payment chips (shared look with the PDP) */
.jls-cart__payments { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.jls-cart__payments .label { font-size: 11px; color: var(--muted); margin-right: 2px; }
.jls-cart .jls-pay-chip { position: relative; display: inline-flex; }
.jls-cart .jls-pay-chip .chip { font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); }
.jls-cart .jls-pay-chip.active .chip { color: var(--navy); background: #eef3fb; border-color: #cdddf3; }
.jls-cart .jls-pay-chip.soon .chip { color: #c0c7d4; background: #f6f8fb; border-color: #edf0f5; cursor: default; }
.jls-cart .jls-pay-chip .tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 600; padding: 4px 8px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.jls-cart .jls-pay-chip.soon:hover .tip { opacity: 1; }

/* ---------- Empty state ---------- */
.jls-cart__empty { text-align: center; padding: 60px 24px 70px; }
.jls-cart__empty .icon { width: 96px; height: 96px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 40px; margin: 0 auto 22px; }
.jls-cart__empty h2 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.jls-cart__empty p { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
.jls-cart__empty .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.jls-cart__empty .primary { display: inline-flex; align-items: center; background: var(--navy); color: #fff; border-radius: 9px; height: 48px; padding: 0 26px; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.jls-cart__empty .primary:hover { background: var(--navy-d); color: #fff; }
.jls-cart__empty .secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); border-radius: 9px; height: 48px; padding: 0 24px; font-size: 14px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.jls-cart__empty .secondary:hover { background: rgba(44,86,151,.05); }
.jls-cart__empty-saved { max-width: 760px; margin: 0 auto; }

/* ---------- Quote modal (shared) ---------- */
.jls-cart-modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(11,17,36,.55); }
.jls-cart-modal.is-open { display: flex; }
.jls-cart-modal__card { background: #fff; border-radius: 16px; width: 100%; max-width: 480px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4); max-height: 92vh; overflow-y: auto; }
.jls-cart-modal__head { background: var(--navy); color: #fff; padding: 20px 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.jls-cart-modal__head h3 { font-family: var(--jls-font-heading, 'Poppins', sans-serif); font-size: 17px; font-weight: 800; margin: 0; color: #fff; text-transform: none; }
.jls-cart-modal__head p { font-size: 12.5px; opacity: .85; margin: 2px 0 0; }
.jls-cart-modal__close { cursor: pointer; font-size: 22px; line-height: 1; opacity: .85; background: none; border: none; color: #fff; }
.jls-cart-modal__body { padding: 22px 24px; }
.jls-cart-modal__foot { text-align: center; margin-top: 11px; font-size: 11.5px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .jls-cart-grid { grid-template-columns: 1fr; gap: 28px; }
    .jls-cart__right { position: static; }
}
@media (max-width: 600px) {
    .jls-cart { padding: 0 16px 32px; }
    .jls-cart__col-head { display: none; }
    .jls-cart__item { grid-template-columns: 1fr auto; grid-template-areas: "main x" "qty total"; gap: 10px 12px; }
    .jls-cart__item-main { grid-area: main; }
    .jls-cart__item-qty { grid-area: qty; justify-content: flex-start; }
    .jls-cart__item-total { grid-area: total; text-align: right; align-self: center; }
    .jls-cart__item-x { grid-area: x; align-self: start; }
    .jls-cart__cross-grid { grid-template-columns: 1fr; }
}
