@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:       #0f0f13;
  --surface:  #18181f;
  --surface2: #1f1f28;
  --border:   rgba(255,255,255,0.07);
  --accent:   #e8c97e;
  --accent2:  #b8975a;
  --text:     #f0ede8;
  --muted:    #7a7880;
  --danger:   #c0524a;
  --radius:   16px;
  --shadow:   0 24px 60px rgba(0,0,0,0.5);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  margin: 0;
}

/* ══ SPLIT LAYOUT ══ */
.checkout-split { display: flex; min-height: calc(100vh - 70px); }

.split-left  { flex: 1 1 55%; background: var(--bg); border-right: 1px solid var(--border); overflow-y: auto; }
.split-right { flex: 0 0 45%; background: var(--surface); overflow-y: auto; }

.split-inner { padding: 48px 40px; max-width: 520px; }
.split-left  .split-inner { margin-left: auto; }
.split-right .split-inner { margin-right: auto; }

/* ── Section label ── */
.section-label {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 600; color: var(--text);
  margin-bottom: 32px;
}

.section-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: grid; place-items: center; font-size: 16px; flex-shrink: 0;
}

/* ══ PRODUCT LIST ══ */
.product-list { display: flex; flex-direction: column; gap: 4px; }

.product-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  animation: fadeUp 0.4s ease both;
}
.product-row:last-child { border-bottom: none; }

.product-thumb {
  width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
  flex-shrink: 0; background: var(--surface2); border: 1px solid var(--border);
  display: grid; place-items: center;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.product-thumb:hover img { transform: scale(1.08); }
.thumb-placeholder { font-size: 24px; opacity: 0.5; }

.product-info { flex: 1; min-width: 0; }
.product-name { font-weight: 500; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.product-original { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.product-badge {
  font-size: 10px; font-weight: 700;
  background: rgba(232,201,126,0.15); color: var(--accent);
  border: 1px solid rgba(232,201,126,0.25);
  border-radius: 20px; padding: 1px 7px; letter-spacing: 0.04em;
}
.product-unit { font-size: 12px; color: var(--muted); font-weight: 300; }

.product-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

/* Qty controls */
.qty-controls {
  display: flex; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.qty-btn2 {
  background: transparent; border: none; color: white;
  font-size: 16px; font-weight: 600; width: 30px; height: 28px;
  cursor: pointer; display: grid; place-items: center;
  transition: background 0.15s, color 0.15s; line-height: 1;
}
.qty-btn2:hover { background: rgba(232,201,126,0.12); color: var(--accent); }
.qty-number {
  font-size: 13px; font-weight: 600; min-width: 24px; text-align: center;
  padding: 0 2px; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  line-height: 28px;
}
.product-subtotal { font-weight: 600; font-size: 14px; color: var(--text); }

/* Remove button */
.remove-btn {
  background: transparent; border: 1px solid rgba(192,82,74,0.25);
  border-radius: 7px; color: var(--muted);
  width: 28px; height: 28px; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s; padding: 0;
}
.remove-btn:hover { background: rgba(192,82,74,0.15); border-color: rgba(192,82,74,0.5); color: #e07b7b; }

/* Empty cart */
.empty-cart { text-align: center; padding: 40px 0; color: var(--muted); }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-cart p { font-size: 14px; margin: 0 0 14px; }
.back-link {
  font-size: 13px; color: var(--accent2); text-decoration: none;
  border-bottom: 1px solid rgba(184,151,90,0.3); padding-bottom: 2px; transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* ══ TOTALS ══ */
.totals-block {
  background: var(--surface2); border-radius: 14px;
  padding: 20px 22px; margin-top: 24px; border: 1px solid var(--border);
}
.total-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; }
.grand-total { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.grand-total .label { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 600; color: var(--text); }
.grand-total .amount { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 600; color: var(--accent); }

/* ══ FORM ══ */
.checkout-form { display: flex; flex-direction: column; }

/* ── Two-column field row ── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-group { margin-bottom: 20px; }

.form-label {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}

.checkout-input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 16px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  box-sizing: border-box; transition: border-color 0.25s, box-shadow 0.25s; outline: none;
}
.checkout-input::placeholder { color: var(--muted); font-weight: 300; }
.checkout-input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(232,201,126,0.12); }

/* Summary */
.form-summary {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 16px;
  font-size: 13px; color: var(--muted);
}
.form-summary-amount { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 600; color: var(--accent); }

/* Button */
.checkout-btn {
  position: relative; width: 100%; padding: 16px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600;
  letter-spacing: 0.04em; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 100%);
  color: #0f0f13; border: none; cursor: pointer; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.checkout-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.checkout-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.25s;
}
.checkout-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(184,151,90,0.35); }
.checkout-btn:hover:not(:disabled)::before { opacity: 1; }
.checkout-btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }

/* Secure badge */
.secure-badge { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.secure-badge svg { color: var(--accent2); }

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
  .checkout-split { flex-direction: column; min-height: unset; }
  .split-left { border-right: none; border-bottom: 1px solid var(--border); }
  .split-right { flex: unset; }
  .split-inner { padding: 32px 20px; max-width: 100%; margin: 0; }
  .field-row { grid-template-columns: 1fr; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.split-left  .split-inner { animation: fadeUp 0.45s ease both; }
.split-right .split-inner { animation: fadeUp 0.45s 0.1s ease both; }