:root {
  --ink: #44231f;
  --muted: rgba(68, 35, 31, 0.72);
  --soft: rgba(68, 35, 31, 0.5);
  --line: rgba(131, 26, 26, 0.14);
  --paper: #fff8ef;
  --panel: #fffaf3;
  --wash: #f5ead9;
  --deep: #831a1a;
  --gold: #f7d46c;
  --green: #9a6b1f;
  --red: #9a2a24;
  --shadow: 0 24px 76px rgba(68, 35, 31, 0.18);
  --shadow-soft: 0 14px 40px rgba(68, 35, 31, 0.1);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(247, 212, 108, 0.24),
      transparent 34rem
    ),
    radial-gradient(
      circle at right 12%,
      rgba(131, 26, 26, 0.08),
      transparent 28rem
    ),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

body.is-modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 22px 96px;
}

.navbar {
  padding-top: 17px;
  width: 100%;
  position: relative;
  left: 0;
  z-index: 10;
  background: linear-gradient(
    to bottom,
    rgb(229 207 194 / 90%),
    rgb(255 253 249 / 4%)
  );
  color: var(--ink);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.nav-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 3vw, 28px);
  min-height: 76px;
  padding: 0 clamp(14px, 4vw, 42px);
}

.nav-logo {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
}

.nav-logo img {
  display: block;
  width: clamp(100px, 10vw, 145px);
  height: auto;
}

.nav-shop {
  grid-column: 1;
  justify-self: start;
}

.checkout-back-nav {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 62px;
  min-height: 54px;
  color: var(--deep);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.checkout-back-nav:hover {
  color: var(--green);
  transform: translateX(-2px);
}

.checkout-back-nav svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.nav-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  min-width: 62px;
}

.checkout-layout.is-single-column {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.checkout-main {
  display: grid;
  gap: 18px;
}

.progress-card,
.panel,
.payment-card,
.summary-card,
.trust-strip article {
  background: rgba(255, 250, 243, 0.84);
  border: 1px solid rgba(131, 26, 26, 0.13);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.progress-card {
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr max-content;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  padding: 10px;
}

.progress-step {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.progress-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--wash);
  color: var(--muted);
}

.progress-step p {
  margin: 0;
}

.progress-step.is-active,
.progress-step.is-complete {
  color: var(--ink);
}

.progress-step.is-active span,
.progress-step.is-complete span {
  background: var(--deep);
  color: var(--gold);
}

.progress-line {
  height: 1px;
  background: var(--line);
}

.progress-line.is-complete {
  background: var(--gold);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel h2,
.payment-card h2,
.summary-card h2,
.order-success-panel h2 {
  margin: 0;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.04;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel h2,
.payment-card h2,
.summary-card h2 {
  font-size: clamp(25px, 3vw, 34px);
}

.quiet-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.quiet-btn:hover {
  color: var(--ink);
}

.cart-items {
  display: grid;
  gap: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(131, 26, 26, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 248, 239, 0.78);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  border-color: rgba(131, 26, 26, 0.24);
  box-shadow: var(--shadow-soft);
}

.cart-item.is-removing {
  opacity: 0;
  transform: translateX(-18px);
}

.product-media {
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--wash);
  border: 1px solid rgba(131, 26, 26, 0.1);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.product-info {
  min-width: 0;
}

.product-info h3 {
  margin: 0;
  color: var(--deep);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
}

.product-info p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-meta span,
.savings-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  padding: 6px 9px;
}

.savings-pill {
  background: rgba(247, 212, 108, 0.2);
  color: var(--green);
}

.item-controls {
  display: grid;
  justify-items: end;
  gap: 13px;
}

.item-price {
  display: grid;
  gap: 3px;
  text-align: right;
}

.item-price strong {
  font-size: 19px;
}

.item-price s {
  color: var(--soft);
  font-size: 13px;
}

.qty-control {
  display: inline-grid;
  grid-template-columns: 34px 36px 34px;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff8ef;
}

.qty-control button {
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--deep);
  font-size: 18px;
  transition: background 0.18s ease;
}

.qty-control button:hover {
  background: var(--wash);
}

.qty-control span {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.remove-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  transition: color 0.18s ease;
}

.remove-btn:hover {
  color: var(--red);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 52px 18px;
  text-align: center;
}

.empty-art {
  width: 86px;
  height: 86px;
  border: 1px solid rgba(131, 26, 26, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(
      90deg,
      transparent 44%,
      rgba(131, 26, 26, 0.2) 45% 55%,
      transparent 56%
    ),
    linear-gradient(var(--wash), #fff8ef);
}

.empty-state h3 {
  margin: 0;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
}

.empty-state p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.primary-link {
  margin-top: 4px;
  border-bottom: 1px solid var(--deep);
  font-weight: 800;
}

.coupon-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.field input,
.field select,
.coupon-input-row input,
.otp-input-row input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  outline: 0;
  padding: 0 14px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.field input:focus,
.field select:focus,
.coupon-input-row input:focus,
.otp-input-row input:focus {
  border-color: rgba(131, 26, 26, 0.36);
  background: #fffaf3;
  box-shadow: 0 0 0 4px rgba(247, 212, 108, 0.18);
}

.field.is-invalid input,
.field.is-invalid select,
.coupon-input-row.is-invalid input {
  border-color: rgba(154, 75, 67, 0.48);
  box-shadow: 0 0 0 4px rgba(154, 75, 67, 0.08);
}

.secondary-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  font-weight: 850;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.secondary-btn {
  border: 1px solid rgba(131, 26, 26, 0.18);
  background: var(--deep);
  color: var(--gold);
  padding: 0 22px;
}

.primary-btn {
  width: 100%;
  border: 0;
  background: var(--deep);
  color: #fff8ef;
  padding: 0 24px;
  box-shadow: 0 16px 34px rgba(131, 26, 26, 0.22);
}

.secondary-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(131, 26, 26, 0.28);
}

.primary-btn.is-loading,
.secondary-btn.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}

.primary-btn.is-loading::after,
.secondary-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 248, 239, 0.45);
  border-top-color: #fff8ef;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.field-message,
