/* The merch shop at /shop. Loads after halbie-homepage.css for its tokens,
   header and footer; template-shop.php owns the markup. Same quiet look as the
   public guide pages: white space, soft borders, plain type, orange only on
   the buttons. */

.ht-shop {
  --shop-max: 1120px;
  --shop-line: #e6e3de;
  --shop-soft: #5c5853;
  --shop-radius: 20px;
  --shop-gold: #c9a227;
  background: #fff;
  color: var(--ht-ink);
}
.ht-shop *, .ht-shop *::before, .ht-shop *::after { box-sizing: border-box; }
.ht-shop-section {
  max-width: var(--shop-max);
  margin: 0 auto;
  padding: 24px var(--page-inset);
}
.ht-shop-head { padding-top: 40px; padding-bottom: 8px; }
.ht-shop-h1 {
  margin: 0 0 8px;
  font-size: 32px; font-weight: 700; line-height: 36px; letter-spacing: -0.02em;
  color: var(--ht-ink);
}

/* Thank-you panel after Stripe sends the buyer back. */
.ht-shop-thanks {
  border: 1px solid var(--shop-line); border-left: 4px solid var(--ht-orange);
  border-radius: 16px; padding: 20px 24px; background: #fffaf3;
}
.ht-shop-thanks h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; line-height: 26px; }
.ht-shop-thanks ul { margin: 0 0 8px 18px; padding: 0; font-size: 15px; line-height: 22px; }
.ht-shop-thanks p { margin: 0; font-size: 15px; line-height: 22px; color: var(--shop-soft); }

/* Items on the left, the cart on the right. */
.ht-shop-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start;
}
.ht-shop-items {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px;
}
.ht-shop-item {
  border: 1px solid var(--shop-line); border-radius: var(--shop-radius);
  padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 6px;
}
.ht-shop-item__art {
  position: relative; aspect-ratio: 1; border-radius: 14px; background: var(--ht-soft);
  margin-bottom: 8px; overflow: hidden;
}
.ht-shop-item__art > svg { position: absolute; inset: 10%; width: 80%; height: 80%; }
/* A photo uploaded in Chronos (Settings > Shop) fills the square instead of the drawing. */
.ht-shop-item__art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ht-shop-item__name { margin: 0; font-size: 18px; font-weight: 700; line-height: 24px; color: var(--ht-ink); }
.ht-shop-item__price { font-size: 20px; font-weight: 700; margin-top: 2px; }
.ht-shop-item__soldout {
  margin-top: auto; align-self: flex-start;
  font-size: 13px; font-weight: 600; color: var(--shop-soft);
  border: 1px solid var(--shop-line); border-radius: 999px; padding: 6px 12px;
}
.is-soldout .ht-shop-item__art { opacity: 0.55; }
.ht-shop-item__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 8px; }
.ht-shop-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ht-shop-field > span { font-size: 12px; font-weight: 600; color: var(--ht-ink); }
.ht-shop-select, .ht-shop-qty {
  height: 44px; border: 1px solid #b9b5af; border-radius: 12px; background: #fff;
  font-size: 15px; font-family: inherit; color: var(--ht-ink);
}
.ht-shop-select { padding: 0 36px 0 12px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1612' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.ht-shop-qty { display: inline-flex; align-items: stretch; overflow: hidden; }
.ht-shop-qty button {
  width: 40px; border: 0; background: #fff; color: var(--ht-ink); font-size: 18px; cursor: pointer; font-family: inherit;
}
.ht-shop-qty button:hover { background: var(--ht-soft); }
.ht-shop-qty input {
  width: 44px; border: 0; text-align: center; font-size: 15px; font-family: inherit; color: var(--ht-ink);
  -moz-appearance: textfield; appearance: textfield; background: #fff;
}
.ht-shop-qty input::-webkit-outer-spin-button, .ht-shop-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ht-shop-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--ht-orange); color: #fff; font-size: 15px; font-weight: 700;
  font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 120ms ease;
}
.ht-shop-btn:hover { background: var(--ht-orange-dark); color: #fff; text-decoration: none; }
.ht-shop-btn[disabled] { background: #d5d1cb; color: #6b6660; cursor: not-allowed; }
.ht-shop-btn--add { flex: 1 1 auto; min-width: 120px; }
.ht-shop-btn--checkout { width: 100%; height: 48px; font-size: 16px; margin-top: 12px; }
.ht-shop-btn--gold { background: var(--shop-gold); color: #1a1612; }
.ht-shop-btn--gold:hover { background: #b8911f; color: #1a1612; }

/* Cart */
.ht-shop-cart {
  position: sticky; top: 96px;
  border: 1px solid var(--shop-line); border-radius: var(--shop-radius); padding: 20px; background: #fff;
}
.ht-shop-cart h2 { margin: 0 0 12px; font-size: 18px; font-weight: 700; line-height: 24px; }
.ht-shop-cart__empty { margin: 0; font-size: 14px; line-height: 20px; color: var(--shop-soft); }
.ht-shop-line {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--shop-line); font-size: 15px; line-height: 20px;
}
.ht-shop-line__name { flex: 1 1 auto; min-width: 0; }
.ht-shop-line__qty { color: var(--shop-soft); font-size: 13px; display: block; }
.ht-shop-line__price { font-variant-numeric: tabular-nums; }
.ht-shop-line__remove {
  border: 0; background: none; color: var(--shop-soft); font-size: 13px; font-family: inherit;
  text-decoration: underline; cursor: pointer; padding: 0;
}
.ht-shop-cart__row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.ht-shop-cart__total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--shop-line); margin-top: 4px; padding-top: 12px; }
.ht-shop-cart__note { margin: 10px 0 0; font-size: 13px; line-height: 18px; color: var(--shop-soft); }
.ht-shop-error { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: #b3261e; min-height: 0; }
.ht-shop-error:empty { display: none; }

/* Phone: a small bar at the bottom once the cart has something in it. */
.ht-shop-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--ht-shop-nav-offset, 0px)); z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--ht-ink); color: #fff;
  font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(26, 22, 18, 0.25);
}
.ht-shop-bar[hidden] { display: none; }
@media (min-width: 901px) { .ht-shop-bar { display: none; } }

