/* ================================================================
   checkout-redesign.css
   IndiansBazar — Redesigned 4-Step Checkout Flow
   Compatible with indiancorner-frontend-theme.css
   ================================================================ */

/* ── Variables (inherit from theme) ─────────────────────────────── */
:root {
  --ck-primary:       var(--ic-orange, #e8621a);
  --ck-primary-dark:  var(--ic-orange-dark, #c94e0d);
  --ck-done:          var(--ic-green, #3a7a1e);
  --ck-inactive:      #c8c0b8;
  --ck-line:          #e0d8d0;
  --ck-text:          var(--ic-brown, #4a2c0a);
  --ck-text-muted:    var(--ic-gray, #6b5a4e);
  --ck-bg:            var(--ic-cream, #fdf6ed);
  --ck-card-bg:       #ffffff;
  --ck-radius:        10px;
  --ck-shadow:        0 2px 12px rgba(74,44,10,0.10);
  --ck-step-size:     34px;
}

/* ================================================================
   STEP INDICATOR
   ================================================================ */
.ic-checkout-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  padding: 16px 0 8px;
}

.ic-checkout-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  text-decoration: none !important;
  color: var(--ck-inactive) !important;
  transition: color 0.2s;
}

/* connecting line */
.ic-checkout-step:not(.last) .ic-step-connector {
  position: absolute;
  top: calc(var(--ck-step-size) / 2);
  left: calc(50% + var(--ck-step-size) / 2 + 4px);
  right: calc(-50% + var(--ck-step-size) / 2 + 4px);
  height: 2px;
  background: var(--ck-line);
  z-index: 0;
  transition: background 0.3s;
}
.ic-checkout-step.last .ic-step-connector { display: none; }

/* step circle */
.ic-step-circle {
  width: var(--ck-step-size);
  height: var(--ck-step-size);
  border-radius: 50%;
  border: 2px solid var(--ck-inactive);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ck-inactive);
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}

/* step label */
.ic-step-label {
  margin-top: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ck-inactive);
  transition: color 0.3s;
}

/* ── Completed state ── */
.ic-checkout-step.completed .ic-step-circle {
  border-color: var(--ck-primary);
  background: var(--ck-primary);
  color: #fff;
}
.ic-checkout-step.completed .ic-step-label {
  color: var(--ck-text) !important;
}
.ic-checkout-step.completed .ic-step-connector {
  background: var(--ck-primary);
}
.ic-checkout-step.completed .ic-step-circle i {
  font-size: 12px;
  color: #fff;
}

/* ── Current/active state ── */
.ic-checkout-step.current .ic-step-circle {
  border-color: var(--ck-primary);
  background: #fff;
  color: var(--ck-primary);
  box-shadow: 0 0 0 4px rgba(232,98,26,0.15);
}
.ic-checkout-step.current .ic-step-label {
  color: var(--ck-primary) !important;
  font-weight: 700;
}

/* ── Hover on clickable steps ── */
.ic-checkout-step.completed:hover .ic-step-circle {
  background: var(--ck-primary-dark);
  border-color: var(--ck-primary-dark);
}

/* Mobile tweaks */
@media (max-width: 480px) {
  --ck-step-size: 28px;
  .ic-step-label { font-size: 9px; }
  .ic-step-circle { font-size: 11px; }
}

/* ================================================================
   ORDER SUMMARY SIDEBAR
   ================================================================ */
.ic-order-summary {
  background: #fff;
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius);
  box-shadow: var(--ck-shadow);
  padding: 20px;
}

/* Coupon offers bar */
.ic-coupon-bar {
  padding: 10px 14px;
  background: rgba(58,122,30,0.06);
  border: 1px solid rgba(58,122,30,0.15);
  border-radius: 8px;
}

/* Summary rows */
.ic-summary-rows { margin-bottom: 4px; }

.ic-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--ck-line);
}
.ic-summary-row:last-child { border-bottom: none; }

.ic-summary-label {
  font-size: 13px;
  color: var(--ck-text-muted);
  flex: 1;
  padding-right: 8px;
}

.ic-free-delivery-note {
  font-size: 11px;
  color: var(--ck-text-muted);
  margin-top: 2px;
  font-weight: 400;
}

.ic-summary-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-text);
  text-align: right;
  white-space: nowrap;
}

.ic-value-muted { color: var(--ck-text-muted) !important; font-weight: 400 !important; font-size: 12px !important; }
.ic-value-discount { color: var(--ck-done) !important; }

.ic-price-original {
  text-decoration: line-through;
  color: var(--ck-text-muted);
  font-weight: 400;
  margin-right: 4px;
  font-size: 12px;
}

