/* ==========================================================================
   Rice Now – Checkout · Payment gateway · Order confirmation
   Loaded by checkout.php, payment.php, order-success.php
   ========================================================================== */

.co-main,
.gw-main,
.os-main {
  background:
    radial-gradient(1000px 460px at 6% -4%, rgba(238, 174, 43, 0.13), transparent 60%),
    radial-gradient(860px 420px at 100% 0%, rgba(120, 74, 34, 0.08), transparent 55%),
    var(--cream);
  min-height: 60vh;
  padding-bottom: 70px;
}

.gw-error {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid rgba(201, 48, 44, 0.24);
  border-radius: 12px;
  background: #fff1f0;
  color: #a02722;
  font-size: 13px;
}

.gw-error[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- Crumbs */
.co-crumbs {
  padding: 18px 0 4px;
  font-size: 13.5px;
}

.co-crumbs .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.co-crumbs a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.co-crumbs a:hover {
  color: var(--gold-deep);
}

.co-crumbs > .container > i {
  color: rgba(108, 84, 66, 0.45);
  font-size: 11px;
}

.co-crumbs span {
  color: var(--brown);
  font-weight: 700;
}

/* ---------------------------------------------------------------- Head */
.co-section {
  padding: 22px 0 10px;
}

.co-head {
  text-align: center;
  margin-bottom: 34px;
}

.co-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  color: var(--brown);
  letter-spacing: -0.8px;
  margin: 0;
}

.co-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
}

.co-sub i {
  color: var(--gold-deep);
}

.co-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f9e5f;
  box-shadow: 0 0 0 0 rgba(47, 158, 95, 0.55);
  animation: coPulse 1.8s infinite;
}

@keyframes coPulse {
  70% {
    box-shadow: 0 0 0 9px rgba(47, 158, 95, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 158, 95, 0);
  }
}

/* ---------------------------------------------------------------- Layout */
.co-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.co-form-col {
  display: grid;
  gap: 22px;
}

.co-summary-col {
  position: sticky;
  top: 96px;
}

/* ---------------------------------------------------------------- Cards */
.co-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(196, 145, 42, 0.26);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: var(--shadow-soft);
  margin: 0;
}

.co-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--brown);
  margin: 0 0 20px;
  padding: 0;
  float: none;
  width: 100%;
}

.co-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--brown-dark);
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- Fields */
.co-field {
  display: block;
  margin-bottom: 16px;
}

.co-field:last-child {
  margin-bottom: 0;
}

.co-field > span {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 7px;
}

.co-field > span em {
  color: #c9302c;
  font-style: normal;
}

.co-field > span small {
  font-weight: 500;
  color: var(--text-muted);
}

.co-field input,
.co-field textarea,
.co-field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 13px;
  border: 2px solid rgba(108, 84, 66, 0.2);
  background: #fff;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--brown);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.co-field input::placeholder,
.co-field textarea::placeholder {
  color: rgba(108, 84, 66, 0.5);
}

.co-field input:focus,
.co-field textarea:focus,
.co-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(238, 174, 43, 0.18);
}

.co-field input.is-invalid,
.co-field textarea.is-invalid {
  border-color: #c9302c;
  background: #fff7f7;
}

.co-field textarea {
  resize: vertical;
  min-height: 74px;
}

.co-field-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.co-field-row .co-field {
  margin-bottom: 0;
}

.co-field-row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.co-field-row-3 {
  grid-template-columns: 1.3fr 1.3fr 1fr;
}

.co-address-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.co-saved-address-picker[hidden] {
  display: none;
}

.co-address-choice label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid rgba(108, 84, 66, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--brown);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.co-address-choice label:has(input:checked) {
  border-color: var(--gold-deep);
  background: rgba(238, 174, 43, 0.1);
}

.co-address-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--gold-deep);
  flex: 0 0 auto;
}

.co-address-note {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.co-field input[readonly] {
  background: rgba(248, 245, 239, 0.9);
  cursor: default;
}

.co-field select:disabled {
  background: rgba(248, 245, 239, 0.9);
  color: var(--text-muted);
}

.co-err {
  display: block;
  margin-top: 6px;
  color: #c9302c;
  font-size: 13px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- Payment picker */
.co-pay-list {
  display: grid;
  gap: 12px;
}

.co-pay {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 18px;
  border-radius: 16px;
  border: 2px solid rgba(108, 84, 66, 0.18);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.22s ease;
}

.co-pay:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.co-pay input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.co-pay-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--cream-deep);
  color: var(--brown-soft);
  font-size: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.22s ease;
}

