:root {
  --md-primary: #6200ee;
  --md-primary-light: #9d46ff;
  --md-primary-dark: #0a00b6;
  --md-secondary: #03dac5;
  --md-background: #f5f5f5;
  --md-surface: #ffffff;
  --md-error: #b00020;
  --md-on-primary: #ffffff;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0px 2px 5px rgba(0, 0, 0, 0.1);
  --shadow-md: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

/* body {
  background: var(--md-background);
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 20px;
  color: #202124;
} */

.checkout-container {
  max-width: 900px;
  margin: 0 auto;
  /* background: var(--md-surface); */
  padding: 32px 40px;
  border-radius: 8px;
  /* box-shadow: var(--shadow-md); */
  transition: box-shadow var(--transition);
}

/* .checkout-container:hover {
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.2);
} */

/* Material Progress Steps */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-top: 40px;
}

.progress-steps .step {
  position: relative;
  width: 30%;
  padding: 12px 10px;
  cursor: default;
  text-align: center;
  color: #757575;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid #e0e0e0;
  transition: color var(--transition), border-color var(--transition);
}

.progress-steps .step.active {
  color: var(--md-primary);
  border-bottom: 2px solid var(--md-primary);
}

.progress-steps .step::before {
  content: attr(data-step);
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--md-surface);
  border-radius: 50%;
  line-height: 28px;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid #e0e0e0;
  color: #9e9e9e;
  transition: border-color var(--transition), color var(--transition);
}

.progress-steps .step.active::before {
  background: var(--md-primary);
  color: var(--md-on-primary);
  border-color: var(--md-primary);
}

/* Step Content */
.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

/* Address Card */
.address-card {
  background: var(--md-surface);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  border-radius: 10px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: box-shadow var(--transition);
}

.address-card.active,
.address-card:hover {
  box-shadow: 0 4px 20px rgba(98, 0, 238, 0.35);
  border-left: 5px solid var(--md-primary);
}

.address-card p {
  margin: 4px 0;
}

/* Buttons */
.btn {
  background: var(--md-primary);
  color: var(--md-on-primary);
  border: none;
  border-radius: 28px;
  padding: 12px 28px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  /* box-shadow: 0 3px 8px rgba(98, 0, 238, 0.3); */
  transition: background var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.btn:disabled,
.btn[disabled] {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
}

/* Coupon */
.coupon-input {
  width: 100%;
  max-width: 280px;
  padding: 12px 18px;
  border-radius: 28px;
  border: 1.5px solid #ddd;
  font-size: 16px;
  margin-right: 10px;
  transition: border-color var(--transition);
}

.coupon-input:focus {
  outline: none;
  border-color: var(--md-primary);
  box-shadow: 0 0 8px var(--md-primary-light);
}

/* Recommendations */
.recommendations {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}

.recommendation-card {
  flex: 1 1 calc(50% - 18px);
  background: var(--md-surface);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition);
  font-weight: 600;
  text-align: center;
}

.recommendation-card:hover {
  box-shadow: 0 8px 16px rgba(98, 0, 238, 0.2);
}

/* Radio Buttons */
label.radio-option {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-radius: 28px;
  background: var(--md-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  margin-bottom: 12px;
  user-select: none;
  transition: box-shadow var(--transition), background var(--transition);
}

label.radio-option:hover {
  box-shadow: 0 8px 16px rgba(98, 0, 238, 0.15);
}

label.radio-option input[type="radio"] {
  margin-right: 16px;
  width: 18px;
  height: 18px;
  accent-color: var(--md-primary);
}

label.radio-option input[type="radio"]:checked+span {
  font-weight: 800;
}



/* Checkout Navigation */
.checkout-nav {
  margin-top: 36px;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(32, 33, 36, 0.6);
  z-index: 10000;
}

/* Modal */
.modal {
  background: var(--md-surface);
  padding: 32px 36px;
  border-radius: 12px;
  width: 430px;
  max-width: 90vw;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  max-height: 80vh;
  font-weight: 500;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 24px;
}

/* Address selector cards */
.address-list {
  max-height: 320px;
  overflow-y: auto;
}

.address-card.selectable {
  cursor: pointer;
  padding: 18px 24px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--md-surface);
}

.address-card.selectable.active {
  border-color: var(--md-primary);
  box-shadow: 0 0 12px var(--md-primary);
}

.address-card.selectable:hover {
  box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 600px) {
  .checkout-container {
    padding: 24px 20px;
  }

  .progress-steps .step {
    font-size: 12px;
  }

  .progress-steps .step::before {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
    top: -25px;
  }

  .recommendations {
    gap: 10px;
  }

  .recommendation-card {
    flex: 1 1 100%;
  }

  .modal {
    width: 95vw;
    padding: 28px 20px;
  }
}


