@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  background-color: #f8f8f8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Announcement Bar */
.announcement-bar {
  background: #000;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 0;
  text-align: center;
}
.announcement-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.region-selector {
  background: transparent;
  color: #fff;
  border: none;
  outline: none;
  text-transform: uppercase;
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
}

/* Header */
.checkout-header {
  background: #ffffff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.checkout-logo {
  font-size: 26px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  letter-spacing: 0.03em;
}
.checkout-header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  color: #888;
}
.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #888;
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
}
.back-link:hover { color: #000; }
.back-text-mobile { display: none; }
.header-cart-icon {
  position: relative;
}
.header-cart-icon i { font-size: 20px; color: #000; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #000;
  color: #fff;
  font-size: 9px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
}

/* Stepper */
.stepper {
  max-width: 600px;
  margin: 2rem auto 1.5rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s;
}
.step-circle.active {
  background: #000;
  color: #fff;
}
.step-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  transition: color 0.3s;
}
.step.active .step-label { color: #000; }
.step-line {
  height: 2px;
  flex: 1;
  max-width: 80px;
  min-width: 30px;
  background: #e5e7eb;
  margin: 0 12px;
  margin-bottom: 20px;
  transition: background 0.3s;
}
.step-line.done {
  background: #000;
}

/* Main Layout */
.checkout-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  flex: 1;
}