.co-pay-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.co-pay-text strong {
  font-size: 15.5px;
  color: var(--brown);
}

.co-pay-text small {
  font-size: 13px;
  color: var(--text-muted);
}

.co-pay-check {
  color: rgba(108, 84, 66, 0.25);
  font-size: 22px;
  transition: all 0.22s ease;
}

.co-pay.is-active {
  border-color: var(--gold-deep);
  background: linear-gradient(160deg, #fff8e8, #fdf1d6);
  box-shadow: 0 10px 24px rgba(215, 148, 20, 0.22);
}

.co-pay.is-active .co-pay-icon {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--brown-dark);
}

.co-pay.is-active .co-pay-check {
  color: #2f9e5f;
}

.co-pay-note {
  display: flex;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px 15px;
  border-radius: 13px;
  background: rgba(246, 232, 205, 0.6);
  color: var(--brown-soft);
  font-size: 13.8px;
  line-height: 1.6;
}

.co-pay-note i {
  color: var(--gold-deep);
  margin-top: 2px;
}

/* ---------------------------------------------------------------- Summary */
.co-summary {
  padding: 24px 26px;
}

.co-items {
  display: grid;
  gap: 13px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 18px;
}

.co-items::-webkit-scrollbar {
  width: 6px;
}

.co-items::-webkit-scrollbar-thumb {
  background: rgba(196, 145, 42, 0.45);
  border-radius: 99px;
}

.co-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14.5px;
  padding: 18px 0;
}

.co-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(196, 145, 42, 0.3);
  border-top-color: var(--gold-deep);
  animation: coSpin 0.8s linear infinite;
}

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

.co-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
}

.co-item-img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  overflow: hidden;
  background: var(--cream-deep);
  border: 1.5px solid rgba(196, 145, 42, 0.3);
}

.co-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.co-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.co-item-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-item-info small {
  font-size: 12.8px;
  color: var(--text-muted);
}

.co-item-total {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown-dark);
  white-space: nowrap;
}

.co-empty {
  text-align: center;
  padding: 30px 12px;
  color: var(--text-muted);
}

.co-empty i {
  font-size: 40px;
  color: rgba(196, 145, 42, 0.6);
}

.co-empty p {
  margin: 10px 0 6px;
}

.co-empty-link {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: none;
}

/* Totals */
.co-totals {
  margin: 0;
  display: grid;
  gap: 11px;
}

.co-totals > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.co-totals dt {
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.co-totals dt small {
  color: var(--gold-deep);
  font-weight: 700;
}

.co-totals dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
}

.co-totals .is-free {
  color: #217a4b;
}

.co-totals .is-discount {
  color: #c9302c;
}

.co-discount-row dt,
.co-discount-row dd {
  color: #c9302c !important;
}

.co-totals .co-grand {
  border-top: 2px solid rgba(108, 84, 66, 0.18);
  padding-top: 13px;
  margin-top: 3px;
}

.co-totals .co-grand dt {
  font-size: 17px;
  font-weight: 800;
  color: var(--brown-dark);
}

.co-totals .co-grand dd {
  font-size: 25px;
  font-weight: 800;
  color: var(--brown-dark);
  letter-spacing: -0.8px;
}

.co-free-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: #e9f7ef;
  color: #217a4b;
  font-size: 13.8px;
  font-weight: 600;
}

