:root {
  --order-bg: #281b17;
  --order-bg-soft: #34251f;
  --order-panel: rgba(62, 45, 37, 0.78);
  --order-panel-strong: #3e2d25;
  --order-text: #fff6ea;
  --order-muted: #d3bdab;
  --order-copper: #d99a5f;
  --order-rose: #c7837d;
  --order-gold: #e6c896;
  --order-line: rgba(255, 246, 234, 0.14);
  --order-line-strong: rgba(230, 200, 150, 0.34);
  --order-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  --order-radius: 8px;
  --order-width: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-padding-top: 120px;
}

.order-page {
  min-height: 100vh;
  overflow: clip;
  padding-bottom: 80px;
  background:
    radial-gradient(circle at 18% 10%, rgba(217, 154, 95, 0.14), transparent 28%),
    radial-gradient(circle at 82% 30%, rgba(199, 131, 125, 0.1), transparent 30%),
    linear-gradient(180deg, var(--order-bg), var(--order-bg-soft));
  color: var(--order-text);
}

.order-container {
  width: min(var(--order-width), calc(100% - 48px));
  margin: 0 auto;
}

.order-hero {
  padding: 64px 0 34px;
}

.order-eyebrow,
.form-step-label {
  margin: 0 0 10px;
  color: var(--order-gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.order-hero h1 {
  max-width: 820px;
  margin: 0;
  color: var(--order-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 500;
  line-height: 1;
}

.order-intro {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--order-muted);
  font-size: 1.06rem;
  line-height: 1.8;
}

.order-guide {
  padding-bottom: 28px;
}

.order-guide__panel,
.builder-panel,
.builder-basket,
.form-section,
.checkout-panel {
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  background: var(--order-panel);
  box-shadow: var(--order-shadow);
}

.order-guide__panel {
  padding: 26px;
}

.order-guide__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.order-guide h2,
.builder-panel h2,
.builder-basket h2,
.form-section h2,
.checkout-panel h2 {
  margin: 0;
  color: var(--order-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.08;
}

.order-guide ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--order-muted);
  line-height: 1.7;
}

.order-guide li + li {
  margin-top: 8px;
}

.order-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--order-line);
  color: var(--order-muted);
  line-height: 1.75;
}

.order-form {
  margin: 0;
}

.builder-section {
  padding: 8px 0 28px;
}

.build-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.build-progress li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  color: rgba(211, 189, 171, 0.76);
  background: rgba(255, 246, 234, 0.035);
  font-size: 0.9rem;
  font-weight: 700;
}

.build-progress span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--order-line);
  border-radius: 50%;
  color: var(--order-gold);
}

.build-progress li.is-active {
  border-color: rgba(217, 154, 95, 0.58);
  color: var(--order-text);
  background: rgba(217, 154, 95, 0.1);
}

.build-progress li.is-complete span {
  border-color: var(--order-copper);
  background: var(--order-copper);
  color: #281b17;
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 22px;
  align-items: start;
}

.builder-workspace {
  min-width: 0;
}

.builder-panel {
  padding: 26px;
}

.builder-panel__heading {
  margin-bottom: 22px;
}

.builder-panel__heading p:last-child,
.form-section__header p {
  margin: 8px 0 0;
  color: var(--order-muted);
  line-height: 1.65;
}

.builder-back-button {
  min-height: 42px;
  margin-bottom: 20px;
  padding: 0 16px;
  border: 1px solid var(--order-line-strong);
  border-radius: 999px;
  background: rgba(255, 246, 234, 0.06);
  color: var(--order-text);
  font: inherit;
  cursor: pointer;
}

.product-search {
  margin-bottom: 18px;
}

.product-search label {
  display: block;
  margin-bottom: 8px;
  color: var(--order-text);
  font-weight: 700;
}

.product-search input,
.form-field input,
.form-field select,
.customise-group input,
.customise-group select,
.customise-group textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 246, 234, 0.2);
  border-radius: var(--order-radius);
  background: rgba(255, 246, 234, 0.08);
  color: var(--order-text);
  font: inherit;
  outline: none;
}

.product-search input,
.form-field input,
.form-field select,
.customise-group input,
.customise-group select {
  padding: 0 15px;
}

