/* Floormad Configurator — stile FlyerAlarm (accordion verticale) */
.fmc-app {
	--fmc-accent: #009ee0;      /* azzurro FlyerAlarm */
	--fmc-accent-dk: #0081bb;
	--fmc-cta: #ff7a00;         /* arancio "in carrello" */
	--fmc-cta-dk: #e66e00;
	--fmc-ok: #27ae60;
	--fmc-line: #e3e7eb;
	--fmc-ink: #1a2733;
	--fmc-muted: #6b7884;
	margin-top: 18px; width: 100%; color: var(--fmc-ink);
	font-size: 15px; line-height: 1.4;
}
.fmc-loading { padding: 24px; color: #888; }

.fmc-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .fmc-layout { grid-template-columns: 1fr; } }

/* ---------- tab orizzontali (stile FlyerAlarm) ---------- */
.fmc-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--fmc-line); margin-bottom: 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.fmc-tab { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; background: #f5f7f9; border: none; border-right: 1px solid #e7ebee; padding: 14px 18px; font-size: 14px; cursor: pointer; color: #5a6b78; white-space: nowrap; position: relative; font-weight: 600; }
.fmc-tab:hover:not(.is-locked):not(.is-active) { background: #eef3f6; }
.fmc-tnum { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; border-radius: 50%; background: #dde3e8; color: #5a6b78; font-size: 12px; font-weight: 800; }
.fmc-tab.is-active { background: #fff; color: var(--fmc-ink); }
.fmc-tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--fmc-accent); }
.fmc-tab.is-active .fmc-tnum { background: var(--fmc-accent); color: #fff; }
.fmc-tab.is-done { color: var(--fmc-ink); }
.fmc-tab.is-done:not(.is-active) .fmc-tnum { background: var(--fmc-ok); color: #fff; }
.fmc-tab.is-locked { color: #b6c0c8; cursor: not-allowed; background: #f7f9fa; }
.fmc-tab.is-locked .fmc-tnum { background: #eef1f3; color: #b6c0c8; }

.fmc-step-title { font-size: 22px; font-weight: 800; margin: 2px 0 16px; }
.fmc-step-help { color: var(--fmc-muted); margin: -8px 0 18px; font-size: 14px; }

/* ---------- cards ---------- */
.fmc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.fmc-card { position: relative; background: #fff; border: 2px solid var(--fmc-line); border-radius: 10px; padding: 12px; cursor: pointer; text-align: center; transition: border-color .12s, box-shadow .12s; }
.fmc-card:hover { border-color: var(--fmc-accent); box-shadow: 0 3px 12px rgba(0,0,0,.06); }
.fmc-card.is-selected { border-color: var(--fmc-accent); box-shadow: 0 0 0 1px var(--fmc-accent) inset; }
.fmc-card.is-selected::after { content: '✓'; position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%; background: var(--fmc-accent); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.fmc-card-top { display: flex; gap: 4px; min-height: 18px; align-items: center; flex-wrap: wrap; }
.fmc-card-img { width: 100%; height: 96px; object-fit: contain; }
.fmc-card-ph { width: 100%; height: 96px; background: linear-gradient(135deg,#f3f5f7,#e2e8ec); border-radius: 6px; }
.fmc-card-ph--sm { height: 60px; }
.fmc-card-swatch { width: 100%; height: 96px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); }
.fmc-card-label { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--fmc-ink); }
.fmc-card-sub { font-size: 12px; color: var(--fmc-muted); margin-top: 3px; }
.fmc-ic { font-size: 14px; }
.fmc-badge { color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .3px; padding: 2px 6px; border-radius: 4px; background: var(--fmc-accent); }
.fmc-badge--top { background: #f39c12; }
.fmc-badge--eco { background: var(--fmc-ok); }
.fmc-badge--exp { background: var(--fmc-accent-dk); }

/* ---------- measure / quantity ---------- */
.fmc-free { margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef1f3; }
.fmc-free-title { font-size: 14px; color: #555; margin-bottom: 8px; font-weight: 600; }
.fmc-free-row { display: flex; align-items: center; gap: 10px; }
.fmc-num { width: 120px; padding: 9px; border: 1px solid #ccd4da; border-radius: 6px; }
.fmc-x { color: #999; }
.fmc-qty-label { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 600; }
.fmc-qty-row { display: flex; align-items: center; gap: 0; }
.fmc-qty-btn { width: 40px; height: 42px; border: 1px solid #ccd4da; background: #f6f8fa; font-size: 18px; cursor: pointer; }
.fmc-qty-btn:first-child { border-radius: 6px 0 0 6px; }
.fmc-qty-btn:last-child { border-radius: 0 6px 6px 0; }
.fmc-qty-input { width: 90px; height: 42px; text-align: center; border: 1px solid #ccd4da; border-left: none; border-right: none; }
.fmc-qty-unit { margin-top: 12px; color: #333; }
.fmc-name { margin-top: 16px; }
.fmc-name label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; font-weight: 600; }
.fmc-name input { width: 280px; max-width: 100%; padding: 9px; border: 1px solid #ccd4da; border-radius: 6px; }

/* ---------- price matrix ---------- */
.fmc-price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fmc-price-table th, .fmc-price-table td { border: 1px solid #ececec; padding: 10px 12px; text-align: right; }
.fmc-price-table th.fmc-q, .fmc-price-table td.fmc-q { text-align: left; }
.fmc-price-table thead th { background: #f7f9fb; text-align: center; font-weight: 700; }
.fmc-cell small { color: #999; font-size: 11px; }
.fmc-cell:hover { background: #ecf8ff; }
.fmc-cell.is-selected { background: var(--fmc-accent); color: #fff; }
.fmc-cell.is-selected small { color: #d7f0fb; }

/* ---------- addons ---------- */
.fmc-addon-group { border-top: 1px solid #eef1f3; padding: 14px 0; }
.fmc-addon-group:first-child { border-top: none; padding-top: 0; }
.fmc-addon-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.fmc-addon-row { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #eef1f3; border-radius: 8px; cursor: pointer; margin-bottom: 6px; }
.fmc-addon-row:hover { border-color: var(--fmc-accent); }
.fmc-addon-row.is-selected { border-color: var(--fmc-accent); background: #f2fbff; }
.fmc-addon-label { flex: 1; }
.fmc-addon-label small { color: #888; }
.fmc-addon-price { color: #333; white-space: nowrap; font-weight: 600; }

/* ---------- summary (sidebar sticky) ---------- */
.fmc-summary { background: #fff; border: 1px solid var(--fmc-line); border-radius: 12px; padding: 20px; position: sticky; top: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.fmc-summary-title { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.fmc-details { font-size: 13px; color: #555; margin-bottom: 12px; }
.fmc-details ul { margin: 6px 0 0; padding-left: 18px; }
.fmc-details li { margin-bottom: 2px; }
.fmc-summary-list { border-top: 1px solid #eef1f3; }
.fmc-srow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f4f6; font-size: 14px; }
.fmc-srow-k { color: var(--fmc-muted); }
.fmc-srow-v { font-weight: 600; text-align: right; }
.fmc-totals { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef1f3; }
.fmc-trow { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.fmc-trow.is-strong { font-size: 20px; font-weight: 800; border-top: 2px solid #e7ebee; margin-top: 8px; padding-top: 10px; }
.fmc-add { width: 100%; margin-top: 16px; background: var(--fmc-cta); color: #fff; border: none; padding: 15px; font-size: 16px; font-weight: 700; border-radius: 8px; cursor: pointer; transition: background .12s; }
.fmc-add:hover { background: var(--fmc-cta-dk); }
.fmc-add.is-disabled, .fmc-add:disabled { background: #c7d0d8; cursor: not-allowed; }
