/* ==========================================================================
   Cart / Inquiry Review — Step 1
   Scoped to .sh-cart-page
   ========================================================================== */

/* ── Nuke WooCommerce wrappers that fight our layout ───────────────────── */
.sh-cart-page .woocommerce-cart-form,
.sh-cart-page .cart_totals,
.sh-cart-page .wc-proceed-to-checkout,
.sh-cart-page .cart-collaterals {
    all: unset;
    display: block;
}

/* Reset WC table markup without nuking our own classes */
.sh-cart-page table.shop_table,
.sh-cart-page table.cart {
    all: unset;
    display: table;
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.sh-cart-page .quantity {
    all: unset;
}

/* ── Blanket cell reset — no backgrounds, no WC borders ────────────────── */
/* NOTE: no !important here so our own .sh-cart-th/.sh-cart-td can override */
.sh-cart-table td,
.sh-cart-table th {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    vertical-align: top;
}

/* ── Page wrapper ──────────────────────────────────────────────────────── */
.sh-cart-page {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 48px 24px 60px !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: var(--sh-ink-900) !important;
}

/* ── Stepper ───────────────────────────────────────────────────────────── */
.sh-cart-stepper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.12em;
    font-family: var(--sh-font-mono);
    text-transform: uppercase;
}

.sh-cart-stepper__step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sh-cart-stepper__step--active  { color: var(--sh-teal-800); font-weight: 600; }
.sh-cart-stepper__step--inactive { color: var(--sh-ink-400); }

.sh-cart-stepper__bubble {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--sh-ink-200);
    color: var(--sh-ink-400);
    background: transparent;
    flex-shrink: 0;
}

.sh-cart-stepper__bubble--active {
    background: var(--sh-teal-800);
    border-color: var(--sh-teal-800);
    color: #fff;
}

.sh-cart-stepper__line {
    flex: 0 0 40px;
    height: 1px;
    background: var(--sh-ink-200);
}

/* ── Empty state ───────────────────────────────────────────────────────── */
.sh-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 24px;
    text-align: center;
    color: var(--sh-ink-500);
}
.sh-cart-empty svg { color: var(--sh-ink-300); }
.sh-cart-empty p   { font-size: var(--sh-fs-base); margin: 0; }

/* ── Two-column layout ─────────────────────────────────────────────────── */
.sh-cart-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 48px !important;
    align-items: start !important;
}

@media (max-width: 860px) {
    .sh-cart-layout { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ── Left panel ────────────────────────────────────────────────────────── */
.sh-cart-title {
    font-size: 32px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    color: var(--sh-ink-900) !important;
    margin: 0 0 8px !important;
    line-height: 1.25 !important;
}

.sh-cart-subtitle {
    font-size: 17px !important;
    color: var(--sh-ink-600) !important;
    margin: 0 0 24px !important;
    line-height: 1.52 !important;
}

.sh-cart-form {
    all: unset;
    display: block;
}

/* ── Table wrapper ─────────────────────────────────────────────────────── */
.sh-cart-table-wrap {
    background: #FDFCFA;
    border: 1px solid var(--sh-ink-200);
    border-radius: 2px;
    overflow: hidden;
}

.sh-cart-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    background: transparent;
    margin: 0;
    padding: 0;
}

/* ── Header cells ──────────────────────────────────────────────────────── */
.sh-cart-table thead .sh-cart-th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sh-ink-600);
    background: var(--sh-ink-50);
    border-bottom: 1px solid var(--sh-ink-200);
    white-space: nowrap;
    text-align: left;
    line-height: 1;
}

.sh-cart-th--qty   { text-align: right; width: 150px; }
.sh-cart-th--price { text-align: right; width: 100px; }
.sh-cart-th--total { text-align: right; width: 100px; }
.sh-cart-th--remove { text-align: center; width: 40px; }

