@font-face { font-family: Manrope; src: url('../font/Manrope-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url('../font/Manrope-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #303030;
  --muted: #5e5e5e;
  --line: #d7d7d7;
  --paper: #f6f6f6;
  --white: #ffffff;
  --accent: #50be07;
  --accent-dark: #3e9505;
  --focus: #357f04;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Manrope, Arial, sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; }
a { color: inherit; }

.site-header {
  min-height: 104px;
  padding: 10px clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--white);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; text-decoration: none; }
.brand img { width: 154px; height: auto; display: block; }
.store-link { color: var(--muted); font-size: 13px; text-underline-offset: 4px; }
.store-link:hover { color: var(--accent-dark); }

.product-shell { width: min(1420px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(560px, 1.1fr); align-items: start; }
.product-story { padding: 54px clamp(24px, 5vw, 72px); }
.eyebrow { color: var(--accent-dark); font-size: 12px; font-weight: 700; text-transform: uppercase; }
h1 { margin: 10px 0 12px; font-size: 56px; line-height: 1.02; letter-spacing: 0; }
.lede { max-width: 620px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.price-line { margin: 26px 0 22px; display: flex; align-items: baseline; gap: 12px; }
.price-line strong { font-size: 27px; }
.price-line span { color: var(--muted); font-size: 12px; }

.product-photo { margin: 0; overflow: hidden; background: #ddd; border: 1px solid #c8c8c8; border-radius: 6px; }
.product-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.product-photo-main { aspect-ratio: 4 / 3; }
.material-photo { margin-top: 12px; aspect-ratio: 4 / 3; }

.pricing-notes { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pricing-notes div { padding: 15px 10px; border-right: 1px solid var(--line); }
.pricing-notes div:last-child { border-right: 0; }
.pricing-notes strong, .pricing-notes span { display: block; }
.pricing-notes strong { color: var(--accent-dark); font-size: 18px; }
.pricing-notes span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.configurator { min-height: calc(100vh - 104px); padding: 46px clamp(24px, 4vw, 56px); background: var(--white); border-left: 1px solid var(--line); }
.form-heading { padding-bottom: 20px; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); }
.form-heading span { font-size: 20px; font-weight: 700; }
.form-heading strong { color: var(--accent-dark); font-size: 24px; }
.form-error { margin-top: 20px; padding: 14px 16px; color: #70141b; background: #fff1f1; border-left: 4px solid #d4313b; font-size: 14px; }
.form-intro { padding: 24px 0 14px; }
.form-intro h2 { margin: 0; font-size: 18px; }
.form-intro p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.setup-list { display: grid; gap: 14px; }
.setup-row { padding: 18px; border: 1px solid #c9caca; border-radius: 6px; }
.setup-heading { margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.setup-heading strong { font-size: 14px; }
.remove-setup { padding: 3px 0; color: #777; background: transparent; border: 0; cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.remove-setup:disabled { visibility: hidden; }

.name-field, .setup-controls label, .quantity-control { display: block; }
.name-field > span:first-child, .setup-controls label > span, .quantity-control > span:first-child { display: block; margin-bottom: 6px; color: #555; font-size: 11px; font-weight: 700; }
.input-wrap { position: relative; display: block; }
.input-wrap input, select { width: 100%; height: 46px; padding: 0 13px; color: var(--ink); background: #fbfbfa; border: 1px solid #b9bcbd; border-radius: 4px; }
.input-wrap input { padding-right: 54px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; text-transform: uppercase; }
.input-wrap small { position: absolute; right: 12px; bottom: 15px; color: #808487; font-size: 10px; }
.input-wrap small b { font-weight: 400; }
.setup-controls { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setup-bottom { margin-top: 12px; display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: end; }

.stepper { height: 46px; display: grid; grid-template-columns: 36px 1fr 36px; border: 1px solid #b9bcbd; border-radius: 4px; overflow: hidden; }
.stepper button { border: 0; background: #eeeeea; cursor: pointer; font-size: 19px; }
.stepper input { width: 100%; min-width: 0; border: 0; text-align: center; appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }

.velcro-choice { min-height: 46px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #c9caca; border-radius: 4px; cursor: pointer; }
.velcro-choice:has(input:checked) { border-color: var(--ink); background: #f4f4f0; }
.velcro-choice input { width: 17px; height: 17px; accent-color: var(--accent); }
.velcro-choice strong, .velcro-choice small { display: block; }
.velcro-choice strong { font-size: 11px; }
.velcro-choice small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.tape-preview { margin-top: 16px; padding: 14px; background: #ededeb; border-radius: 4px; text-align: center; }
.preview-tape { --thread: #141414; min-height: 48px; padding: 8px 22px; display: flex; align-items: center; justify-content: center; color: var(--thread); background-color: #647252; border: 2px solid #4a513e; font-family: Arial, sans-serif; font-size: 24px; font-weight: 700; line-height: 1; text-shadow: 0 1px 0 rgb(255 255 255 / 18%); }
.tape-preview > small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }

.preview-tape[data-material='digital-desert'] { background-color: #b8a683; border-color: #8f7d5f; }
.preview-tape[data-material='digital-navy'] { background-color: #485565; border-color: #313a46; }
.preview-tape[data-material='ocp-multicam'] { background-color: #8b805d; border-color: #5f5840; }
.preview-tape[data-material='blue'] { background-color: #3668a8; border-color: #244775; }
.preview-tape[data-material='dark-blue-cap'] { background-color: #303e68; border-color: #202946; }
.preview-tape[data-material='abu'] { background-color: #8c918b; border-color: #676c67; }
.preview-tape[data-material='tan'] { background-color: #c5b693; border-color: #9b8c6d; }
.preview-tape[data-material='olive-drab-web'] { background-color: #626747; border-color: #454a31; }
.preview-tape[data-material='black-web'], .preview-tape[data-material='black'] { background-color: #202120; border-color: #090a09; }
.preview-tape[data-material='a-tacs-fg'] { background-color: #72775f; border-color: #505542; }
.preview-tape[data-thread='white'] { --thread: #fff; }
.preview-tape[data-thread='grey'] { --thread: #a7aaac; }
.preview-tape[data-thread='spice-brown'] { --thread: #7a4a32; }
/* Retired name: .preview-tape[data-thread='brown'] { --thread: #65402c; } */
.preview-tape[data-thread='red'] { --thread: #d52933; }
.preview-tape[data-thread='blue'] { --thread: #2873d2; }
.preview-tape[data-thread='dark-blue'] { --thread: #172a67; }
.preview-tape[data-thread='pink'] { --thread: #ea4c9b; }
.preview-tape[data-thread='od'] { --thread: #4c592d; }
.preview-tape[data-thread='yellow'] { --thread: #e1b62d; }
.preview-tape[data-thread='silver'] { --thread: #d1d4d5; }

.add-setup { margin-top: 14px; padding: 10px 0; color: var(--accent-dark); background: transparent; border: 0; cursor: pointer; font-weight: 700; }
.field-note { margin: 4px 0 22px; color: #73777a; font-size: 10px; }
.order-summary { padding: 18px 0; display: flex; align-items: center; justify-content: space-between; border-top: 2px solid var(--ink); }
.order-summary span { color: var(--muted); font-size: 12px; }
.order-summary strong { font-size: 22px; }
.add-button { width: 100%; min-height: 52px; padding: 12px 20px; color: var(--white); background: var(--accent); border: 0; border-radius: 4px; cursor: pointer; font-weight: 700; }
.add-button:hover { background: var(--accent-dark); }

input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgb(80 190 7 / 28%); outline-offset: 2px; }

.thread-gallery { padding: 52px max(24px, calc((100% - 1320px) / 2)); background: var(--white); border-top: 1px solid var(--line); }
.gallery-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 28px; }
.gallery-heading h2 { margin: 6px 0 0; font-size: 28px; }
.gallery-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.thread-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.thread-grid figure { margin: 0; overflow: hidden; aspect-ratio: 4 / 3; background: #ddd; border-radius: 4px; }
.thread-grid img { width: 100%; height: 100%; display: block; object-fit: cover; }

.site-footer { padding: 22px clamp(20px, 4vw, 64px); display: flex; justify-content: space-between; gap: 20px; color: #eee; background: #5e5e5e; font-size: 12px; }

@media (max-width: 1020px) {
  .product-shell { grid-template-columns: 1fr; }
  .configurator { min-height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .product-photo-main, .material-photo { aspect-ratio: 16 / 10; }
  .thread-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header { min-height: 82px; padding: 8px 16px; }
  .brand img { width: 118px; }
  .store-link { font-size: 11px; }
  .product-story, .configurator { padding: 30px 18px; }
  h1 { font-size: 40px; }
  .price-line { align-items: flex-start; flex-direction: column; gap: 3px; }
  .pricing-notes { grid-template-columns: 1fr; }
  .pricing-notes div { border-right: 0; border-bottom: 1px solid var(--line); }
  .pricing-notes div:last-child { border-bottom: 0; }
  .setup-controls, .setup-bottom { grid-template-columns: 1fr; }
  .quantity-control { width: 132px; }
  .preview-tape { font-size: 20px; }
  .thread-gallery { padding: 38px 18px; }
  .gallery-heading { grid-template-columns: 1fr; gap: 12px; }
  .thread-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { flex-direction: column; padding: 20px 18px; }
}