.customise-group textarea {
  min-height: 132px;
  padding: 14px 15px;
  resize: vertical;
}

.product-search input::placeholder,
.form-field input::placeholder,
.customise-group input::placeholder,
.customise-group textarea::placeholder {
  color: rgba(211, 189, 171, 0.58);
}

.form-field select option,
.customise-group select option {
  background: #fff6ea;
  color: #332821;
}

.product-search input:focus,
.form-field input:focus,
.form-field select:focus,
.customise-group input:focus,
.customise-group select:focus,
.customise-group textarea:focus {
  border-color: var(--order-copper);
  box-shadow: 0 0 0 4px rgba(217, 154, 95, 0.12);
}

.product-card-grid__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.keepsake-choice-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  background: rgba(40, 27, 23, 0.38);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.keepsake-choice-card:hover {
  border-color: rgba(217, 154, 95, 0.54);
  transform: translateY(-2px);
}

.keepsake-choice-card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #241815;
}

.keepsake-choice-card__image.is-empty,
.customise-product__image.is-empty {
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--order-muted);
  font-weight: 800;
  text-align: center;
}

.keepsake-choice-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.keepsake-choice-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.keepsake-choice-card__title {
  display: grid;
  gap: 7px;
}

.keepsake-choice-card h3,
.customise-product h3,
.configured-basket-item h3 {
  margin: 0;
  color: var(--order-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  line-height: 1.12;
}

.keepsake-choice-card strong,
.customise-product strong,
.configured-basket-item strong {
  color: var(--order-gold);
}

.keepsake-choice-card p {
  margin: 12px 0 18px;
  color: var(--order-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.keepsake-choice-card__requirement {
  margin-top: 0 !important;
  color: rgba(230, 200, 150, 0.8) !important;
}

.keepsake-choice-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.keepsake-choice-card__actions a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(255, 246, 234, 0.18);
  border-radius: 999px;
  color: var(--order-text);
  font-weight: 800;
  text-decoration: none;
}

.keepsake-choice-card__actions a:hover {
  border-color: rgba(217, 154, 95, 0.58);
  color: var(--order-gold);
}

.keepsake-choice-card button,
.customise-action button,
.basket-add-another,
.basket-continue,
.mobile-basket-bar button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--order-copper), #e3ad72);
  color: #fff6ea;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.keepsake-choice-card button {
  flex: 1 1 140px;
}

.product-search__empty {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed var(--order-line-strong);
  border-radius: var(--order-radius);
  color: var(--order-muted);
  text-align: center;
}

.customise-product {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  background: rgba(40, 27, 23, 0.34);
}

.customise-product__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--order-radius);
  background: #241815;
}

.customise-product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.configured-basket-item__no-image {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 6px;
  background: #241815;
  color: var(--order-muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
}

.customise-product p:last-child {
  margin: 10px 0 0;
  color: var(--order-muted);
  line-height: 1.6;
}

.customise-group {
  min-width: 0;
  margin: 20px 0 0;
  padding: 20px;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
}

.customise-group legend,
.customise-notes-label {
  padding: 0 8px;
  color: var(--order-text);
  font-weight: 800;
}

.customise-notes-label {
  display: block;
  padding: 0;
  margin-bottom: 9px;
}

.customise-notes-label span {
  color: var(--order-muted);
  font-weight: 400;
}

.customise-group__intro {
  margin: 0 0 14px;
  color: var(--order-muted);
  line-height: 1.55;
}

.extra-choice-list {
  display: grid;
  gap: 10px;
}

.extra-choice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  background: rgba(255, 246, 234, 0.045);
  cursor: pointer;
}

.extra-choice:has(input:checked) {
  border-color: rgba(217, 154, 95, 0.68);
  background: rgba(217, 154, 95, 0.11);
}

.extra-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.extra-choice__check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--order-line-strong);
  border-radius: 6px;
  background: rgba(255, 246, 234, 0.07);
}

.extra-choice:has(input:checked) .extra-choice__check {
  border-color: var(--order-copper);
  background: var(--order-copper);
}

.extra-choice:has(input:checked) .extra-choice__check::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #281b17;
  border-bottom: 2px solid #281b17;
  transform: rotate(-45deg) translateY(-1px);
}

