/* ══════════════════════════════════════════════════════════════
   QUOTE PAGE — THEME ISOLATION
   ══════════════════════════════════════════════════════════════ */
.sgq-page *,
.sgq-page *::before,
.sgq-page *::after {
  box-sizing: border-box !important;
}
.sgq-page { font-family: inherit !important; }
.sgq-page p  { margin: 0 !important; padding: 0 !important; }
.sgq-page ul, .sgq-page ol { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.sgq-page li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.sgq-page h1, .sgq-page h2, .sgq-page h3, .sgq-page h4 {
  font-family: inherit !important; margin: 0 !important; padding: 0 !important;
  text-transform: none !important; letter-spacing: inherit !important;
}
.sgq-page a { text-decoration: none !important; }
.sgq-page img { border: none !important; box-shadow: none !important; vertical-align: middle !important; }
.sgq-page button {
  border: none !important; cursor: pointer !important;
  font-family: inherit !important; font-size: inherit !important;
  -webkit-appearance: none !important; appearance: none !important;
  text-transform: none !important; letter-spacing: normal !important;
  min-height: unset !important; min-width: unset !important;
  box-shadow: none !important;
}
.sgq-page input, .sgq-page textarea, .sgq-page select {
  font-family: inherit !important; font-size: inherit !important;
  letter-spacing: normal !important; text-transform: none !important;
}

/* ═══════════════════════════════════════════════════════════
   SGQ — Quote Page v3
   No-account-required, guest-first design.
   Brand: red #e63128  ·  dark #0d1b2a
   ═══════════════════════════════════════════════════════════ */

.sgq-page,
.sgq-page * { box-sizing: border-box; }

.sgq-page {
  /* Use wcdd vars injected by PHP — falls back to defaults */
  --r:   var(--wcdd-primary, #e63128);
  --rd:  var(--wcdd-primary-hover, #c52a22);
  --dk:  var(--wcdd-dark, #0d1b2a);
  --mid: #374151;
  --mu:  #6b7280;
  --lt:  #9ca3af;
  --gn:  var(--wcdd-accent, #0ea970);
  --bor: var(--wcdd-g200, #e5e7eb);
  --bg:  var(--wcdd-bg, #f8fafc);
  --wh:  #ffffff;
  --sh:  0 2px 12px rgba(0,0,0,.06);
  --sh2: 0 8px 32px rgba(0,0,0,.1);
  --ease: cubic-bezier(.4,0,.2,1);
  --t:    .18s;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0 60px;
  font-family: inherit;
  font-size: 14px;
  color: var(--dk);
}

/* ── Shared buttons ──────────────────────────────────────── */
.sgq-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: all var(--t) var(--ease); font-family: inherit; line-height: 1;
}
.sgq-btn--primary {
  background: var(--r); color: #fff; border-color: var(--r);
  box-shadow: 0 4px 14px rgba(230,49,40,.3);
}
.sgq-btn--primary:hover { background: var(--rd); border-color: var(--rd); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(230,49,40,.38); color: #fff; }
.sgq-btn--outline {
  background: transparent; color: var(--mid); border-color: var(--bor);
}
.sgq-btn--outline:hover { border-color: var(--mid); color: var(--dk); background: var(--bg); }

/* ── Page header ─────────────────────────────────────────── */
.sgq-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.sgq-header__left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sgq-header__title {
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(1.25rem,3vw,1.6rem); font-weight: 900;
  color: var(--dk); margin: 0; letter-spacing: -.025em;
}
.sgq-header__title svg { color: var(--r); flex-shrink: 0; }
.sgq-badge {
  background: rgba(230,49,40,.1); color: var(--r);
  font-size: 12px; font-weight: 700; padding: 3px 12px;
  border-radius: 20px; border: 1px solid rgba(230,49,40,.2);
  white-space: nowrap;
}
.sgq-header__clear {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid var(--bor); color: var(--lt);
  font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 8px;
  cursor: pointer; transition: all var(--t); font-family: inherit;
}
.sgq-header__clear:hover { border-color: rgba(230,49,40,.5); color: var(--r); background: rgba(230,49,40,.04); }

/* ── Guest banner ────────────────────────────────────────── */
.sgq-notice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: 12px; margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(14,169,112,.07), rgba(14,169,112,.04));
  border: 1.5px solid rgba(14,169,112,.22);
  color: #065f46; font-size: 13.5px; line-height: 1.55;
}
.sgq-notice svg { color: var(--gn); flex-shrink: 0; margin-top: 2px; }
.sgq-notice strong { font-weight: 800; }

/* ── Two-column layout ───────────────────────────────────── */
.sgq-layout {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 28px;
  align-items: start;
}

/* ── Card ────────────────────────────────────────────────── */
.sgq-card, .sgq-form-card {
  background: var(--wh);
  border: 1.5px solid var(--bor);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--sh);
}
.sgq-form-card {
  position: sticky;
  top: 24px;
}

/* Card head label */
.sgq-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px;
  background: var(--bg);
  border-bottom: 1.5px solid var(--bor);
}
.sgq-card__label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--mu);
}
.sgq-card__label svg { opacity: .7; }

/* ── Items list ──────────────────────────────────────────── */
.sgq-items { padding: 0; }

.sgq-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  transition: background var(--t);
  position: relative;
}
.sgq-item:last-child { border-bottom: none; }
.sgq-item:hover { background: rgba(248,250,252,.9); }

