/* ── Cart layout ─────────────────────────────────────────────────────── */
.nexab-cart__layout { display: flex; gap: 1.75rem; align-items: flex-start; }
.nexab-cart__main   { flex: 1; min-width: 0; overflow-x: auto; }
.nexab-cart__sidebar { flex: 0 0 300px; position: sticky; top: 20px; }

/* ── Table ───────────────────────────────────────────────────────────── */
.nexab-cart__table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.nexab-cart__table thead th {
    text-align: left;
    padding: .5rem .625rem;
    border-bottom: 2px solid var(--nx-border, #e5e7eb);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--nx-muted, #6b7280);
}
.nexab-cart__row { border-bottom: 1px solid var(--nx-border, #e5e7eb); transition: opacity .2s; }
.nexab-cart__row td { padding: .875rem .625rem; vertical-align: middle; }

.nexab-cart__th-img, .nexab-cart__td-img { width: 76px; padding-right: 0 !important; }
.nexab-cart__img    { width: 68px; height: 68px; object-fit: cover; border-radius: var(--nx-radius-sm, 6px); display: block; border: 1px solid var(--nx-border, #e5e7eb); }
.nexab-cart__img-ph { width: 68px; height: 68px; border-radius: var(--nx-radius-sm, 6px); background: var(--nx-surface, #f4f7f6); display: flex; align-items: center; justify-content: center; border: 1px solid var(--nx-border, #e5e7eb); }

.nexab-cart__name { font-weight: 700; color: var(--nx-heading, #10243d); text-decoration: none; font-size: .9375rem; transition: color .2s ease; }
.nexab-cart__name:hover { color: var(--nx-accent, #0d9488); }
.nexab-cart__props { margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .25rem; }
.nexab-cart__prop  { font-size: .75rem; color: var(--nx-muted, #6b7280); background: var(--nx-surface, #f4f7f6); padding: .0625rem .4375rem; border-radius: 100px; border: 1px solid var(--nx-border, #e5e7eb); }

.nexab-cart__th-price, .nexab-cart__td-price { white-space: nowrap; }
.nexab-cart__old-price  { font-size: .8rem; color: var(--nx-border, #e5e7eb); display: block; text-decoration: line-through; }
.nexab-cart__price      { font-weight: 700; color: var(--nx-heading, #10243d); }
.nexab-cart__price.is-sale { color: #ef4444; }

/* ── Qty control ─────────────────────────────────────────────────────── */
.nexab-cart__qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--nx-border, #e5e7eb);
    border-radius: var(--nx-radius-sm, 6px);
    overflow: hidden;
    width: fit-content;
}
.nexab-cart__qty-btn {
    width: 30px; height: 34px;
    border: none;
    background: var(--nx-surface, #f4f7f6);
    color: var(--nx-muted, #6b7280);
    font-size: 1rem;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}
.nexab-cart__qty-btn:hover { background: var(--nx-border, #e5e7eb); color: var(--nx-heading, #10243d); }
.nexab-cart__qty-input {
    width: 44px; height: 34px;
    border: none;
    border-left: 1px solid var(--nx-border, #e5e7eb);
    border-right: 1px solid var(--nx-border, #e5e7eb);
    text-align: center;
    font-size: .875rem;
    -moz-appearance: textfield;
    color: var(--nx-heading, #10243d);
    font-family: inherit;
}
.nexab-cart__qty-input::-webkit-inner-spin-button { display: none; }

.nexab-cart__row-sum { font-weight: 800; white-space: nowrap; color: var(--nx-accent, #0d9488); }

/* ── Delete ──────────────────────────────────────────────────────────── */
.nexab-cart__del-btn { background: none; border: none; color: var(--nx-border, #e5e7eb); cursor: pointer; padding: .25rem; border-radius: 4px; transition: color .15s; }
.nexab-cart__del-btn:hover { color: #ef4444; }

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.nexab-cart__sidebar {
    background: var(--nx-surface, #f4f7f6);
    border: 1px solid var(--nx-border, #e5e7eb);
    border-radius: var(--nx-radius, 10px);
    padding: 1.25rem;
}

/* ── Coupon ──────────────────────────────────────────────────────────── */
.nexab-cart__coupon { margin-bottom: 1.125rem; }
.nexab-cart__coupon-label { font-size: .75rem; font-weight: 700; color: var(--nx-muted, #6b7280); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .375rem; }
.nexab-cart__coupon-row { display: flex; gap: .375rem; }
.nexab-cart__coupon-input { flex: 1; padding: .4375rem .625rem; border: 1px solid var(--nx-border, #e5e7eb); border-radius: var(--nx-radius-sm, 6px); font-size: .875rem; font-family: inherit; color: var(--nx-heading, #10243d); background: var(--nx-bg, #fff); }
.nexab-cart__coupon-btn { padding: .4375rem .75rem; background: var(--nx-surface, #f4f7f6); border: 1px solid var(--nx-border, #e5e7eb); border-radius: var(--nx-radius-sm, 6px); font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; transition: background .15s; }
.nexab-cart__coupon-btn:hover { background: var(--nx-border, #e5e7eb); }
.nexab-cart__coupon-msg { font-size: .8rem; margin: .3rem 0 0; min-height: 1.125rem; }
.nexab-cart__coupon-msg.is-ok  { color: #16a34a; }
.nexab-cart__coupon-msg.is-err { color: #ef4444; }

/* ── Totals ──────────────────────────────────────────────────────────── */
.nexab-cart__totals { margin-bottom: 1rem; border-top: 1px solid var(--nx-border, #e5e7eb); padding-top: .875rem; }
.nexab-cart__total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-size: .9rem; color: var(--nx-muted, #6b7280); }
.nexab-cart__total-row--discount { color: #ef4444; font-size: .875rem; }
.nexab-cart__total-row--final { font-size: 1.125rem; font-weight: 800; color: var(--nx-heading, #10243d); margin-top: .625rem; border-top: 1px solid var(--nx-border, #e5e7eb); padding-top: .625rem; margin-bottom: 0; }

/* ── Action buttons ──────────────────────────────────────────────────── */
.nexab-cart__action-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: .6875rem 1rem;
    border-radius: var(--nx-radius-sm, 6px);
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: .5rem;
    transition: opacity .15s, background .15s, color .15s, border-color .15s;
    font-family: inherit;
    cursor: pointer;
}
.nexab-cart__action-btn--primary { background: var(--nx-accent, #0d9488); color: #fff; border: none; }
.nexab-cart__action-btn--primary:hover { opacity: .88; }
.nexab-cart__action-btn--outline { border: 1.5px solid var(--nx-border, #e5e7eb); color: var(--nx-text, #5a6577); background: var(--nx-bg, #fff); }
.nexab-cart__action-btn--outline:hover { border-color: var(--nx-accent, #0d9488); color: var(--nx-accent, #0d9488); }

/* ── Empty state ─────────────────────────────────────────────────────── */
.nexab-cart__empty { text-align: center; padding: 3.75rem 1.25rem; }
.nexab-cart__empty-icon { margin-bottom: 1rem; opacity: .35; }
.nexab-cart__empty-msg  { font-size: 1.0625rem; color: var(--nx-muted, #6b7280); margin: 0 0 1.25rem; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .nexab-cart__layout  { flex-direction: column; }
    .nexab-cart__sidebar { flex: none; width: 100%; position: static; }
    .nexab-cart__th-price, .nexab-cart__td-price,
    .nexab-cart__th-sum,   .nexab-cart__td-sum { display: none; }
    .nexab-cart__row-sum { display: none; }
}
@media (max-width: 540px) {
    .nexab-cart__th-img, .nexab-cart__td-img { display: none; }
}