/* ── Body rows ─────────────────────────────────────────────────────────── */
.sh-cart-tr {
    border-bottom: 1px solid var(--sh-ink-100);
    transition: background 0.15s;
}
.sh-cart-tr:last-child { border-bottom: none; }
.sh-cart-tr:hover { background: #f9fbfb; }

/* Body cells */
.sh-cart-table tbody .sh-cart-td {
    padding: 14px 16px;
    vertical-align: middle;
    background: transparent;
    border: none;
    font-size: 14px;
}

.sh-cart-table tbody .sh-cart-td--qty,
.sh-cart-table tbody .sh-cart-td--price,
.sh-cart-table tbody .sh-cart-td--total {
    text-align: right;
    vertical-align: middle;
}

.sh-cart-table tbody .sh-cart-td--remove {
    text-align: center;
    vertical-align: middle;
}

/* ── Product cell ──────────────────────────────────────────────────────── */
.sh-cart-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sh-cart-product__img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: 1px solid var(--sh-ink-200);
    border-radius: 2px;
    overflow: hidden;
    background: var(--sh-ink-50);
}

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

.sh-cart-product__img a {
    display: block;
    width: 100%;
    height: 100%;
}

.sh-cart-product__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sh-ink-900);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-cart-product__name a {
    color: inherit;
    text-decoration: none;
}

.sh-cart-product__name a:hover { color: var(--sh-teal-800); }

.sh-cart-product__sku {
    font-family: var(--sh-font-mono);
    font-size: 10px;
    color: var(--sh-ink-400);
    margin-top: 3px;
    letter-spacing: 0.06em;
}

/* ── Qty stepper ───────────────────────────────────────────────────────── */
.sh-cart-qty-wrap {
    display: flex;
    justify-content: flex-end;
}

.sh-cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--sh-ink-200);
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
    height: 32px;
}

.sh-cart-qty__btn {
    all: unset;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 300;
    color: var(--sh-ink-400);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    line-height: 1;
}

.sh-cart-qty__btn:hover {
    color: var(--sh-teal-800);
    background: var(--sh-ink-50);
}

.sh-cart-qty__input {
    all: unset;
    width: 44px;
    height: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--sh-ink-900);
    border-left: 1px solid var(--sh-ink-200);
    border-right: 1px solid var(--sh-ink-200);
    -moz-appearance: textfield;
    line-height: 32px;
    padding: 0;
}

.sh-cart-qty__input::-webkit-outer-spin-button,
.sh-cart-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sh-cart-qty-solo {
    font-size: 14px;
    font-weight: 500;
    color: var(--sh-ink-900);
    padding: 0 8px;
    line-height: 32px;
}

.sh-cart-moq-warning {
    display: none;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fff5f5;
    border-left: 3px solid #ef4444;
    border-radius: 2px;
    width: 100%;
    box-sizing: border-box;
}

.sh-cart-moq-warning svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #ef4444;
    margin-top: 1px;
}

.sh-cart-moq-warning span {
    font-size: 13px;
    line-height: 1.5;
    color: #b91c1c;
}

/* ── Price cells ───────────────────────────────────────────────────────── */
.sh-cart-price,
.sh-cart-line-total {
    font-family: var(--sh-font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--sh-ink-900);
    letter-spacing: 0.02em;
}

/* Override WC injected price spans */
.sh-cart-table .woocommerce-Price-amount,
.sh-cart-table .woocommerce-Price-currencySymbol {
    font-family: var(--sh-font-mono) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--sh-ink-900) !important;
    background: transparent !important;
}

.sh-cart-price--quote {
    color: var(--sh-ink-400);
    font-weight: 400;
    font-size: 11px;
}

.sh-cart-price--strike {
    font-family: var(--sh-font-mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--sh-ink-400);
    text-decoration: line-through;
    display: block;
    line-height: 1.4;
}

.sh-cart-price--discounted {
    font-family: var(--sh-font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--sh-ink-900);
    display: block;
    line-height: 1.4;
}


/* ── Remove button ─────────────────────────────────────────────────────── */
.sh-cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sh-ink-300);
    text-decoration: none;
    transition: color 0.15s;
    line-height: 1;
    padding: 4px;
}