.field-error {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
}

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

.field-message.is-success {
  color: var(--green);
}

.field-message.is-error,
.field-error {
  color: var(--red);
}

.coupon-dropdown {
  margin-top: 16px;
}

.coupon-dropdown summary {
  display: flex;
  min-height: 52px;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 248, 239, 0.74);
  padding: 0 16px;
  color: var(--ink);
  font-weight: 800;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.coupon-dropdown summary::-webkit-details-marker {
  display: none;
}

.coupon-dropdown summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.coupon-dropdown summary:hover,
.coupon-dropdown summary:focus-visible {
  border-color: rgba(131, 26, 26, 0.24);
  background: #fffaf3;
  box-shadow: 0 0 0 4px rgba(247, 212, 108, 0.14);
  outline: 0;
}

.coupon-dropdown[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.coupon-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.coupon-chip {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 248, 239, 0.72);
  padding: 12px 14px;
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.coupon-chip:hover,
.coupon-chip.is-active {
  border-color: rgba(131, 26, 26, 0.24);
  background: #fffaf3;
}

.coupon-chip strong,
.coupon-chip span {
  display: block;
}

.coupon-chip strong {
  margin-bottom: 7px;
  font-size: 13px;
}

.coupon-chip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.delivery-grid > div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 248, 239, 0.72);
  padding: 16px;
}

.mini-label {
  display: block;
  margin-bottom: 7px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.delivery-grid strong {
  color: var(--deep);
  font-size: 14px;
  line-height: 1.35;
}

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

.form-wide {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.payment-card {
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.shipping-card {
  border: 1px solid rgba(131, 26, 26, 0.13);
  border-radius: 24px;
  background: rgba(255, 250, 243, 0.84);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  margin-bottom: 14px;
}

.payment-card-heading,
.shipping-card-heading {
  margin-bottom: 14px;
}

.payment-card h2,
.shipping-card h2 {
  margin: 0;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.04;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payment-card .payment-options {
  grid-template-columns: 1fr;
}

.payment-option {
  display: flex;
  gap: 12px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 248, 239, 0.72);
  padding: 16px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
}

.payment-option-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(247, 212, 108, 0.18);
  color: var(--deep);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.payment-option-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.payment-option:hover,
.payment-option.is-selected {
  border-color: rgba(131, 26, 26, 0.28);
  background: #fffaf3;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.payment-option:hover .payment-option-icon,
.payment-option.is-selected .payment-option-icon {
  background: var(--deep);
  color: var(--gold);
  transform: scale(1.04);
}

.payment-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--deep);
  margin-top: 2px;
}

.payment-option strong,
.payment-option small {
  display: block;
}

.payment-option strong {
  margin-bottom: 6px;
}

.payment-option small {
  color: var(--muted);
  line-height: 1.45;
}

.payment-method-note {
  margin: 14px 0 0;
  border: 1px solid rgba(154, 107, 31, 0.22);
  border-radius: 14px;
  background: rgba(247, 212, 108, 0.14);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 14px;
}

.shipping-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shipping-status-grid article {
  display: flex;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 248, 239, 0.72);
  padding: 14px;
}

.shipping-status-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(247, 212, 108, 0.2);
  color: var(--deep);
}

.shipping-status-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.shipping-status-grid span,
.shipping-status-grid strong {
  display: block;
}

.shipping-status-grid article > div {
  min-width: 0;
}

