/* Tlamane Quote Engine — quotation page, product-page configurator, header badge. Uses the theme's design tokens. */
:root { --tq-radius: 14px; --tq-line: var(--line, #d8dee3); --tq-navy: var(--navy, #102943); --tq-orange: var(--orange, #e46f26); --tq-orange-dark: var(--orange-dark, #bd5319); --tq-paper: var(--paper, #f5f3ee); --tq-muted: var(--muted, #5c6972); }
.tq *, .tq-inline *, .tq-toast *, .tq-modal * { box-sizing: border-box; }
.tq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.tq-main { min-width: 0; display: grid; gap: 28px; }
.tq-side { position: sticky; top: 104px; }

.tq-step { padding: 30px; border: 1px solid var(--tq-line); border-radius: var(--tq-radius); background: #fff; box-shadow: 0 7px 22px rgba(16,41,67,.05); }
.tq-step__head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 22px; }
.tq-step__head h2 { margin: 0 0 4px; font-size: clamp(1.2rem, 1.8vw, 1.45rem); }
.tq-step__head p { margin: 0; color: var(--tq-muted); }
.tq-step__num { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; background: var(--tq-navy); font-weight: 800; }

.tq-btn { position: relative; display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 9px; padding: 11px 22px; border: 2px solid var(--tq-orange); border-radius: 8px; color: #fff; background: var(--tq-orange); font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; transition: .2s ease; }
.tq-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tq-btn:hover { color: #fff; border-color: var(--tq-orange-dark); background: var(--tq-orange-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(189,83,25,.25); }
.tq-btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.tq-btn--primary { color: #fff; border-color: var(--tq-orange); background: var(--tq-orange); }
.tq-btn--outline { color: var(--tq-navy); border-color: var(--tq-navy); background: transparent; }
.tq-btn--outline:hover { color: #fff; border-color: var(--tq-navy); background: var(--tq-navy); box-shadow: none; }
.tq-btn--small { min-height: 42px; padding: 7px 16px; font-size: .88rem; }
.tq-btn--block { width: 100%; }
.tq-btn--whatsapp { border-color: #1f8f5a; background: #1f8f5a; }
.tq-btn--whatsapp:hover { border-color: #176d4a; background: #176d4a; }
.tq-btn.is-busy::after { content: ""; position: absolute; inset: 0; border-radius: 6px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); animation: tq-shimmer 1.2s infinite; }
@keyframes tq-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.tq-link { padding: 0; border: 0; background: none; color: var(--tq-navy); font: inherit; font-size: .88rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tq-link:hover { color: var(--tq-orange-dark); }
.tq-link--danger { color: #9b2c2c; }

/* Items in the quotation */
.tq-cart__empty { padding: 28px 22px; border: 1px dashed #bfc8ce; border-radius: 12px; text-align: center; }
.tq-cart__empty p { margin: 0 0 14px; color: var(--tq-muted); }
.tq-cart__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tq-cart__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; grid-template-areas: "img info qty total" "img info actions actions"; align-items: center; column-gap: 16px; row-gap: 6px; padding: 14px; border: 1px solid var(--tq-line); border-radius: 12px; background: var(--tq-paper); }
.tq-cart__item img, .tq-cart__noimg { grid-area: img; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #e8ecef; }
.tq-cart__info { grid-area: info; display: grid; gap: 2px; min-width: 0; }
.tq-cart__info strong { color: var(--tq-navy); }
.tq-cart__info span { color: var(--tq-muted); font-size: .86rem; }
.tq-cart__info em { color: var(--tq-muted); font-size: .8rem; font-style: normal; }
.tq-cart__item .tq-qty { grid-area: qty; justify-self: end; }
.tq-cart__total { grid-area: total; min-width: 120px; color: var(--tq-navy); font-weight: 800; text-align: right; }
.tq-cart__actions { grid-area: actions; display: flex; justify-content: flex-end; gap: 16px; }
.tq-cart__more { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--tq-line); color: var(--tq-muted); font-size: .9rem; }

/* Delivery */
.tq-delivery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tq-radio { display: block; cursor: pointer; position: relative; }
.tq-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tq-radio__card { display: grid; gap: 4px; height: 100%; padding: 14px 16px 14px 46px; position: relative; border: 2px solid var(--tq-line); border-radius: 12px; background: #fff; transition: .15s ease; }
.tq-radio__card::before { content: ""; position: absolute; top: 17px; left: 16px; width: 18px; height: 18px; border: 2px solid #bfc8ce; border-radius: 50%; background: #fff; transition: .15s ease; }
.tq-radio input:checked + .tq-radio__card { border-color: var(--tq-navy); background: #f7f9fb; }
.tq-radio input:checked + .tq-radio__card::before { border-color: var(--tq-orange); border-width: 6px; }
.tq-radio input:focus-visible + .tq-radio__card { outline: 3px solid rgba(228,111,38,.3); }
.tq-radio__title { color: var(--tq-navy); font-weight: 750; }
.tq-radio__desc { color: var(--tq-muted); font-size: .84rem; }
.tq-radio__price { color: var(--tq-orange-dark); font-size: .88rem; font-weight: 800; }

/* Details form */
.tq-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tq-form__wide, .tq-form__errors { grid-column: 1/-1; }
.tq-form label { display: block; margin-bottom: 6px; color: var(--tq-navy); font-weight: 750; }
.tq-form label span { color: var(--tq-orange-dark); }
.tq-form input { width: 100%; min-height: 49px; padding: 11px 13px; border: 1px solid #bfc8ce; border-radius: 6px; font: inherit; color: inherit; background: #fff; }
.tq-form input:focus { outline: 3px solid rgba(228,111,38,.2); border-color: var(--tq-orange); }
.tq-hp { position: absolute !important; left: -9999px !important; }
.tq-form__errors { padding: 13px 16px; border: 1px solid #f5c2c7; border-radius: 8px; color: #842029; background: #f8d7da; }
.tq-form__errors ul { margin: 6px 0 0; padding-left: 18px; }

/* Summary */
.tq-summary { padding: 26px; border-radius: var(--tq-radius); color: #fff; background: var(--tq-navy); box-shadow: 0 15px 40px rgba(16,41,67,.18); }
.tq-summary__eyebrow { margin: 0 0 10px; color: #f2b181; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tq-summary__empty { margin: 0 0 16px; color: #b8c5cf; font-size: .92rem; }
.tq-summary__lines { display: grid; gap: 8px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
.tq-summary__line { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.tq-summary__line span { color: #d8e3ec; }
.tq-summary__line em { display: block; color: #9eafbc; font-size: .8rem; font-style: normal; }
.tq-summary__line strong { white-space: nowrap; }
.tq-summary__totals { display: grid; gap: 7px; margin: 0 0 18px; }
.tq-summary__totals div { display: flex; justify-content: space-between; gap: 10px; }
.tq-summary__totals dt { color: #b8c5cf; font-size: .9rem; }
.tq-summary__totals dd { margin: 0; font-weight: 700; }
.tq-summary__na { color: #9eafbc; font-weight: 500; font-size: .85rem; }
.tq-summary__grand { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.tq-summary__grand dt { color: #fff; font-weight: 800; }
.tq-summary__grand dd { font-size: 1.55rem; font-weight: 850; color: #ffb37c; }
.tq-summary__note { margin: 12px 0 0; color: #b8c5cf; font-size: .8rem; line-height: 1.5; }
.tq-side__alt { display: block; margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: rgba(255,255,255,.07); color: #d8e3ec; font-size: .86rem; line-height: 1.45; }
.tq-side__alt strong { color: #fff; }
.tq-side__alt:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Option fields (shared by product page and edit dialog) */
.tq-field { margin: 0; padding: 16px 0; border: 0; border-top: 1px solid var(--tq-line); min-width: 0; }
.tq-field:first-child { border-top: 0; }
.tq-field legend, .tq-field > label { display: block; margin-bottom: 10px; padding: 0; color: var(--tq-navy); font-weight: 750; }
.tq-field legend { float: left; width: 100%; }
.tq-field small { color: var(--tq-muted); font-weight: 500; }
.tq-field__note { margin: 0; padding: 12px 0 0; color: var(--tq-muted); font-size: .84rem; border-top: 1px solid var(--tq-line); }
.tq-chips, .tq-checks { display: flex; flex-wrap: wrap; gap: 8px; clear: both; }
.tq-chip, .tq-check { position: relative; cursor: pointer; }
.tq-chip input, .tq-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tq-chip span, .tq-check span { display: grid; gap: 1px; padding: 9px 15px; border: 2px solid var(--tq-line); border-radius: 10px; background: #fff; line-height: 1.25; transition: .15s ease; }
.tq-chip strong, .tq-check strong { color: var(--tq-navy); font-size: .92rem; }
.tq-chip em, .tq-check em { color: var(--tq-muted); font-size: .8rem; font-style: normal; }
.tq-chip:hover span, .tq-check:hover span { border-color: #9fb0bd; }
.tq-chip input:checked + span { border-color: var(--tq-navy); background: var(--tq-navy); }
.tq-chip input:checked + span strong, .tq-chip input:checked + span em { color: #fff; }
.tq-check span { padding-left: 40px; }
.tq-check span::before { content: ""; position: absolute; top: 13px; left: 13px; width: 18px; height: 18px; border: 2px solid #9fb0bd; border-radius: 5px; background: #fff; transition: .15s ease; }
.tq-check input:checked + span { border-color: var(--tq-orange); background: #fff7ef; }
.tq-check input:checked + span::before { border-color: #e46f26; background-color: #e46f26; background-image: 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='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); background-size: 13px 13px; background-position: center; background-repeat: no-repeat; }
.tq-chip input:focus-visible + span, .tq-check input:focus-visible + span { outline: 3px solid rgba(228,111,38,.3); }
.tq-qty { display: inline-flex; align-items: stretch; border: 1px solid #bfc8ce; border-radius: 8px; overflow: hidden; background: #fff; }
.tq-qty button { width: 44px; border: 0; background: var(--tq-paper); color: var(--tq-navy); font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.tq-qty button:hover { background: #e9e5dc; }
.tq-qty input { width: 80px; min-height: 46px; padding: 6px; border: 0; font: inherit; font-weight: 700; text-align: center; -moz-appearance: textfield; }
.tq-qty input::-webkit-outer-spin-button, .tq-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tq-qty--small button { width: 36px; font-size: 1.05rem; }
.tq-qty--small input { width: 58px; min-height: 38px; }

/* Edit dialog */
.tq-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.tq-modal[hidden] { display: none; }
.tq-modal__backdrop { position: absolute; inset: 0; background: rgba(7,26,43,.62); backdrop-filter: blur(3px); }
.tq-modal__dialog { position: relative; width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; border-radius: 16px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: tq-pop .18s ease; }
@keyframes tq-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.tq-modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--tq-paper); color: var(--tq-navy); cursor: pointer; }
.tq-modal__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tq-modal__product { display: flex; gap: 16px; align-items: center; margin: 0 40px 18px 0; }
.tq-modal__product img { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 10px; object-fit: cover; background: #edf0f1; }
.tq-modal__product h3 { margin: 0 0 4px; font-size: 1.15rem; }
.tq-modal__product p { margin: 0; color: var(--tq-muted); font-size: .88rem; }
.tq-modal .tq-config { border-top: 1px solid var(--tq-line); }
.tq-modal .tq-field:first-child { border-top: 0; }
.tq-modal__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px solid var(--tq-line); }
body.tq-modal-open { overflow: hidden; }

/* Product page: instant quotation card */
.tq-inline { margin-top: 28px; overflow: hidden; border: 1px solid var(--tq-line); border-radius: var(--tq-radius); background: #fff; box-shadow: 0 10px 30px rgba(16,41,67,.08); }
.tq-inline__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; padding: 20px 24px; border-bottom: 1px solid var(--tq-line); background: var(--tq-paper); }
.tq-inline__head h3 { margin: 0; font-size: 1.12rem; }
.tq-inline .tq-summary__eyebrow { color: var(--tq-orange-dark); margin-bottom: 5px; }
.tq-inline__from { margin: 0; padding-top: 2px; color: var(--tq-muted); font-size: .88rem; white-space: nowrap; }
.tq-inline__from strong { color: var(--tq-navy); font-size: 1.15rem; }
.tq-inline .tq-config { padding: 2px 24px 0; }
.tq-inline .tq-field:first-child { border-top: 0; }
.tq-inline__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-top: 1px solid var(--tq-line); background: #fff; }
.tq-inline__total { display: grid; gap: 1px; }
.tq-inline__total span { color: var(--tq-muted); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tq-inline__total strong { color: var(--tq-navy); font-size: 1.6rem; line-height: 1.1; }
.tq-inline__total small { color: var(--tq-muted); font-size: .76rem; }
.tq-inline__note { margin: 0; padding: 0 24px 18px; color: var(--tq-muted); font-size: .84rem; }
.tq-inline--poa { padding: 24px; background: var(--tq-paper); box-shadow: none; }
.tq-inline--poa h3 { margin: 0 0 8px; }

/* Success */
.tq-success__card { max-width: 760px; margin: 0 auto; padding: 40px; border: 1px solid var(--tq-line); border-radius: var(--tq-radius); background: #fff; box-shadow: var(--shadow, 0 15px 40px rgba(16,41,67,.12)); text-align: center; }
.tq-success__icon { display: grid; width: 74px; height: 74px; margin: 0 auto 18px; place-items: center; border-radius: 50%; background: #e8f5ee; color: #176d4a; }
.tq-success__icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tq-success__card h2 { margin-bottom: 10px; }
.tq-success__card h2 span { color: var(--tq-orange-dark); }
.tq-success__lead { color: var(--tq-muted); font-size: 1.05rem; }
.tq-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 22px 0 26px; }
.tq-success__table { width: 100%; margin-bottom: 22px; border-collapse: collapse; text-align: left; }
.tq-success__table td { padding: 10px 8px; border-bottom: 1px solid var(--tq-line); vertical-align: top; }
.tq-success__table td:nth-child(2) { text-align: center; white-space: nowrap; }
.tq-success__table td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.tq-success__table td span { color: var(--tq-muted); font-size: .84rem; }
.tq-success__sub td { color: var(--tq-muted); font-weight: 500; }
.tq-success__grand td { border-bottom: 0; color: var(--tq-navy); font-size: 1.15rem; font-weight: 850; }
.tq-success__next { padding: 18px 22px; border-left: 4px solid var(--tq-orange); border-radius: 8px; background: #fff7ef; text-align: left; }
.tq-success__next strong { color: var(--tq-navy); }
.tq-success__next ol { margin: 8px 0 0; padding-left: 20px; }
.tq-success__next li { margin-bottom: 4px; }
.tq-success__foot { margin: 22px 0 0; color: var(--tq-muted); font-size: .9rem; }

.tq-toast { position: fixed; z-index: 1100; right: 20px; bottom: 20px; max-width: min(380px, calc(100vw - 40px)); padding: 14px 18px; border-left: 4px solid var(--tq-orange); border-radius: 10px; background: var(--tq-navy); color: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.3); font-size: .92rem; opacity: 0; transform: translateY(12px); transition: .22s ease; }
.tq-toast.is-visible { opacity: 1; transform: none; }
.tq-toast a { color: #ffb37c; font-weight: 700; text-decoration: underline; }

.header-quote { position: relative; }
.tq-badge { position: absolute; top: -8px; right: -8px; display: grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; border: 2px solid #fff; border-radius: 999px; background: var(--tq-navy); color: #fff; font-size: .7rem; font-weight: 800; line-height: 1; }

@media (max-width: 1060px) {
  .tq-layout { grid-template-columns: 1fr; }
  .tq-side { position: static; }
}
@media (max-width: 640px) {
  .tq-step { padding: 20px 16px; }
  .tq-delivery, .tq-form { grid-template-columns: 1fr; }
  .tq-form__wide { grid-column: auto; }
  .tq-cart__item { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "img info" "qty total" "actions actions"; column-gap: 12px; }
  .tq-cart__item img, .tq-cart__noimg { width: 56px; height: 56px; }
  .tq-cart__item .tq-qty { justify-self: start; }
  .tq-cart__total { min-width: 0; }
  .tq-cart__more { flex-direction: column; align-items: stretch; text-align: center; }
  .tq-modal { padding: 0; align-items: end; }
  .tq-modal__dialog { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 22px 18px; }
  .tq-inline__head, .tq-inline__foot { padding: 16px 18px; }
  .tq-inline .tq-config { padding: 0 18px; }
  .tq-inline__note { padding: 0 18px 16px; }
  .tq-inline__foot .tq-btn { flex: 1 1 100%; }
  .tq-success__card { padding: 28px 18px; }
  .tq-badge { top: -6px; right: -6px; }
}
