/* =========================================================
   HVHA Cart UI — consolidated & commented (retain styling)
   ========================================================= */

/* ===== Wrappers ===== */
.hvha-mini-cart,
.hvha-checkout-review{
  display:block;
  border:1px solid rgba(0,0,0,.08);
  padding:1rem;
  border-radius:6px;
}

/* ===== Cart Row (2-row grid) =====
   Row 1: [thumb] [title/price/options] [qty]
   Row 2: [bin ]  [stock]               [line total]
*/
.hvha-cartlist__line{
  display:grid;
  grid-template-columns:64px minmax(0,1fr) max-content; /* qty column sized to content (tight, right) */
  grid-template-rows:auto auto;
  grid-template-areas:
    "thumb title qty"
    "bin   stock total";
  column-gap:8px;
  row-gap:8px;
  align-items:start;                 /* top-align title/qty with thumb */
  padding-top:8px;                   /* space above divider */
  border-bottom:1px dashed rgba(0,0,0,.08);
}
.hvha-cartlist__line:last-child{ border-bottom:none; }

/* Hide any extra separators some themes inject */
.hvha-cartlist__line + .hvha-cartlist__line::before,
.hvha-cartlist__line > hr{ display:none !important; }

/* ===== Thumb ===== */
.hvha-cartlist__thumb{ grid-area:thumb; }
.hvha-cartlist__thumb img{
  width:56px; height:56px; object-fit:cover; border-radius:3px;
}

/* ===== Title / Price / Options ===== */
.hvha-cartlist__title{ display:contents; } /* children place directly on the grid */
.hvha-cartlist__title > :not(.stock):not(.hvha-cartlist__line-total){
  grid-column:2; grid-row:1; /* keep title/price text in row 1 middle col */
}
.hvha-cartlist__title a{ text-decoration:none; }
.hvha-cartlist__title a:hover{ color:#ff6900; }
.hvha-cartlist__price{ font-size:.9em; opacity:.85; line-height:1.2; }

/* ===== Qty (right column, row 1) ===== */
.hvha-cartlist__qty{
  grid-area:qty;
  justify-self:end;                /* hard-right */
  align-self:start;                /* top with thumb */
  display:inline-flex;
  gap:.25rem;
}
/* prevent theme wrappers from expanding the qty block */
.hvha-cartlist__qty .quantity{
  width:auto !important; max-width:none !important;
  margin:0 !important; float:none !important;
  display:inline-flex !important; flex:0 0 auto !important;
}

/* ===== Bin (row 2, col 1) ===== */
.hvha-cartlist__remove{
  grid-area:bin;
  justify-self:start; align-self:center;
  cursor:pointer; border:none; background:none;
  padding:.2rem; line-height:1;
  width:36px; height:36px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:6px;
}
.hvha-cartlist__remove svg{ width:18px; height:18px; stroke:currentColor; }
.hvha-cartlist__remove:hover svg{ stroke:#ff0000; }

/* ===== Stock pill (row 2, col 2) =====
   Uses Woo’s global .stock classes from your site-wide snippet
*/
.stock{ display:inline-block; margin-top:4px; }
.hvha-cartlist__stock,
.hvha-cartlist__title .stock{ grid-area:stock; align-self:center; }

/* ===== Line total (row 2, col 3) ===== */
.hvha-cartlist__line-total{
  grid-area:total;
  justify-self:end; align-self:center;
  font-weight:600; font-size:.9em; margin-top:0;
}

/* ===== Mini-cart subtotal/footer ===== */
.wc-block-mini-cart__footer{
  margin-top:1rem; padding-top:1rem; border-top:1px solid rgba(0,0,0,.08);
}
.wc-block-mini-cart__footer-subtotal{
  display:flex; justify-content:space-between; font-weight:600;
}

/* Hide built-in mini-cart action buttons (you style Avada buttons elsewhere) */
.hvha-mini-cart__actions{ display:none !important; }

/* ===== Checkout totals ===== */
.wc-block-components-totals{
  margin-top:1rem; padding-top:1rem; border-top:1px solid rgba(0,0,0,.08);
}
.wc-block-components-totals-item{
  display:flex; justify-content:space-between; margin:.25rem 0;
}
.wc-block-components-totals-footer-item{ margin-top:.35rem; }
.tax-rate,.tax-total{ font-size:.95em; }

/* ===== Empty state ===== */
.hvha-cartlist__empty{ opacity:.8; font-size:.95em; }

/* ===== Mobile ===== */
@media (max-width:480px){
  .hvha-cartlist__line{
    grid-template-columns:56px minmax(0,1fr) max-content;
  }
}

/* ===== Qty input: compact & consistent =====
   (Single source of truth; overrides theme with !important where needed)
*/
.hvha-mini-cart input[name^="hvha_qty["],
.hvha-checkout-review input[name^="hvha_qty["],
.hvha-cartlist__line input[name^="hvha_qty["],
.hvha-cartlist__qty input[type="number"],
.hvha-cartlist__line .quantity .qty{
  display:inline-block !important;
  width:60px !important; min-width:60px !important; max-width:80px !important;
  height:32px !important; line-height:32px !important;
  padding:0 6px !important; text-align:center !important;
  box-sizing:border-box !important;
  border:1px solid rgba(0,0,0,.4) !important;
  border-radius:3px !important;         /* matches your current thumb radius */
  background:#fff !important;
}

/***********Empty Condition**********/
.hvha-mini-cart .hvha-empty__actions a:hover,
.hvha-checkout-review .hvha-empty__actions a:hover{ color:#ff6900 !important; }

/* Optional: tint + sizing for the icon wrapper */
.hvha-empty__icon { color:#ff6900; line-height:0; }
.hvha-empty__icon svg { width:32px; height:32px; }

/* === HVHA empty state: center everything === */
.hvha-empty{
  text-align: center;
}

.hvha-empty__head{
  display: flex;
  flex-direction: column;
  align-items: center;   /* centers icon + text + CTA */
  gap: 6px;
}

.hvha-empty__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin-bottom: 6px;
  /* optional tint; remove if you want to inherit */
  /* color: #ff6900; */
}

.hvha-empty__actions{
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.hvha-empty__btn{
  display: inline-block;
  margin: 0 auto;        /* keeps the CTA centered even if it’s inline-block */
}

/* If you kept the “Continue shopping” text link */
.hvha-empty__actions a:hover{
  color: #ff6900;
}

/* Optional: if you show the “Recently viewed” block, keep that centered too */
.hvha-empty__block-title{ text-align: center; }
.hvha-empty__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  justify-items: center;
}