.sgq-item__img-link { flex-shrink: 0; display: block; }
.sgq-item__img {
  width: 68px; height: 68px;
  object-fit: contain; padding: 6px;
  border-radius: 10px;
  border: 1.5px solid var(--bor);
  background: var(--bg);
  display: block;
  transition: transform var(--t);
}
.sgq-item:hover .sgq-item__img { transform: scale(1.04); }

.sgq-item__body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}

.sgq-item__name {
  font-size: 14px; font-weight: 700; color: var(--dk);
  text-decoration: none; line-height: 1.35;
  transition: color var(--t);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.sgq-item__name:hover { color: var(--r); }

.sgq-item__var {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--mu);
  background: var(--bg); padding: 2px 9px;
  border-radius: 20px; border: 1px solid var(--bor);
  width: fit-content; line-height: 1.6;
}
.sgq-item__var svg { opacity: .55; flex-shrink: 0; }
.sgq-item__sku { font-size: 11px; color: var(--lt); }

.sgq-item__foot {
  display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  margin-top: 8px; flex-wrap: wrap;
}

/* Qty */
.sgq-qty {
  display: inline-flex; align-items: stretch;
  border: 1.5px solid var(--bor); border-radius: 9px;
  overflow: hidden; height: 36px; background: var(--wh);
}
.sgq-qty__btn {
  width: 34px; height: 34px;
  background: var(--bg); border: none; font-size: 19px; font-weight: 300;
  cursor: pointer; color: var(--dk);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t), color var(--t); line-height: 1; user-select: none;
}
.sgq-qty__btn:hover { background: #edf0f3; color: var(--r); }
.sgq-qty__input {
  width: 42px; height: 34px;
  text-align: center; border: none;
  border-left: 1.5px solid var(--bor);
  border-right: 1.5px solid var(--bor);
  font-size: 13px; font-weight: 700; color: var(--dk);
  background: var(--wh); -moz-appearance: textfield;
}
.sgq-qty__input::-webkit-inner-spin-button,
.sgq-qty__input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Line price */
.sgq-item__price {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.sgq-item__price-unit { font-size: 11px; color: var(--lt); }
.sgq-item__price strong { font-size: 15px; font-weight: 900; color: var(--dk); }
.sgq-item__price-tbd { font-size: 12px; color: var(--mu); font-style: italic; }

/* Remove */
.sgq-item__rm {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 50%; border: none; background: none;
  cursor: pointer; color: var(--lt);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t); align-self: center;
}
.sgq-item__rm:hover { background: rgba(230,49,40,.1); color: var(--r); }

/* Total bar */
.sgq-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  border-top: 2px solid var(--bor);
  background: linear-gradient(135deg, var(--bg) 0%, #fff 100%);
}
.sgq-total span { font-size: 13px; font-weight: 600; color: var(--mu); }
.sgq-total strong { font-size: 1.25rem; font-weight: 900; color: var(--dk); letter-spacing: -.02em; }

/* Add more */
.sgq-add-more {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 20px;
  font-size: 13px; color: var(--mu); text-decoration: none;
  border-top: 1.5px solid var(--bor);
  transition: color var(--t), background var(--t);
}
.sgq-add-more:hover { color: var(--r); background: rgba(230,49,40,.03); }
.sgq-add-more svg { opacity: .45; flex-shrink: 0; }
.sgq-add-more:hover svg { opacity: 1; }

/* ── Form card ───────────────────────────────────────────── */
.sgq-form-head {
  padding: 20px 24px 16px;
  border-bottom: 1.5px solid var(--bor);
  background: var(--bg);
}
.sgq-form-title {
  font-size: 17px; font-weight: 800; color: var(--dk);
  margin: 0 0 5px; letter-spacing: -.02em;
}
.sgq-form-sub {
  font-size: 13px; color: var(--mu); margin: 0; line-height: 1.5;
}

.sgq-form {
  padding: 20px 24px 22px;
  display: flex; flex-direction: column; gap: 16px;
}

.sgq-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

.sgq-field { display: flex; flex-direction: column; gap: 7px; }
.sgq-field--full { grid-column: 1 / -1; }

.sgq-label {
  font-size: 12px; font-weight: 700; color: var(--mid);
  display: flex; align-items: center; gap: 5px;
  text-transform: uppercase; letter-spacing: .04em;
}
.sgq-req { color: var(--r); font-weight: 800; }
.sgq-opt { color: var(--lt); font-weight: 400; font-size: 11px; text-transform: none; letter-spacing: 0; }

.sgq-input-wrap {
  position: relative; display: flex; align-items: center;
}
.sgq-ico {
  position: absolute; left: 12px; color: var(--lt); flex-shrink: 0;
  pointer-events: none; transition: color var(--t);
}
.sgq-ico--top { top: 12px; align-self: flex-start; }

.sgq-input {
  width: 100%; padding: 11px 14px 11px 36px;
  border: 1.5px solid var(--bor); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--dk);
  background: var(--wh); line-height: 1.4;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.sgq-input::placeholder { color: var(--lt); }
.sgq-input:focus {
  outline: none;
  border-color: var(--r);
  box-shadow: 0 0 0 3px rgba(230,49,40,.12);
}
.sgq-input-wrap:focus-within .sgq-ico { color: var(--r); }

.sgq-textarea {
  resize: vertical; min-height: 96px;
  padding-top: 11px; line-height: 1.6;
}

/* ── Validation states ───────────────────────────────────── */
.sgq-field.has-error .sgq-input {
  border-color: var(--r);
  box-shadow: 0 0 0 3px rgba(230,49,40,.08);
}
.sgq-field-error {
  font-size: 11.5px; color: var(--r); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}

/* ── Error box ───────────────────────────────────────────── */
.sgq-error {
  padding: 12px 16px;
  background: rgba(230,49,40,.07);
  border: 1.5px solid rgba(230,49,40,.25);
  border-radius: 9px; color: var(--r);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: flex-start; gap: 8px;
  line-height: 1.4;
}

/* ── Submit button ───────────────────────────────────────── */
.sgq-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 15px 20px;
  background: var(--r); color: #fff; border: none;
  border-radius: 12px;
  font-size: 15px; font-weight: 800; letter-spacing: .01em;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 18px rgba(230,49,40,.32);
  transition: background var(--t) var(--ease), transform var(--t), box-shadow var(--t);
  margin-top: 4px; line-height: 1;
}
.sgq-submit:hover:not(:disabled) {
  background: var(--rd); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(230,49,40,.42);
}
.sgq-submit:active:not(:disabled) { transform: translateY(0); }
.sgq-submit:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

