/* ============================================================
   custom-order.css — Custom Order Builder page styles
   Bow and Banner Co. — May 2026
   ============================================================
   Drop-in companion to base.css / components.css / pages.css.
   All selectors are scoped to the .builder layout or the
   .builder-hero / .guide-strip wrappers, so loading this file
   on other pages is harmless.
   Uses tokens from base.css; do not edit colors here.
   ============================================================ */
/* =================================================================
   Custom Order Builder — page-scoped styles
   Uses tokens from base.css. Scope everything under .builder.
   ================================================================= */

.builder-hero {
  padding-block: var(--s-7) var(--s-6);
  background: linear-gradient(180deg, var(--bg-blush) 0%, var(--bg-canvas) 100%);
  position: relative;
  overflow: hidden;
}
.builder-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(217,127,166,.18) 0, transparent 22%),
    radial-gradient(circle at 88% 70%, rgba(47,143,137,.12) 0, transparent 28%);
  pointer-events: none;
}
.builder-hero-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  position: relative;
}
.builder-hero .eyebrow { margin-bottom: 10px; display: inline-block; }
.builder-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3rem);
  letter-spacing: var(--tracking-tight);
  max-width: 22ch;
  line-height: 1.05;
  margin-bottom: 14px;
}
.builder-hero h1 .script-accent {
  font-family: var(--font-script);
  font-weight: 600;
  font-size: 1.15em;
  color: var(--rose-500);
  letter-spacing: 0;
  display: inline-block;
  transform: translateY(2px);
}
.builder-hero .lead {
  font-size: 1.05rem;
  color: var(--ink-mid);
  max-width: 56ch;
  line-height: 1.65;
}

/* Inline price guide pills near hero */
.guide-pills {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px;
}
.guide-pills .gpill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 9px;
  background: #fff; border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 13px; color: var(--ink-mid);
  box-shadow: var(--shadow-xs);
}
.guide-pills .gpill .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--rose-500); color: #fff;
  display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 700;
}
.guide-pills .gpill .dot.teal { background: var(--teal-500); }

/* ── Builder layout ─────────────────────────────────────── */
.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: var(--s-7);
  align-items: start;
  padding-block: var(--s-7);
}
@media (max-width: 960px) {
  .builder { grid-template-columns: 1fr; }
}

.config { display: flex; flex-direction: column; gap: var(--s-6); }

/* Step card */
.step {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.step.is-disabled {
  opacity: .42;
  pointer-events: none;
  filter: saturate(.4);
}
.step-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed var(--border-soft);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--rose-500);
  background: var(--bg-blush);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 600;
  white-space: nowrap;
}
.step-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--ink);
  flex: 1;
}
.step-hint {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ── Product type picker (large polaroid cards) ─────────── */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
@media (max-width: 580px) {
  .product-grid { grid-template-columns: 1fr; }
}
.product-card {
  background: #fff;
  border: 2px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 18px 18px 20px;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: center;
  position: relative;
}
.product-card:hover { transform: translateY(-2px); border-color: var(--rose-300); box-shadow: var(--shadow-md); }
.product-card.is-on {
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(217,127,166,.18), var(--shadow-md);
}
.product-card .visual {
  height: 170px;
  border-radius: var(--r-md);
  background: var(--bg-mist);
  display: grid; place-items: center;
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}
.product-card .visual.tassel {
  background: linear-gradient(180deg, #FCE3EE 0%, #F8D5E5 100%);
}
.product-card .visual.banner {
  background: linear-gradient(180deg, #EDF4F2 0%, #D9E8E4 100%);
}
.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 4px;
}
.product-card .price-from {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.product-card .price-from strong { color: var(--rose-700); font-size: 14px; }
.product-card .check {
  position: absolute; top: 12px; right: 12px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--rose-500); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.7);
  transition: all 200ms ease;
}
.product-card.is-on .check { opacity: 1; transform: scale(1); }

/* SVG illustrations inside product cards */
.tassel-illo, .banner-illo { width: 100%; height: 100%; }

/* ── Generic option grids ───────────────────────────────── */
.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.opt-card {
  background: #fff;
  border: 2px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: all 150ms ease;
  text-align: center;
  position: relative;
}
.opt-card:hover { border-color: var(--rose-300); }
.opt-card.is-on {
  border-color: var(--rose-500);
  background: var(--bg-blush);
}
.opt-card .opt-icon {
  height: 64px;
  display: grid; place-items: center;
  margin-bottom: 8px;
}
.opt-card .opt-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.2;
}
.opt-card .opt-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.opt-card .opt-price {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--rose-700);
  background: var(--bg-blush);
  padding: 3px 8px;
  border-radius: 999px;
}
.opt-card.is-on .opt-price { background: #fff; }

/* Hand-drawn arrow size markers (banner sizes) */
.size-marker {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
}
.size-marker svg { color: var(--ink-mid); }

/* ── Add-on checklist rows ──────────────────────────────── */
.addon-list { display: flex; flex-direction: column; gap: 10px; }
.addon-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 150ms ease;
}
.addon-row:hover { border-color: var(--rose-300); }
.addon-row input { margin-top: 3px; }
.addon-row .addon-body { flex: 1; }
.addon-row .addon-name {
  font-weight: 600; color: var(--ink); font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.addon-row .addon-desc { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.addon-row .addon-price {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--rose-700);
  white-space: nowrap;
}
.addon-row.is-on { background: var(--bg-blush); border-color: var(--rose-500); }

/* Difficult border tier selector (nested in glitter row) */
.tier-pick {
  display: none;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
}
.addon-row.is-on .tier-pick.show-when-on { display: flex; }
.tier-pick .tier-btn {
  flex: 1;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-mid);
}
.tier-pick .tier-btn.is-on {
  background: var(--rose-500); color: #fff; border-color: var(--rose-500);
}

