/* ================================================================
   CHECKOUT PAGE
   Reuses base tokens from style.css (--bg-primary, --gold, --serif, etc.)
   ================================================================ */

.nav-checkout {
  justify-content: space-between;
}
.checkout-wordmark {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--gold);
  line-height: 1;
  transition: color 0.2s;
}
.checkout-wordmark:hover { color: var(--gold-light); }
@media (max-width: 768px) {
  .checkout-wordmark { font-size: 1.4rem; letter-spacing: 2px; }
}
@media (max-width: 420px) {
  .checkout-wordmark { font-size: 1.15rem; letter-spacing: 1.5px; }
}
.checkout-back {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.checkout-back:hover { color: var(--gold-light); }

.checkout-main {
  min-height: 100vh;
  padding: 6rem 2rem 4rem;
  background: var(--bg-primary);
}
.checkout-container {
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Two-column layout ---------- */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 360px;
  gap: 2.5rem;
  align-items: flex-start;
}

.checkout-form-col { min-width: 0; }
.checkout-summary-col { min-width: 0; }
.checkout-summary-sticky {
  position: sticky;
  top: 6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.6rem 1.4rem;
}

/* ---------- Page heading ---------- */
.checkout-title {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

/* ---------- Cutoff notice ---------- */
.cutoff-notice {
  background: rgba(232, 201, 122, 0.08);
  border: 1px solid rgba(232, 201, 122, 0.4);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
  font-size: 0.92rem;
  color: var(--gold-light);
  line-height: 1.55;
}
.cutoff-notice strong { color: var(--gold); }

/* ---------- Sections ---------- */
.checkout-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.6rem 1.6rem;
  margin-bottom: 1.4rem;
}
.checkout-section-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
}
/* Small italic hint that sits between a section title and its content. Used
   to clarify the Friday-only fulfillment cycle so customers know up front
   that orders any day get prepared/delivered the upcoming Friday. */
.checkout-section-hint {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-style: italic;
  margin-top: -0.6rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.checkout-section-hint strong {
  color: var(--gold-light);
  font-style: normal;
  font-weight: 500;
}
.checkout-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}

/* ---------- Mode tabs (pickup/delivery/gift) ---------- */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.mode-tab {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.2rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--sans);
  color: var(--text-primary);
}
.mode-tab:hover { border-color: var(--gold-dark); }
.mode-tab.active {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}
.mode-tab-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}
.mode-tab.active .mode-tab-name { color: var(--gold); }
.mode-tab-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  flex: 1;
}
.mode-tab-fee {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
  margin-top: 0.4rem;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.instant-bolt {
  color: #7ec8a0;
  filter: drop-shadow(0 0 4px rgba(126, 200, 160, 0.7));
  animation: instant-bolt-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes instant-bolt-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px rgba(126, 200, 160, 0.5));
  }
  50% {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(126, 200, 160, 0.9));
  }
}

/* ---------- Form fields ---------- */
.checkout-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}
.checkout-field { display: flex; flex-direction: column; }
.checkout-field-full { grid-column: 1 / -1; }
.checkout-field-checkbox {
  flex-direction: row;
  align-items: center;
  align-self: end;
  padding-top: 1.5rem;
}
.checkout-field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}
.optional-tag {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  opacity: 0.7;
}
.checkout-field input,
.checkout-field textarea,
.checkout-field select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 0.98rem;
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s;
}
.checkout-field input:focus,
.checkout-field textarea:focus,
.checkout-field select:focus {
  outline: none;
  border-color: var(--gold);
}
.checkout-field textarea { resize: vertical; min-height: 80px; }
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  margin-bottom: 0;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}
.char-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.3rem;
}

/* Google Places autocomplete dropdown — match the dark + gold aesthetic */
.pac-container {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--gold-dark) !important;
  border-radius: 4px !important;
  margin-top: 4px !important;
  font-family: var(--sans) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}
