/* ==========================================================================
   Online store — store / product / cart / thanks / legal pages
   Additions only. Every colour and font comes from the tokens in
   css/style.css (§2: do not deviate); style.css itself is not modified.
   ========================================================================== */

/* Shared states
   ========================================================================== */
/* The pages toggle states with the `hidden` attribute. Any rule below that
   sets `display` would otherwise beat the browser's own [hidden] style. */
[hidden] { display: none !important; }

.shop-status { margin: 10px 0 0; font-size: 15.5px; color: var(--muted); }
.shop-photo-note { text-align: left; margin-top: 14px; }

.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 36px 0 20px;
}
.shop-empty p { font-size: 17px; color: var(--ink-3); letter-spacing: .04em; }

.shop-alert {
  margin: 0;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
  background: var(--ivory-3);
  border-left: 3px solid var(--gold);
}
.shop-alert a { color: var(--navy-2); border-bottom: 1px solid var(--navy-2); }

/* Listing cards
   ========================================================================== */
.shop-card__romaji { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; color: var(--muted-2); }
.shop-card__producer { font-size: 13px; color: var(--muted); letter-spacing: .04em; flex: 1; }
.shop-card__add { text-align: center; white-space: nowrap; }

/* Product detail
   ========================================================================== */
.pd-romaji {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .16em;
  color: var(--muted-2);
  vertical-align: middle;
}

/* The real region + producer: the primary attribution (§4) */
.pd-attrib {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pd-attrib div { display: flex; align-items: baseline; gap: 12px; }
.pd-attrib dt { font-size: 13px; letter-spacing: .18em; color: var(--gold-label); }
.pd-attrib dd { margin: 0; font-size: 17px; letter-spacing: .06em; color: var(--ink); }

.pd-qty__btn:disabled { color: var(--line); cursor: default; background: none; }
.pd-cart-btn:disabled { background: var(--muted-2); cursor: default; transform: none; }

.pd-added { margin: 0; font-size: 14.5px; color: var(--green); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }

.pd-notices {
  margin: 0;
  padding: 16px 0 0 1.2em;
  border-top: 1px solid rgba(38, 34, 26, .12);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.pd-section { margin-top: 72px; }
.pd-section .sec-head { margin-bottom: 28px; }
.pd-section .sec-head h2 { font-size: clamp(22px, 2.2vw, 30px); }
.pd-spec--table { max-width: 720px; font-size: 16px; }
.pd-spec--table .pd-spec__row { gap: 20px; }
.pd-spec--table .pd-spec__row span:last-child { text-align: right; }

.pd-variety { padding-top: 56px; border-top: 1px solid var(--line); }
.pd-variety__lead { font-family: var(--serif); font-size: 19px; line-height: 1.9; letter-spacing: .04em; max-width: 42em; }
.pd-variety__body { display: flex; flex-direction: column; gap: 16px; max-width: 42em; margin-top: 16px; }
.pd-variety__body p { font-size: 16px; line-height: 2; color: var(--ink-3); }
.pd-variety__pending { text-align: left; margin-top: 12px; }

/* Cart
   ========================================================================== */
.ct-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

.ct-head,
.ct-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 150px 110px;
  gap: 16px;
  align-items: center;
}
.ct-head {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--muted-2);
}
.ct-head span:nth-child(2), .ct-head span:nth-child(4) { text-align: right; }

.ct-list { list-style: none; margin: 0; padding: 0; }
.ct-line { padding: 20px 0; border-bottom: 1px solid var(--line); }
.ct-line__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-line__name { font-family: var(--serif); font-size: 18px; letter-spacing: .04em; color: var(--ink); }
.ct-line__name:hover { color: var(--gold); }
.ct-line__opts { font-size: 14px; color: var(--muted); letter-spacing: .04em; }
.ct-line__unit, .ct-line__sub { text-align: right; font-size: 15.5px; }
.ct-line__sub { color: var(--ink); }
.ct-line__qty { display: flex; align-items: center; gap: 10px; }
/* The cart page does not load product.css, so the stepper and the checkout
   button are defined here with the same values as the product page. */
.ct-stepper {
  display: flex;
  align-items: center;
  border: 1px solid rgba(38, 34, 26, .25);
  border-radius: 2px;
}
.ct-stepper .pd-qty__btn {
  width: 34px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--sans);
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.ct-stepper .pd-qty__btn:hover { background: rgba(38, 34, 26, .05); }
.ct-stepper .pd-qty__btn:disabled { color: var(--line); cursor: default; background: none; }
.ct-stepper .pd-qty__num { width: 32px; text-align: center; font-size: 15px; }
.ct-line__remove {
  border: 0;
  background: none;
  padding: 4px 2px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted-2);
  text-decoration: underline;
  cursor: pointer;
}
.ct-line__remove:hover { color: var(--gold); }
.ct-continue { display: inline-block; margin-top: 22px; }

