/* CRH Clean Cart (DIV layout) — tuned to your latest HTML
   Columns: [thumbnail | product | quantity | subtotal] + after-row .c--alloc
   Uses Elementor Primary for accents
*/
:root{
  --crh-primary: var(--e-global-color-primary, #2563eb);
  --crh-text: #0f172a;
  --crh-muted: #6b7689;
  --crh-card: #fff;
  --crh-bg: #f6f8fb;
  --crh-border: #e7edf4;
  --crh-border-2: #dfe6ee;
  --crh-radius: 12px;
  --crh-shadow: 0 10px 28px rgba(2,6,23,.06);
  --crh-font: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

/* body.woocommerce-cart{ background:var(--crh-bg); } */
.crh-basket{ font-family:var(--crh-font); }

/* -------- List + line card (4-col grid) -------- */
.crh-list{
 margin:0 auto; padding:0 8px;
  display:flex; flex-direction:column; gap:14px;
}
.crh-line{
  background:var(--crh-card); border:1px solid var(--crh-border);
  border-radius:14px; 
  padding:16px 18px;
  display:grid; gap:16px;
  grid-template-columns: 84px 1fr 151px 100px;
  align-items:start;
}
/* Quantity input - show arrows, one line */
.woocommerce div.quantity,
.woocommerce-page div.quantity {
    display: inline-flex;           /* Make input and buttons in one line */
    align-items: center;
}
.woocommerce-page div.quantity .minus{
          padding: 5px 5px;
    width: 35px;
}
.woocommerce-page div.quantity .plus{
       padding: 5px 5px;
    width: 35px;
}
.woocommerce div.quantity input.qty {
    -moz-appearance: number-input;  /* Firefox */
    -webkit-appearance: number-input; /* Chrome/Safari */
    width: 60px;                    /* Adjust width as needed */
    text-align: center;
}

.woocommerce div.quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: number-input;
    display: block;
}

/* -------- Thumbnail -------- */
.c.c--th img{
  width:64px; height:64px; object-fit:cover;
  border-radius:10px; border:1px solid #eef2f7;
}

/* -------- Product cell -------- */
/* .pd-top{ display:flex; justify-content:space-between; gap:10px; align-items:center; } */
.pd-title .pd-name,
.pd-title .pd-name:link{
  font-weight:800; color:var(--crh-text); text-decoration:none;
}
.pd-title .pd-name:hover{ opacity:.9; }
.pd-title .pd-sku{ margin-left:10px; color:#6f8fc4; font-weight:700; font-size:12px; }
.per-unit{ margin-top:6px; color:#7a8798; font-weight:700; font-size:13px; }

/* -------- Quantity cell (native Woo input) -------- */
.c.c--qt .quantity .qty{
  height:36px; border-radius:10px; border:1px solid var(--crh-border-2);
  width:88px; text-align:center; font-weight:800;
}

/* -------- Subtotal cell -------- */
.c.c--st{ text-align:right; }
.c.c--st .amount{ font-weight:800; color:var(--crh-text); }

/* -------- After-row slot: Allocated Areas (hook output) -------- */
.c.c--alloc{ grid-column: 1 / -1; margin-top:6px; }
.c--alloc .crh-acc{ background:#f8fbff; border:1px solid var(--crh-border); border-radius:12px; }
.c--alloc .crh-acc__toggle{     width: 100%;
    display: flex;
    justify-content: space-between;
    background-color: transparent;
    border: 1px solid var(--e-global-color-primary);
    border-radius: 3px;
    color: var(--e-global-color-primary);
} 
.c--alloc .crh-acc__toggle:focus, .c--alloc .crh-acc__toggle:hover, .c--alloc .crh-acc__toggle:focus, .c--alloc .crh-acc__toggle:hover, .c--alloc .crh-acc__toggle:focus, .c--alloc .crh-acc__toggle:hover{
  background-color: var(--e-global-color-primary);
    color: #fff;
    text-decoration: none;
}
  
.c--alloc .crh-acc__panel{  padding:12px 14px; }
.c--alloc .crh-panel-rows{ margin-bottom:8px; }
.c--alloc .crh-panel-row{
  display:grid; grid-template-columns: 1fr 92px 40px; gap:10px; align-items:center; margin-bottom:10px;
}
.c--alloc .crh-area-name{
  height:40px; border-radius:10px; padding:0 12px; border:1px solid var(--crh-border-2); background:#fff;
}
.c--alloc .crh-area-qty{
  width:92px; height:40px; text-align:center; font-weight:800;
  border:1px solid var(--crh-border-2); border-radius:10px; background:#fff;
}
.c--alloc .crh-del-row{
  width:40px; height:40px; border-radius:10px; border:1px solid var(--crh-border-2);
  background:#f1f3f6; color:#3b3f44; font-weight:900; display:flex; align-items:center; justify-content:center;
}
#crh-del-row{ background:#D41212; color:#fff; } /* your override */
.c--alloc .crh-del-row:hover{ background:#e8ebef; }

.c--alloc .crh-panel-actions{
  display:flex; gap:10px; align-items:center; margin-top:6px; padding:0 8px; justify-content:space-between;
}
.c--alloc .button{
  height:34px; line-height:34px; padding:0 14px; border-radius:10px; font-weight:700;
  border:1px solid var(--crh-border-2); background:#fff; color:#0f172a;
}
.c--alloc .button.button-primary{
  background:var(--e-global-color-primary)!important; border-color:var(--e-global-color-primary)!important; color:#fff!important;
}
.c--alloc .crh-panel-msg{ font-size:12px; color:#6b7280; }

/* -------- Line actions (Remove/Re-allocate if you print them) -------- */
.line-actions{ display:flex; justify-content:space-between; align-items:center; margin-top:10px; }
.lnk-remove{ color:#6b7788; text-decoration:none; }
.lnk-remove:hover{ text-decoration:underline; }

/* -------- Coupon / Update row -------- */
.crh-actions{
  margin:14px auto 0; padding:0 8px;
  display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap;
}
.crh-actions .coupon .input-text{
  height:36px; border-radius:10px; border:1px solid var(--crh-border-2);
}
.crh-actions .button{
  height:36px; line-height:34px; border-radius:10px; font-weight:700;
  border:1px solid var(--crh-border-2); background:#fff; color:#0f172a;
}
/* visual enable state for Update button (paired with small JS) */
.crh-actions .button[name="update_cart"][disabled],
.crh-actions .button[name="update_cart"].disabled{ opacity:.45; cursor:not-allowed; }
.crh-actions .button[name="update_cart"].crh-update-ready{ opacity:1; cursor:pointer; }

/* -------- Totals / CTA -------- */
.crh-collaterals .cart_totals{
  background:#fff; border:1px solid var(--crh-border); border-radius:14px;
 
}
.crh-collaterals .cart_totals h2{ margin:0; padding:14px 16px; border-bottom:1px solid #eef2f7; }
.crh-collaterals .wc-proceed-to-checkout a.checkout-button{
  background:var(--e-global-color-primary)!important; color:#fff;
  border-radius:12px!important; border:0!important; height:46px; line-height:46px;
  font-weight:800; font-size:16px; box-shadow:0 10px 22px rgba(37,99,235,.22);
}

/* -------- Responsive -------- */
@media (max-width: 980px){
  .crh-line{ grid-template-columns: 64px 1fr; }
  .c--qt, .c--st{ grid-column: 2 / -1; }
  .c--st{ text-align:left; }
  .c--qt, .c--st{ display:flex; justify-content:space-between; margin-top:8px; }
  .c--qt::before{ content: attr(data-title); color:#8a96a8; font-weight:700; }
  .c--st::before{ content: attr(data-title); color:#8a96a8; font-weight:700; }
  .c--alloc{ grid-column: 1 / -1; }
}
/* Optional: give a visual cue once we’ve enabled it */
.woocommerce-cart-form button[name="update_cart"].is-dirty {
  opacity: 1;
  filter: none;
  cursor: pointer;
}
.crh-update-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.woocommerce-cart-form.is-loading {
  position: relative;
  opacity: .6;
  pointer-events: none;
}
.woocommerce-cart-form.is-loading::after {
  content: '';
  position: absolute; inset: 0;
  background: transparent;
}
.woocommerce-cart-form.is-loading::before {
  content: '';
  position: absolute; inset: 0;
  margin: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,.12);
  border-top-color: var(--e-global-color-primary, #2563eb);
  animation: crhspin .8s linear infinite;
}
@keyframes crhspin { to { transform: rotate(360deg); } }
/* ===== CRH — Order Summary (Cart Totals) ===== */
.crh-collaterals{margin:30px auto 0px;padding:0 8px}
.crh-collaterals .cart_totals{
  background:#fff;border:1px solid var(--crh-border);border-radius:14px;
padding:0;overflow:hidden
}

/* Title: show “Order Summary”, hide the default text */
.crh-collaterals .cart_totals h2{
  margin:0;padding:16px 18px;border-bottom:1px solid #eef2f7;
  font-weight:800;font-size:16px;color:var(--crh-text);
  position:relative;line-height:1.2
}

.crh-collaterals .cart_totals h2 span,
.crh-collaterals .cart_totals h2::before{
  display:none !important;     /* hide original “Cart totals” text safely */
}

/* Rows */
.crh-collaterals .shop_table{
  width:100%;border:0!important;background:transparent!important;border-collapse:separate;border-spacing:0
}
.crh-collaterals .shop_table th,
.crh-collaterals .shop_table td{
  border:0!important;padding:12px 18px!important;background:transparent!important
}
.crh-collaterals .shop_table th{
  color:#8a96a8;font-weight:700;width:60%;text-align:left
}
.crh-collaterals .shop_table td{
  text-align:right;color:var(--crh-text);font-weight:700
}

/* Shipping / helper copy */
.crh-collaterals .woocommerce-shipping-totals .woocommerce-shipping-destination,
.crh-collaterals .e-checkout-message,
.crh-collaterals .shipping-calculator-button{
  font-size:12px;color:#6b7689
}
.crh-collaterals .woocommerce-shipping-totals .woocommerce-shipping-destination{
  padding:6px 18px 0
}
.crh-collaterals .shipping-calculator-button{
  display:inline-block;margin-top:6px;text-decoration:none
}
.crh-collaterals .shipping-calculator-button:hover{ text-decoration:underline }

/* Total row a bit bolder */
.crh-collaterals .order-total th,
.crh-collaterals .order-total td{
  padding-top:16px;padding-bottom:16px
}
.crh-collaterals .order-total td strong{font-weight:800}

/* Proceed button: big, blue, right aligned */
.crh-collaterals .wc-proceed-to-checkout{
  padding:14px 18px;border-top:1px solid #eef2f7;display:flex;justify-content:flex-end
}
.crh-collaterals .wc-proceed-to-checkout a.checkout-button{
  background:var(--e-global-color-primary)!important;color:#fff!important;
  border-radius:12px!important;border:0!important;
  height:44px;line-height:44px;font-weight:800;font-size:15px;
  padding:0 20px!important;box-shadow:0 10px 22px rgba(37,99,235,.18)
}
.crh-collaterals .wc-proceed-to-checkout a.checkout-button:hover{filter:brightness(.96)}

/* Mobile tweaks */
@media (max-width: 680px){
  .crh-collaterals .shop_table th{width:auto}
  .crh-collaterals .wc-proceed-to-checkout{justify-content:stretch}
  .crh-collaterals .wc-proceed-to-checkout a.checkout-button{width:100%;text-align:center}
}
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals{
  width:100%
}