/* Sections */
.checkout-left { min-width: 0; }
.checkout-section {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eee;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-number {
  width: 28px;
  height: 28px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

/* Animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease forwards; }

/* Cart Items */
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  background: #f5f5f5;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-brand {
  font-size: 10px;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-meta {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.remove-item-btn {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
  padding: 0;
}
.remove-item-btn:hover { color: #ef4444; }
.qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  transition: background 0.2s;
}
.qty-btn:hover { background: #f5f5f5; }
.qty-value {
  width: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

/* Empty Cart */
.empty-cart {
  text-align: center;
  padding: 3rem 1rem;
}
.empty-cart-icon {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 12px;
}
.empty-cart-text {
  font-size: 14px;
  color: #999;
  font-weight: 500;
  margin-bottom: 16px;
}

/* Cart Actions */
.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}
.clear-cart-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.clear-cart-btn:hover { color: #ef4444; }

/* Forms & Inputs */
.floating-input {
  position: relative;
  margin-bottom: 16px;
}
.floating-input input,
.floating-input select {
  width: 100%;
  padding: 22px 14px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  background-color: #ffffff;
  color: #000000;
  transition: all 0.2s ease;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
}
.floating-input input:focus,
.floating-input select:focus {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}
.floating-input label {
  position: absolute;
  top: 16px;
  left: 15px;
  font-size: 15px;
  color: #888;
  pointer-events: none;
  transition: all 0.2s ease;
}
.floating-input input:focus ~ label,
.floating-input input:not(:placeholder-shown) ~ label,
.floating-input select:focus ~ label,
.floating-input select:valid ~ label,
.floating-input select:not(:empty) ~ label {
  top: 6px;
  font-size: 11px;
  color: #555;
  font-weight: 500;
}
.floating-input textarea:focus ~ label,
.floating-input textarea:not(:placeholder-shown) ~ label {
  top: 6px;
  font-size: 11px;
  color: #555;
  font-weight: 500;
}
.floating-input textarea:focus {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}
.input-row {
  display: flex;
  gap: 16px;
}
.input-row > div { flex: 1; }

/* Shipping Methods */
.shipping-methods { margin-top: 1.5rem; }
.shipping-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 12px;
}
.radio-card {
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.radio-card.selected {
  border-color: #000;
  background: #fafafa;
}
.radio-card input[type=radio] {
  accent-color: #000;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.radio-card-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.radio-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.radio-card-desc {
  font-size: 12px;
  color: #999;
  margin: 2px 0 0;
}
.shipping-price {
  font-size: 14px;
  font-weight: 700;
}
.shipping-price.free { color: #16a34a; }

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: inherit;
}
.btn-primary:hover { background-color: #222; }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: transparent;
  color: #000;
  border: 1px solid #ddd;
}
.btn-secondary:hover { background: #f5f5f5; }
.btn-whatsapp {
  background: #16a34a;
  margin-bottom: 10px;
}
.btn-whatsapp:hover { background: #15803d; }

.actions {
  display: flex;
  gap: 12px;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}
.actions button { flex: 1; }

/* Payment Methods */
.payment-methods {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.payment-option-clean {
  display: flex;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  background-color: #ffffff;
  transition: background-color 0.2s;
}
.payment-option-clean:last-child { border-bottom: none; }
.payment-option-clean input[type="radio"] {
  accent-color: #000;
  width: 18px;
  height: 18px;
  margin-right: 14px;
  flex-shrink: 0;
}
.payment-option-clean .icon {
  font-size: 22px;
  color: #333;
  margin-right: 14px;
}
.payment-option-clean .info p { margin: 0; }
.payment-option-clean .info .title {
  font-size: 15px;
  color: #000;
  font-weight: 500;
}

/* Delivery Summary */
.delivery-summary {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 1rem;
}
.delivery-summary-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 8px;
}
.delivery-summary-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}
.delivery-summary-detail {
  font-size: 13px;
  color: #666;
  margin: 0 0 2px;
}
.edit-link {
  background: none;
  border: none;
  color: #000;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  margin-top: 8px;
  padding: 0;
  transition: color 0.2s;
}
.edit-link:hover { color: #ef4444; }

/* Sidebar */
.checkout-sidebar {
  position: relative;
}
.sidebar-inner {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eee;
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.sidebar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}
.summary-items {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 4px;
}
.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.summary-item-img-wrap {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
  position: relative;
}
.summary-item-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.summary-item-qty-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: #666;
  color: #fff;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
}
.summary-item-info { flex: 1; min-width: 0; }
.summary-item-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.summary-item-price {
  font-size: 12px;
  color: #888;
  margin: 2px 0 0;
}

/* Summary Totals */
.summary-totals {
  border-top: 1px solid #f0f0f0;
  padding-top: 1rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}
.summary-row.summary-total {
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #000;
}
.shipping-free { color: #16a34a; font-weight: 600; }

/* Trust Badges */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 1.2rem;
  margin-top: 1.2rem;
}
.trust-badge i {
  font-size: 22px;
  color: #ccc;
  margin-bottom: 4px;
}
.trust-badge p {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin: 0;
}

/* WhatsApp Help */
.whatsapp-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #16a34a;
  color: #16a34a;
  padding: 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 1.2rem;
  transition: background 0.2s;
}
.whatsapp-help:hover { background: #f0fdf4; }
.whatsapp-help i { font-size: 16px; }

/* Success Overlay */
.success-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}
.success-overlay.show { display: flex; }
.success-content {
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.success-icon-wrap {
  width: 72px;
  height: 72px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.success-icon-wrap i {
  font-size: 36px;
  color: #16a34a;
}
.success-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}
.success-subtext {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}
.success-note {
  font-size: 12px;
  color: #999;
  margin-bottom: 2rem;
}
.success-details {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  margin-bottom: 1.5rem;
}
.success-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
}
.success-row span:first-child { color: #888; }
.success-row span:last-child { font-weight: 600; }
.account-details-box {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 1.5rem;
  text-align: left;
}
.account-details-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #856404;
  margin: 0 0 8px;
}
.account-details-number {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #856404;
  margin: 0;
  line-height: 1.6;
}
.account-details-name {
  font-size: 12px;
  color: #856404;
  margin: 4px 0 0;
}
.success-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Footer */
.checkout-footer {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}
.checkout-footer a {
  font-size: 12px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s;
}
.checkout-footer a:hover { color: #000; }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
  .checkout-main {
    grid-template-columns: 1fr;
  }
  .checkout-sidebar {
    order: -1;
  }
  .sidebar-inner {
    position: static;
  }
}
@media (max-width: 600px) {
  .checkout-header {
    padding: 0.8rem 1rem;
  }
  .checkout-section {
    padding: 1.5rem;
  }
  .back-text { display: none; }
  .back-text-mobile { display: inline; }
  .input-row {
    flex-direction: column;
    gap: 0;
  }
  .stepper {
    margin: 1.5rem auto 1rem;
  }
}