.shipping-status-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.shipping-status-grid strong {
  margin-top: 5px;
  color: var(--deep);
  font-size: 13px;
  line-height: 1.35;
}

.shipping-method-note {
  margin: 14px 0 0;
  border: 1px solid rgba(154, 107, 31, 0.22);
  border-radius: 14px;
  background: rgba(247, 212, 108, 0.14);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 14px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.trust-strip article {
  border-radius: var(--radius-md);
  padding: 20px;
}

.trust-strip span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
}

.trust-strip h3 {
  margin: 12px 0 8px;
  color: var(--deep);
  font-size: 16px;
}

.trust-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.summary-card {
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.mobile-summary-heading {
  display: none;
}

.summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.summary-count {
  border-radius: 999px;
  background: var(--wash);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 8px 10px;
  white-space: nowrap;
}

.summary-lines {
  display: grid;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-lines div,
.summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.summary-lines span,
.summary-note span,
.mobile-pay-bar span {
  color: var(--muted);
}

.summary-lines strong {
  font-size: 15px;
}

.summary-total {
  padding: 22px 0;
}

.summary-total strong {
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
}

.summary-note {
  display: grid;
  gap: 5px;
  border-radius: 18px;
  background: rgba(247, 212, 108, 0.16);
  padding: 15px;
  margin-bottom: 18px;
}

.summary-note strong {
  color: var(--green);
  font-size: 14px;
}

.summary-note span {
  font-size: 13px;
  line-height: 1.45;
}

.summary-checkout {
  margin-bottom: 10px;
}

.checkout-step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.checkout-step-actions .primary-btn {
  width: min(260px, 100%);
}

.review-assurance {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.review-assurance article {
  display: flex;
  flex: 1 1 0;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 13px;
}

.review-assurance-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: rgba(247, 212, 108, 0.22);
}

.review-assurance-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--deep);
  margin: 8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.review-assurance strong,
.review-assurance span {
  display: block;
}

.review-assurance strong {
  color: var(--deep);
  font-size: 13px;
}

.review-assurance div > span {
  margin-top: 3px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.35;
}

.mobile-pay-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(131, 26, 26, 0.16);
  border-radius: 22px;
  background: rgba(255, 248, 239, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 12px;
}

.mobile-pay-bar strong {
  display: block;
  color: var(--deep);
  font-size: 20px;
}

.mobile-pay-bar .primary-btn {
  width: auto;
  min-width: 132px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  border: 1px solid rgba(131, 26, 26, 0.14);
  border-radius: 16px;
  background: rgba(255, 248, 239, 0.96);
  box-shadow: var(--shadow-soft);
  color: var(--deep);
  padding: 14px 15px;
  animation: toastIn 0.26s ease both;
}

.toast.is-error {
  border-color: rgba(154, 75, 67, 0.2);
  color: var(--red);
}

.otp-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(68, 35, 31, 0.5);
  padding: 18px;
  backdrop-filter: blur(10px);
}

.otp-card {
  width: min(460px, 100%);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
  animation: modalIn 0.25s ease both;
}

.otp-card {
  position: relative;
  text-align: left;
}

.order-success-panel {
  display: grid;
  gap: 22px;
}

.order-success-shell {
  padding-top: 38px;
}

.order-confirmed-panel {
  position: relative;
  overflow: hidden;
}

.order-confirmed-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--deep), var(--gold), var(--deep));
}

.payment-failed-shell {
  padding-top: 38px;
}

.payment-failed-panel {
  position: relative;
  overflow: hidden;
}

.payment-failed-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--deep), var(--gold), var(--deep));
}

.order-success-panel[hidden] {
  display: none;
}

.order-success-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.success-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(247, 212, 108, 0.22);
  margin: 0;
  position: relative;
}

.success-icon::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 17px;
  width: 14px;
  height: 24px;
  border: solid var(--deep);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.order-confirmed-icon {
  background: rgba(247, 212, 108, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(154, 107, 31, 0.18),
    0 14px 34px rgba(131, 26, 26, 0.12);
}

.order-confirmed-icon::after {
  border-color: var(--deep);
}

.failure-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 50%;
  background: rgba(154, 42, 36, 0.1);
  color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(154, 42, 36, 0.16);
}

.failure-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.order-success-panel h2,
.order-success-panel h1,
.otp-card h2 {
  margin: 0;
  color: var(--deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.05;
}

.order-success-panel p:not(.eyebrow),
.otp-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.order-success-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.order-success-meta article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 248, 239, 0.74);
  padding: 14px;
}

.order-success-meta span,
.order-success-meta strong {
  display: block;
}

.order-success-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.order-success-meta strong {
  margin-top: 6px;
  color: var(--deep);
  font-size: 14px;
  line-height: 1.35;
}

