/* Order page ("Поръчай торта") */
.order-page .site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 243, .95); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(163, 58, 92, .1); }
.order-form-section { padding-top: clamp(2rem, 5vw, 3.5rem); }
.container.narrow { width: min(760px, 92%); }
.order-form-section h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

.order-form fieldset {
  border: 0; margin: 0 0 1.4rem; padding: 1.4rem 1.4rem .6rem;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.order-form legend {
  font-family: var(--font-head); font-size: 1.25rem; color: var(--choco);
  padding: 0; float: left; width: 100%; margin-bottom: 1rem;
}
.order-form legend + * { clear: both; }
.field { margin-bottom: 1.1rem; }
.field label, .field .label { display: block; font-weight: 700; color: var(--choco); margin-bottom: .35rem; font-size: .95rem; }
.req { color: var(--rose-deep); }
.hint { font-size: .85rem; color: var(--muted); margin: -.1rem 0 .6rem; }
.center-hint { text-align: center; margin-top: .8rem; }

.order-form input[type="text"], .order-form input[type="tel"], .order-form input[type="url"],
.order-form input[type="date"], .order-form input[type="time"], .order-form select, .order-form textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: .75rem .9rem; border: 1.5px solid #e6d3d0; border-radius: 12px; background: var(--cream);
  transition: border-color .15s, box-shadow .15s;
}
.order-form textarea { resize: vertical; min-height: 64px; }
.order-form input:focus, .order-form select:focus, .order-form textarea:focus {
  outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(200, 85, 122, .18); background: #fff;
}
.order-form .invalid input, .order-form .invalid select, .order-form .invalid textarea,
.order-form input.invalid { border-color: #c0392b; background: #fff6f5; }
.field .err { display: block; color: #c0392b; font-size: .82rem; font-weight: 600; margin-top: .3rem; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; margin: 0 !important; font-weight: 600 !important; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #e6d3d0; background: var(--cream); color: var(--choco); font-size: .92rem;
  transition: background .15s, border-color .15s, color .15s;
}
.chip input:checked + span { background: var(--rose-deep); border-color: var(--rose-deep); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(200, 85, 122, .3); }
.invalid .chip > span { border-color: #c0392b; }

.photo-pick { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.photo-pick input[type="url"] { flex: 1 1 220px; }
.file-btn { position: relative; overflow: hidden; margin: 0 !important; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.or { color: var(--muted); font-size: .9rem; }
.photo-preview { position: relative; display: inline-block; margin-top: .8rem; }
.photo-preview img { max-height: 180px; width: auto; border-radius: 12px; box-shadow: var(--shadow); }
.photo-clear {
  position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: var(--choco); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error { background: #fff0ef; color: #a5281b; border: 1px solid #f3c4bf; border-radius: 12px; padding: .8rem 1rem; font-weight: 600; }
.submit { width: 100%; font-size: 1.1rem; padding: 1rem; }
.submit[disabled] { opacity: .7; cursor: wait; transform: none; }

.order-done { text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.5rem 1.5rem; }
.order-done:focus { outline: none; }
.done-icon { font-size: 3rem; margin: 0; }

@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; gap: 0; }
  .order-form fieldset { padding: 1.1rem 1rem .4rem; }
  .order-page .header-actions .btn { padding: .45rem .8rem; font-size: .85rem; }
}
.photo-preview[hidden], .order-done[hidden], .order-form[hidden] { display: none !important; }
@media (max-width: 420px) {
  .order-page .brand-name { font-size: 1.5rem; white-space: nowrap; }
  .order-page .brand img { width: 36px; height: 36px; }
  .order-page .header-actions { gap: .4rem; }
}
@media (max-width: 480px) {
  .order-page .header-actions .btn-ghost { width: 40px; height: 40px; padding: 0; font-size: 1.1rem; }
  .order-page .header-actions .btn-ghost span { font-size: 0; }
  .order-page .header-actions .btn-ghost span::before { content: "←"; font-size: 1.2rem; }
}
