/* ============================================================
   MY MOBİ — Ultra Professional Dedicated Checkout CSS
   ============================================================ */

:root {
  --co-primary: #161922;
  --co-accent: #c59b6d;
  --co-accent-dark: #b08556;
  --co-accent-light: rgba(197, 155, 109, 0.12);
  --co-bg: #f8fafc;
  --co-card-bg: #ffffff;
  --co-border: #e2e8f0;
  --co-border-focus: #c59b6d;
  --co-text: #0f172a;
  --co-text-muted: #64748b;
  --co-success: #16a34a;
  --co-danger: #ef4444;
  --co-radius-sm: 8px;
  --co-radius-md: 14px;
  --co-radius-lg: 20px;
  --co-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--co-bg);
  color: var(--co-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ---- Checkout Minimal Header ---- */
.checkout-header {
  background: #ffffff;
  border-bottom: 1px solid var(--co-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.checkout-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.checkout-brand img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.checkout-security-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--co-success);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 6px 12px;
  border-radius: 20px;
}

.checkout-support-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--co-text);
  text-decoration: none;
  transition: color .2s;
}

.checkout-support-link:hover {
  color: var(--co-accent);
}

/* ---- Progress Step Indicator ---- */
.checkout-steps-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--co-border);
  padding: 14px 0;
}

.checkout-steps-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.checkout-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--co-text-muted);
  cursor: default;
  transition: all .2s;
  position: relative;
  z-index: 2;
}

.checkout-step-item.active {
  color: var(--co-text);
  font-weight: 700;
}

.checkout-step-item.done {
  color: var(--co-success);
}

.checkout-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--co-text-muted);
  transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-step-item.active .checkout-step-num {
  background: var(--co-primary);
  border-color: var(--co-primary);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(22, 25, 34, 0.15);
}

.checkout-step-item.done .checkout-step-num {
  background: var(--co-success);
  border-color: var(--co-success);
  color: #ffffff;
}

.checkout-step-divider {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 12px;
  position: relative;
  z-index: 1;
}

.checkout-step-divider.filled {
  background: var(--co-success);
}

/* ---- Main Checkout Layout ---- */
.checkout-main-wrap {
  max-width: 1240px;
  margin: 28px auto 80px;
  padding: 0 20px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: start;
}

/* ---- Step Panes (Left Column) ---- */
.checkout-card {
  background: var(--co-card-bg);
  border: 1px solid var(--co-border);
  border-radius: var(--co-radius-lg);
  padding: 32px;
  box-shadow: var(--co-shadow);
  margin-bottom: 24px;
}

.checkout-card-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.checkout-card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--co-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-card-subtitle {
  font-size: 13px;
  color: var(--co-text-muted);
  margin-top: 4px;
}

/* Form Controls */
.co-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.co-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.co-form-group:last-child {
  margin-bottom: 0;
}

.co-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.co-label span.req {
  color: var(--co-danger);
}

.co-input, .co-select, .co-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--co-border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--co-text);
  font-size: 14px;
  outline: none;
  transition: all .2s;
  font-family: inherit;
}

.co-input:focus, .co-select:focus, .co-textarea:focus {
  border-color: var(--co-border-focus);
  box-shadow: 0 0 0 3.5px rgba(197, 155, 109, 0.15);
}

/* Dynamic Live Shipping Notice Box */
.co-shipping-notice-box {
  background: linear-gradient(135deg, rgba(197, 155, 109, 0.12) 0%, rgba(197, 155, 109, 0.03) 100%);
  border: 1.5px solid rgba(197, 155, 109, 0.35);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.co-shipping-notice-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.co-shipping-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.co-shipping-badge {
  font-size: 18px;
  font-weight: 900;
  color: var(--co-accent-dark);
  text-align: right;
  flex-shrink: 0;
}

/* Payment Method Cards */
.co-payment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.co-payment-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #ffffff;
  border: 2px solid var(--co-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.co-payment-card:hover {
  border-color: #cbd5e1;
  background: #fdfbf8;
}

.co-payment-card.selected {
  border-color: var(--co-accent);
  background: #fdfaf6;
  box-shadow: 0 4px 14px rgba(197, 155, 109, 0.15);
}

.co-payment-card input[type="radio"] {
  accent-color: var(--co-accent);
  width: 20px;
  height: 20px;
}

.co-payment-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
}

/* Installment Table */
.co-installment-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}

