/* ================================================
   davetli.co — Checkout & Teşekkürler sayfası
   ================================================ */

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #FDF8F3;
  --cream-mid:  #F5E6D3;
  --cream-dark: #ebe6dd;
  --sand:       #D4B896;
  --gold:       #d4a574;
  --gold-dark:  #b8865a;
  --dark:       #2c2420;
  --ink:        #1a1410;
  --muted:      #7a6a5e;
  --error:      #c0392b;
  --success:    #2d7a4f;
  --radius:     8px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Montserrat', system-ui, sans-serif;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Nav ──────────────────────────────────────── */
.co-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--cream-dark);
  background: var(--cream);
}

.co-nav__brand {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.co-nav__brand em { font-style: italic; color: var(--gold-dark); }

.co-nav__back {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.co-nav__back:hover { color: var(--ink); }

/* ── Page wrapper ─────────────────────────────── */
.checkout-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ── Stepper ──────────────────────────────────── */
.checkout-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 28px 0 32px;
}

.stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.35;
  transition: opacity .2s;
}
.stepper__item.is-active  { opacity: 1; }
.stepper__item.is-done    { opacity: 0.7; }

.stepper__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
  transition: background .2s, border-color .2s;
}
.stepper__item.is-active .stepper__num {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--cream);
}
.stepper__item.is-done .stepper__num {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--cream);
}

.stepper__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.stepper__sep {
  width: 48px;
  height: 1px;
  background: var(--cream-dark);
  margin-bottom: 18px;
  flex-shrink: 0;
}
@media (max-width: 480px) { .stepper__sep { width: 24px; } }

/* ── Section title ────────────────────────────── */
.co-section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 6px;
}
.co-section-title em { font-style: italic; color: var(--gold-dark); }
.co-section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ── Step panel ───────────────────────────────── */
.checkout-step { display: none; }
.checkout-step.is-visible { display: block; }

/* ── Template preview card ────────────────────── */
.template-preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  margin-bottom: 24px;
  background: white;
}

.template-preview-card__img {
  width: 56px;
  height: 84px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--cream-mid);
}

.template-preview-card__info { flex: 1; min-width: 0; }
.template-preview-card__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.template-preview-card__name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.template-preview-card__change {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.template-preview-card__change:hover { text-decoration: underline; }

/* ── Package grid ─────────────────────────────── */
.package-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 480px) { .package-grid { grid-template-columns: 1fr; } }

.package-card {
  position: relative;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: white;
}
.package-card:has(input:checked) {
  border-color: var(--dark);
  background: #fdfaf6;
}
.package-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.package-card__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--gold-dark);
  border-radius: 3px;
  padding: 2px 7px;
  margin-bottom: 8px;
}

.package-card__name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 2px;
}
.package-card__price {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.package-card__price span { font-size: 14px; font-weight: 400; color: var(--muted); }

.package-card__list {
  list-style: none;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.package-card__list li::before { content: '✓  '; color: var(--gold-dark); }

.package-card__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--cream-dark);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}
.package-card:has(input:checked) .package-card__check {
  background: var(--dark);
  border-color: var(--dark);
}
.package-card__check::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  opacity: 0;
  transition: opacity .15s;
}
.package-card:has(input:checked) .package-card__check::after { opacity: 1; }

/* ── Addons ───────────────────────────────────── */
.addons-section {
  margin-bottom: 28px;
}
.addons-section__title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.addons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 480px) { .addons-grid { grid-template-columns: 1fr; } }

.addon-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  cursor: pointer;
  background: white;
  transition: border-color .15s;
}
.addon-chip:has(input:checked) { border-color: var(--gold); background: #fdfaf6; }

.addon-chip input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--dark);
  flex-shrink: 0;
}
.addon-chip__name {
  font-size: 12px;
  color: var(--ink);
  flex: 1;
}
.addon-chip__price {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Price summary ────────────────────────────── */
.price-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid var(--cream-dark);
  margin-bottom: 20px;
}
.price-summary__label { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.price-summary__total { font-size: 24px; font-weight: 700; color: var(--ink); }

/* ── Buttons ──────────────────────────────────── */
.co-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, opacity .15s;
  text-decoration: none;
}
.co-btn--primary {
  background: var(--dark);
  color: var(--cream);
  border-color: var(--dark);
  width: 100%;
}
.co-btn--primary:hover { background: var(--ink); }
.co-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }

.co-btn--outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--dark);
}
.co-btn--outline:hover { background: var(--cream-dark); }

/* ── Form fields ──────────────────────────────── */
.co-form { display: flex; flex-direction: column; gap: 16px; }

.co-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.co-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.co-field input,
.co-field select,
.co-field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: white;
  transition: border-color .15s;
  outline: none;
  width: 100%;
}
.co-field input:focus,
.co-field select:focus,
.co-field textarea:focus { border-color: var(--dark); }
.co-field textarea { resize: vertical; min-height: 90px; }

.co-field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .co-field--row { grid-template-columns: 1fr; } }

/* KVKK consent */
.co-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}
.co-consent input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--dark); flex-shrink: 0; }
.co-consent a { color: var(--gold-dark); text-decoration: none; }
.co-consent a:hover { text-decoration: underline; }

/* ── Error / info banners ─────────────────────── */
.co-alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.co-alert.is-visible { display: block; }
.co-alert--error { background: #fdf0f0; color: var(--error); border: 1px solid #f5c6c6; }
.co-alert--info  { background: #f0f4fd; color: #2c4a8a; border: 1px solid #c6d4f5; }

/* ── Step 3: Payment container ────────────────── */
.payment-order-box {
  background: white;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}
.payment-order-box__label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.payment-order-box__code {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.payment-order-box__note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.payment-form-container {
  min-height: 200px;
  position: relative;
}
.payment-form-container .co-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Loading spinner ──────────────────────────── */
.co-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--cream-dark);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: co-spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes co-spin { to { transform: rotate(360deg); } }

/* ── Thank you page ───────────────────────────── */
.ty-hero {
  text-align: center;
  padding: 60px 0 48px;
}
.ty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 28px;
}
.ty-hero__title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 12px;
}
.ty-hero__title em { font-style: italic; color: var(--gold-dark); }
.ty-hero__sub { font-size: 14px; color: var(--muted); max-width: 400px; margin: 0 auto; line-height: 1.7; }

.ty-order-code-box {
  background: white;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-bottom: 32px;
}
.ty-order-code-box__label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.ty-order-code-box__code {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.ty-steps {
  background: white;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}
.ty-steps__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.ty-steps__list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ty-steps__item {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}
.ty-steps__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-dark);
  flex-shrink: 0;
}

.ty-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ty-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 4px;
  background: #25D366;
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s;
}
.ty-wa-btn:hover { background: #1da851; }

/* ── Footer strip ─────────────────────────────── */
.co-footer {
  text-align: center;
  padding: 32px 0 0;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--cream-dark);
  margin-top: 48px;
}
.co-footer a { color: var(--gold-dark); text-decoration: none; }

/* ── Error page ───────────────────────────────── */
.error-page {
  text-align: center;
  padding: 80px 0;
}
.error-page__icon { font-size: 48px; margin-bottom: 24px; }
.error-page__title {
  font-family: var(--font-serif);
  font-size: 32px;
  margin-bottom: 12px;
}
.error-page__sub { font-size: 14px; color: var(--muted); margin-bottom: 32px; }
