:root {
  --checkout-green: #5e735f;
  --checkout-text: #3f3a36;
  --checkout-cream: #f8f5ef;
  --checkout-gold: #c9a44c;
}

* {
  box-sizing: border-box;
}

.checkout-result-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(143, 166, 142, 0.2), transparent 28%),
    linear-gradient(145deg, #fffdf9, var(--checkout-cream));
  color: var(--checkout-text);
  font-family: Arial, Helvetica, sans-serif;
}

.checkout-result-shell {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  padding: 42px 20px;
}

.checkout-result-pampille {
  position: relative;
  z-index: 2;
  margin-bottom: -42px;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(63, 58, 54, 0.18));
}

.checkout-result-card {
  width: min(620px, 100%);
  padding: 74px clamp(26px, 6vw, 58px) 46px;
  border: 1px solid rgba(94, 115, 95, 0.18);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 30px 80px rgba(63, 58, 54, 0.13);
  text-align: center;
}

.checkout-result-eyebrow {
  margin: 0 0 14px;
  color: var(--checkout-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.checkout-result-card h1 {
  margin: 0 0 18px;
  color: var(--checkout-green);
  font-size: clamp(36px, 7vw, 58px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.checkout-result-card > p:last-of-type {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
}

.checkout-result-number {
  display: inline-block;
  margin: 0 0 22px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(143, 166, 142, 0.14);
  font-size: 13px;
  font-weight: 750;
}

.checkout-result-card--error {
  border-color: rgba(189, 136, 117, 0.46);
}

.checkout-result-actions {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.checkout-result-actions a {
  display: block;
  padding: 14px 22px;
  border: 1px solid var(--checkout-green);
  border-radius: 999px;
  background: var(--checkout-green);
  color: white;
  font-weight: 750;
  text-decoration: none;
}

.checkout-result-actions .checkout-result-secondary {
  background: transparent;
  color: var(--checkout-green);
}

.checkout-ready-total {
  display: grid;
  gap: 4px;
  margin: 0 0 24px !important;
  padding: 17px 20px;
  border: 1px solid rgba(94, 115, 95, 0.18);
  border-radius: 18px;
  background: rgba(143, 166, 142, 0.1);
}

.checkout-ready-total span {
  color: #716b64;
  font-size: 13px;
}

.checkout-ready-total strong {
  color: var(--checkout-green);
  font-size: 28px;
}

.checkout-sandbox-reminder {
  margin: 0 0 18px !important;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(201, 164, 76, 0.13);
  color: #7c652b;
  font-size: 13px !important;
  font-weight: 750;
  line-height: 1.45 !important;
}

.checkout-recovery-note {
  margin: 2px 12px 5px;
  color: #716b64;
  font-size: 12px;
  line-height: 1.5;
}

body.cart-open {
  overflow: hidden;
}

.cart-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px 10px 19px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  background: rgba(94, 115, 95, 0.96);
  color: white;
  box-shadow: 0 18px 40px rgba(63, 58, 54, 0.25);
  font-size: 14px;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.cart-trigger strong {
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 29px;
  padding: 0 8px;
  border-radius: 999px;
  background: white;
  color: var(--checkout-green);
  font-size: 13px;
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(36, 39, 35, 0.38);
  backdrop-filter: blur(3px);
}

.cart-backdrop[hidden] {
  display: none;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 410;
  width: min(470px, 100%);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: 28px clamp(20px, 4vw, 34px) 38px;
  background:
    radial-gradient(circle at 76% 5%, rgba(201, 164, 76, 0.15), transparent 24%),
    #fffdf9;
  box-shadow: -24px 0 70px rgba(63, 58, 54, 0.18);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 300ms ease, visibility 300ms ease;
}

.cart-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.cart-drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.cart-drawer-heading p {
  margin: 0 0 4px;
  color: var(--checkout-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cart-drawer-heading h2 {
  margin: 0;
  color: var(--checkout-green);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.cart-drawer-heading button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(94, 115, 95, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--checkout-green);
  font-size: 28px;
  line-height: 1;
}

.cart-sandbox-badge {
  margin: 0 0 18px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(201, 164, 76, 0.13);
  color: #7c652b;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.cart-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(94, 115, 95, 0.24);
  border-radius: 12px;
  background: rgba(143, 166, 142, 0.12);
  color: #354a36;
  font-size: 13px;
  line-height: 1.5;
}

.cart-notice[hidden] {
  display: none;
}

.cart-notice--error {
  border-color: rgba(189, 136, 117, 0.48);
  background: #fff3ed;
  color: #7a3623;
}

.cart-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 48px 12px;
  color: #716b64;
  text-align: center;
}

.cart-empty[hidden],
.cart-checkout[hidden] {
  display: none;
}

.cart-empty img {
  object-fit: contain;
  opacity: 0.82;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(94, 115, 95, 0.14);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.72);
}

.cart-item img {
  width: 72px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.cart-item-content {
  min-width: 0;
}

.cart-item-content strong,
.cart-item-content small {
  display: block;
}

.cart-item-content strong {
  overflow-wrap: anywhere;
  color: var(--checkout-green);
  font-size: 14px;
  line-height: 1.3;
}

.cart-item-content small {
  margin-top: 4px;
  color: #716b64;
  font-size: 12px;
}

.cart-item-content label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  color: #716b64;
  font-size: 12px;
}

.cart-item-content input {
  width: 58px;
  min-height: 34px;
  border: 1px solid rgba(94, 115, 95, 0.24);
  border-radius: 9px;
  background: white;
  text-align: center;
}

.cart-item-remove {
  align-self: start;
  border: 0;
  padding: 7px;
  background: transparent;
  color: #7a5a4d;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-stock-warning {
  color: #8a4c35 !important;
  font-weight: 700;
}

.cart-checkout {
  margin-top: 20px;
}

.cart-totals {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid rgba(94, 115, 95, 0.18);
  border-bottom: 1px solid rgba(94, 115, 95, 0.18);
}

.cart-totals div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.cart-totals dt,
.cart-totals dd {
  margin: 0;
}

.cart-total {
  padding-top: 4px;
  color: var(--checkout-green);
  font-size: 19px;
  font-weight: 800;
}

.cart-delivery-note,
.cart-account-note {
  color: #716b64;
  font-size: 12px;
  line-height: 1.5;
}

.cart-delivery-note {
  margin: 14px 0 20px;
}

.cart-checkout-form {
  display: grid;
  gap: 9px;
}

.cart-checkout-form label {
  margin-top: 5px;
  color: var(--checkout-text);
  font-size: 13px;
  font-weight: 750;
}

.cart-checkout-form label span {
  color: #716b64;
  font-weight: 500;
}

.cart-checkout-form input:not([type="hidden"]),
.cart-checkout-form select {
  width: 100%;
  min-height: 47px;
  border: 1px solid rgba(94, 115, 95, 0.28);
  border-radius: 12px;
  padding: 11px 13px;
  background: white;
  color: var(--checkout-text);
  font-size: 16px;
}

.cart-delivery-fields {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 10px 0 0;
  padding: 16px;
  border: 1px solid rgba(94, 115, 95, 0.24);
  border-radius: 17px;
  background: rgba(143, 166, 142, 0.07);
}

.cart-delivery-fields legend {
  padding: 0 7px;
  color: var(--checkout-green);
  font-size: 14px;
  font-weight: 800;
}

.cart-checkout-form .cart-choose-relay {
  margin-top: 10px;
  border: 1px solid var(--checkout-green);
  background: white;
  color: var(--checkout-green);
}

.cart-selected-relay {
  margin: 5px 0 0;
  color: #716b64;
  font-size: 13px;
  line-height: 1.5;
}

.cart-selected-relay.is-selected {
  color: #354a36;
  font-weight: 700;
}

.relay-map-backdrop {
  position: fixed;
  inset: 0;
  z-index: 490;
  background: rgba(36, 39, 35, 0.68);
}

.relay-map-dialog {
  position: fixed;
  inset: 4dvh 4vw;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: 0 30px 80px rgba(36, 39, 35, 0.25);
}

.relay-map-backdrop[hidden],
.relay-map-dialog[hidden] {
  display: none;
}

.relay-map-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 12px;
}

.relay-map-dialog header p {
  margin: 0 0 5px;
  color: var(--checkout-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.relay-map-dialog header h2 {
  margin: 0;
  color: var(--checkout-green);
  font-size: clamp(22px, 4vw, 34px);
}

.relay-map-dialog header button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(94, 115, 95, 0.25);
  border-radius: 50%;
  background: white;
  color: var(--checkout-green);
  font-size: 27px;
}

.relay-map-status {
  min-height: 22px;
  margin: 0 22px 8px;
  color: #716b64;
  font-size: 13px;
}

.relay-map-container {
  flex: 1;
  min-height: 0;
  margin: 0 14px 14px;
  border: 1px solid rgba(94, 115, 95, 0.2);
  border-radius: 14px;
  overflow: hidden;
}

.relay-map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 650px) {
  .relay-map-dialog {
    inset: 2dvh 2vw;
    border-radius: 16px;
  }

  .relay-map-dialog header {
    padding: 14px 16px 8px;
  }

  .relay-map-status {
    margin: 0 16px 8px;
  }

  .relay-map-container {
    margin: 0 8px 8px;
  }
}

.cart-checkout-form input[readonly] {
  background: rgba(143, 166, 142, 0.08);
}

.cart-checkout-form button {
  min-height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: var(--checkout-green);
  color: white;
  font-weight: 800;
}

.cart-checkout-form button:disabled {
  background: #aaa8a2;
  cursor: not-allowed;
}

.product-purchase {
  display: grid;
  gap: 9px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid rgba(94, 115, 95, 0.18);
  border-radius: 20px;
  background: rgba(143, 166, 142, 0.08);
  text-align: left;
}

.product-purchase[hidden] {
  display: none;
}

.product-purchase > label {
  color: var(--checkout-green);
  font-size: 13px;
  font-weight: 750;
}

.product-purchase-actions {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
}

.product-purchase-actions input,
.product-purchase-actions button {
  min-height: 46px;
  border-radius: 999px;
}

.product-purchase-actions input {
  width: 100%;
  border: 1px solid rgba(94, 115, 95, 0.28);
  padding: 10px;
  background: white;
  text-align: center;
}

.product-purchase-actions button {
  border: 0;
  padding: 11px 18px;
  background: var(--checkout-green);
  color: white;
  font-weight: 800;
}

.product-purchase-actions button:disabled {
  background: #aaa8a2;
}

.product-purchase > p {
  min-height: 18px;
  margin: 0;
  color: #716b64;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .cart-trigger {
    right: 14px;
    bottom: 14px;
  }

  .cart-drawer {
    padding: 22px 17px 32px;
  }

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

  .cart-item img {
    width: 62px;
    height: 74px;
  }

  .cart-item-remove {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }
}