.pac-item {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-top: 1px solid var(--border) !important;
  padding: 0.55rem 0.9rem !important;
  cursor: pointer;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover, .pac-item-selected {
  background: rgba(201, 168, 76, 0.12) !important;
}
.pac-item-query {
  color: var(--gold-light) !important;
  font-size: 0.95rem !important;
}
.pac-matched { color: var(--gold) !important; }
.pac-icon { display: none !important; }  /* hide the default location-pin icon */
.pac-logo:after {
  background-color: var(--bg-secondary) !important;
  filter: invert(0.85) brightness(1.05);
}

.quote-status {
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.quote-status-ok {
  background: rgba(126, 200, 160, 0.08);
  border-color: rgba(126, 200, 160, 0.3);
  color: #7ec8a0;
}
.quote-status-warn {
  background: rgba(255, 180, 84, 0.08);
  border-color: rgba(255, 180, 84, 0.4);
  color: #ffb454;
}

.gift-note-block {
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--border);
}

/* ---------- Submit button + WA alt link ---------- */
.checkout-submit-btn {
  width: 100%;
  font-size: 1.05rem;
  padding: 1rem 1.5rem;
  margin-bottom: 0.8rem;
}
.checkout-wa-link {
  display: block;
  text-align: center;
  color: var(--gold);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.checkout-wa-link:hover { border-bottom-color: var(--gold); }
.checkout-wa-link {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.checkout-fineprint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.55;
}
.checkout-error {
  background: rgba(232, 92, 92, 0.1);
  border: 1px solid rgba(232, 92, 92, 0.4);
  color: #e85c5c;
  padding: 0.9rem 1.1rem;
  border-radius: 4px;
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

/* ---------- Order summary (right column) ---------- */
.checkout-summary-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
  letter-spacing: 0.5px;
}
.summary-lines { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.2rem; }
.summary-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.summary-line:last-child { border-bottom: none; padding-bottom: 0; }
.summary-line-image {
  width: 56px;
  height: 56px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-primary);
}
.summary-line-image img { width: 100%; height: 100%; object-fit: cover; }
.summary-line-name {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ivory);
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-line-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.summary-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}
.summary-qty-btn:hover { background: var(--gold); color: #000; }
.summary-qty {
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 1.4ch;
  text-align: center;
}
.summary-line-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
}
.summary-line-remove:hover { color: #e85c5c; }
.summary-line-total {
  font-family: var(--serif);
  color: var(--gold-light);
  font-size: 1.1rem;
}

.summary-totals {
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.summary-fee-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 300;
}
.summary-row-total {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-top: 0.6rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}
.summary-fineprint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.checkout-brand-block {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.checkout-brand-img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold);
  margin: 0 auto 1rem;
  display: block;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.18);
}
.checkout-brand-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-light);
  font-size: 1rem;
  letter-spacing: 0.8px;
}
@media (max-width: 768px) {
  .checkout-brand-block { margin-top: 1.2rem; padding-top: 1.2rem; }
  .checkout-brand-img { width: 100px; height: 100px; }
}

/* ---------- Empty + Confirmation states ---------- */
.checkout-empty,
.checkout-confirmation {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4rem 2rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.checkout-empty-title,
.checkout-confirmation-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}
.checkout-empty-sub,
.checkout-confirmation-sub {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  line-height: 1.6;
}
.checkout-confirmation-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(126, 200, 160, 0.14);
  border: 2px solid #7ec8a0;
  color: #7ec8a0;
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.checkout-confirmation-number-row {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  padding: 0.8rem 1.4rem;
  border-radius: 4px;
  margin: 0.5rem auto 1.5rem;
}
.checkout-confirmation-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.checkout-confirmation-number {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gold-light);
  letter-spacing: 1px;
}
.checkout-confirmation-fineprint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .checkout-summary-col { order: -1; }  /* show summary FIRST on mobile */
  .checkout-summary-sticky { position: static; }
}
@media (max-width: 768px) {
  .checkout-main { padding: 5rem 1rem 3rem; }
  .checkout-title { font-size: 2rem; }
  .checkout-section { padding: 1.3rem 1.1rem; }
  .checkout-section-title { font-size: 1.2rem; }
  .mode-tabs { grid-template-columns: 1fr; }
  .mode-tab { padding: 1rem 1rem; }
  .checkout-grid-2 { grid-template-columns: 1fr; }
  .checkout-field-checkbox { padding-top: 0; }
  .checkout-summary-sticky { padding: 1.4rem 1.1rem; }
  .summary-line { grid-template-columns: 48px 1fr auto; }
  .summary-line-image { width: 48px; height: 48px; }
  .checkout-empty, .checkout-confirmation { padding: 3rem 1.4rem; }
}

/* ---------- Confirmation total row + payment options ---------- */
.checkout-confirmation-total-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.6rem 0 1.2rem;
  font-size: 1.1rem;
}
.checkout-confirmation-total-row .checkout-confirmation-number {
  color: #c9a84c;
  font-weight: 600;
}

.checkout-pay-options {
  margin: 1.8rem auto 1.2rem;
  max-width: 700px;
  padding: 1.4rem 1.2rem;
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 6px;
}
.checkout-pay-title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: #c9a84c;
  text-align: center;
}
.checkout-pay-hint {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}
.checkout-pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.checkout-pay-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem 1rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  color: #ddd;
  text-decoration: none;
  transition: all 0.12s;
  text-align: left;
}
.checkout-pay-card:hover {
  border-color: #c9a84c;
  transform: translateY(-1px);
  background: #1f1f1f;
}
.checkout-pay-card-primary {
  border-color: #c9a84c;
  background: rgba(201, 168, 76, 0.1);
}
.checkout-pay-card-primary:hover {
  background: rgba(201, 168, 76, 0.18);
}
.checkout-pay-card-icon {
  width: 48px;
  height: 48px;
  background: #0a0a0a;
  border: 1px solid #c9a84c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #c9a84c;
  font-size: 0.95rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.checkout-pay-card-primary .checkout-pay-card-icon {
  background: #c9a84c;
  color: #000;
}
.checkout-pay-card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #ededed;
  margin-bottom: 0.15rem;
}
.checkout-pay-card-sub {
  font-size: 0.78rem;
  color: #999;
  line-height: 1.35;
}
@media (max-width: 600px) {
  .checkout-pay-grid { grid-template-columns: 1fr; }
}