/* ── Color palette picker ───────────────────────────────── */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.palette-card {
  background: #fff;
  border: 2px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 10px 10px 12px;
  cursor: pointer;
  transition: all 150ms ease;
}
.palette-card:hover { border-color: var(--rose-300); }
.palette-card.is-on { border-color: var(--rose-500); background: var(--bg-blush); }
.palette-card .swatches {
  display: flex; gap: 4px;
  margin-bottom: 8px;
  height: 26px;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.palette-card .swatches span { flex: 1; }
.palette-card .pal-name {
  font-size: 13px; font-weight: 600; color: var(--ink);
  text-align: center;
}

/* ── Phrase input with char counter ─────────────────────── */
.phrase-wrap { position: relative; }
.phrase-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.phrase-meta .tier-tag {
  background: var(--bg-blush);
  color: var(--rose-700);
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
}
.phrase-meta .tier-tag.warn { background: var(--warn-bg); color: var(--warn); }

/* ── Quantity stepper ───────────────────────────────────── */
.qty-row {
  display: flex; align-items: center; gap: 14px;
}
.qty-stepper {
  display: inline-flex; align-items: center;
  background: #fff; border: 1px solid var(--border-strong);
  border-radius: var(--r-md); overflow: hidden;
}
.qty-stepper button {
  width: 40px; height: 40px;
  background: transparent; border: none;
  font-size: 18px; font-weight: 700; color: var(--ink-mid);
  cursor: pointer;
}
.qty-stepper button:hover { background: var(--bg-blush); color: var(--rose-700); }
.qty-stepper input {
  width: 56px; height: 40px;
  border: none; text-align: center;
  font-family: var(--font-display); font-size: 1.2rem;
  color: var(--ink);
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bulk-note {
  font-size: 13px; color: var(--teal-700);
  background: var(--bg-mist);
  padding: 10px 14px; border-radius: var(--r-md);
  margin-top: 12px;
  display: none;
}
.bulk-note.show { display: block; }
.bulk-note strong { font-family: var(--font-mono); }

/* ── Upload area ────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg-mist);
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 150ms ease;
}
.upload-area:hover {
  border-color: var(--rose-500);
  background: var(--bg-blush);
}
.upload-area .upload-icon {
  width: 36px; height: 36px;
  margin-bottom: 10px;
  color: var(--teal-500);
}
.upload-area .upload-cta {
  font-weight: 600; color: var(--ink); font-size: 14px;
}
.upload-area .upload-hint {
  font-size: 12px; color: var(--ink-soft); margin-top: 4px;
}

/* ── Two-column field rows ──────────────────────────────── */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* ── Sticky price summary ───────────────────────────────── */
.summary-wrap {
  position: sticky; top: 24px;
  align-self: start;
}
.summary {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-md);
}
.summary-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed var(--border-soft);
}
.summary-head h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.summary-head .live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--teal-600);
}
.summary-head .live-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Preview "polaroid" inside summary */
.preview-poly {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 10px 10px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s-4);
  transform: rotate(-1.2deg);
}
.preview-poly .preview-img {
  aspect-ratio: 4 / 3;
  background: var(--bg-mist);
  border-radius: 3px;
  display: grid; place-items: center;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.preview-poly .preview-cap {
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--teal-700);
  text-align: center;
  line-height: 1;
}

/* Line items */
.line-items {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: var(--s-4);
  font-size: 14px;
}
.line-items .li {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--ink-mid);
}
.line-items .li .label { display: flex; align-items: center; gap: 6px; }
.line-items .li .label .small {
  font-size: 11px; color: var(--ink-soft);
  font-family: var(--font-mono);
}
.line-items .li.li-base .price { color: var(--ink); font-weight: 600; }
.line-items .li.li-addon .price { color: var(--rose-700); font-weight: 600; }
.line-items .li.li-discount .price { color: var(--success); font-weight: 600; }
.line-items .li.li-empty {
  font-style: italic; color: var(--ink-soft); font-size: 13px;
  padding: 8px 0;
}
.line-items .li .price::before { content: '$'; opacity: .6; margin-right: 1px; }
.line-items .li.li-discount .price::before { content: '−$'; opacity: .8; }

.summary-divider {
  border-top: 1px dashed var(--border-soft);
  margin-block: var(--s-3);
}

