/* ==========================================================
   The GF Shop: order request page (/order/)
   ========================================================== */
[hidden] { display: none !important; }
.order-page { padding-bottom: 0 !important; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.order-main { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 7vw, 5rem); }

.order-head { max-width: 760px; margin-bottom: 1.6rem; }
.order-title { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.3rem); text-transform: uppercase; color: var(--dark); margin-bottom: .6rem; }
.order-lead { font-size: 1.08rem; }
.notice {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--dark); color: #F3EDDF; border-radius: 12px; padding: .95rem 1.1rem; margin: 0;
  border-left: 5px solid var(--gold); font-size: .98rem; line-height: 1.5;
}
.notice .icon { width: 1.35em; height: 1.35em; fill: var(--tan); margin-top: .1em; }
.notice strong { color: #fff; }

/* Layout */
.order-layout { display: grid; gap: 1.4rem; align-items: start; }
.order-steps { display: grid; gap: 1.4rem; min-width: 0; }
@media (min-width: 1024px) {
  .order-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; }
  .summary { position: sticky; top: 92px; }
}

/* Step cards */
.step-card {
  margin: 0; min-width: 0;
  background: var(--card); border: 1px solid rgba(111, 67, 36, .16); border-radius: 18px;
  padding: 1.2rem clamp(1rem, 3vw, 1.75rem) 1.5rem;
  box-shadow: 0 6px 18px -14px rgba(61, 36, 20, .35);
}
.step-card.invalid { border-color: #A3361F; box-shadow: 0 0 0 2px rgba(163, 54, 31, .2); }
.step-card legend {
  float: left; width: 100%; padding: 0; margin-bottom: 1rem;
  font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); color: var(--dark);
  display: flex; align-items: center; gap: .7rem;
}
.step-card legend + * { clear: both; }
.step-no {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--dark); color: var(--tan); font-size: 1.05rem; font-weight: 700;
  box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--gold);
}
.hint { font-size: .9rem; color: var(--muted); margin: .3rem 0 0; }
#items-hint { margin: 0 0 1rem; }
.ws-only { display: none; }
.is-wholesale .ws-only { display: inline; }
.is-wholesale .field.ws-only { display: flex; }

