/* Checkout demo — extended layout */
.checkout-page {
  background: linear-gradient(180deg, #f8f9fb 0%, #eef1f5 280px, #f0f2f5 100%);
  min-height: 100vh;
}

.checkout-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.checkout-header__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.checkout-header__logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #c41e1e !important;
  text-decoration: none !important;
}

.checkout-header__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a6570;
  padding: 0.25rem 0.5rem;
  background: #eef2f6;
  border-radius: 999px;
}

.checkout-header__nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.checkout-hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0.5rem;
  text-align: center;
}

.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
}

.checkout-steps__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.checkout-steps__item--done {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.checkout-steps__item--current {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
  box-shadow: 0 0 0 2px rgba(196, 30, 30, 0.12);
}

.checkout-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #e5e7eb;
  font-size: 0.7rem;
}

.checkout-steps__item--done .checkout-steps__num {
  background: #22c55e;
  color: #fff;
}

.checkout-steps__item--current .checkout-steps__num {
  background: #c41e1e;
  color: #fff;
}

.checkout-steps__line {
  width: 1.5rem;
  height: 2px;
  background: #d1d5db;
  border-radius: 1px;
}

.checkout-hero__title {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  color: #111827;
}

.checkout-hero__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.checkout-layout {
  display: grid;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 960px) {
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
  }
}

.checkout-main-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.checkout-aside {
  position: relative;
}

@media (min-width: 960px) {
  .checkout-aside {
    position: sticky;
    top: 1rem;
  }
}

.checkout-card {
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 1.35rem 1.4rem;
  background: #fff;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.checkout-card--product {
  padding: 0;
  overflow: hidden;
}

.checkout-card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  color: #111827;
}

.checkout-card__lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.45;
}

.optional {
  font-weight: 400;
  color: #9ca3af;
}

.checkout-notice {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #1e3a5f;
}

/* Product block */
.checkout-product {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem;
}

@media (min-width: 640px) {
  .checkout-product {
    grid-template-columns: minmax(200px, 280px) 1fr;
    align-items: start;
  }
}

.checkout-product__gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkout-product__main {
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #f3f4f6, #e5e7eb);
  aspect-ratio: 1;
  max-height: 320px;
}

.checkout-product__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.checkout-product__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.checkout-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.checkout-thumb:hover {
  border-color: #d1d5db;
}

.checkout-thumb.is-active {
  border-color: #c41e1e;
  box-shadow: 0 0 0 1px rgba(196, 30, 30, 0.25);
}

.checkout-thumb img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
}

@media (min-width: 640px) {
  .checkout-thumb img {
    width: 64px;
    height: 64px;
  }
}

.checkout-product__title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  margin: 0.35rem 0 0.5rem;
  color: #1f2937;
}

.checkout-product__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.88rem;
  color: #4b5563;
  margin: 0 0 0.75rem;
}

.checkout-product__sku {
  color: #9ca3af;
  font-size: 0.8rem;
}

.checkout-product__controls {
  margin-bottom: 0.75rem;
}

.checkout-product__controls.form-row--inline {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.checkout-product__price {
  font-size: 0.92rem;
  color: #374151;
  margin: 0 0 0.75rem;
}

.checkout-product__price strong {
  color: #b91c1c;
  font-size: 1.05rem;
}

.checkout-product__trust {
  margin: 0;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
}

.checkout-trust-icon {
  color: #16a34a;
  font-weight: 700;
  margin-right: 0.25rem;
}

.form-row {
  margin-bottom: 1rem;
}

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

.form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #374151;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #c41e1e;
  box-shadow: 0 0 0 3px rgba(196, 30, 30, 0.12);
}

.form-row textarea {
  resize: vertical;
  min-height: 4rem;
}

.form-row--inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .form-row--inline {
    grid-template-columns: 1fr;
  }
}

/* Shipping options */
.checkout-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.checkout-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

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

.checkout-option--selected,
.checkout-option:has(input:checked) {
  border-color: #c41e1e;
  background: #fffafa;
}

.checkout-option input {
  margin-top: 0.2rem;
  accent-color: #c41e1e;
}

.checkout-option__body {
  flex: 1;
  min-width: 0;
}

.checkout-option__title {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: #111827;
}

.checkout-option__desc {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.2rem;
}

.checkout-option__price {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1f2937;
  white-space: nowrap;
}

/* Payment methods */
.checkout-pay-methods {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-pay {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.checkout-pay:has(input:checked):not(.checkout-pay--disabled) {
  border-color: #c41e1e;
  background: #fffafa;
}

.checkout-pay--active input {
  accent-color: #c41e1e;
}

.checkout-pay--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkout-pay strong {
  display: block;
  font-size: 0.92rem;
}

.checkout-pay small {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 0.15rem;
}

.checkout-pay__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.checkout-pay-note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* Summary aside */
.checkout-summary-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
}

.summary-product-preview {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0 1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.summary-product-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.summary-product-preview__title {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: #111827;
}

.summary-product-preview__variant {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.35;
}

.checkout-promo {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #e5e7eb;
}

.checkout-promo label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #4b5563;
}

.checkout-promo__row {
  display: flex;
  gap: 0.5rem;
}

.checkout-promo__row input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
}

.btn-secondary {
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: #f9fafb;
}

.checkout-promo__msg {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

.checkout-promo__msg.is-ok {
  color: #15803d;
}

.checkout-promo__msg.is-err {
  color: #b91c1c;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.92rem;
  gap: 1rem;
}

.summary-line--muted {
  color: #6b7280;
  font-size: 0.86rem;
}

.summary-total {
  font-weight: 800;
  font-size: 1.2rem;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 2px solid #111827;
  color: #111827;
}

.tax-note {
  font-size: 0.76rem;
  color: #9ca3af;
  margin-top: 0.65rem;
  line-height: 1.45;
}

.checkout-actions {
  margin-top: 1.35rem;
}

.btn-primary,
.checkout-actions button {
  width: 100%;
  padding: 0.95rem 1rem;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.35);
  transition: transform 0.1s, box-shadow 0.15s;
}

.btn-primary:hover,
.checkout-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(185, 28, 28, 0.4);
}

.checkout-mini-facts {
  margin: 1.25rem 0 0;
  padding: 0.85rem 0 0;
  border-top: 1px solid #f3f4f6;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
  list-style: none;
  padding-left: 0;
}

.checkout-mini-facts li {
  margin: 0.35rem 0;
  padding-left: 1rem;
  position: relative;
}

.checkout-mini-facts li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: #c41e1e;
  font-weight: bold;
}

.checkout-mini-facts a {
  color: #b91c1c;
}

.checkout-trust-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.5;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.checkout-trust-panel p {
  margin: 0.35rem 0;
}

.checkout-trust-panel strong {
  color: #374151;
}

.checkout-trust-panel a {
  color: #b91c1c;
}

.checkout-footer-wrap {
  max-width: 960px;
  padding-top: 0;
  padding-bottom: 3rem;
}
