/* ==========================================================
   Limka Knitters - Wholesale page styles
   (loads after style.css)
   ========================================================== */

[hidden] { display: none !important; }

/* ---------- Banner ---------- */
.page-banner {
  background:
    radial-gradient(circle at 90% 0%, rgba(242, 169, 0, 0.18), transparent 45%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 22px 0 34px;
}
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: #fff; font-weight: 500; }
.page-banner h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.2; }
.page-banner p { margin-top: 6px; color: rgba(255, 255, 255, 0.85); max-width: 560px; }
.banner-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---------- Three ways ---------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 32px; }
.way { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.way-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand); font-weight: 700; margin-bottom: 10px;
}
.way h2 { font-size: 1.05rem; color: var(--brand); margin-bottom: 6px; }
.way p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-top: 48px; }
.section-head { text-align: left; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2, .request-intro h2 { font-size: 1.5rem; color: var(--brand); }
.section-head p { color: var(--muted); max-width: 560px; margin: 4px 0 0; font-size: 0.92rem; }
.school-pick { display: grid; gap: 4px; font-size: 0.8rem; font-weight: 500; min-width: 240px; }
.school-pick select, .field select {
  width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 0.94rem; color: var(--text); background: #fff; outline: none;
}
.school-pick select:focus, .field select:focus { border-color: var(--brand); }

.loading, .empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Price table ---------- */
.table-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--bg-alt); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
td .sub { display: block; font-size: 0.76rem; color: var(--muted); }
.price-ws { font-weight: 700; color: var(--brand); white-space: nowrap; }
.price-retail { white-space: nowrap; }
.save { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: var(--brand-light); color: var(--brand); font-size: 0.72rem; font-weight: 600; }
.ask { color: var(--muted); font-style: italic; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mini {
  padding: 7px 14px; border-radius: 999px; border: 2px solid var(--brand); background: #fff; color: var(--brand);
  font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.mini:hover { background: var(--brand); color: #fff; }
.fine { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }

/* ---------- Request ---------- */
.request { padding-bottom: 72px; }
.request-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px; align-items: start; }
.request-intro p { color: var(--muted); margin-top: 8px; }
.ticks { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: 0.92rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}
.callout { padding: 14px 16px; border-radius: 12px; background: var(--brand-light); color: var(--text) !important; font-size: 0.92rem; }
.callout a { color: var(--brand); }

.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }

.type-pick { border: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-pick legend { font-size: 0.86rem; font-weight: 500; margin-bottom: 8px; padding: 0; }
.type-opt { position: relative; display: block; cursor: pointer; }
.type-opt input { position: absolute; opacity: 0; inset: 0; }
.type-opt span { display: block; height: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 12px; transition: border-color 0.2s, background 0.2s; }
.type-opt strong { display: block; font-size: 0.92rem; }
.type-opt small { color: var(--muted); font-size: 0.78rem; }
.type-opt input:checked + span { border-color: var(--brand); background: var(--brand-light); }
.type-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 16px; min-width: 0; }
.field label { display: block; margin-bottom: 6px; font-size: 0.86rem; font-weight: 500; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 0.94rem; color: var(--text); outline: none; transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--brand); }
.field input.invalid, .field textarea.invalid { border-color: #c0392b; }
.help { margin-top: 6px; font-size: 0.78rem; color: var(--muted); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { background: #fdecea; color: #c0392b; padding: 10px 14px; border-radius: 10px; font-size: 0.88rem; margin-bottom: 14px; }
.btn-block { display: block; width: 100%; text-align: center; font-family: inherit; cursor: pointer; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.done { text-align: center; padding: 38px 26px; }
.done-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-light); color: var(--brand); margin-bottom: 12px; }
.done h2 { color: var(--brand); font-size: 1.4rem; margin-bottom: 8px; }
.ref { margin: 18px 0 6px; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.ref strong { display: block; font-size: 1.5rem; letter-spacing: 1px; color: var(--text); text-transform: none; }
.btn-light-dark { margin-top: 18px; border: 2px solid var(--brand); background: #fff; color: var(--brand); font-family: inherit; cursor: pointer; }
.btn-light-dark:hover { background: var(--brand); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ways { grid-template-columns: 1fr; }
  .request-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 600px) {
  .page-banner { padding: 16px 0 26px; }
  .card { padding: 20px 16px; }
  .field-row, .type-pick { grid-template-columns: 1fr; }
  .school-pick { min-width: 0; width: 100%; }
  th, td { padding: 11px 12px; }
}

/* ---------- Knitwear order builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.b-unit { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.b-grid-card { padding: 18px; }
.b-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.b-grid { --b-size-w: 52px; --b-col-w: 84px; display: grid; gap: 6px; align-items: stretch;
  grid-template-columns: var(--b-size-w) repeat(var(--b-cols, 4), minmax(var(--b-col-w), 1fr)); min-width: calc(var(--b-size-w) + var(--b-cols, 4) * (var(--b-col-w) + 6px)); }
.b-h { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--brand); text-align: center; padding: 4px 2px 8px; display: flex; align-items: flex-end; justify-content: center; }
.b-size { position: sticky; left: 0; z-index: 1; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--brand); background: var(--brand-light); border-radius: 10px; }
.b-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border: 2px solid var(--border); border-radius: 10px; background: #fff; transition: border-color 0.15s, background 0.15s; cursor: text; }
.b-cell:focus-within { border-color: var(--brand); }
.b-cell.has { border-color: var(--brand); background: var(--brand-light); }
.b-cell.b-na { color: var(--muted); border-style: dashed; justify-content: center; cursor: default; background: transparent; }
.b-price { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.b-cell.has .b-price { color: var(--brand); }
.b-qty { width: 100%; max-width: 64px; text-align: center; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 1.05rem; padding: 2px 0; outline: none; -moz-appearance: textfield; }
.b-qty::-webkit-outer-spin-button, .b-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.b-side h3 { font-size: 1.1rem; color: var(--brand); margin-bottom: 10px; }
.b-meter { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.b-meter span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s, background 0.2s; }
.b-meter span.ok { background: #2e9e5b; }
.b-meter-text { font-size: 0.84rem; color: var(--muted); margin: 6px 0 12px; }
.b-meter-text.bad { color: #b3261e; font-weight: 600; }
.b-lines { list-style: none; margin: 0 0 10px; padding: 0; max-height: 190px; overflow-y: auto; font-size: 0.86rem; }
.b-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.b-lines .none { color: var(--muted); border: 0; }
.b-totals { margin: 0 0 6px; }
.b-totals div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 0.92rem; }
.b-totals dt { color: var(--muted); } .b-totals dd { margin: 0; font-weight: 600; }
.b-totals .b-total { border-top: 2px solid var(--border); margin-top: 6px; padding-top: 10px; font-size: 1.15rem; }
.b-totals .b-total dt { color: var(--text); font-weight: 700; } .b-totals .b-total dd { color: var(--brand); font-weight: 800; }
.b-clear { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 0.8rem; margin-bottom: 14px; padding: 0; }
.b-ful { display: flex; gap: 18px; flex-wrap: wrap; }
.b-ful label { display: flex; align-items: center; gap: 6px; margin: 0; }
.b-ful input { width: auto; }
.b-custom { display: flex; gap: 8px; align-items: flex-start; font-size: 0.84rem; margin-bottom: 14px; }
.b-custom input { width: auto; margin-top: 3px; }
.b-side .btn { margin-top: 8px; }
.b-side .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.b-side .form-error { color: #b3261e; font-size: 0.86rem; margin: 6px 0; }
.b-busy { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; z-index: 80; }
.b-busy p { background: #fff; padding: 18px 26px; border-radius: 12px; font-weight: 600; }
@media (max-width: 900px) { .builder { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .b-grid-card { padding: 12px 8px; }
  .b-grid { --b-size-w: 38px; --b-col-w: 64px; gap: 5px; }
  .b-cell { padding: 4px 1px; }
  .b-price { font-size: 0.7rem; }
  .b-qty { font-size: 1rem; }
  .b-h { font-size: 0.64rem; letter-spacing: 0; }
}
.b-qty::placeholder { color: #b8c0c8; font-weight: 500; }

/* ---------- Builder: steps, colours, design (v2) ---------- */
.build-sec { padding-top: 32px; }
.demo-tag { background: #fff3cd; color: #7a5b00; border-radius: 999px; padding: 4px 12px; font-size: 0.78rem; font-weight: 600; }
.b-closed { text-align: center; padding: 34px 20px; }
.b-closed h3 { color: var(--brand); margin-bottom: 6px; }
.b-closed p { color: var(--muted); margin-bottom: 16px; }
.b-left { display: grid; gap: 16px; min-width: 0; }
.b-step h3, .b-side h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; color: var(--brand); margin-bottom: 8px; }
.b-step h3 small { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.b-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.85rem; flex: none; }
.b-hint { font-size: 0.84rem; color: var(--muted); margin: 2px 0 8px; }
.b-side { position: sticky; top: 90px; }
.b-col { padding: 12px 0; border-top: 1px dashed var(--border); }
.b-col:first-child { border-top: 0; padding-top: 0; }
.b-col h4 { font-size: 0.95rem; margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border: 2px solid var(--border); border-radius: 999px; font-size: 0.82rem; background: #fff; transition: border-color 0.15s, background 0.15s; }
.chip i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); flex: none; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand-light); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.b-other { margin-top: 8px; width: 100%; max-width: 280px; padding: 8px 12px; border: 2px solid var(--border); border-radius: 10px; font: inherit; font-size: 0.86rem; outline: none; }
.b-other:focus { border-color: var(--brand); }
.b-design { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.b-opt { position: relative; cursor: pointer; display: block; }
.b-opt input { position: absolute; opacity: 0; inset: 0; }
.b-opt span { display: block; height: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 12px; }
.b-opt strong { display: block; font-size: 0.92rem; }
.b-opt small { color: var(--muted); font-size: 0.78rem; }
.b-opt input:checked + span { border-color: var(--brand); background: var(--brand-light); }
.b-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.b-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; font-size: 0.88rem; }
.b-checks label { display: flex; align-items: center; gap: 6px; }
.ways { padding-top: 40px; padding-bottom: 8px; }
@media (max-width: 900px) { .b-side { position: static; } }
@media (max-width: 600px) { .b-design { grid-template-columns: 1fr; } }
.build-sec .section-head { justify-content: space-between; align-items: flex-start; text-align: left; }
.build-sec .section-head > div { flex: 1 1 320px; text-align: left; }
.build-sec .section-head p { margin-left: 0; }
.build-sec .section-head { max-width: none; margin: 0 0 20px; }
