/* Página de cotação (cotacao.html). Usa as variáveis e botões de styles.css. */
.quote-page { background: #fbf1ec; }
.back { text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; }
.back:hover { background: var(--blush); color: var(--wine); }

.q { position: relative; padding: 48px 0 110px; min-height: 70vh; overflow: hidden; }
.q__bg {
  position: absolute; inset: 0 0 auto; height: 520px; pointer-events: none;
  background:
    radial-gradient(50% 70% at 90% 10%, rgba(245, 166, 35, 0.28), transparent 70%),
    radial-gradient(40% 60% at 10% 0%, rgba(200, 16, 46, 0.14), transparent 70%),
    linear-gradient(180deg, #fbe6df 0%, rgba(251, 241, 236, 0) 100%);
}
.q .wrap { position: relative; }
.q__head { max-width: 720px; margin-bottom: 34px; }
.q__head h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; margin-bottom: 14px; }
.q__head p { font-size: 18px; color: var(--ink-2); }
.trust { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.trust li { font-size: 13px; font-weight: 600; color: var(--wine); background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(143, 29, 29, 0.14); padding: 6px 12px 6px 28px; border-radius: 999px; position: relative; }
.trust li::before { content: ""; position: absolute; left: 11px; top: 50%; width: 9px; height: 5px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: translateY(-70%) rotate(-45deg); }

.q__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.q__main { display: grid; gap: 16px; min-width: 0; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); margin: 0; min-width: 0; }
fieldset.q-card { border: 1px solid var(--line); }
.q-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.q-label i { color: var(--red); font-style: normal; }
.q-label em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
.q-label--row { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }

/* Tipo de envio */
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.type input { position: absolute; opacity: 0; pointer-events: none; }
.type:hover { border-color: rgba(143, 29, 29, 0.4); }
.type:has(input:checked) { border-color: var(--wine); background: #fff8f6; box-shadow: 0 0 0 4px rgba(143, 29, 29, 0.08); }
.type:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.type__txt { display: grid; line-height: 1.3; }
.type__txt strong { font-size: 16px; }
.type__txt small { color: var(--muted); font-size: 13px; }
.type__art { flex: none; width: 54px; height: 54px; border-radius: 14px; background: var(--cream); display: grid; place-items: center; }
.type__art--box i { width: 30px; height: 24px; border-radius: 4px; background: linear-gradient(135deg, #d9a66a, #b98146); position: relative; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08); }
.type__art--box i::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; transform: translateX(-50%); background: rgba(255, 255, 255, 0.55); }
.type__art--doc i { width: 32px; height: 22px; border-radius: 3px; background: #fff; border: 2px solid var(--wine); position: relative; overflow: hidden; }
.type__art--doc i::before { content: ""; position: absolute; left: -2px; right: -2px; top: -12px; height: 22px; border: 2px solid var(--wine); transform: rotate(45deg) skew(10deg, 10deg); transform-origin: center; background: #fff8f6; }
.type:has(input:checked) .type__art { background: #fde9d0; }

/* Campos */
.q-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.q-field { display: block; min-width: 0; }
.q-field--pair { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.q-field--full { grid-column: 1 / -1; }
.q-field input[type="text"], .q-field input[type="tel"], .phone select, .money__in {
  width: 100%; font: 500 16px var(--body); color: var(--ink); background: var(--cream);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.q-field input:focus, .phone select:focus, .money__in:focus-within { border-color: var(--wine); background: #fff; box-shadow: 0 0 0 4px rgba(143, 29, 29, 0.08); }
.q-field.invalid input, .q-field .invalid, .combo.invalid input { border-color: var(--red); background: #fff6f6; }
.err { display: block; min-height: 0; color: var(--red); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.err:empty { display: none; }

/* Combobox de país */
.combo { position: relative; }
.combo input { padding-right: 38px !important; }
.combo .chev { position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%) rotate(90deg); color: var(--muted); pointer-events: none; }
.combo__list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); max-height: 260px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(60, 20, 20, 0.35); }
.combo__list li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.combo__list li[aria-selected="true"], .combo__list li:hover { background: var(--blush); color: var(--wine); }
.combo__list li.none { color: var(--muted); cursor: default; background: none; }
.flag { font-size: 18px; line-height: 1; }

/* Segmentado (moedas) */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { font: 600 14px var(--body); border: 0; background: transparent; color: var(--ink-2); padding: 10px 8px; border-radius: 9px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--wine); box-shadow: 0 2px 8px -3px rgba(60, 20, 20, 0.25); }

/* Seguro */
.insure { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--line); }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; padding-top: 10px; }
.switch input { position: absolute; opacity: 0; }
.switch__track { width: 46px; height: 26px; border-radius: 999px; background: #d9cfca; position: relative; transition: background 0.2s; flex: none; }
.switch__track span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch input:checked + .switch__track { background: #22a35a; }
.switch input:checked + .switch__track span { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--red); outline-offset: 2px; }
.switch__txt { display: grid; line-height: 1.3; }
.switch__txt strong { font-size: 15px; }
.switch__txt small { color: var(--muted); font-size: 12.5px; }
.money { display: block; min-width: 200px; flex: 1; max-width: 280px; padding-top: 10px; }
.money[hidden] { display: none; }
.money__in { display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.money__in b { color: var(--muted); font-weight: 600; }
.money__in input { border: 0; outline: 0; background: transparent; font: 600 16px var(--body); padding: 13px 0; width: 100%; color: var(--ink); }

/* Volumes */
.qbox { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px; border-radius: 16px; background: #faf4f0; border: 1px solid var(--line); margin-bottom: 12px; animation: boxIn 0.3s ease; }
.qbox__art { display: grid; place-items: center; height: 100px; }
.qbox__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.qbox__head strong { font-size: 16px; }
.qbox__vol { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.qbox__rm { border: 0; background: none; color: var(--muted); font: 600 13px var(--body); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.qbox__rm:hover { color: var(--red); background: #fff; }
.qbox__fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.qbox__fields.one { grid-template-columns: minmax(0, 200px); }
.unit { position: relative; display: block; }
.unit span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.unit input { width: 100%; font: 600 16px var(--body); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 36px 11px 12px; outline: none; }
.unit input:focus { border-color: var(--wine); box-shadow: 0 0 0 4px rgba(143, 29, 29, 0.08); }
.unit.invalid input { border-color: var(--red); background: #fff6f6; }
.unit b { position: absolute; right: 11px; bottom: 12px; font-size: 13px; font-weight: 500; color: var(--muted); pointer-events: none; }

/* Caixa 3D em CSS */
.cube { --s: 62px; width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-38deg); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.qbox:hover .cube { transform: rotateX(-24deg) rotateY(-58deg); }
.cube div { position: absolute; inset: 0; background: #c99358; border: 1px solid rgba(90, 50, 20, 0.25); }
.cube .f { transform: translateZ(calc(var(--s) / 2)); background: linear-gradient(180deg, #d9a66a, #c48c51); }
.cube .r { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); background: linear-gradient(180deg, #b98146, #a8733c); }
.cube .t { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); background: #e6bb85; }
.cube .t::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 10px; transform: translateX(-50%); background: rgba(255, 255, 255, 0.55); }
.cube .f::after { content: ""; position: absolute; left: 50%; top: 0; height: 30%; width: 10px; transform: translateX(-50%); background: rgba(255, 255, 255, 0.5); }
.envelope { width: 84px; height: 56px; border-radius: 6px; background: #fff; border: 2px solid var(--wine); position: relative; overflow: hidden; transform: rotate(-6deg); box-shadow: 0 10px 20px -10px rgba(60, 20, 20, 0.4); }
.envelope::before { content: ""; position: absolute; left: 50%; top: -38px; width: 60px; height: 60px; transform: translateX(-50%) rotate(45deg); border: 2px solid var(--wine); background: #fff4f1; }
.envelope::after { content: "MS"; position: absolute; right: 6px; bottom: 4px; font: 800 10px var(--display); color: var(--gold); }

.add { display: inline-flex; align-items: center; gap: 8px; border: 1.5px dashed rgba(143, 29, 29, 0.35); background: transparent; color: var(--wine); font: 600 14px var(--body); padding: 12px 16px; border-radius: 12px; cursor: pointer; width: 100%; justify-content: center; transition: background 0.15s, border-color 0.15s; }
.add:hover { background: #fff8f6; border-color: var(--wine); }
.add[hidden] { display: none; }

/* Resumo */
.q__side { position: sticky; top: 96px; }
.summary { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); border-top: 5px solid var(--wine); }
.summary h2 { font-size: 18px; margin-bottom: 12px; }
.summary dl { margin: 0; display: grid; }
.summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f3ece7; font-size: 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.summary__charged { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 6px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, var(--red), var(--wine)); color: #fff; }
.summary__charged span { font-size: 13px; font-weight: 600; opacity: 0.85; }
.summary__charged strong { font: 700 22px var(--display); }
.summary .btn { margin-top: 16px; }
.form-err { margin-top: 10px; color: var(--red); font-weight: 600; font-size: 14px; }

/* Passo 2 e 3 */
.q-narrow { max-width: 560px; margin: 0 auto; }
.contact, .done { padding: 30px; display: grid; gap: 14px; text-align: left; }
.contact h2, .done h2 { font-size: 26px; }
.contact__icon { width: 56px; height: 56px; border-radius: 16px; background: #25d366; color: #fff; display: grid; place-items: center; }
.contact__icon svg { width: 30px; height: 30px; }
.recap { font-size: 14px; color: var(--ink-2); background: var(--cream); border-radius: 12px; padding: 12px 14px; line-height: 1.5; }
.recap b { color: var(--ink); }
.phone { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; }
.phone select { padding: 13px 8px; appearance: auto; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--wine); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.link { justify-self: center; border: 0; background: none; color: var(--wine); font: 600 14px var(--body); cursor: pointer; text-decoration: none; padding: 6px; }
.link:hover { text-decoration: underline; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
.done { text-align: center; justify-items: center; }
.done__check svg { width: 72px; height: 72px; }
.done__check circle { fill: none; stroke: #22a35a; stroke-width: 3; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 0.7s ease forwards; }
.done__check path { fill: none; stroke: #22a35a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw 0.4s 0.55s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ref { font: 800 30px var(--display); letter-spacing: 0.04em; color: var(--wine); background: #fff4e0; border: 1px dashed var(--gold); border-radius: 14px; padding: 10px 22px; }
.q-step[hidden] { display: none; }
.q-step { animation: stepIn 0.35s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } }
.footer--slim { padding: 0; }
.footer--slim .footer__bottom { margin-top: 0; }

@media (max-width: 960px) {
  .q__grid { grid-template-columns: 1fr; }
  .q__side { position: static; }
}
@media (max-width: 600px) {
  .q { padding-top: 28px; }
  .types { grid-template-columns: 1fr; }
  .q-fields { grid-template-columns: 1fr; }
  .q-field--pair { grid-template-columns: 1fr; gap: 16px; }
  .q-card { padding: 16px; border-radius: 16px; }
  .qbox { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .qbox__art { height: 76px; }
  .qbox__fields { grid-template-columns: 1fr 1fr; }
  .money { max-width: none; }
  .contact, .done { padding: 22px; }
  .phone { grid-template-columns: 112px minmax(0, 1fr); }
}
fieldset.q-card legend { float: left; width: 100%; margin-bottom: 8px; }
fieldset.q-card .types { clear: both; }
.quote-page .footer--slim { background: transparent; }
@media (max-width: 600px) {
  .quote-page .footer__bottom { padding-bottom: 84px; }
  .q__head h1 { font-size: 32px; }
}