/* Divider */
.ic-summary-divider {
  border: none;
  border-top: 2px solid var(--ck-line);
  margin: 12px 0;
}

/* Grand total */
.ic-grand-total-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0 8px;
}
.ic-grand-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ck-text);
}
.ic-tax-inc-note {
  font-size: 11px;
  font-weight: 400;
  color: var(--ck-text-muted);
  margin-top: 2px;
}
.ic-grand-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--ck-primary);
}

/* Delivery time */
.ic-delivery-time {
  font-size: 12px;
  color: var(--ck-text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ic-delivery-time i { color: var(--ck-primary); }

/* Savings banner */
.ic-savings-banner {
  background: #f0fae8;
  border: 1px solid rgba(58,122,30,0.25);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  font-size: 12px;
  color: #2d6016;
  line-height: 1.5;
}
.ic-savings-banner i { color: var(--ck-done); font-size: 14px; }

/* Coupon input */
.ic-coupon-input-wrap { }
.ic-coupon-input-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--ck-line);
  border-radius: 30px;
  overflow: hidden;
  padding-left: 12px;
  background: #fff;
  transition: border-color 0.2s;
}
.ic-coupon-input-group:focus-within {
  border-color: var(--ck-primary);
}
.ic-coupon-icon {
  color: var(--ck-text-muted);
  font-size: 15px;
  flex-shrink: 0;
}
.ic-coupon-field {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  flex: 1;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
}
.ic-coupon-apply-btn {
  background: var(--ck-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.ic-coupon-apply-btn:hover { background: var(--ck-primary-dark); }

/* Applied coupon */
.ic-coupon-applied {
  background: #f0fae8;
  border: 1px solid rgba(58,122,30,0.25);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.ic-coupon-remove {
  color: #c0392b !important;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;

}

/* Proceed button */
.ic-proceed-btn {
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 12px !important;
  letter-spacing: 0.3px;
}

/* Terms checkbox */
.ic-terms-check { font-size: 12px; color: var(--ck-text-muted); }

/* Loyalty note */
.ic-loyalty-note {
  text-align: center;
  font-size: 12px;
  color: var(--ck-text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ic-loyalty-note i { color: var(--ck-primary); }

/* ================================================================
   FORM FIELDS (Address Step)
   ================================================================ */
.ic-form-group { margin-bottom: 0; }

.ic-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-text);
  margin-bottom: 5px;
  display: block;
}

.ic-label-optional {
  font-weight: 400;
  color: var(--ck-text-muted);
  font-size: 12px;
}

.ic-section-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--ck-text);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ck-line);
  margin-bottom: 4px;
}

/* Override card body padding to match design */
.checkout_details .card.ic-card-clean,
.checkout_details .card.__card .card-body {
  padding: 20px 20px;
}

/* ================================================================
   PAYMENT PAGE — Two-panel layout
   ================================================================ */
.ic-payment-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border: 1px solid var(--ck-line);
  border-radius: var(--ck-radius);
  overflow: hidden;
  box-shadow: var(--ck-shadow);
}

@media (max-width: 576px) {
  .ic-payment-layout {
    grid-template-columns: 1fr;
  }
  .ic-payment-methods-panel {
    border-right: none !important;
    border-bottom: 1px solid var(--ck-line) !important;
  }
}

.ic-payment-methods-panel {
  background: var(--ck-bg) !important;
  border: none !important;
  border-right: 1px solid var(--ck-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ic-payment-description-panel {
  background: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ic-payment-method-item {
  border-bottom: 1px solid var(--ck-line);
  transition: background 0.15s;
}
.ic-payment-method-item:last-child { border-bottom: none; }
.ic-payment-method-item:hover { background: rgba(232,98,26,0.04); }
.ic-payment-method-item.ic-payment-active {
  background: rgba(232,98,26,0.08) !important;
}

.ic-payment-label {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}

.ic-payment-radio {
  width: 16px;
  height: 16px;
  accent-color: var(--ck-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.ic-payment-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-text);
  text-transform: capitalize;
  line-height: 1.3;
}

.ic-pay-now-btn {
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 12px !important;
}

.ic-bring-change {
  background: var(--ck-bg);
  border: 1px solid var(--ck-line);
  border-radius: 8px;
  padding: 12px 14px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 991px) {
  .checkout_details { padding-right: 0; }
  .ic-order-summary { margin-top: 16px; }
}

@media (max-width: 767px) {
  .ic-checkout-steps { padding: 12px 0 4px; }
  .ic-step-label { font-size: 10px; letter-spacing: 0; }
}