.payment-failed-panel .order-success-meta article {
  border-color: rgba(154, 42, 36, 0.18);
}

.payment-failed-panel .order-success-meta strong {
  color: var(--red);
}

.order-confirmed-panel .order-success-meta article {
  background: rgba(255, 248, 239, 0.88);
}

.order-confirmed-panel .order-success-meta strong {
  color: var(--deep);
}

.success-order-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  margin: 22px 0;
  border: 1px solid rgba(154, 107, 31, 0.22);
  border-radius: 18px;
  background: rgba(247, 212, 108, 0.16);
  padding: 16px;
  text-align: left;
}

.order-confirmed-panel .success-order-summary {
  background: rgba(247, 212, 108, 0.18);
  border-color: rgba(154, 107, 31, 0.28);
  margin: 8px 0 20px;
}

.success-order-icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--deep);
}

.success-order-icon::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  width: 10px;
  height: 17px;
  border: solid var(--gold);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.success-order-summary strong {
  display: block;
  color: var(--deep);
  font-size: 14px;
}

.success-order-summary > div > strong {
  margin-bottom: 8px;
}

.success-order-summary p {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 8px 0 0;
  color: var(--green);
  line-height: 1.45;
}

.success-order-summary p span {
  min-width: 0;
}

.success-order-summary p strong {
  flex: 0 0 auto;
  color: var(--green);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(131, 26, 26, 0.14);
  border-radius: 50%;
  background: var(--wash);
  color: var(--deep);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.otp-form {
  margin-top: 22px;
}

.otp-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 700;
}

.otp-input-row {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 10px;
}

.otp-input-row .primary-btn {
  min-height: 52px;
}

.resend-otp {
  margin-top: 12px;
  width: auto;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1040px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 18px 14px 112px;
  }

  .nav-container {
    min-height: 64px;
    padding: 0 clamp(12px, 3.5vw, 24px);
    gap: 8px;
  }

  .checkout-back-nav {
    min-width: 52px;
    min-height: 48px;
    font-size: 10px;
  }

  .checkout-back-nav svg {
    width: 22px;
    height: 22px;
  }

  .nav-right {
    min-width: 52px;
  }

  .progress-card {
    grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(
        0,
        1fr
      );
    border-radius: 20px;
    gap: 6px;
    padding: 8px;
  }

  .progress-line {
    display: block;
    min-width: 0;
  }

  .progress-step {
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    border-radius: 14px;
    padding: 8px 4px;
    text-align: center;
  }

  .progress-step span {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .progress-step p {
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .progress-step.is-active {
    background: rgba(32, 27, 22, 0.04);
  }

  .panel,
  .summary-card {
    padding: 18px;
  }

  .checkout-step-actions {
    display: none;
  }

  .mobile-summary-panel {
    order: initial;
    margin-bottom: 4px;
  }

  .review-assurance {
    display: grid;
  }

  .order-success-hero,
  .order-success-meta {
    grid-template-columns: 1fr;
  }

  .summary-card {
    box-shadow: var(--shadow-soft);
  }

  .mobile-summary-panel .summary-card {
    padding: 12px;
  }

  .mobile-summary-heading {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    border-radius: 18px;
    color: var(--deep);
    padding: 14px;
    text-align: left;
  }

  .mobile-summary-heading > span:first-child {
    display: grid;
    gap: 4px;
  }

  .mobile-summary-heading .eyebrow {
    margin: 0;
  }

  .mobile-summary-heading strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 500;
  }

  .mobile-summary-heading > span:last-child {
    font-size: 18px;
    font-weight: 850;
    white-space: nowrap;
  }

  .mobile-summary-content {
    padding: 4px 4px 6px;
  }

  .summary-checkout {
    min-height: 50px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .cart-item {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .item-controls {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto auto;
    justify-items: start;
    align-items: center;
  }

  .item-price {
    text-align: left;
  }

  .coupon-grid,
  .delivery-grid,
  .form-grid,
  .payment-options,
  .shipping-status-grid,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .coupon-input-row,
  .otp-input-row {
    grid-template-columns: 1fr;
  }

  .secondary-btn {
    width: 100%;
  }

  .mobile-pay-bar {
    display: flex;
  }

  .toast-region {
    right: 12px;
    bottom: 86px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 420px) {
  .progress-card {
    grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 14px minmax(
        0,
        1fr
      );
    gap: 4px;
    padding: 7px;
  }

  .progress-step {
    padding: 7px 2px;
  }

  .progress-step span {
    width: 24px;
    height: 24px;
  }

  .progress-step p {
    font-size: 10px;
  }

  .nav-logo img {
    width: 104px;
  }

  .cart-item {
    gap: 13px;
    padding: 12px;
  }

  .product-info h3 {
    font-size: 16px;
  }

  .item-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