/* Total — big scallop sticker */
.total-row {
  display: flex; align-items: center; gap: 14px;
  margin-block: var(--s-4) var(--s-4);
  padding: var(--s-3) 4px 4px;
}
.scallop {
  --sz: 88px;
  width: var(--sz); height: var(--sz);
  background: var(--rose-500); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 26px;
  flex-shrink: 0;
  -webkit-mask: radial-gradient(circle at 10px 50%, transparent 5px, #000 6px) 0 0/12px 12px;
          mask: radial-gradient(circle at 10px 50%, transparent 5px, #000 6px) 0 0/12px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-rose);
  position: relative;
}
.scallop::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(255,255,255,.55);
  border-radius: 999px;
  pointer-events: none;
}
.total-row .total-meta {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--ink-soft);
}
.total-row .total-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem; color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 2px;
}

.summary-actions { display: flex; flex-direction: column; gap: 10px; }
.summary-actions .btn { width: 100%; justify-content: center; }
.summary-note {
  font-size: 12px; color: var(--ink-soft);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}
.summary-note strong { color: var(--teal-700); }

/* ── Price guide footer (the infographics) ──────────────── */
.guide-strip {
  background: var(--bg-mist);
  padding-block: var(--s-7);
  border-top: 1px solid var(--border-mist);
  border-bottom: 1px solid var(--border-mist);
}
.guide-strip h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 6px;
}
.guide-strip .sub {
  color: var(--ink-mid);
  margin-bottom: var(--s-5);
  max-width: 60ch;
}
.guide-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
@media (max-width: 720px) { .guide-images { grid-template-columns: 1fr; } }
.guide-img-wrap {
  background: #fff;
  border-radius: var(--r-md);
  padding: 12px;
  box-shadow: var(--shadow-md);
  transform: rotate(-.6deg);
  transition: transform 240ms ease;
}
.guide-img-wrap:nth-child(2) { transform: rotate(.7deg); }
.guide-img-wrap:hover { transform: rotate(0) scale(1.01); }
.guide-img-wrap img { width: 100%; height: auto; border-radius: var(--r-sm); display: block; }
.guide-img-wrap .caption {
  font-family: var(--font-script);
  font-size: 1.3rem;
  text-align: center;
  color: var(--teal-700);
  margin-top: 8px;
}

/* small visual placeholders */
.visual-svg { width: 80%; height: 100%; }

/* Hide a step until product type is selected */
.req-tassel, .req-banner { display: none; }
.builder[data-product="tassel"] .req-tassel { display: block; }
.builder[data-product="banner"] .req-banner { display: block; }
.builder[data-product=""] .step.gated { opacity: .42; pointer-events: none; filter: saturate(.4); }

/* status pulse */
.builder-hero .returnto {
  position: absolute; top: 20px; right: 28px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-mid);
}
.builder-hero .returnto a { color: var(--rose-700); text-decoration: underline; text-underline-offset: 3px; }

/* tiny rough-edge wrap for the preview banner */
.kraft-preview {
  width: 80%; aspect-ratio: 5/2;
  background: linear-gradient(180deg, #D8C19A, #C8A977);
  border-radius: 3px;
  position: relative;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), var(--shadow-sm);
  font-family: var(--font-script);
  color: #5C4423;
  font-size: 22px;
  text-align: center;
}
.kraft-preview::before, .kraft-preview::after {
  content: ''; position: absolute; top: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(0,0,0,.3);
}
.kraft-preview::before { left: 8px; } .kraft-preview::after { right: 8px; }

/* Tassel ribbon preview */
.tassel-preview {
  width: 110px;
  display: flex; flex-direction: column; align-items: center;
}
.tassel-preview .hardware {
  width: 26px; height: 32px;
  background: linear-gradient(180deg, #D9B25C, #B8902C);
  border-radius: 8px 8px 4px 4px;
  position: relative;
  margin-bottom: -4px;
  z-index: 2;
}
.tassel-preview .hardware::after {
  content: ''; position: absolute; inset: 4px 6px 6px 6px;
  border-radius: 4px;
  border: 1.5px solid rgba(0,0,0,.18);
}
.tassel-preview .band {
  width: 70px; height: 14px;
  background: var(--rose-300);
  border-radius: 6px 6px 2px 2px;
  position: relative; z-index: 1;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.06);
}
.tassel-preview .ribbons {
  display: flex; gap: 2px;
  margin-top: -2px;
  height: 105px;
}
.tassel-preview .ribbons span {
  width: 5px; height: 100%;
  border-radius: 0 0 2px 2px;
}

/* Plaque hint on preview */
.tassel-preview .plaque {
  position: absolute;
  width: 38px; height: 38px;
  background: #fff;
  border: 2px solid var(--rose-300);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-script);
  font-size: 13px;
  color: var(--rose-700);
  bottom: 14px; right: -2px;
  box-shadow: var(--shadow-sm);
  transform: rotate(8deg);
}

/* error inline for required fields */
.required-flag { color: var(--rose-500); margin-left: 2px; }

/* tiny decorative hearts */
.deco-heart { color: var(--rose-500); font-size: 10px; }