/* ─────────────────────────────────────────────
   cart.css  ·  minimal, responsive table design
   Relies on variables from site.css:
     --accent         main brand colour
     --sidebar-bg     dark text backdrop (if defined)
────────────────────────────────────────────── */

.hc-cart-page {
  padding-block: 2.5rem;
}

/* empty-state text */
.hc-empty {
  font-size: 1.1rem;
  margin: 1rem 0 2rem;
}

/* clear-cart */
.hc-clear-form {
  text-align: right;
  margin-bottom: 0.5rem;
}
.hc-clear-form .btn-alt {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* responsive table wrapper (horizontal scroll on mobile) */
.cart-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* cart table */
.hc-cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
  min-width: 540px;           /* fallback width */
}

.hc-cart-table thead th {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid #e4e4e4;
  font-weight: 600;
}
.hc-cart-table th.right,
.hc-cart-table td.right  { text-align: right; }
.hc-cart-table th.center,
.hc-cart-table td.center { text-align: center; }

.hc-cart-table tbody td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #eee;
}

/* product thumb + name */
.cart-thumb {
  display: inline-block;
  width: 52px;
  height: 52px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}
.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: .25rem;
  border: 1px solid #ddd;
}
.cart-name {
  vertical-align: middle;
  font-weight: 500;
}

/* qty form */
.qty-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.qty-form input[type="number"] {
  width: 3.5rem;
  padding: 0.3rem 0.4rem;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
}
.qty-form button {
  border: none;
  background: var(--accent, #111);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* remove button */
.remove-form button {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: #aaa;
  cursor: pointer;
}
.remove-form button:hover { color: var(--accent, #111); }

/* totals row */
.hc-cart-table tfoot th {
  padding: 0.8rem 0.5rem;
  font-size: 1.05rem;
}

/* CTA buttons */
.hc-cart-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}
.hc-cart-cta .btn-primary {
  background: var(--accent, #111);
  color: #fff;
  padding: 0.8rem 1.4rem;
  border-radius: 0.3rem;
}
.hc-cart-cta .btn-outline {
  padding: 0.8rem 1.4rem;
  border: 1px solid #000;
  border-radius: 0.3rem;
}

/* small-screen tweaks */
@media (max-width: 600px) {
  .hc-cart-page {
    padding-block: 1.25rem;
  }
  .hc-cart-table thead {
    display: none;          /* headerless, card-style rows */
  }
  .hc-cart-table,
  .hc-cart-table tbody,
  .hc-cart-table tr,
  .hc-cart-table td {
    display: block;
    width: 100%;
  }
  .hc-cart-table tr {
    margin-bottom: 1.2rem;
    border: 1px solid #eee;
    border-radius: .3rem;
    padding: 0.75rem;
  }
  .hc-cart-table td {
    border: none;
  }
  .hc-cart-table td.right,
  .hc-cart-table td.center { text-align: left; }

  .qty-form input[type="number"] { width: 3rem; }
  .hc-cart-cta { justify-content: center; }
}
