/* ============================================
   SHEOVATION - Checkout Page
   ============================================ */

/* Checkout body override */
body.page-checkout-template {
  background: #f5f2fc;
}

/* ---- Checkout Header ---- */
.checkout-header {
  background: var(--purple-dark);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.checkout-header .ch-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checkout-header .sheo-logo {
  color: var(--gold);
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.checkout-header .sheo-logo span { color: #fff; font-weight:400; }
.checkout-secure {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
}
.checkout-secure svg { width:14px;height:14px;color:var(--gold); }

/* ---- Progress Bar ---- */
.checkout-progress {
  background: white;
  border-bottom: 1px solid #e8e0f5;
  padding: 0;
}
.checkout-progress .cp-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
}
.cp-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #bbb;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}
.cp-step.active {
  color: var(--purple-accent);
  border-bottom-color: var(--purple-accent);
}
.cp-step.done {
  color: #22c55e;
  border-bottom-color: #22c55e;
}
.cp-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.cp-step.active .cp-num { background: var(--purple-accent); color: white; }
.cp-step.done .cp-num { background: #22c55e; color: white; }

/* ---- Main Layout ---- */
.checkout-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* ---- Order Summary (right side) ---- */
.order-summary {
  background: white;
  border-radius: 16px;
  padding: 28px;
  position: sticky;
  top: 90px;
  box-shadow: 0 4px 30px rgba(100,60,200,0.08);
}
.os-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F1EEF6;
}
.os-product {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #F1EEF6;
}
.os-product-img {
  width: 70px;
  height: 90px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #2A1525, #1a0a38);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.os-product-img img { width:100%;height:100%;object-fit:cover; }
.os-product-info {}
.os-product-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 4px;
}
.os-product-sub {
  font-size: 0.7rem;
  color: var(--text-gray);
  margin-bottom: 6px;
}
.os-product-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple-accent);
}
.os-rows {}
.os-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  margin-bottom: 10px;
  color: var(--text-gray);
}
.os-row strong { color: var(--text-dark); font-weight: 700; }
.os-row.total {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  padding-top: 12px;
  margin-top: 4px;
  border-top: 2px solid #F1EEF6;
}
.os-row.total .price-big {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--purple-accent);
}
.os-free-shipping {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0fff4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #15803d;
  margin-top: 16px;
}
.os-free-shipping svg { width:14px;height:14px;color:#15803d; }
.os-trust {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.os-trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  color: var(--text-gray);
}
.os-trust-item svg { width:13px;height:13px;color:var(--purple-accent); }

/* ---- Left Form Area ---- */
.checkout-form-area {}

/* ---- Step Cards ---- */
.step-card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: 0 4px 30px rgba(100,60,200,0.06);
  transition: box-shadow 0.3s;
}
.step-card:hover { box-shadow: 0 6px 40px rgba(100,60,200,0.1); }

.step-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.step-card-num {
  width: 32px;
  height: 32px;
  background: var(--purple-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}
.step-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
}

/* ---- Form Fields ---- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.form-row.full { grid-template-columns: 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group label .required {
  color: var(--purple-accent);
  margin-left: 2px;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0d8f0;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  color: var(--text-dark);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--purple-accent);
  box-shadow: 0 0 0 3px rgba(92,32,88,0.1);
}
.form-control.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.field-error {
  font-size: 0.67rem;
  color: #ef4444;
  margin-top: 3px;
  font-weight: 600;
  display: none;
}
.field-error.show { display: block; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ---- Payment Stage ---- */
#payment-stage { display: none; }
#payment-stage.visible { display: block; }

/* iyzico form container */
#iyzipay-checkout-form {
  min-height: 400px;
}
#iyzipay-checkout-form iframe {
  border: none !important;
  width: 100% !important;
}

.payment-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  gap: 16px;
}
.payment-loading .spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #F1EEF6;
  border-top-color: var(--purple-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.payment-loading p {
  font-size: 0.84rem;
  color: var(--text-gray);
  font-weight: 600;
}

/* iyzico güven rozetleri */
.iyzico-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #F1EEF6;
}
.iyzico-trust img { height: 24px; opacity: 0.7; }
.iyzico-trust span {
  font-size: 0.65rem;
  color: #aaa;
  font-weight: 600;
  text-align: center;
}
.iyzico-powered {
  text-align: center;
  font-size: 0.65rem;
  color: #bbb;
  margin-top: 10px;
}
.iyzico-powered strong { color: #888; }

/* ---- Submit / CTA ---- */
.btn-checkout {
  width: 100%;
  background: linear-gradient(135deg, var(--purple-accent) 0%, #7A3575 100%);
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  transition: transform 0.18s, box-shadow 0.22s, background 0.22s;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.btn-checkout::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
}
.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(92,32,88,0.45);
}
.btn-checkout:active { transform: translateY(0); }
.btn-checkout svg { width:20px;height:20px;position:relative;z-index:1; }
.btn-checkout span { position:relative;z-index:1; }
.btn-checkout.loading { pointer-events: none; opacity: 0.8; }

/* Sub-text below button */
.btn-subtext {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-gray);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.btn-subtext svg { width:12px;height:12px;color:var(--green-check); }

/* ---- Urgency Bar ---- */
.urgency-bar {
  background: linear-gradient(90deg, #5C2058, #7A3575);
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.urgency-bar span { color: var(--gold-light); }

/* ---- Error Alert ---- */
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.82rem;
  color: #991b1b;
  font-weight: 600;
  display: none;
  margin-bottom: 16px;
  align-items: center;
  gap: 10px;
}
.alert-error.show { display: flex; }
.alert-error svg { width:18px;height:18px;flex-shrink:0; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .checkout-wrap {
    grid-template-columns: 1fr;
    padding: 20px 16px 50px;
  }
  .order-summary { position: static; order: -1; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr 1fr; }
}
