/* RC8 cart / checkout polish. Presentation-only layer over the stable RC7 order flow. */

#order-backdrop {
  background: rgba(20, 20, 20, .32);
  backdrop-filter: blur(6px);
}

.order-sheet {
  max-height: 94svh;
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background: #faf9f7;
  box-shadow: 0 -18px 58px rgba(20, 20, 20, .18);
}

.order-sheet::before {
  content: "";
  position: sticky;
  top: 0;
  z-index: 3;
  display: block;
  width: 38px;
  height: 5px;
  margin: -12px auto 18px;
  border-radius: 999px;
  background: #d8d6d2;
}

.order-sheet > .eyebrow {
  margin: 0 0 8px;
  color: #97938d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
}

.order-sheet h2 {
  margin: 0 56px 7px 0;
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 540;
  letter-spacing: -.045em;
}

.order-sheet-copy {
  max-width: 520px;
  margin: 0 52px 22px 0;
  color: #77736d;
  font-size: 14px;
  font-weight: 430;
  line-height: 1.45;
}

.order-sheet-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e6e2dc;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #1f1f1f;
  box-shadow: 0 6px 18px rgba(24,24,24,.07);
  font-size: 24px;
  font-weight: 400;
}

.rc8-order-section-label {
  margin: 4px 2px 10px;
  color: #86817a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.order-cart-section {
  gap: 0;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid #ebe8e3;
  border-radius: 24px;
  background: #fff;
}

.order-cart-lines {
  gap: 0;
}

.order-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 14px;
  align-items: center;
  padding: 15px 16px;
  border-bottom: 1px solid #efede9;
  border-radius: 0;
  background: transparent;
}

.order-cart-line:last-child {
  border-bottom: 0;
}

.order-cart-copy {
  gap: 4px;
}

.order-cart-copy strong {
  color: #1b1b1b;
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -.015em;
}

.order-cart-copy small {
  color: #8a857f;
  font-size: 12px;
  font-weight: 430;
}

.order-qty-control {
  grid-template-columns: 32px minmax(24px, auto) 32px;
  gap: 4px;
  padding: 3px;
  border: 1px solid #e7e4df;
  background: #f7f6f4;
}

.order-qty-control button {
  width: 32px;
  height: 32px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(30,30,30,.05);
  font-size: 18px;
  font-weight: 500;
}

.order-qty-control strong {
  font-size: 14px;
  font-weight: 570;
}

.order-line-total {
  grid-column: 1 / 2;
  color: #1c1c1c;
  font-size: 13px;
  font-weight: 560;
}

.order-empty {
  margin: 0;
  padding: 26px 18px;
  border-radius: 0;
  background: transparent;
  color: #8a857f;
  font-size: 14px;
  font-weight: 460;
}

.order-browse-products {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  border-top: 1px solid #efede9;
  border-radius: 0;
  background: #fff;
  color: #ef6a22;
  text-align: left;
  font-size: 14px;
  font-weight: 560;
}

.order-continue-shopping {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #e9e6e1;
  border-radius: 18px;
  background: #fff;
  color: #383735;
  font-size: 14px;
  font-weight: 520;
}

.order-form-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.order-field {
  gap: 6px;
  color: #77736d;
  font-size: 12px;
  font-weight: 520;
}

.order-field input,
.order-field select,
.order-field textarea {
  border: 1px solid #e9e6e1;
  border-radius: 18px;
  padding: 15px 16px;
  background: #fff;
  color: #1d1d1d;
  font-weight: 430;
  box-shadow: none;
}

.order-field input:focus,
.order-field select:focus,
.order-field textarea:focus {
  border-color: #222;
  box-shadow: 0 0 0 1px #222;
}

.order-field textarea {
  min-height: 78px;
}

.order-location-card {
  gap: 10px;
  padding: 15px 16px;
  border: 1px solid #e4eee7;
  border-radius: 18px;
  background: #f7fbf8;
}

.order-location-copy strong {
  color: #26392f;
  font-size: 14px;
  font-weight: 560;
}

.order-location-copy small {
  color: #748079;
  font-size: 12px;
  font-weight: 420;
  line-height: 1.4;
}

