/* Order page — same system as home.css */
.order { padding-bottom: 40px; }

/* Intro band */
.o-intro { position: relative; background: radial-gradient(70% 120% at 80% 0%, #4a2f55 0%, transparent 65%), var(--night); color: var(--on-night); overflow: hidden; isolation: isolate; }
.o-intro::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(#ffffff26 1px, transparent 1.4px); background-size: 34px 34px; mask-image: radial-gradient(60% 90% at 80% 20%, #000 0%, transparent 75%); }
.o-intro-in { display: grid; gap: 22px; padding-block: clamp(36px, 5vw, 64px) clamp(30px, 4vw, 48px); }
.o-intro-copy { display: grid; gap: 10px; max-width: 640px; }
.o-intro h1 { margin: 0; font: 800 clamp(2rem, 4vw, 3rem)/1.25 var(--display); letter-spacing: 0; }
.o-intro-copy > p { margin: 0; color: var(--on-night-muted); text-wrap: pretty; }
.o-progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 760px; }
.o-progress li { display: grid; gap: 8px; }
.o-progress-bar { height: 6px; border-radius: 99px; background: #ffffff1f; overflow: hidden; position: relative; }
.o-progress-bar::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-hi), var(--gold)); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.order[dir='ltr'] .o-progress-bar::after { transform-origin: left; }
.o-progress li[data-done='true'] .o-progress-bar::after { transform: scaleX(1); }
.o-progress-label { font-size: .82rem; font-weight: 500; color: var(--on-night-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.o-progress li[data-done='true'] .o-progress-label { color: var(--gold-soft); }
.o-progress-note { margin: -6px 0 0; font-size: .85rem; color: var(--gold-hi); }

/* Layout */
.o-main { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; padding-block: 32px 60px; }
.o-form { display: grid; gap: 20px; min-width: 0; }
.o-panel { display: grid; gap: 20px; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-lg); background: var(--white); box-shadow: 0 0 0 1px var(--line), 0 20px 40px -36px #22152a55; scroll-margin-top: 90px; }
.o-panel-head { display: flex; align-items: flex-start; gap: 14px; }
.o-panel-head h2 { margin: 0; font: 700 clamp(1.15rem, 2vw, 1.35rem)/1.4 var(--display); }
.o-panel-head p { margin: 2px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.7; }
.o-step-n { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--gold); background: var(--white); color: var(--plum); font: 800 1rem/1 var(--display); transition: background-color .3s ease, color .3s ease; }
.o-step-n[data-done='true'] { background: var(--plum); border-color: var(--plum); color: var(--gold-hi); }

/* Templates */
.o-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px; }
.o-tpl { display: grid; gap: 8px; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; color: var(--ink); }
.o-tpl-art { position: relative; display: grid; place-items: center; aspect-ratio: 6 / 10; overflow: hidden; border-radius: 18px; box-shadow: 0 0 0 1px #22152a14, 0 10px 22px -16px #22152a90; transition: transform .25s ease, box-shadow .25s ease; }
.o-tpl-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.o-tpl:hover .o-tpl-art { transform: translateY(-3px); }
.o-tpl[aria-pressed='true'] .o-tpl-art { box-shadow: 0 0 0 3px var(--gold), 0 14px 28px -14px #c98b5fcc; }
.o-tpl-check { position: absolute; top: 8px; inset-inline-start: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--night); font-size: .8rem; font-weight: 700; box-shadow: 0 2px 6px #00000040; }
.o-tpl-custom { display: grid; gap: 4px; padding: 10px; line-height: 1.4; }
.o-tpl-custom > small { font-size: .72rem; opacity: .8; }
.o-tpl-custom > strong { font: 800 1rem/1.35 var(--display); }
.o-tpl-name { font-size: .86rem; font-weight: 600; line-height: 1.4; }
.o-tpl[aria-pressed='true'] .o-tpl-name { color: var(--plum-2); }
.o-link { justify-self: start; font-size: .88rem; font-weight: 500; color: var(--plum-2); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.o-link:hover { border-color: var(--plum-2); }

/* Packages */
.o-pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.o-pkg { display: grid; gap: 8px; align-content: start; text-align: start; padding: 18px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.o-pkg:hover { border-color: var(--lilac-2); background: var(--pearl); }
.o-pkg[aria-pressed='true'] { border-color: var(--gold); background: #fdf6ef; box-shadow: 0 12px 26px -18px #c98b5fcc; }
.o-pkg-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.o-pkg-top > strong { font: 700 1.05rem/1.4 var(--display); }
.o-pkg-flag { padding: 2px 10px; border-radius: 99px; background: var(--plum); color: var(--gold-soft); font-size: .7rem; font-weight: 600; white-space: nowrap; }
.o-pkg-price { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.o-pkg-price > b { font: 800 1.9rem/1 var(--display); color: var(--plum); }
.o-pkg-price > span { font-size: .82rem; color: #5d4e63; }
.o-pkg-price > s { font-size: .85rem; color: var(--muted); }
.o-pkg-desc { font-size: .84rem; color: var(--muted); line-height: 1.6; }

/* Fields */
.o-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.o-field { display: grid; gap: 6px; min-width: 0; }
.o-field[data-span='true'] { grid-column: 1 / -1; }
.o-field-label { font-size: .86rem; font-weight: 500; color: var(--ink); }
.o-field :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 50px; padding: 11px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--pearl); color: var(--ink); font-size: 16px; outline: none; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.o-field textarea { resize: vertical; line-height: 1.7; }
.o-field :is(input, select, textarea)::placeholder { color: #9a8aa0; }
.o-field :is(input, select, textarea):hover { border-color: var(--lilac-2); }
.o-field :is(input, select, textarea):focus { border-color: var(--gold); background: var(--white); box-shadow: 0 0 0 4px #c98b5f26; }
.o-field input[aria-invalid='true'] { border-color: #b4463a; box-shadow: 0 0 0 4px #b4463a1f; }
.o-empty { display: block; width: 100%; padding: 22px; border-radius: var(--r-md); border: 1.5px dashed var(--lilac-2); background: var(--lilac); color: var(--plum); font-size: .92rem; line-height: 1.7; text-align: center; cursor: pointer; }
.o-empty:hover { border-color: var(--plum-2); }

/* Summary */
.o-side { position: sticky; top: 88px; display: grid; gap: 14px; min-width: 0; scroll-margin-top: 90px; }
.o-summary { display: grid; gap: 18px; padding: 26px; border-radius: var(--r-lg); background: linear-gradient(170deg, #3d2748, var(--night)); color: var(--on-night); box-shadow: 0 30px 60px -30px #22152aaa; }
.o-summary h2 { margin: 0; font: 700 1.15rem/1.4 var(--display); }
.o-sum-row { display: flex; gap: 14px; align-items: center; }
.o-sum-art { position: relative; flex: none; display: grid; place-items: center; width: 74px; aspect-ratio: 6 / 10; overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px #ffffff26; text-align: center; padding: 6px; }
.o-sum-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.o-sum-art > strong { font: 700 .75rem/1.35 var(--display); }
.o-sum-list { margin: 0; display: grid; gap: 2px; min-width: 0; }
.o-sum-list dt { font-size: .76rem; color: var(--on-night-muted); }
.o-sum-list dt:not(:first-child) { margin-top: 6px; }
.o-sum-list dd { margin: 0; font-weight: 600; line-height: 1.5; }
.o-sum-list .o-sum-sub { font-weight: 400; font-size: .82rem; color: var(--gold-soft); }
.o-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px dashed #ffffff2a; color: var(--on-night-muted); font-size: .9rem; }
.o-total-n { color: var(--on-night-muted); }
.o-total-n > b { font: 800 2.2rem/1 var(--display); color: var(--gold-hi); }
.o-send { width: 100%; }
.o-wa { flex: none; width: 20px; height: 20px; background: var(--night); -webkit-mask: url(assets/icons/whatsapp.svg) center / contain no-repeat; mask: url(assets/icons/whatsapp.svg) center / contain no-repeat; }
.o-missing { margin: -6px 0 0; text-align: center; font-size: .85rem; color: #ffb4a6; }
.o-sent { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); background: #ffffff10; font-size: .88rem; line-height: 1.7; }
.o-sent > strong { color: var(--gold-soft); }
.o-sent > span { color: var(--on-night-muted); }
.o-sent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.o-assure { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .84rem; color: var(--on-night-muted); line-height: 1.6; }
.o-assure li { display: flex; gap: 8px; }
.o-assure li::before { content: '✓'; flex: none; color: var(--gold); font-weight: 700; }

/* WhatsApp preview: shows exactly what will be sent */
.o-preview { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg); background-color: #ece5dd; background-image: radial-gradient(circle, #8e796121 1px, transparent 1px); background-size: 14px 14px; }
.o-preview-label { justify-self: center; padding: 2px 10px; border-radius: 6px; background: #f9f8f0; color: #4e574e; font-size: .74rem; }
.o-bubble { justify-self: end; max-width: 100%; padding: 10px 14px; border-radius: 12px; border-start-end-radius: 3px; background: #dcf8c6; color: #1f2c26; font-size: .84rem; line-height: 1.8; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 2px #4b443320; }

/* Mobile bottom bar */
.o-bar { position: fixed; z-index: 30; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #22152af2; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid #ffffff14; }
.o-bar-sum { flex: none; display: grid; gap: 0; min-height: 48px; align-content: center; padding: 0; border: 0; background: none; color: var(--on-night-muted); text-align: start; cursor: pointer; line-height: 1.3; }
.o-bar-sum > small { font-size: .74rem; }
.o-bar-sum > span { font-size: .8rem; }
.o-bar-sum b { font: 800 1.3rem/1.1 var(--display); color: var(--gold-hi); }
.o-bar .o-send { flex: 1; width: auto; }

@media (max-width: 959px) {
  .o-main { grid-template-columns: minmax(0, 1fr); padding-bottom: 110px; }
  .o-side { position: static; }
}
@media (max-width: 640px) {
  .o-progress-label { font-size: .74rem; }
  .o-pkgs { grid-template-columns: minmax(0, 1fr); }
  .o-fields { grid-template-columns: minmax(0, 1fr); }
  .o-tpls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .o-tpl-name { font-size: .78rem; }
  .o-panel-head p { font-size: .84rem; }
}
