/* On-checkout demo — page chrome (card widget: ncx-card-form.css in assets/css/) */
@media (max-width:650px){
  .demo-header__controls, .demo-badge{
   display:none!important; 
  }
  
}

.demo-header__inner
:root { 
    
  --demo-radius: 12px;
  --demo-shadow: 0 4px 24px rgba(15, 23, 42, 0.06); 
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.demo-page {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f6f9;
  color: #111827;
  line-height: 1.5;
  min-height: 100vh;
}

.demo-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 24px;
}

.demo-header__inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.demo-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111827;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.demo-logo span {
  color: #dd4238;
}

.demo-badge {
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 4px 10px;
  border-radius: 999px;
}

.demo-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.demo-hero {
  text-align: center;
  padding: 48px 20px 56px;
}

.demo-hero--product {
  background: linear-gradient(145deg, #1e293b 0%, #334155 55%, #475569 100%);
  color: #fff;
  border-radius: 12px;
  margin-bottom: 0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.demo-hero__img {
  width: min(220px, 70vw);
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
}

.demo-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.demo-hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}

.demo-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.demo-card h2 {
  margin: 0 0 4px;
  font-size: 1.125rem;
  font-weight: 600;
}

.demo-card .subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: #6b7280;
}

.demo-field {
  margin-bottom: 14px;
}

.demo-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 6px;
}

.demo-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.demo-field input,
.demo-field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.demo-field input:focus,
.demo-field select:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #dd4238;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.demo-btn:hover {
  background: #c23a31;
}

.demo-btn--block {
  width: 100%;
  margin-top: 8px;
}

.demo-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.demo-summary-table th,
.demo-summary-table td {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.demo-summary-table tr:last-child td {
  border-bottom: none;
  font-weight: 600;
  font-size: 1rem;
}

.demo-summary-product {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.demo-summary-product img {
  width: 72px;
  height: auto;
  border-radius: 8px;
  background: #f9fafb;
}

/* Checkout: billing left | summary + payment stacked on the right */
.demo-checkout-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.demo-checkout-sidebar .demo-checkout-summary {
  margin: 0;
}

.demo-checkout-summary {
  position: sticky;
  top: 20px;
  z-index: 1;
}

.demo-summary-table tr.demo-summary-total td {
  font-weight: 700;
  font-size: 1.05rem;
  padding-top: 14px;
}

.demo-checkout-pay {
  margin-top: 0;
  width: 100%;
}

.demo-pay-panel {
  margin-top: 0;
}

@media (max-width: 860px) {
  .demo-checkout-summary {
    position: static;
  }
}

.demo-pay-panel .payment_box {
  padding: 20px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.demo-pay-panel__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.demo-pay-panel__hint {
  margin: 0px;
  font-size: 13px;
  color: #6b7280;
}

.demo-pay-panel .test-hint {
  margin: 16px 0 0;
  font-size: 12px;
  color: #9ca3af;
}

.demo-alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 20px;
}

.demo-alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.demo-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.demo-footer {
  max-width: 1040px;
  margin: 32px auto 0;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.demo-test-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.demo-test-panel h2 {
  font-size: 1rem;
  margin: 0 0 4px;
}

.demo-test-table code {
  font-size: 11px;
}

.demo-product-placeholder {
  width: min(220px, 70vw);
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px dashed rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  line-height: 1;
}

/* Shop page: 3×2 grid uses viewport height without crushing card content */
.demo-page--shop {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.demo-page--shop .demo-header {
  flex-shrink: 0;
  padding: 14px 24px;
}

.demo-page--shop .demo-main--shop {
  /*flex: 1;*/
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 1200px;
  padding: 20px 24px 28px;
}

.demo-catalog {
  max-width: 1040px;
  margin: 0 auto;
}

.demo-page--shop .demo-catalog {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: none;
  width: 100%;
}

.demo-catalog h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.demo-page--shop .demo-catalog h1 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.demo-catalog__intro {
  margin: 0 0 28px;
  color: #6b7280;
  font-size: 1.05rem;
}

.demo-page--shop .demo-catalog__intro {
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.demo-catalog__grid {
  margin-top: 0;
}

.demo-page--shop .demo-catalog__grid {
  flex: 1;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(200px, 1fr));
  gap: 20px;
  align-content: stretch;
}

.demo-product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.demo-page--shop .demo-product-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 22px;
  height: 100%;
}

.demo-product-card h2 {
  margin: 0 0 4px;
  font-size: 1.125rem;
  font-weight: 600;
}

.demo-page--shop .demo-product-card h2 {
  font-size: 1.0625rem;
  margin-bottom: 4px;
}

.demo-product-card__price {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6b7280;
}

.demo-page--shop .demo-product-card__price {
  margin: 0 0 12px;
  font-size: 14px;
}

.demo-page--shop .demo-product-card form {
  margin-top: 10px;
}

.demo-page--shop .demo-product-card .demo-field {
  margin-bottom: 12px;
}

.demo-page--shop .demo-product-card .demo-field label {
  margin-bottom: 6px;
  font-size: 13px;
}

.demo-page--shop .demo-product-card .demo-field select {
  height: 40px;
  font-size: 15px;
}

.demo-page--shop .demo-product-card .demo-btn--block {
  margin-top: 0;
  min-height: 42px;
  font-size: 14px;
}

.demo-product-card .demo-product-placeholder {
  width: 100%;
  max-width: 180px;
  height: 96px;
  margin: 0 auto 16px;
  background: #f3f4f6;
  border: 1px dashed #e5e7eb;
  font-size: 48px;
}

.demo-page--shop .demo-product-card .demo-product-placeholder {
  flex: none;
  width: 100%;
  max-width: 200px;
  height: clamp(84px, 12vh, 108px);
  margin: 0 auto 14px;
  font-size: clamp(40px, 6vh, 52px);
}

@media (max-width: 900px) {
  .demo-page--shop .demo-catalog__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    flex: none;
  }
}

@media (max-width: 520px) {
  .demo-page--shop .demo-catalog__grid {
    grid-template-columns: 1fr;
  }
}

.demo-choose-checkout {
  max-width: 1040px;
  margin: 0 auto;
}

.demo-choose-checkout h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.demo-choose-checkout__intro {
  margin: 0 0 24px;
  color: #6b7280;
  font-size: 0.95rem;
}

.demo-choose-checkout__order {
  margin-bottom: 28px;
}

.demo-choose-checkout__order .demo-summary-product {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 12px;
}

.demo-choose-checkout__total {
  margin: 0;
  font-size: 1.05rem;
}

.demo-choose-checkout__options {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.demo-layout-option {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 100%;
}

.demo-layout-option:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.demo-layout-option--live {
  border-color: rgba(221, 66, 56, 0.35);
}

.demo-layout-option--live:hover {
  border-color: #dd4238;
}

.demo-layout-option h2 {
  margin: 10px 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
}

.demo-layout-option p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.45;
}

.demo-layout-option__badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e5e7eb;
}

.demo-layout-option__badge--inline {
  display: inline-block;
}

.demo-layout-option--live .demo-layout-option__badge {
  background: #fef2f2;
  color: #dd4238;
  border-color: rgba(221, 66, 56, 0.25);
}

.demo-layout-option__cta {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #dd4238;
}

.demo-choose-checkout__back {
  margin: 28px 0 0;
  text-align: center;
  font-size: 14px;
}

.demo-choose-checkout__back a {
  color: #6b7280;
  text-decoration: none;
}

.demo-choose-checkout__back a:hover {
  color: #111827;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .demo-choose-checkout__options {
    grid-template-columns: 1fr;
  }
}

