/* ══════════════════════════════════════════════════════════════
   DECAL BUILDER (spdb-*) — v1.6.0
   Two-column layout for Frosted, One-Way Perf, Logo & Branding.
   All styles scoped under .spdb-* namespace to avoid collisions.
   ══════════════════════════════════════════════════════════════ */

.spdb-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.spdb-hidden { display: none !important; }

/* ─── HERO ─── */
.spdb-hero {
  padding: 28px 0 20px;
  max-width: 780px;
}
.spdb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  background: rgba(242, 101, 34, 0.12);
  color: #D4561A;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.spdb-h1 {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 6px;
  color: #3D1E08;
}
.spdb-hero-sub {
  color: #7a6356;
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 500;
  margin: 0;
}

/* ─── LAYOUT ─── */
.spdb-builder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 980px) {
  .spdb-builder {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
  }
}
.spdb-form-col { display: flex; flex-direction: column; gap: 14px; }
.spdb-info-col { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 980px) {
  .spdb-info-col { position: sticky; top: 80px; height: fit-content; }
}

/* ─── CARDS ─── */
.spdb-card {
  background: #fff;
  border: 1.5px solid #E8D6C5;
  border-radius: 14px;
  padding: 20px;
}
.spdb-card-h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3D1E08;
  margin: 0 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.spdb-card-h3-plain {
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
}
.spdb-step-num { color: #F26522; }
.spdb-hint {
  font-size: 11px;
  color: #7a6356;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.spdb-caption {
  font-size: 11.5px;
  color: #7a6356;
  margin-top: 8px;
  line-height: 1.4;
}

/* ─── INFO CARD (inline, top of one-way-perf) ─── */
.spdb-info-card-inline {
  background: rgba(242, 101, 34, 0.06);
  border: 1px solid rgba(242, 101, 34, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #7a6356;
  line-height: 1.5;
}
.spdb-info-card-inline strong { color: #3D1E08; }

/* ─── METHOD TILES ─── */
.spdb-method-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 560px) {
  .spdb-method-grid { grid-template-columns: repeat(3, 1fr); }
}
.spdb-method-tile {
  padding: 16px;
  background: #FEF0E6;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-family: inherit;
}
.spdb-method-tile:hover { background: #FCE4D2; }
.spdb-method-tile.active {
  background: #fff;
  border-color: #F26522;
  box-shadow: 0 1px 2px rgba(61, 30, 8, 0.06);
}
.spdb-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(242, 101, 34, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4561A;
  font-size: 20px;
}
.spdb-method-tile.active .spdb-method-icon {
  background: rgba(242, 101, 34, 0.2);
}
.spdb-method-name {
  font-size: 14px;
  font-weight: 700;
  color: #3D1E08;
}
.spdb-method-tile.active .spdb-method-name { color: #D4561A; }
.spdb-method-sub {
  font-size: 11.5px;
  color: #7a6356;
  font-weight: 500;
  line-height: 1.35;
}

/* Logo & Branding only has 2 methods */
.spdb-wrap[data-product="logo-branding"] .spdb-method-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .spdb-wrap[data-product="logo-branding"] .spdb-method-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── DIMENSIONS ─── */
.spdb-dim-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
  max-width: 460px;
}
.spdb-dim-field { display: flex; flex-direction: column; gap: 6px; }
.spdb-dim-label {
  font-size: 11px;
  font-weight: 700;
  color: #7a6356;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.spdb-dim-input-wrap { position: relative; }
.spdb-dim-input {
  width: 100%;
  padding: 12px 42px 12px 14px;
  border: 1.5px solid #E8D6C5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: #3D1E08;
  background: #FEF0E6;
  outline: none;
  -moz-appearance: textfield;
}
.spdb-dim-input::-webkit-outer-spin-button,
.spdb-dim-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.spdb-dim-input:focus { border-color: #F26522; background: #fff; }
.spdb-dim-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #7a6356;
  pointer-events: none;
}
.spdb-dim-x {
  font-size: 18px;
  font-weight: 600;
  color: #7a6356;
  padding-bottom: 12px;
}
.spdb-dim-helper {
  font-size: 12px;
  color: #7a6356;
  margin-top: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.spdb-dim-helper strong { color: #3D1E08; font-weight: 700; }
.spdb-dim-warn {
  color: #c1440e;
  font-weight: 600;
  margin-top: 6px;
  font-size: 12px;
  display: none;
}
.spdb-dim-warn.spdb-show { display: block; }

/* ─── COLOUR SWATCHES ─── */
.spdb-colour-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 380px;
}
.spdb-swatch {
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  position: relative;
  padding: 0;
  font-family: inherit;
}
.spdb-swatch::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.spdb-swatch:hover { transform: scale(1.05); }
.spdb-swatch.active {
  border-color: #F26522;
  transform: scale(1.05);
}
.spdb-swatch.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.spdb-swatch-label {
  font-size: 11.5px;
  color: #7a6356;
  margin-top: 8px;
  font-weight: 600;
}
.spdb-swatch-label strong { color: #3D1E08; }

/* ─── APPLICATION TOGGLE ─── */
.spdb-app-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 460px;
}
.spdb-app-opt {
  padding: 12px;
  background: #FEF0E6;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
}
.spdb-app-opt:hover:not(:disabled) { background: #FCE4D2; }
.spdb-app-opt.active {
  background: #fff;
  border-color: #F26522;
  box-shadow: 0 1px 2px rgba(61, 30, 8, 0.06);
}
.spdb-app-opt-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #3D1E08;
}
.spdb-app-opt-sub {
  font-size: 11.5px;
  color: #7a6356;
  font-weight: 500;
  line-height: 1.3;
}
.spdb-app-opt.active .spdb-app-opt-name { color: #D4561A; }
.spdb-app-opt:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── UPLOAD ─── */
.spdb-upload-zone {
  display: block;
  padding: 18px 16px;
  background: #FEF0E6;
  border: 1.5px dashed #E8D6C5;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  color: #7a6356;
}
.spdb-upload-zone:hover {
  background: #FCE4D2;
  border-color: #F26522;
  color: #F26522;
}
.spdb-upload-zone.spdb-has-file {
  border-style: solid;
  border-color: #F26522;
  background: #fff;
  color: #3D1E08;
  padding: 16px;
}
.spdb-up-empty { padding: 8px 0; }
.spdb-up-filled { display: none; }
.spdb-upload-zone.spdb-has-file .spdb-up-filled { display: block; }
.spdb-upload-zone.spdb-has-file .spdb-up-empty { display: none; }
.spdb-up-ico {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
  font-weight: 700;
}
.spdb-up-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}
.spdb-up-sub {
  font-size: 11.5px;
  color: #7a6356;
  font-weight: 500;
}
.spdb-up-preview-box {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background-image:
    linear-gradient(45deg, #f0e6dc 25%, transparent 25%),
    linear-gradient(-45deg, #f0e6dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f0e6dc 75%),
    linear-gradient(-45deg, transparent 75%, #f0e6dc 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-color: #fff;
  border: 1px solid #E8D6C5;
}
.spdb-up-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.spdb-up-filename {
  font-size: 13px;
  font-weight: 600;
  color: #3D1E08;
  margin-bottom: 3px;
  word-break: break-all;
}

/* ─── QTY CHIPS ─── */
.spdb-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.spdb-chip {
  padding: 9px 14px;
  background: #FEF0E6;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #3D1E08;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.spdb-chip:hover { background: #FCE4D2; }
.spdb-chip.active {
  background: #3D1E08;
  color: #fff;
  border-color: #3D1E08;
}

/* ─── NOTES TEXTAREA ─── */
.spdb-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #E8D6C5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #3D1E08;
  background: #FEF0E6;
  outline: none;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}
.spdb-input:focus { border-color: #F26522; background: #fff; }

/* ─── INFO COL: APPROVAL BANNER ─── */
.spdb-approval-banner {
  background: rgba(46, 143, 82, 0.08);
  border: 1px solid rgba(46, 143, 82, 0.25);
  color: #2e8f52;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ─── INFO COL: FEATURE LIST ─── */
.spdb-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.spdb-feature-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.spdb-feature-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(242, 101, 34, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4561A;
  font-weight: 700;
  font-size: 16px;
}
.spdb-feature-body { flex: 1; min-width: 0; }
.spdb-feature-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #3D1E08;
  margin-bottom: 2px;
}
.spdb-feature-sub {
  font-size: 12px;
  color: #7a6356;
  line-height: 1.4;
  font-weight: 500;
}

/* ─── INFO COL: SPECS ─── */
.spdb-spec-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spdb-spec-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #E8D6C5;
  font-size: 12.5px;
}
.spdb-spec-row:last-child { border-bottom: none; }
.spdb-spec-label { color: #7a6356; font-weight: 500; }
.spdb-spec-value {
  color: #3D1E08;
  font-weight: 700;
  text-align: right;
}

/* ─── CONTENT BELOW CONFIGURATOR (preserved the_content()) ─── */
.spdb-content-below {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #E8D6C5;
}

/* ─── INLINE PRICE CARD (final step under options) ─── */
.spdb-price-card {
  background: #3D1E08;
  border-color: #3D1E08;
  color: #fff;
  padding: 24px;
}
.spdb-price-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.spdb-price-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}
.spdb-price-lbl {
  font-size: 11px;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 4px;
}
.spdb-price-amt {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  margin-bottom: 4px;
}
.spdb-price-unit {
  font-size: 12.5px;
  opacity: 0.72;
  font-weight: 500;
}
.spdb-btn-cart {
  padding: 14px 26px;
  background: #F26522;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.spdb-btn-cart:hover { background: #D4561A; }
.spdb-btn-cart:active { transform: translateY(1px); }
.spdb-btn-cart:disabled { opacity: 0.4; cursor: not-allowed; }
.spdb-price-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  opacity: 0.7;
  text-align: center;
  letter-spacing: 0.01em;
}

@media (max-width: 560px) {
  .spdb-price-card { padding: 20px; }
  .spdb-price-card-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .spdb-btn-cart {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }
  .spdb-price-amt { font-size: 30px; }
}