.co-installment-table th, .co-installment-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.co-installment-table th {
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
}

.co-installment-table tr:hover {
  background: #f8fafc;
}

/* Buttons */
.co-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-decoration: none;
  font-family: inherit;
}

.co-btn-primary {
  background: linear-gradient(135deg, #161922 0%, #242938 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 25, 34, 0.25);
}

.co-btn-primary:hover {
  background: linear-gradient(135deg, var(--co-accent) 0%, var(--co-accent-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(197, 155, 109, 0.35);
}

.co-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.co-btn-secondary:hover {
  background: #e2e8f0;
}

/* ---- Sticky Order Summary Sidebar (Right Column) ---- */
.checkout-sidebar-sticky {
  position: sticky;
  top: 90px;
}

.co-summary-card {
  background: var(--co-card-bg);
  border: 1px solid var(--co-border);
  border-radius: var(--co-radius-lg);
  padding: 24px;
  box-shadow: var(--co-shadow);
}

.co-summary-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.co-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 20px;
}

.co-item-row {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.co-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.co-item-info {
  flex: 1;
  min-width: 0;
}

.co-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--co-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-item-meta {
  font-size: 11.5px;
  color: var(--co-text-muted);
  margin-top: 2px;
}

.co-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--co-text);
  margin-top: 4px;
}

/* Coupon Box */
.co-coupon-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: #f8fafc;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.co-coupon-input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
  outline: none;
}

.co-coupon-btn {
  padding: 0 16px;
  background: var(--co-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* Summary Totals */
.co-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #475569;
  margin-bottom: 10px;
}

.co-totals-row.grand-total {
  font-size: 18px;
  font-weight: 900;
  color: var(--co-text);
  border-top: 2px dashed #e2e8f0;
  padding-top: 14px;
  margin-top: 14px;
}

.co-totals-row.grand-total span.price {
  color: var(--co-accent-dark);
  font-size: 22px;
}

/* ---- Success Screen ---- */
.co-success-card {
  text-align: center;
  padding: 48px 32px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--co-border);
  box-shadow: var(--co-shadow);
  max-width: 720px;
  margin: 0 auto;
}

.co-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.2);
}

.co-success-orderno-badge {
  display: inline-block;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  padding: 8px 24px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 800;
  color: var(--co-primary);
  margin: 16px 0 24px;
  letter-spacing: 1px;
}

/* Timeline */
.co-timeline {
  display: flex;
  justify-content: space-between;
  margin: 32px 0;
  position: relative;
}

.co-timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: #e2e8f0;
  z-index: 1;
}

.co-timeline-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--co-text-muted);
}

.co-timeline-step.active {
  color: var(--co-success);
}

.co-timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.co-timeline-step.active .co-timeline-dot {
  border-color: var(--co-success);
  background: #dcfce7;
  color: var(--co-success);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS (Mobile & Tablet)
   ============================================================ */

@media (max-width: 1024px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .checkout-sidebar-sticky {
    position: static;
  }
}

@media (max-width: 768px) {
  .checkout-header-inner {
    padding: 0 14px;
  }
  .checkout-brand img {
    height: 36px;
  }
  .checkout-security-badge {
    font-size: 11px;
    padding: 4px 8px;
  }
  .checkout-support-link {
    display: none;
  }
  .checkout-steps-container {
    padding: 0 12px;
  }
  .checkout-step-item span.step-title {
    display: none;
  }
  .checkout-main-wrap {
    margin: 16px auto 60px;
    padding: 0 12px;
  }
  .checkout-card {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .co-form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .co-shipping-notice-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .co-shipping-badge {
    text-align: left;
    font-size: 16px;
  }
  .co-btn {
    width: 100%;
  }
}
