.layby-page { padding: 24px 0 80px; max-width: 800px; }
.layby-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.layby-subtitle { color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }

/* Show page hero header */
.layby-show-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; margin-top: 24px; flex-wrap: wrap; }
.layby-show-product { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.layby-show-meta { font-size: 13px; color: var(--text-muted); }

.layby-card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.layby-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.layby-card h2 i { color: var(--blue); font-size: 13px; }
.layby-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.layby-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.layby-points i { color: var(--blue); margin-top: 3px; }
.layby-summary-grid { display: grid; gap: 10px; }
.layby-summary-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.layby-summary-row:last-child { border-bottom: none; }
.layby-summary-row strong { font-weight: 700; }
/* ── Create page product header ──────────────────────────── */
.layby-create-product { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.layby-create-product-name { font-size: 17px; font-weight: 800; }
.layby-create-colour { font-weight: 400; color: var(--text-muted); }
.layby-create-price { font-size: 20px; font-weight: 800; color: var(--orange); white-space: nowrap; }

/* ── Summary card redesign ────────────────────────────────── */
.layby-summary-card { padding: 24px; }
.layby-progress-wrap { margin-bottom: 24px; }
.layby-progress-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.layby-progress-amounts { margin-top: 8px; }
.layby-progress-amounts strong { font-size: 16px; font-weight: 800; color: var(--text); }
.layby-progress-total { font-size: 13px; color: var(--text-muted); }
.layby-progress-bar { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.layby-progress-fill { height: 100%; background: var(--orange); border-radius: 99px; transition: width 0.4s ease; }
.layby-stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.layby-stat-tile { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.layby-stat-tile--balance { border-color: var(--orange); background: #fff7f0; }
.layby-stat-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.layby-stat-value { font-size: 16px; font-weight: 800; }
.layby-stat-tile--balance .layby-stat-value { color: var(--orange); }
.layby-stat-tile a { color: var(--blue); text-decoration: none; font-weight: 700; }
.layby-closed-grid { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (min-width: 480px) {
  .layby-stat-tiles { grid-template-columns: repeat(3, 1fr); }
}
/* ───────────────────────────────────────────────────────── */

.layby-policy-section + .layby-policy-section { margin-top: 20px; }
.layby-policy-section h3 { font-size: 15px; margin-bottom: 8px; }
.layby-policy-section p { color: var(--text-muted); line-height: 1.6; font-size: 14px; }
.layby-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.layby-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 50px; font-size: 14px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; font-family: inherit; }
.layby-btn-primary { background: var(--orange); color: #fff; }
.layby-btn-primary:hover { background: var(--orange-dark); }
.layby-btn-secondary { background: var(--white); color: var(--orange); border: 1px solid var(--orange); }
.layby-btn-secondary:hover { background: var(--orange); color: #fff; }
.layby-btn-outline { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.layby-guest-note { background: #eff6ff; color: #1e40af; border-radius: 12px; padding: 14px 16px; font-size: 14px; margin-bottom: 16px; }
.layby-form { display: grid; gap: 16px; }
.layby-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.layby-form label { font-size: 14px; font-weight: 600; }
.layby-form input[type="number"],
.layby-form input[type="text"] { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-family: inherit; }
.layby-payment-heading { font-size: 14px; font-weight: 700; margin: 20px 0 6px; }
.layby-payment-card h2 { margin-bottom: 12px; }
.layby-amount-field { display: inline-flex; align-items: center; border: 2px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--white); transition: border-color 0.15s; }
.layby-amount-field:focus-within { border-color: var(--orange); }
.layby-amount-prefix { padding: 0 10px; font-size: 14px; font-weight: 700; color: var(--text-muted); border-right: 1px solid var(--border); background: var(--gray-card); line-height: 40px; }
.layby-amount-input { width: 120px; border: none; outline: none; padding: 0 12px; font-size: 16px; font-weight: 700; font-family: inherit; height: 40px; background: transparent; }
.layby-amount-hint { font-size: 12px; color: var(--text-muted); margin: 6px 0 16px; }
.layby-submit-btn { width: auto; padding: 11px 48px; font-size: 14px; }

.layby-terms-box { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); font-size: 13px; line-height: 1.6; }
.layby-terms-product { font-size: 14px; margin-bottom: 12px; color: var(--text); }
.layby-terms-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.layby-terms-list li { display: flex; justify-content: space-between; gap: 12px; }
.layby-terms-list li span { color: var(--text-muted); }
.layby-terms-list li strong { font-weight: 600; text-align: right; }
.layby-terms-note { color: var(--text-muted); padding-top: 12px; border-top: 1px solid var(--border); margin: 0; }
.layby-policy-link { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0; font-size: 14px; font-weight: 600; color: var(--blue); text-decoration: none; }
.layby-policy-link:hover { text-decoration: underline; }
.layby-checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.layby-checkbox input { margin-top: 3px; }
.field-error { color: #991b1b; font-size: 12px; }
.layby-alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.layby-alert-error { background: #fef2f2; color: #991b1b; }
.layby-alert-success { background: #dcfce7; color: #166534; }
.layby-list-card { display: block; background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; margin-bottom: 12px; text-decoration: none; color: inherit; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.layby-list-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.layby-list-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.layby-list-meta { color: var(--text-muted); font-size: 13px; }
.layby-status { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 50px; background: #e8f4f3; color: var(--blue); }
.layby-status--completed { background: #dcfce7; color: #166534; }
.layby-status--expired { background: #fef3c7; color: #92400e; }
.layby-status--cancelled { background: #fee2e2; color: #991b1b; }
.layby-list-amounts { display: flex; gap: 24px; }
.layby-list-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.layby-payments-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.layby-payments-table th, .layby-payments-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--border); }
.layby-confirm-icon { width: 56px; height: 56px; border-radius: 50%; background: #dcfce7; color: #166534; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; }
.layby-alert-warning { background: #fef3c7; color: #92400e; }
.layby-card-danger { border-color: #fecaca; background: #fff5f5; }
.layby-cancel-intro { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
.layby-cancel-summary { margin-bottom: 16px; }
.layby-btn-danger { background: #991b1b; color: #fff; }
.layby-portal-card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.layby-portal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.layby-portal-product { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.layby-portal-deadline { display: block; font-size: 13px; color: var(--blue); font-weight: 600; margin-top: 6px; }
.layby-portal-summary { margin-bottom: 16px; }
.layby-portal-history h3 { font-size: 15px; margin-bottom: 10px; }
.layby-list-amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
@media (min-width: 640px) {
  .layby-list-amounts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