/* Checkout layouts: demo (default), compact, minimal */
.demo-checkout-layout--compact,
.demo-checkout-layout--minimal {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.demo-checkout-layout--minimal {
  max-width: 520px;
}

.demo-checkout-summary--minimal h2 {
  margin-bottom: 12px;
}

.demo-payment-methods__heading {
  margin: 0 0 16px;
  font-size: 1.125rem;
  font-weight: 600;
}

.demo-pay-method-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-payment-methods--compact .demo-pay-method-list {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  font-size: 14px;
}

.demo-payment-methods--compact .demo-pay-method {
  flex: 1;
  min-width: 140px;
}

.demo-pay-method--active {
  border-color: rgba(221, 66, 56, 0.45);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(221, 66, 56, 0.15);
}

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

.demo-pay-method__icon {
  font-size: 1.25rem;
  line-height: 1;
}

.demo-pay-method__label {
  flex: 1;
  font-weight: 500;
}

.demo-pay-method__tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
}

.demo-pay-method--active .demo-pay-method__tag {
  background: #fef2f2;
  color: #dd4238;
}

.demo-pay-method-panel {
  margin-top: 4px;
}

.demo-pay-method-panel .demo-pay-panel__hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7280;
}

.demo-cp-widget-slot {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  padding: 16px 16px 12px;
}

.demo-cp-widget-slot__label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.demo-cp-widget-slot__note {
  margin: 0 0 12px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.demo-cp-widget-slot__frame {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.demo-checkout-layout--minimal .demo-pay-method-list {
  gap: 6px;
}

.demo-checkout-layout--minimal .demo-pay-method {
  padding: 10px 12px;
}

.demo-summary-product .demo-product-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.demo-billing-card h2 {
  margin-bottom: 12px;
}

.demo-billing-table td:first-child {
  color: #6b7280;
  font-size: 14px;
  width: 42%;
}

.demo-billing-table td:last-child {
  font-weight: 500;
}

.demo-success-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.demo-success-banner .demo-success-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

/* Minimal redirect checkout — additional feature toggles */
.demo-payment-methods--minimal .demo-payment-methods__subheading {
  margin: 16px 0 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.demo-payment-methods--minimal .demo-minimal-features {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

@media (max-width: 520px) {
  .demo-payment-methods--minimal .demo-minimal-features {
    grid-template-columns: 1fr;
  }
}

.demo-payment-methods--minimal .demo-minimal-features li {
  margin: 0;
}

.demo-payment-methods--minimal .demo-minimal-features .demo-switch {
  width: 100%;
  box-sizing: border-box;
}

/* OPP Pay button: .ncx-cp-standalone in ncx-card-form.css */