.ct-summary {
  background: #fff;
  border: 1px solid var(--card-line);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ct-totals { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ct-totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.ct-totals dt { color: var(--muted); }
.ct-totals dd { margin: 0; white-space: nowrap; }
.ct-totals .ct-totals__grand {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  align-items: baseline;
}
.ct-totals__grand dt { color: var(--ink); }
.ct-totals__grand dd { font-family: var(--serif); font-size: 24px; letter-spacing: .02em; }

.ct-field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ct-field label, .ct-field legend { font-size: 14.5px; letter-spacing: .08em; color: var(--ink-2); }
.ct-split label { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.ct-split legend { margin-bottom: 6px; }
.ct-field textarea {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px 12px;
  resize: vertical;
}
.ct-field textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.ct-count { align-self: flex-end; font-size: 12.5px; color: var(--muted-2); }

.ct-checkout {
  width: 100%;
  background: var(--navy-2);
  color: var(--cream);
  text-align: center;
  padding: 16px;
  font-family: var(--sans);
  font-size: 16.5px;
  letter-spacing: .2em;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
}
.ct-checkout:hover { background: var(--navy-hover); }
.ct-checkout:disabled { background: var(--muted-2); cursor: default; }
.ct-line__producer { font-size: 13px; color: var(--muted-2); letter-spacing: .04em; }
.ct-small { margin: 0; font-size: 13px; line-height: 1.8; color: var(--muted); }
.ct-notices { padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }
.ct-notices a { color: var(--navy-2); border-bottom: 1px solid var(--navy-2); }

/* Checkout (checkout.html)
   ========================================================================== */
.co-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
}
.co-main { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.co-status { margin: 0; font-size: 15px; color: var(--muted); }

.co-section { display: flex; flex-direction: column; gap: 18px; }
.co-h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  letter-spacing: .1em;
}
.co-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--gold-label);
}

.co-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}
.co-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.co-field--wide { grid-column: 1 / -1; }
.co-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  letter-spacing: .08em;
  color: var(--ink-2);
}
/* The same badges as the contact form (contact.css is not loaded here). */
.co .form-req, .co .form-opt { font-size: 12px; letter-spacing: .1em; padding: 1px 7px; }
.co .form-req { color: var(--gold-label); border: 1px solid #c9b98a; }
.co .form-opt { color: var(--muted-2); border: 1px solid var(--line); }

.co-field input,
.co-field select {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px 14px;
  letter-spacing: .04em;
}
.co-field input::placeholder { color: var(--muted-2); }
.co-field input:focus,
.co-field select:focus { outline: none; border-color: var(--gold); background: #fff; }
.co-field select { cursor: pointer; }
.co-field .is-invalid { border-color: #a13b2e; background: #fff; }

/* Stripe mounts an iframe here; give it the same footprint as our inputs. */
.co-payment { min-height: 120px; }

.co-summary { position: sticky; top: 96px; }
.co-summary__h { font-size: 17px; letter-spacing: .1em; }
.co-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.co-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.co-line__name { font-family: var(--serif); font-size: 16px; letter-spacing: .03em; }
.co-line__opts { grid-column: 1; font-size: 13px; color: var(--muted); }
.co-line__sub { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 15px; white-space: nowrap; }
.co-requests { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.co-requests div { display: flex; gap: 12px; }
.co-requests dt { flex: none; color: var(--muted); }
.co-requests dd { margin: 0; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.co-edit { align-self: flex-start; font-size: 13.5px; }
.ct-notices a { color: var(--navy-2); border-bottom: 1px solid var(--navy-2); }

/* Thanks
   ========================================================================== */
/* Width is capped on the content, not on .ty itself: .ty is also the
   centred .container, and capping it would pull the content out of line
   with the page heading above. */
.ty-status { font-size: 16px; color: var(--muted); }
.ty-order { display: flex; flex-direction: column; gap: 34px; max-width: 820px; }
.ty-lead { font-size: 16.5px; line-height: 1.95; color: var(--ink-3); }
.ty-number {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 18px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--card-line);
  align-self: flex-start;
}
.ty-number dt { font-size: 13px; letter-spacing: .18em; color: var(--gold-label); }
.ty-number dd { margin: 0; font-family: var(--serif); font-size: 24px; letter-spacing: .06em; }
.ty-block { display: flex; flex-direction: column; gap: 14px; }
.ty-h2 { font-size: 20px; letter-spacing: .08em; }
.ty-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ty-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.ty-line__name { font-family: var(--serif); font-size: 17px; }
.ty-line__opts { grid-column: 1; font-size: 14px; color: var(--muted); }
.ty-line__sub { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 15.5px; }
.ty .ct-totals { max-width: 420px; align-self: flex-end; width: 100%; }
.ty-contact { font-size: 15px; line-height: 2; color: var(--ink-3); }

/* Legal
   ========================================================================== */
.lg-note { text-align: left; margin: 0 0 26px; }
.lg-table { margin: 0; max-width: 880px; border-top: 1px solid var(--line); }
.lg-table div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.lg-table dt { font-size: 15px; letter-spacing: .08em; color: var(--gold-label); }
.lg-table dd { margin: 0; font-size: 15.5px; line-height: 1.95; color: var(--ink-2); }
.lg-pending { color: var(--muted-2); font-style: italic; }

/* Mobile (site breakpoints)
   ========================================================================== */
@media (max-width: 1020px) {
  .pd-section { margin-top: 52px; }
  .pd-variety { padding-top: 40px; }
  .ct-layout { grid-template-columns: 1fr; gap: 32px; }
  .co-layout { grid-template-columns: 1fr; gap: 36px; }
  .co-summary { position: static; }
}

@media (max-width: 680px) {
  .ct-head { display: none; }
  .ct-line {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "info info"
      "unit sub"
      "qty  qty";
    gap: 10px 12px;
  }
  .ct-line__info { grid-area: info; }
  .ct-line__unit { grid-area: unit; text-align: left; font-size: 14px; color: var(--muted); }
  .ct-line__sub { grid-area: sub; }
  .ct-line__qty { grid-area: qty; justify-content: space-between; }
  .ct-line__unit::before, .ct-line__sub::before { content: attr(data-label) "　"; font-size: 13px; color: var(--muted-2); }
  .lg-table div { grid-template-columns: 1fr; gap: 4px; }
  .pd-romaji { display: block; margin: 4px 0 0; }
  .co-grid { grid-template-columns: 1fr; }
  .co-main { gap: 36px; }
}