.order-summary {
  background: var(--md-surface);
  padding: 20px 24px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  margin-top: 25px;
  max-width: 400px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 8px;
}

.summary-row.total {
  font-weight: 700;
  font-size: 18px;
  border-top: 2px solid var(--md-primary);
  padding-top: 12px;
}

.edit-address-btn {
  background: var(--md-primary);
  border: none;
  color: var(--md-on-primary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  float: right;
  cursor: pointer;
  transition: background 0.3s;
}

.edit-address-btn:hover {
  background: var(--md-primary-light);
}



.payment-summary-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.payment-methods-section,
.order-summary {
  background: var(--md-surface);
  padding: 24px 28px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  flex: 1 1 400px;
  max-width: 400px;
}

.payment-methods-section h4,
.order-summary h4 {
  margin-top: 0;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 22px;
}

.payment-methods-section label {
  display: flex;
  align-items: center;
  font-size: 16px;
  margin-bottom: 14px;
  cursor: pointer;
  user-select: none;
  gap: 10px;
}

.payment-methods-section input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--md-primary, #6200ee);
}

/* Responsive: stack vertically on mobile */
@media (max-width: 768px) {
  .payment-summary-container {
    flex-direction: column;
  }

  .payment-methods-section,
  .order-summary {
    max-width: 100%;
    margin-bottom: 20px;
  }
}

/* Modern Checkout Styles - Scoped with chk- prefix */
#chk-scope-wrapper {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1f2937;
  line-height: 1.5;
  box-sizing: border-box;
  background-color: #f9fafb;
  min-height: 100vh;
  padding: 40px 20px;
}

#chk-scope-wrapper * {
  box-sizing: border-box;
}

.chk-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 900px) {
  .chk-container {
    grid-template-columns: 1fr;
  }
}

h2.chk-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chk-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #e5e7eb;
}

.chk-address-box {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  background-color: #fff;
  transition: all 0.2s;
}

.chk-address-list-container {
  display: none;
  margin-top: 10px;
}

.chk-address-list-container.show {
  display: block;
}

.chk-address-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background-color: white;
}

.chk-address-option:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.chk-address-option.selected {
  border-color: #4f46e5;
  background-color: #eef2ff;
  box-shadow: 0 0 0 1px #4f46e5;
}

.chk-add-new-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: transparent;
  color: #4f46e5;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  margin-top: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}

.chk-add-new-btn:hover {
  border-color: #4f46e5;
  background-color: #eef2ff;
}

.chk-address-details strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: #111827;
}

.chk-address-details p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chk-action-link {
  color: #4f46e5;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.chk-action-link:hover {
  color: #4338ca;
}

.chk-product-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}

.chk-product-item:first-child {
  padding-top: 0;
}

.chk-product-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.chk-prod-img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background-color: #f3f4f6;
}

.chk-prod-info {
  flex: 1;
}

.chk-prod-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 4px;
  display: block;
}

.chk-prod-meta {
  color: #6b7280;
  font-size: 0.85rem;
}

.chk-prod-price {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.chk-payment-option {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.chk-payment-option:hover {
  border-color: #d1d5db;
}

.chk-payment-option.active {
  border-color: #4f46e5;
  background-color: #eef2ff;
  box-shadow: 0 0 0 1px #4f46e5;
}

.chk-radio {
  margin-top: 3px;
  margin-right: 12px;
  accent-color: #4f46e5;
  width: 16px;
  height: 16px;
}

.chk-summary-panel {
  position: sticky;
  top: 20px;
}

.chk-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: #4b5563;
}

.chk-row.total {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 16px;
  font-weight: 600;
  font-size: 1.125rem;
  color: #111827;
}

.chk-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.chk-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chk-btn {
  background-color: #111827;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
  font-size: 0.95rem;
  font-family: inherit;
}

.chk-btn:hover {
  background-color: #000000;
}

.chk-btn:disabled {
  background-color: #d1d5db;
  cursor: not-allowed;
}

.chk-btn-outline {
  background-color: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.chk-btn-outline:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.chk-btn-small {
  padding: 8px 14px;
  width: auto;
  font-size: 0.875rem;
}

.chk-badge {
  display: inline-block;
  background-color: #f3f4f6;
  color: #4b5563;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}

.chk-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.chk-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.chk-modal {
  background: white;
  padding: 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.chk-modal-overlay.open .chk-modal {
  transform: scale(1);
}

.chk-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chk-full-width {
  grid-column: span 2;
}

.chk-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.chk-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.chk-guest-notice {
  background-color: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: start;
  gap: 12px;
}

.chk-guest-notice p {
  margin: 0;
  color: #92400e;
  font-size: 0.9rem;
}

.chk-guest-notice a {
  color: #92400e;
  font-weight: 600;
  text-decoration: underline;
}