/* Kitchen Khurana — cart drawer + checkout */

.cart-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(35, 26, 16, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
}
.cart-scrim.show { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: min(440px, 100vw);
  background: var(--cream);
  box-shadow: -30px 0 80px -30px rgba(35, 26, 16, 0.4);
  transform: translateX(105%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
.cart-drawer.show { transform: translateX(0); }

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 23px; }
.cart-head .cart-sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.cart-close {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.cart-close:hover { background: var(--ink); color: var(--cream); transform: rotate(90deg); }

.cart-body { flex: 1; overflow-y: auto; padding: 20px 26px; }

.cart-empty { text-align: center; padding: 70px 20px; color: var(--ink-soft); }
.cart-empty .hindi { font-size: 30px; color: var(--terra); display: block; margin-bottom: 14px; }
.cart-empty p { font-size: 15px; max-width: 26ch; margin: 0 auto 22px; }

.cart-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-item .ci-main { flex: 1; min-width: 0; }
.cart-item .ci-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 9px; }
.cart-item .ci-name .diet-dot { width: 13px; height: 13px; border-width: 1px; }
.cart-item .ci-name .diet-dot::after { width: 5px; height: 5px; }
.cart-item .ci-meta { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }
.cart-item .ci-price { font-family: var(--font-display); font-size: 17px; white-space: nowrap; }
.qty {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  margin-top: 10px;
}
.qty button {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 16px; color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.qty button:hover { background: var(--ink); color: var(--cream); }
.qty b { min-width: 26px; text-align: center; font-size: 14px; }

.cart-progress { padding: 14px 26px 0; }
.cart-progress p { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }
.cart-progress p b { color: var(--green); }
.progress-bar { height: 5px; border-radius: 999px; background: var(--cream-deep); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--green)); border-radius: 999px; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }

.cart-foot { border-top: 1px solid var(--line); padding: 18px 26px 24px; background: var(--cream); }
.cart-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.cart-row { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--ink-soft); }
.cart-row.total { font-size: 17px; color: var(--ink); font-weight: 600; padding-top: 8px; border-top: 1px dashed var(--line); }
.cart-row.total span:last-child { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.cart-row .free { color: var(--green); font-weight: 600; }
.checkout-btn { width: 100%; }

/* ---------- Checkout step ---------- */
.cart-panel { display: flex; flex-direction: column; height: 100%; }
.cart-panel[hidden] { display: none; }

.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  transition: color 0.2s;
}
.back-link:hover { color: var(--ink); }

.co-form { display: flex; flex-direction: column; gap: 18px; }
.co-section h4 {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 12px; font-weight: 700;
}
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.co-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(200, 64, 26, 0.12);
}
.field input.invalid { border-color: var(--terra); background: #FFF3EE; }

.slot-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.slot-pill {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
  transition: all 0.25s;
}
.slot-pill.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.pay-toggle { display: flex; gap: 8px; margin-bottom: 12px; }
.pay-opt {
  flex: 1;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  transition: all 0.25s;
}
.pay-opt small { font-weight: 400; font-size: 11.5px; color: var(--ink-faint); }
.pay-opt.active { border-color: var(--terra); background: #FFF3EE; color: var(--ink); }

.card-fields { display: grid; grid-template-columns: 1fr; gap: 10px; }
.card-fields .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.etransfer-note {
  font-size: 13.5px; color: var(--ink-soft); background: var(--cream-deep);
  border-radius: 12px; padding: 14px 16px; line-height: 1.6;
}
.etransfer-note b { color: var(--ink); }

/* ---------- Success ---------- */
.success-panel {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px;
}
.success-tiffin { width: 110px; height: 110px; margin-bottom: 26px; }
.success-panel h3 { font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.success-panel .hindi-thanks { font-family: var(--font-hindi); color: var(--terra); font-size: 20px; margin-top: 6px; }
.success-panel p { color: var(--ink-soft); font-size: 14.5px; max-width: 32ch; margin: 16px auto 8px; }
.success-panel .order-no {
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
  border: 1px dashed var(--line); border-radius: 999px; padding: 8px 18px; margin: 14px 0 26px;
}

@media (max-width: 540px) {
  .cart-drawer { width: 100vw; }
  .co-grid { grid-template-columns: 1fr; }
}