.co-shipping-picker {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.co-shipping-picker legend {
  margin-bottom: 10px;
  color: var(--brown);
  font-size: 13.5px;
  font-weight: 700;
}

.co-shipping-picker legend em {
  color: #c9302c;
  font-style: normal;
}

.co-shipping-options {
  display: grid;
  gap: 10px;
}

.co-shipping-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 2px solid rgba(108, 84, 66, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.co-shipping-option:has(input:checked) {
  border-color: var(--gold);
  background: #fffaf0;
}

.co-shipping-option input {
  accent-color: var(--gold-deep);
}

.co-shipping-option span,
.co-shipping-option strong,
.co-shipping-option small {
  display: block;
}

.co-shipping-option strong {
  color: var(--brown);
  font-size: 14px;
}

.co-shipping-option small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.co-phone-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px;
  border: 1.5px solid rgba(196, 145, 42, 0.26);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.co-phone-note {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.guest-track-card .co-place {
  margin-top: 0;
}

.guest-track-results {
  margin-top: 24px;
}

.guest-track-results h2 {
  margin: 0 0 12px;
  color: var(--brown-dark);
  font-family: var(--font-heading);
  font-size: 18px;
}

.guest-track-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  color: var(--brown);
  font-size: 14px;
}

.guest-track-order + .guest-track-order {
  border-top: 1px solid rgba(108, 84, 66, 0.14);
}

.guest-track-shipment {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(196, 145, 42, 0.24);
  border-radius: 14px;
  background: rgba(253, 246, 231, 0.62);
}

.guest-track-shipment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  color: var(--brown);
  font-size: 13px;
}

.guest-track-shipment-head > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.guest-track-shipment-head > span i {
  color: var(--gold-deep);
}

.guest-track-shipment-head > strong {
  color: var(--gold-deep);
  font-size: 12.5px;
}

.guest-track-waybill {
  margin: 7px 0 10px;
  color: var(--text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.guest-track-map-details {
  border-top: 1px solid rgba(108, 84, 66, 0.13);
  padding-top: 10px;
}

.guest-track-map-details summary {
  color: var(--brown-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.guest-track-map-details summary::-webkit-details-marker {
  display: none;
}

.guest-track-map-details summary i {
  margin-right: 5px;
  color: var(--gold-deep);
}

.guest-track-map-note {
  margin: 9px 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.guest-track-map-frame {
  height: 260px;
  overflow: hidden;
  border: 1px solid rgba(108, 84, 66, 0.15);
  border-radius: 11px;
  background: #f5f1e9;
}

.guest-track-map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.guest-track-carrier-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--gold-deep);
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
}

.guest-track-carrier-link:hover {
  color: var(--brown-dark);
  text-decoration: underline;
}

.guest-track-row time,
.guest-track-note {
  color: var(--text-muted);
  font-size: 12px;
}

.guest-track-message {
  margin: 18px 0 0;
  color: var(--brown);
  font-weight: 700;
}

.guest-track-note {
  margin: 18px 0 0;
}

.co-place {
  width: 100%;
  margin-top: 18px;
  height: 56px;
  font-size: 16.5px;
  font-weight: 800;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.co-place:disabled {
  background: #cfc3b2;
  color: #5b4636;
  box-shadow: none;
  cursor: not-allowed;
}

.co-assure {
  list-style: none;
  padding: 16px 0 0;
  margin: 16px 0 0;
  border-top: 1.5px dashed rgba(108, 84, 66, 0.22);
  display: grid;
  gap: 9px;
}

.co-assure li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.co-assure i {
  color: var(--gold-deep);
  font-size: 16px;
}

/* ==========================================================================
   Payment gateway
   ========================================================================== */
.gw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.gw-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid rgba(196, 145, 42, 0.3);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.gw-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 26px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown-soft));
  color: #fff;
}

.gw-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.gw-brand i {
  color: var(--gold-bright);
  font-size: 19px;
}

.gw-method-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
}

.gw-panel form {
  padding: 26px;
}

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

.gw-field {
  display: block;
}

.gw-field-wide {
  grid-column: 1 / -1;
}

.gw-field > span:first-child {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 7px;
}

.gw-input-wrap {
  position: relative;
  display: block;
}

.gw-input-wrap > i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(108, 84, 66, 0.55);
  font-size: 17px;
  pointer-events: none;
}

.gw-input-wrap input,
.gw-input-wrap select {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border-radius: 13px;
  border: 2px solid rgba(108, 84, 66, 0.2);
  background: #fff;
  font-size: 15.5px;
  font-family: var(--font-body);
  color: var(--brown);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gw-input-wrap input:focus,
.gw-input-wrap select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(238, 174, 43, 0.18);
}

.gw-hint {
  display: flex;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.gw-hint i {
  color: var(--gold-deep);
  margin-top: 2px;
}

/* UPI apps */
.gw-upi-apps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 20px;
}