.sh-cart-remove:hover { color: #c0392b; }

/* ── Actions bar ───────────────────────────────────────────────────────── */
.sh-cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.sh-cart-actions__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--sh-ink-400);
    text-decoration: none;
    transition: color 0.15s;
}

.sh-cart-actions__back:hover { color: var(--sh-teal-800); }


/* ── Summary sidebar ───────────────────────────────────────────────────── */
.sh-cart-summary {
    position: sticky;
    top: 100px;
}

.sh-cart-summary__inner {
    background: #fff;
    border: 1px solid var(--sh-ink-200);
    border-radius: 2px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sh-cart-summary__title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    color: var(--sh-ink-950, #0B1012) !important;
    margin: 0 0 16px !important;
    line-height: 1.25 !important;
    text-transform: none !important;
}

.sh-cart-summary__rows {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

.sh-cart-summary__row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid var(--sh-ink-100) !important;
    font-size: 13px !important;
    color: var(--sh-ink-600) !important;
    line-height: 1.5 !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    letter-spacing: 0 !important;
}

.sh-cart-summary__row span:last-child {
    font-family: var(--sh-font-mono) !important;
    color: var(--sh-ink-900) !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    letter-spacing: -0.01em !important;
}

/* Override WC price spans in summary */
.sh-cart-summary__row .woocommerce-Price-amount,
.sh-cart-summary__row .woocommerce-Price-currencySymbol {
    font-family: var(--sh-font-mono) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--sh-ink-900) !important;
    background: transparent !important;
}

.sh-cart-summary__tbd {
    color: var(--sh-ink-400) !important;
    font-family: var(--sh-font-mono) !important;
    font-size: 13px !important;
}

.sh-cart-summary__total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    padding: 12px 0 4px !important;
    margin-bottom: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--sh-ink-900) !important;
    border-top: none !important;
}

.sh-cart-summary__total span:last-child {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--sh-ink-600) !important;
    letter-spacing: 0 !important;
}

/* Override WC price spans in total */
.sh-cart-summary__total .woocommerce-Price-amount,
.sh-cart-summary__total .woocommerce-Price-currencySymbol {
    font-family: var(--sh-font-mono) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0A4F4F !important;
    background: transparent !important;
}

.sh-cart-summary__note {
    font-size: 11px;
    color: var(--sh-ink-400);
    text-align: center;
    margin: 14px 0 0;
    line-height: 1.6;
}

/* ── CTA button ────────────────────────────────────────────────────────── */
.sh-cart-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #006767 !important;
    color: #fff !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 12px 20px !important;
    border-radius: 2px !important;
    text-decoration: none !important;
    transition: background 0.15s !important;
    cursor: pointer !important;
    border: none !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.sh-cart-cta-btn:hover { background: #0A4F4F !important; }

.sh-cart-cta-btn--full {
    width: 100% !important;
}

/* ── WooCommerce notices ────────────────────────────────────────────────── */
.sh-cart-page .woocommerce-message,
.sh-cart-page .woocommerce-error,
.sh-cart-page .woocommerce-info {
    font-family: var(--sh-font-sans);
    font-size: var(--sh-fs-sm);
    margin-bottom: 24px;
    border-radius: 2px;
    border-left-width: 3px;
}

/* ── WooCommerce input-text / woocommerce-Input neutralisation ──────────── */
.sh-cart-page input.input-text,
.sh-cart-page .woocommerce-Input,
.sh-cart-page select.woocommerce-select {
    height: auto !important;
    padding: 8px 12px !important;
    background: #fff !important;
    border: 1px solid var(--sh-ink-200) !important;
    border-radius: 2px !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
    color: var(--sh-ink-900) !important;
    box-shadow: none !important;
    outline: none !important;
    width: auto !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-block !important;
    margin: 0 !important;
    float: none !important;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .sh-cart-th--price,
    .sh-cart-td--price { display: none; }

    .sh-cart-product__img { width: 48px; height: 48px; }

    .sh-cart-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