/* The Solid Gold Halbert */
.ht-shop-gold {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: center;
  margin-top: 32px; padding: 32px; border-radius: 28px;
  background: #1a1612; color: #fff;
}
.ht-shop-gold__art img {
  display: block; width: 100%; height: auto; border-radius: 20px;
  box-shadow: 0 0 60px rgba(201, 162, 39, 0.35);
}
.ht-shop-gold__kicker {
  margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--shop-gold);
}
.ht-shop-gold h2 { margin: 0 0 10px; font-size: 30px; font-weight: 700; line-height: 34px; letter-spacing: -0.02em; color: #fff; }
.ht-shop-gold p { margin: 0 0 14px; font-size: 16px; line-height: 24px; color: #d9d3ca; }
.ht-shop-gold__price { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.ht-shop-ask { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 420px; }
.ht-shop-ask[hidden], .ht-shop-btn[hidden] { display: none; }
.ht-shop-ask__field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ht-shop-ask__field span { font-size: 12px; font-weight: 600; color: #d9d3ca; }
.ht-shop-ask__field input, .ht-shop-ask__field textarea {
  border: 1px solid #4a4642; border-radius: 12px; padding: 10px 12px; font-size: 15px; font-family: inherit;
  background: #fff; color: var(--ht-ink);
}
.ht-shop-ask__hp { position: absolute; left: -9999px; }
.ht-shop-ask__msg { margin: 0; font-size: 13px; line-height: 18px; color: #d9d3ca; }

@media (max-width: 900px) {
  .ht-shop-body { grid-template-columns: minmax(0, 1fr); }
  .ht-shop-cart { position: static; }
  .ht-shop-gold { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 20px; }
  .ht-shop-gold h2 { font-size: 26px; line-height: 30px; }
  main.ht-shop { padding-bottom: calc(72px + var(--ht-shop-nav-offset, 0px)); }
}
@media (max-width: 480px) {
  .ht-shop-items { grid-template-columns: minmax(0, 1fr); }
  .ht-shop-item__row { align-items: stretch; }
  .ht-shop-btn--add { flex-basis: 100%; }
}
