/* Product review and delivery details share the storefront card palette. */
:root { --order-surface: linear-gradient(135deg, #fffdfc 0%, #f7f9fe 45%, #d6e6fc 100%); }
.modal-discount, .tg-checkout-item-discount {
  justify-self: start;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 99px;
  background: #c8102e;
  color: white;
  font-size: .77rem;
  font-weight: 700;
  white-space: nowrap;
}
.tg-checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1800;
  background: #071a2a99;
  backdrop-filter: blur(8px);
}
.tg-checkout-dialog {
  position: fixed;
  z-index: 1900;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 1200px);
  max-height: 94dvh;
  overflow: auto;
  border: 1px solid #c48a32;
  border-radius: 28px;
  box-shadow: 0 20px 60px #071a2a55;
  background: var(--order-surface);
  color: var(--navy);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.tg-checkout-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(12px, 2vw, 26px);
  align-items: center;
  padding: 18px clamp(16px, 2vw, 28px);
  border-bottom: 1px solid #c7d3e2;
}
.tg-checkout-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 20px;
  border-right: 1px solid #c48a32;
}
.tg-checkout-brand strong, .tg-checkout-brand small { display: block; }
.tg-checkout-brand strong { font: 700 1.13rem var(--font-display); }
.tg-checkout-brand small { color: #895b15; font-weight: 700; }
.tg-checkout-head h2 { font-size: clamp(1.25rem, 2.3vw, 2rem); line-height: 1.15; }
.tg-checkout-subtitle { margin-top: 4px; font-size: .9rem; color: #405469; }
.tg-checkout-close {
  align-self: start;
  width: 44px;
  height: 44px;
  border: 1px solid #c48a32;
  border-radius: 50%;
  background: #fffdf9;
  font-size: 1.55rem;
}
.tg-checkout-close:hover { background: #f6e9d3; }
.tg-checkout-content {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 24px);
  padding: 18px clamp(16px, 2vw, 28px);
}
#tg-checkout-form { border-left: 1px solid #c7d3e2; padding-left: clamp(14px, 2vw, 24px); }
.tg-checkout-summary { border: 1px solid #ccd9ea; border-radius: 16px; overflow: hidden; background: #ffffff42; }
.tg-checkout-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 13px;
  background: #dbeafb;
  font-size: clamp(1rem, 1.6vw, 1.32rem);
  line-height: 1.25;
}
.tg-checkout-section-title .shop-glyph { color: #895b15; }
.tg-checkout-summary-list { margin: 0; padding: 0 14px; list-style: none; }
.tg-checkout-summary-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.tg-checkout-summary-list li + li { border-top: 1px solid #c7d3e2; }
.tg-checkout-item-photo { width: clamp(62px, 9vw, 116px); height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 10px; }
.tg-checkout-item-details { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.tg-checkout-item-name { line-height: 1.2; }
.tg-checkout-item-category, .tg-checkout-item-mrp, .tg-checkout-item-qty { color: #46576a; font-size: .82rem; }
.tg-checkout-item-price, .tg-checkout-summary-total strong { color: #895b15; font-size: 1.35rem; }
.tg-checkout-summary-total {
  margin: 0 14px;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #c7d3e2;
  font-weight: 700;
}
.tg-checkout-info { margin-top: 12px; padding: 12px; border-radius: 13px; background: #e1f6ed; color: #173e32; font-size: .85rem; }
.tg-checkout-info strong { display: block; }
.tg-checkout-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
.tg-checkout-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tg-checkout-field--wide { grid-column: 1 / -1; }
.tg-checkout-field label { font-size: .85rem; font-weight: 700; }
.tg-checkout-optional { font-weight: 400; color: #46576a; }
.tg-checkout-field input, .tg-checkout-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #a36c1d;
  border-radius: 10px;
  background: #fffdfbea;
  color: var(--navy);
  font: inherit;
  font-size: 16px;
  scroll-margin-block: 16px 80px;
}
.tg-checkout-field input::placeholder, .tg-checkout-field textarea::placeholder { color: #46576a; }
.tg-checkout-field textarea { min-height: 58px; resize: vertical; }
.tg-checkout-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px clamp(16px, 2vw, 28px);
  border-top: 1px solid #c7d3e2;
  background: #e6effb;
}
.tg-checkout-footer .btn { justify-content: center; min-height: 48px; text-align: center; }
.tg-checkout-footer .btn--ghost { justify-self: center; min-width: 116px; background: #fffdfb; border-color: #a36c1d; color: var(--navy); }
.tg-checkout-footer .btn--ghost:hover { background: #f6e9d3; color: var(--navy); }
.tg-checkout-footer .btn--primary { background: #15743d; color: white; }
.tg-checkout-footer .btn--primary:hover { background: #105b30; }
.tg-checkout-footer .shop-glyph { width: 19px; height: 19px; }

@media (max-width: 920px) {
  .tg-checkout-brand { display: none; }
  .tg-checkout-head { grid-template-columns: 1fr auto; }
}
@media (max-width: 680px) {
  .tg-checkout-dialog { width: min(96vw, 540px); max-height: 94dvh; border-radius: 18px; }
  .tg-checkout-head, .tg-checkout-content { padding: 12px; }
  .tg-checkout-content { grid-template-columns: minmax(0, 1fr); }
  .tg-checkout-footer { grid-template-columns: auto minmax(0, 1fr); padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); }
  .tg-checkout-footer .btn { padding: 8px 11px; font-size: .87rem; line-height: 1.2; }
  .tg-checkout-footer .btn--ghost { min-width: 62px; }
  #tg-checkout-form { border-left: 0; padding-left: 0; }
}
@media (max-width: 380px) {
  .tg-checkout-fields { grid-template-columns: minmax(0, 1fr); }
}