.order-location-button,
.order-location-clear {
  padding: 10px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 560;
}

.order-location-button {
  background: #1d1d1d;
}

.order-location-clear {
  border: 1px solid #e2e8e4;
  background: #fff;
}

.order-location-status {
  font-size: 11px;
  font-weight: 480;
}

.order-total {
  margin: 14px 0 12px;
  padding: 15px 17px;
  border: 1px solid #eee9e2;
  border-radius: 18px;
  background: #fff;
}

.order-total span {
  color: #77736d;
  font-size: 14px;
  font-weight: 470;
}

.order-total strong {
  font-size: 20px;
  font-weight: 600;
}

.order-submit {
  position: sticky;
  bottom: calc(4px + env(safe-area-inset-bottom));
  z-index: 5;
  min-height: 58px;
  padding: 16px 20px;
  border-radius: 18px;
  background: #1c1c1c;
  box-shadow: 0 12px 30px rgba(20,20,20,.18);
  font-size: 17px;
  font-weight: 570;
}

.order-submit:disabled {
  opacity: .36;
  box-shadow: none;
}

.order-message {
  min-height: 0;
  margin: 12px 2px 0;
  font-size: 13px;
  font-weight: 520;
}

.order-reference {
  margin-top: 14px;
  padding: 22px 18px;
  border: 1px solid #dceee3;
  border-radius: 22px;
  background: #f6fcf8;
  color: #245f42;
  font-weight: 460;
}

.rc8-success-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e4f7ea;
  color: #16854c;
  font-size: 30px;
  font-weight: 600;
}

.rc8-success-heading {
  margin: 0 0 6px;
  color: #1d1d1d;
  text-align: center;
  font-size: 22px;
  font-weight: 560;
}

.rc8-success-copy {
  margin: 0 0 18px;
  color: #76716b;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
}

.order-success-title {
  display: block;
  margin-bottom: 12px;
  color: #245f42;
  font-size: 14px;
  font-weight: 560;
}

.order-success-items {
  gap: 8px;
}

.order-success-items li {
  color: #4b6556;
  font-size: 13px;
}

.order-success-items li strong,
.order-success-total strong {
  font-weight: 580;
}

.rc8-success-done {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  border: 0;
  border-radius: 16px;
  background: #1c1c1c;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 560;
}

.order-sheet.rc8-order-success .order-cart-section,
.order-sheet.rc8-order-success .order-form-grid,
.order-sheet.rc8-order-success .order-total,
.order-sheet.rc8-order-success .order-submit,
.order-sheet.rc8-order-success .order-continue-shopping,
.order-sheet.rc8-order-success .rc8-order-section-label {
  display: none !important;
}

.order-sheet.rc8-order-success .order-sheet-copy {
  display: none;
}

.order-sheet.rc8-order-success h2 {
  margin-bottom: 18px;
}

/* Keep the submitted-order state focused: confirmation only. */
.order-sheet.rc8-order-success > .eyebrow,
.order-sheet.rc8-order-success > h2,
.order-sheet.rc8-order-success > .order-sheet-copy {
  display: none !important;
}

.order-sheet.rc8-order-success #order-form > :not(#order-reference) {
  display: none !important;
}

/* The full LIVE ORDER tracker is intentionally hidden on the customer page.
   Order history remains available through Order Zangu. */
.wigo-guest-tracker {
  display: none !important;
}

.cart-bar {
  min-height: 58px;
  border-radius: 19px;
  background: rgba(26,26,26,.96);
  backdrop-filter: blur(12px);
}

.cart-bar-copy strong,
#cart-bar-total {
  font-weight: 570;
}

.cart-bar-copy small {
  color: #ff9a5d;
  font-weight: 500;
}

@media (max-width: 520px) {
  .order-sheet {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Keep checkout above full-screen product details (420), category pages (430)
   and guest profile sheets (531). QR scanner must remain above checkout. */
#order-backdrop:not([hidden]) {
  z-index: 600;
}
#order-sheet:not([hidden]) {
  z-index: 601;
}
#hero-scanner-backdrop:not([hidden]) {
  z-index: 620;
}
#hero-scanner-sheet:not([hidden]) {
  z-index: 621;
}