.extra-choice__copy {
  min-width: 0;
}

.extra-choice__copy strong,
.extra-choice__copy small {
  display: block;
}

.extra-choice__copy strong {
  color: var(--order-text);
}

.extra-choice__copy small {
  margin-top: 4px;
  color: var(--order-muted);
  line-height: 1.45;
}

.extra-choice b {
  color: var(--order-gold);
  white-space: nowrap;
}

.extra-details {
  padding: 4px 0 8px 40px;
}

.extra-details label {
  display: block;
  margin-bottom: 8px;
  color: var(--order-text);
  font-size: 0.9rem;
}

.customise-fields,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--order-text);
  font-size: 0.94rem;
}

.field-optional {
  color: var(--order-muted);
}

.customise-action {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(217, 154, 95, 0.34);
  border-radius: var(--order-radius);
  background: rgba(217, 154, 95, 0.09);
}

.customise-action span,
.customise-action strong {
  display: block;
}

.customise-action span {
  color: var(--order-muted);
  font-size: 0.88rem;
}

.customise-action strong {
  margin-top: 4px;
  color: var(--order-gold);
  font-size: 1.45rem;
}

.customise-action button {
  min-width: 250px;
  padding: 0 22px;
}

.builder-basket {
  position: sticky;
  top: 122px;
  padding: 20px;
}

.builder-basket__heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--order-line);
}

.builder-basket__heading strong {
  color: var(--order-gold);
  font-size: 0.9rem;
  white-space: nowrap;
}

.builder-basket__items {
  display: grid;
  gap: 12px;
  max-height: min(58vh, 620px);
  margin-top: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.builder-basket__empty {
  padding: 20px 14px;
  border: 1px dashed var(--order-line-strong);
  border-radius: var(--order-radius);
  text-align: center;
}

.builder-basket__empty p {
  margin: 0;
  color: var(--order-text);
  font-weight: 800;
}

.builder-basket__empty span {
  display: block;
  margin-top: 7px;
  color: var(--order-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.configured-basket-item {
  padding: 14px;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  background: rgba(40, 27, 23, 0.34);
}

.configured-basket-item__top {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.configured-basket-item__top img {
  width: 68px;
  height: 68px;
  border-radius: var(--order-radius);
  object-fit: cover;
  background: #241815;
}

.configured-basket-item__top p {
  margin: 0 0 3px;
  color: var(--order-rose);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.configured-basket-item__top h3 {
  font-size: 1.25rem;
}

.configured-basket-item__details {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--order-line);
}

.configured-basket-item__details p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--order-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.configured-basket-item__details p strong {
  color: var(--order-text);
  font-size: 0.82rem;
  text-align: right;
}

.configured-basket-item__details small {
  display: block;
  margin-top: 2px;
  color: rgba(211, 189, 171, 0.72);
}

.configured-basket-item__notes {
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 246, 234, 0.055);
  color: var(--order-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.configured-basket-item__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.configured-basket-item__actions button {
  min-height: 38px;
  border: 1px solid var(--order-line-strong);
  border-radius: 999px;
  background: rgba(255, 246, 234, 0.055);
  color: var(--order-text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.configured-basket-item__actions button.is-danger {
  border-color: rgba(199, 91, 91, 0.42);
  color: #efb3ad;
}

.builder-basket__total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--order-line);
  color: var(--order-text);
}

.builder-basket__total strong {
  color: var(--order-gold);
  font-size: 1.35rem;
}

.basket-add-another {
  width: 100%;
  margin-top: 14px;
}

.basket-continue {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  border: 1px solid rgba(230, 200, 150, 0.44);
  border-radius: 999px;
  background: rgba(255, 246, 234, 0.08);
  color: var(--order-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.details-section {
  padding: 0 0 34px;
}

.details-section .order-container {
  display: grid;
  gap: 20px;
}

.form-section,
.checkout-panel {
  padding: 26px;
}

.form-section__header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  margin-bottom: 20px;
}

.form-step {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  border: 1px solid var(--order-line-strong);
  border-radius: 50%;
  color: var(--order-gold);
  font-weight: 800;
}

.checkout-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.checkout-panel__summary p {
  color: var(--order-muted);
  line-height: 1.65;
}

.checkout-panel__total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--order-line);
  color: var(--order-text);
}

.checkout-panel__total strong {
  color: var(--order-gold);
  font-size: 1.55rem;
}

.policy-box {
  padding: 20px;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  background: rgba(40, 27, 23, 0.26);
  color: var(--order-muted);
  line-height: 1.6;
}

.policy-box h3 {
  margin: 0 0 10px;
  color: var(--order-text);
}

.policy-box p {
  margin: 0 0 12px;
}

.policy-links a {
  color: var(--order-gold);
}

.policy-checkbox {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  color: var(--order-text);
  cursor: pointer;
}

.policy-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--order-copper);
}

.form-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px 24px;
  align-items: center;
  padding-top: 4px;
}

#submitOrderBtn {
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--order-copper), #e3ad72);
  color: #fff6ea;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#submitOrderBtn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.form-helper {
  margin: 0;
  color: var(--order-muted);
  line-height: 1.55;
}