.gw-upi-app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 8px;
  border-radius: 15px;
  border: 2px solid rgba(108, 84, 66, 0.18);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.gw-upi-app input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gw-upi-app i {
  font-size: 24px;
  color: var(--brown-soft);
}

.gw-upi-app span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brown);
}

.gw-upi-app:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.gw-upi-app.is-active {
  border-color: var(--gold-deep);
  background: linear-gradient(160deg, #fff8e8, #fdf1d6);
  box-shadow: 0 8px 18px rgba(215, 148, 20, 0.22);
}

.gw-upi-app.is-active i {
  color: var(--gold-deep);
}

/* Actions */
.gw-actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.gw-pay {
  height: 56px;
  font-size: 16.5px;
  font-weight: 800;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.gw-pay:disabled {
  opacity: 0.85;
  cursor: wait;
}

.gw-processing {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(47, 27, 15, 0.3);
  border-top-color: var(--brown-dark);
  animation: coSpin 0.8s linear infinite;
  display: inline-block;
}

.gw-cancel {
  border: 2px solid rgba(108, 84, 66, 0.25);
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gw-cancel:hover {
  border-color: #c9302c;
  color: #c9302c;
  background: #fff5f5;
}

/* Receipt */
.gw-receipt {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(196, 145, 42, 0.28);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 96px;
}

.gw-receipt-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--brown);
  margin: 0 0 18px;
}

.gw-receipt-title i {
  color: var(--gold-deep);
}

.gw-items {
  display: grid;
  gap: 13px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 18px;
  border-bottom: 1.5px dashed rgba(108, 84, 66, 0.22);
  padding-bottom: 16px;
}

.gw-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.gw-item-img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--cream-deep);
  border: 1.5px solid rgba(196, 145, 42, 0.3);
}

.gw-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gw-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gw-item-info span {
  font-size: 14.3px;
  font-weight: 700;
  color: var(--brown);
}

.gw-item-info small {
  font-size: 12.6px;
  color: var(--text-muted);
}

.gw-item > strong {
  font-size: 14.8px;
  color: var(--brown-dark);
  white-space: nowrap;
}

.gw-totals {
  margin-bottom: 18px;
}

.gw-ship {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--cream-deep);
  border-radius: 15px;
  padding: 14px 16px;
}

.gw-ship > i {
  color: var(--gold-deep);
  font-size: 19px;
  margin-top: 2px;
}

.gw-ship div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gw-ship strong {
  font-size: 14.5px;
  color: var(--brown);
}

.gw-ship span {
  font-size: 13.3px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Order success
   ========================================================================== */
.os-hero {
  padding: 40px 0 20px;
}

.os-card {
  max-width: 880px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(196, 145, 42, 0.32);
  border-radius: 28px;
  padding: 46px 46px 40px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.os-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #37b46f, #217a4b);
  color: #fff;
  font-size: 42px;
  margin-bottom: 20px;
  box-shadow: 0 16px 34px rgba(33, 122, 75, 0.35);
  animation: osPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.os-icon-warn {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 16px 34px rgba(215, 148, 20, 0.35);
}

@keyframes osPop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.os-kicker {
  font-family: var(--font-script);
  color: var(--gold-deep);
  font-size: 20px;
  margin: 0 0 6px;
}

.os-card h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  color: var(--brown);
  letter-spacing: -0.8px;
  margin: 0 0 12px;
}

.os-sub {
  color: var(--text-muted);
  font-size: 15.5px;
  margin: 0 auto 26px;
  max-width: 560px;
  line-height: 1.7;
}

.os-sub strong {
  color: var(--brown);
}

/* Meta chips */
.os-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 30px;
}

.os-meta-item {
  background: var(--cream-deep);
  border-radius: 15px;
  padding: 15px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.os-meta-item span {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.os-meta-item strong {
  font-size: 15px;
  color: var(--brown);
  word-break: break-word;
}

.os-pay-paid {
  color: #217a4b;
}

.os-pay-pending {
  color: var(--gold-deep);
}

/* Progress */
.os-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 32px;
  position: relative;
}

.os-progress::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 12%;
  right: 12%;
  height: 3px;
  background: rgba(108, 84, 66, 0.16);
  border-radius: 99px;
  z-index: 0;
}