.sgq-submit__idle, .sgq-submit__loading {
  display: inline-flex; align-items: center; gap: 10px;
}

@keyframes sgq-spin { to { transform: rotate(360deg); } }
.sgq-spin { animation: sgq-spin .75s linear infinite; }

/* ── Trust row ───────────────────────────────────────────── */
.sgq-trust {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 10px; padding-top: 2px;
}
.sgq-trust__item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--lt); white-space: nowrap;
}
.sgq-trust__item svg { opacity: .65; flex-shrink: 0; }
.sgq-trust__dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--bor); flex-shrink: 0;
}

/* ── Empty state ─────────────────────────────────────────── */
.sgq-empty {
  text-align: center; padding: 72px 24px;
}
.sgq-empty__icon {
  width: 88px; height: 88px; margin: 0 auto 22px;
  color: var(--bor);
}
.sgq-empty__icon svg { width: 100%; height: 100%; }
.sgq-empty h3 {
  font-size: 1.35rem; font-weight: 800; color: var(--dk);
  margin: 0 0 10px; letter-spacing: -.02em;
}
.sgq-empty p {
  color: var(--mu); font-size: 14px; margin: 0 0 28px; line-height: 1.65;
}

/* ── Success state ───────────────────────────────────────── */
@keyframes sgq-in { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }

.sgq-success {
  min-height: 360px;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 24px;
  animation: sgq-in .5s var(--ease);
}
.sgq-success__inner { max-width: 520px; text-align: center; }

.sgq-success__icon {
  width: 80px; height: 80px; margin: 0 auto 22px; color: var(--gn);
}
.sgq-success__icon svg { width: 100%; height: 100%; }

.sgq-success__title {
  font-size: 1.65rem; font-weight: 900; color: var(--dk);
  margin: 0 0 12px; letter-spacing: -.025em;
}
.sgq-success__msg {
  color: var(--mu); font-size: 15px; margin: 0 0 18px; line-height: 1.65;
}
.sgq-success__ref {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; background: var(--bg);
  border: 1.5px solid var(--bor); border-radius: 9px;
  font-size: 14px; color: var(--mid); margin-bottom: 18px;
}
.sgq-success__ref strong { color: var(--dk); font-weight: 900; }
.sgq-success__note {
  font-size: 13px; color: var(--lt); margin: 0 0 30px; line-height: 1.65;
  padding: 12px 16px;
  background: var(--bg); border-radius: 8px;
  border: 1px solid var(--bor);
}
.sgq-success__actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sgq-layout { grid-template-columns: 1fr; }
  .sgq-form-card { position: static; }
}
@media (max-width: 600px) {
  .sgq-page { padding: 16px 0 40px; }
  .sgq-row { grid-template-columns: 1fr; }
  .sgq-form { padding: 16px 18px 20px; }
  .sgq-form-head { padding: 16px 18px; }
  .sgq-item__img { width: 56px; height: 56px; }
  .sgq-card__head { padding: 11px 16px; }
  .sgq-item { padding: 14px 16px; }
}