.form-message {
  grid-column: 1 / -1;
  padding: 13px 15px;
  border: 1px solid var(--order-line);
  border-radius: var(--order-radius);
  background: rgba(255, 246, 234, 0.06);
  color: var(--order-text);
}

.form-message.is-error {
  border-color: rgba(199, 91, 91, 0.5);
  color: #f0bab4;
}

.mobile-basket-bar {
  display: none;
}

.form-inline-note {
  color: var(--order-muted);
}

@media (max-width: 980px) {
  .builder-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .product-card-grid__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 92px;
  }

  .order-page {
    padding-bottom: 48px;
  }

  .order-container {
    width: min(100%, calc(100% - 24px));
  }

  .order-hero {
    padding: 42px 0 26px;
  }

  .order-guide__grid,
  .builder-layout,
  .checkout-panel,
  .form-grid,
  .customise-fields {
    grid-template-columns: 1fr;
  }

  .build-progress {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .build-progress::-webkit-scrollbar {
    display: none;
  }

  .build-progress li {
    min-width: 126px;
  }

  .builder-basket {
    position: static;
  }

  .builder-basket__items {
    max-height: none;
    overflow: visible;
  }

  .checkout-panel__summary,
  .policy-box,
  .form-actions {
    grid-column: 1;
  }

  .form-actions {
    grid-template-columns: 1fr;
  }

  .mobile-basket-bar:not([hidden]) {
    position: fixed;
    inset: auto 0 0;
    z-index: 120;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid rgba(230, 200, 150, 0.34);
    background: rgba(40, 27, 23, 0.96);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
  }

  .mobile-basket-bar strong,
  .mobile-basket-bar span {
    display: block;
  }

  .mobile-basket-bar strong {
    color: var(--order-text);
    font-size: 0.9rem;
  }

  .mobile-basket-bar span {
    margin-top: 3px;
    color: var(--order-muted);
    font-size: 0.72rem;
  }

  .mobile-basket-bar button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 17px;
  }
}

@media (max-width: 600px) {
  .order-guide__panel,
  .builder-panel,
  .builder-basket,
  .form-section,
  .checkout-panel {
    padding: 18px;
  }

  .product-card-grid__items,
  .customise-product {
    grid-template-columns: 1fr;
  }

  .customise-product__image {
    max-height: 260px;
  }

  .customise-action {
    align-items: stretch;
    flex-direction: column;
  }

  .customise-action button {
    width: 100%;
    min-width: 0;
  }

  .extra-choice {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 82px;
  }

  .extra-choice b {
    grid-column: 2;
  }

  .extra-details {
    padding-left: 0;
  }

  .form-section__header {
    grid-template-columns: 1fr;
  }

  .configured-basket-item__actions {
    grid-template-columns: 1fr;
  }

  .configured-basket-item__actions button {
    min-height: 44px;
  }

  #submitOrderBtn,
  .basket-add-another,
  .basket-continue,
  .keepsake-choice-card button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .order-hero h1 {
    font-size: 2.65rem;
  }

  .mobile-basket-bar:not([hidden]) {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-basket-bar button {
    width: 100%;
  }
}