.os-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.os-step i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(108, 84, 66, 0.18);
  color: rgba(108, 84, 66, 0.5);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.os-step.is-done i {
  background: linear-gradient(135deg, #37b46f, #217a4b);
  border-color: transparent;
  color: #fff;
}

.os-step.is-done {
  color: #217a4b;
}

.os-step.is-current i {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  border-color: transparent;
  color: var(--brown-dark);
  box-shadow: 0 0 0 5px rgba(238, 174, 43, 0.25);
}

.os-step.is-current {
  color: var(--gold-deep);
  font-weight: 800;
}

/* Receipt */
.os-receipt {
  text-align: left;
  border: 1.5px solid rgba(108, 84, 66, 0.16);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 22px;
}

.os-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  background: var(--cream-deep);
}

.os-receipt-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--brown);
  margin: 0;
}

.os-receipt-head h2 i {
  color: var(--gold-deep);
}

.os-status-badge {
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 6px 14px;
  border-radius: 999px;
}

.os-status-pending {
  background: #fff3d6;
  color: #a3700d;
}

.os-status-confirmed {
  background: #e6f1ff;
  color: #1f5fbf;
}

.os-status-packed {
  background: #efe9ff;
  color: #6247c7;
}

.os-status-shipped {
  background: #e2f6ff;
  color: #0d7ea8;
}

.os-status-delivered {
  background: #e9f7ef;
  color: #217a4b;
}

.os-status-cancelled {
  background: #fdecec;
  color: #c9302c;
}

.os-items {
  padding: 18px 22px;
  display: grid;
  gap: 14px;
}

.os-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
}

.os-item-img {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  overflow: hidden;
  background: var(--cream-deep);
  border: 1.5px solid rgba(196, 145, 42, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-soft);
  font-size: 22px;
}

.os-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.os-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.os-item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
}

.os-item-info small {
  font-size: 13px;
  color: var(--text-muted);
}

.os-item-total {
  font-size: 16px;
  font-weight: 800;
  color: var(--brown-dark);
  white-space: nowrap;
}

.os-totals {
  padding: 4px 22px 22px;
}

/* Address */
.os-address {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  background: var(--cream-deep);
  border-radius: 17px;
  padding: 17px 20px;
  margin-bottom: 26px;
}

.os-address > i {
  color: var(--gold-deep);
  font-size: 21px;
  margin-top: 2px;
}

.os-address div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.os-address strong {
  font-size: 15px;
  color: var(--brown);
}

.os-address span {
  font-size: 13.8px;
  color: var(--text-muted);
  line-height: 1.6;
}

.os-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  font-style: italic;
}

/* Actions */
.os-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 22px;
}

.os-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 14px;
  border: 2px solid rgba(108, 84, 66, 0.25);
  color: var(--brown-soft);
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  transition: all 0.22s ease;
}

.os-secondary:hover {
  border-color: var(--gold-deep);
  color: var(--brown-dark);
  background: rgba(255, 248, 232, 0.9);
}

.os-help {
  font-size: 14.3px;
  color: var(--text-muted);
  margin: 0;
}

.os-help a {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: none;
}

.os-help a:hover {
  text-decoration: underline;
}

.os-card-missing {
  padding: 60px 40px;
}

.os-card-missing p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .co-grid,
  .gw-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .co-summary-col,
  .gw-receipt {
    position: static;
  }

  .os-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .co-card,
  .gw-panel form,
  .gw-receipt {
    padding: 20px 18px;
  }

  .co-address-choice {
    grid-template-columns: minmax(0, 1fr);
  }

  .co-field-row-2,
  .co-field-row-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .gw-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .gw-upi-apps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .os-card {
    padding: 34px 20px 30px;
    border-radius: 22px;
  }

  .os-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .os-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 8px;
  }

  .os-progress::before {
    display: none;
  }

  .os-item {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 11px;
  }

  .os-item-img {
    width: 48px;
    height: 48px;
  }

  .os-receipt-head,
  .os-items,
  .os-totals {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 460px) {
  .gw-upi-apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-track-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .guest-track-row time {
    grid-column: 1 / -1;
  }

  .os-meta {
    grid-template-columns: minmax(0, 1fr);
  }
}