/* Retail / wholesale + pickup / delivery choices */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; clear: both; }
.choice-grid-sm { margin-bottom: 1.1rem; }
.choice { position: relative; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box {
  display: flex; flex-direction: column; gap: .2rem; height: 100%;
  border: 2px solid rgba(61, 36, 20, .25); border-radius: 14px; padding: .9rem 1rem .9rem 2.9rem;
  background: var(--cream-2); position: relative; transition: border-color .15s, background-color .15s;
}
.choice-box::before {
  content: ""; position: absolute; left: 1rem; top: 1.05rem; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  border: 2px solid var(--brown); background: #fff;
}
.choice input:checked + .choice-box { border-color: var(--dark); background: #fff; box-shadow: 0 0 0 1px var(--dark); }
.choice input:checked + .choice-box::before { background: var(--dark); box-shadow: inset 0 0 0 3px #fff; border-color: var(--dark); }
.choice input:focus-visible + .choice-box { outline: 3px solid var(--gold); outline-offset: 2px; }
.choice-title { font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 1.25rem; color: var(--dark); line-height: 1.1; }
.choice-note { font-size: .86rem; color: var(--muted); line-height: 1.35; }

/* Product rows */
.order-items { display: grid; gap: .8rem; }
.oi {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: .9rem; align-items: center;
  background: var(--cream-2); border: 1.5px solid rgba(111, 67, 36, .14); border-radius: 14px; padding: .6rem .8rem .6rem .6rem;
  transition: border-color .15s, background-color .15s;
}
.oi.has-qty { border-color: var(--brown); background: #fff; }
.oi-img { background: #F8F6EE; border-radius: 10px; overflow: hidden; aspect-ratio: 608 / 368; }
.oi-img img { width: 100%; height: 100%; object-fit: contain; }
.oi h3 { font-size: 1.22rem; text-transform: uppercase; color: var(--dark); margin-bottom: .3rem; }
.oi .product-meta { margin-bottom: .55rem; gap: .35rem .7rem; }
.oi .tag { font-size: .76rem; padding: .14rem .6rem; }
.oi .weight { font-size: .86rem; }
.stepper { display: inline-flex; align-items: center; gap: .35rem; }
.stepper .step {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--dark); background: transparent; color: var(--dark);
  font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; font-family: var(--body); font-weight: 600;
}
.stepper .step:hover { background: var(--dark); color: var(--cream); }
.stepper .step[data-step="1"] { background: var(--dark); color: var(--cream); }
.stepper .step[data-step="1"]:hover { background: var(--brown); border-color: var(--brown); }
.stepper input {
  width: 4.2rem; height: 44px; text-align: center; font: 700 1.15rem var(--body); color: var(--dark);
  border: 1.5px solid rgba(61, 36, 20, .35); border-radius: 10px; background: #fff; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .unit { font-size: .85rem; color: var(--muted); font-weight: 600; margin-left: .15rem; }
@media (min-width: 700px) {
  .order-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oi { grid-template-columns: 1fr; align-items: stretch; padding: .7rem; }
  .oi-body { padding: .1rem .3rem .2rem; }
}
@media (max-width: 699px) {
  .step-card { padding-inline: .9rem; }
  .oi { grid-template-columns: 84px minmax(0, 1fr); gap: .75rem; padding: .6rem .6rem .6rem .5rem; }
  .oi h3 { font-size: 1.12rem; }
  .stepper { gap: .3rem; flex-wrap: wrap; }
  .stepper .step { width: 42px; height: 42px; }
  .stepper input { width: 3.1rem; height: 42px; }
  .stepper .unit { font-size: .8rem; margin-left: 0; }
}
@media (max-width: 360px) {
  .oi { grid-template-columns: 70px minmax(0, 1fr); }
  .stepper .step { width: 40px; height: 40px; }
  .stepper input { width: 2.8rem; }
}

/* Form fields */
.fields { display: grid; gap: 1rem 1.2rem; clear: both; }
@media (min-width: 700px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label { font-weight: 700; color: var(--dark); font-size: .98rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.req, .opt { font-family: var(--head); font-weight: 400; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; }
.req { background: var(--dark); color: var(--cream); }
.opt { color: var(--muted); box-shadow: inset 0 0 0 1px rgba(61, 36, 20, .3); }
.field input, .field textarea {
  width: 100%; font: 500 1rem var(--body); color: var(--ink); background: #fff;
  border: 1.5px solid rgba(61, 36, 20, .3); border-radius: 10px; padding: .75rem .85rem; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .stepper input:focus { border-color: var(--dark); outline: 3px solid rgba(185, 142, 72, .55); outline-offset: 0; }
.field input[aria-invalid="true"] { border-color: #A3361F; background: #FFF8F5; }
.field-error { color: #A3361F; font-weight: 600; font-size: .9rem; margin: 0; }
.field-error::before { content: "! "; font-weight: 700; }
#items-error { margin: -.4rem 0 .9rem; }

.form-errors {
  background: #FFF4EF; border: 2px solid #A3361F; color: #6E1F0F; border-radius: 14px; padding: 1rem 1.2rem; margin-bottom: 1.4rem;
}
.form-errors p { margin: 0 0 .3rem; }
.form-errors ul { list-style: disc; padding-left: 1.3rem; }
.form-errors a { color: #6E1F0F; }

/* Honeypot */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Summary */
.summary-card {
  background: var(--dark); color: #F3EDDF; border-radius: 18px; padding: 1.4rem 1.3rem 1.3rem;
  border-top: 4px solid var(--gold); box-shadow: var(--shadow);
}
.summary-card h2 { color: #F7F1E3; font-size: 1.7rem; margin-bottom: .1rem; }
.summary-type { font-family: var(--head); text-transform: uppercase; letter-spacing: .16em; color: var(--tan); font-size: .9rem; margin-bottom: .8rem; }
.summary-list { display: grid; gap: .35rem; margin-bottom: .8rem; }
.summary-list li { display: flex; gap: .7rem; align-items: baseline; padding: .3rem 0; border-bottom: 1px dashed rgba(191, 178, 144, .35); }
.summary-list .sq { font-family: var(--head); font-weight: 700; font-size: 1.15rem; color: var(--tan); min-width: 2.2rem; text-align: right; }
.summary-empty { color: #CFC5AF; font-style: italic; border: 0 !important; }
.summary-total { font-weight: 700; margin-bottom: 1rem; }
.ts-wrap { margin-bottom: .9rem; min-height: 0; }
.ts-wrap .field-error { color: #FFB8A3; margin-top: .4rem; }
.btn-submit { width: 100%; background: var(--tan); color: var(--dark); font-size: 1.2rem; min-height: 54px; }
.btn-submit:hover { background: var(--gold-soft); }
.btn-submit:disabled { opacity: .7; cursor: progress; transform: none; }
.summary-note { font-size: .86rem; color: #DCD3BF; margin: .9rem 0 .4rem; line-height: 1.45; }
.summary-call { font-size: .9rem; margin: 0; }
.summary-call a { color: var(--tan); font-weight: 700; white-space: nowrap; }

/* Thank-you screen */
.thanks:focus { outline: none; }
.thanks-card {
  max-width: 680px; margin: 0 auto; text-align: center;
  background: var(--card); border: 1.5px solid var(--gold); border-radius: 22px; padding: clamp(1.8rem, 5vw, 3rem) clamp(1.2rem, 4vw, 2.6rem);
  outline: 1px solid rgba(185, 142, 72, .35); outline-offset: 5px;
}
.thanks-card .eyebrow { justify-content: center; }
.thanks-card .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--gold); }
.thanks-check { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; background: var(--dark); color: var(--tan); display: grid; place-items: center; }
.thanks-check svg { width: 40px; height: 40px; }
.order-no-label { font-family: var(--head); text-transform: uppercase; letter-spacing: .2em; color: var(--muted); font-size: .9rem; margin: 1rem 0 .2rem; }
.order-no {
  display: inline-block; font-family: var(--head); font-weight: 700; font-size: clamp(1.8rem, 1.3rem + 2.4vw, 2.6rem); letter-spacing: .06em;
  color: var(--dark); background: var(--cream); border: 2px dashed var(--brown); border-radius: 12px; padding: .2rem 1.1rem; margin-bottom: 1.1rem;
}
.thanks-lead { max-width: 520px; margin: 0 auto 1.2rem; }
.thanks-list { max-width: 360px; margin: 0 auto 1rem; text-align: left; }
.thanks-list li { border-bottom-color: rgba(111, 67, 36, .25); }
.thanks-list .sq { color: var(--brown); }
.thanks-meta { color: var(--muted); font-weight: 600; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1.4rem 0 1rem; }
.thanks .summary-call a { color: var(--brown); }

@media (max-width: 959px) {
  .site-nav .nav-order { font-weight: 700; }
}
@media (max-width: 420px) {
  .choice-box { padding: .8rem .7rem .8rem 2.5rem; }
  .choice-box::before { left: .75rem; }
  .choice-title { font-size: 1.1rem; }
}

/* Account line on the order page */
.acct-line { margin: .8rem 0 0; font-size: .95rem; }
.acct-line a { color: var(--brown); font-weight: 700; }
