#mhf-wrap { max-width: 860px; margin: 0 auto; padding: 1.5rem 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

.mhf-step { display: none; }
.mhf-step.active { display: block; }

/* Step bar */
.mhf-step-bar { display: flex; margin-bottom: 2rem; background: #fff; border-radius: 10px; border: 1px solid #E8E4DF; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.mhf-pip { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 6px; font-size: 12px; color: #9E9890; background: #F7F5F2; border-right: 1px solid #E8E4DF; transition: all 0.2s; }
.mhf-pip:last-child { border-right: none; }
.mhf-pip-num { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; background: #E8E4DF; color: #9E9890; flex-shrink: 0; }
.mhf-pip.done .mhf-pip-num { background: #27AE60; color: white; }
.mhf-pip.done { color: #6B6560; }
.mhf-pip.current { color: #1A1714; font-weight: 500; background: #fff; }
.mhf-pip.current .mhf-pip-num { background: #C0392B; color: white; }

.mhf-title { font-size: 20px; font-weight: 600; color: #1A1714; margin: 0 0 5px; }
.mhf-desc { font-size: 14px; color: #6B6560; margin: 0 0 1.5rem; line-height: 1.5; }

/* Type & subtype cards */
.mhf-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 540px; }
.mhf-type-card { background: #fff; border: 1.5px solid #E8E4DF; border-radius: 12px; padding: 2rem 1.5rem 1.5rem; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.mhf-type-card:hover { border-color: #C0392B; transform: translateY(-2px); box-shadow: 0 4px 20px rgba(192,57,43,0.12); }
.mhf-type-card.active { border-color: #C0392B; background: #fdf2f1; }
.mhf-type-card.active .mhf-type-name { color: #C0392B; }
.mhf-type-name { font-size: 18px; font-weight: 600; color: #1A1714; }

.mhf-subtype-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 580px; margin-bottom: 1.25rem; }
.mhf-subtype-card { background: #fff; border: 1.5px solid #E8E4DF; border-radius: 12px; padding: 1.5rem 1rem; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.mhf-subtype-card:hover { border-color: #C0392B; transform: translateY(-2px); }
.mhf-subtype-card.active { border-color: #C0392B; background: #fdf2f1; }
.mhf-subtype-card.active .mhf-subtype-label { color: #C0392B; }
.mhf-subtype-label { font-size: 15px; font-weight: 600; color: #1A1714; }
.mhf-subtype-sub { font-size: 12px; color: #6B6560; line-height: 1.4; }

/* Legend */
.mhf-legend { display: flex; gap: 16px; margin-bottom: 1.5rem; font-size: 12px; color: #6B6560; align-items: center; }
.mhf-legend-item { display: flex; align-items: center; gap: 6px; }
.mhf-legend-dot { width: 14px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Mode tabs */
.mhf-mode-tabs { display: inline-flex; background: #E8E4DF; border-radius: 8px; padding: 3px; margin-bottom: 1.5rem; gap: 2px; }
.mhf-mode-tab { padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; color: #6B6560; background: transparent; border: none; font-family: inherit; transition: all 0.15s; }
.mhf-mode-tab.active { background: #fff; color: #1A1714; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.mhf-mode-panel { display: none; }
.mhf-mode-panel.active { display: block; }

/* Calc layout */
.mhf-calc-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; margin-bottom: 1.25rem; }
.mhf-fields { display: flex; flex-direction: column; gap: 12px; }
.mhf-field label { display: block; font-size: 12px; font-weight: 500; color: #6B6560; letter-spacing: 0.2px; text-transform: uppercase; margin-bottom: 5px; }
.mhf-field select, .mhf-field input[type="number"] { width: 100%; padding: 9px 12px; border: 1.5px solid #D4CFC9; border-radius: 8px; font-family: inherit; font-size: 14px; color: #1A1714; background: #fff; transition: border-color 0.15s; box-sizing: border-box; }
.mhf-field select:focus, .mhf-field input:focus { outline: none; border-color: #C0392B; }
.mhf-field input[readonly] { background: #F7F5F2; color: #9E9890; border-color: #E8E4DF; cursor: default; }

/* Weight box */
.mhf-weight-box { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1.5px solid #E8E4DF; border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.mhf-weight-box span:first-child { font-size: 16px; color: #6B6560; font-weight: 500; }

/* Direct */
.mhf-direct-wrap { max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.mhf-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mhf-input-row { display: flex; align-items: center; gap: 8px; }
.mhf-input-row input { flex: 1; }
.mhf-unit { font-size: 14px; color: #6B6560; font-weight: 500; white-space: nowrap; }
.mhf-double-direct { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 580px; }
.mhf-panel-lbl { font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 6px; margin-bottom: 10px; text-align: center; }
.mhf-panel-lbl-red { background: #fdf2f1; color: #C0392B; }
.mhf-panel-lbl-grey { background: #f5f5f5; color: #666; }

/* Buttons */
.mhf-actions { display: flex; gap: 10px; margin-top: 1.25rem; align-items: center; flex-wrap: wrap; }
.mhf-btn-primary { padding: 11px 24px; background: linear-gradient(135deg, #D44637 0%, #A93226 100%); color: white; border: none; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 6px rgba(169,50,38,0.35); transition: all 0.18s; }
.mhf-btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #C0392B 0%, #922B21 100%); box-shadow: 0 4px 12px rgba(169,50,38,0.45); transform: translateY(-1px); }
.mhf-btn-primary:disabled { opacity: 0.38; cursor: not-allowed; transform: none; box-shadow: none; }
.mhf-btn-secondary { padding: 11px 18px; background: linear-gradient(135deg, #ffffff 0%, #f0ede9 100%); color: #6B6560; border: 1px solid #D4CFC9; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: all 0.18s; }
.mhf-btn-secondary:hover { background: linear-gradient(135deg, #f7f5f2 0%, #ece8e3 100%); color: #1A1714; border-color: #B8B0A8; transform: translateY(-1px); }
.mhf-btn-reset { padding: 11px 18px; background: linear-gradient(135deg, #fff5f4 0%, #fde8e6 100%); color: #C0392B; border: 1px solid #f0c0bb; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.18s; }
.mhf-btn-reset:hover { background: linear-gradient(135deg, #fde8e6 0%, #fad4d0 100%); transform: translateY(-1px); }
.mhf-note { font-size: 11px; color: #9E9890; margin-top: 1rem; line-height: 1.5; }

/* Results */
.mhf-result-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 2rem; }
.mhf-result-card { background: #fff; border: 1.5px solid #E8E4DF; border-radius: 8px; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.mhf-result-card-label { font-size: 11px; font-weight: 500; color: #9E9890; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.mhf-result-card-value { font-size: 16px; font-weight: 600; color: #1A1714; }
.mhf-result-card-value.red { color: #C0392B; }

.mhf-double-result { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.mhf-result-panel { background: #fff; border: 1.5px solid #E8E4DF; border-radius: 12px; padding: 1rem 1.25rem; }
.mhf-result-panel-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.mhf-result-panel-sub { font-size: 11px; color: #6B6560; margin-bottom: 10px; }
.mhf-sum-item { font-size: 13px; color: #6B6560; margin-bottom: 6px; }
.mhf-sum-val { font-size: 17px; font-weight: 600; color: #1A1714; display: block; margin-top: 2px; }

.mhf-section-title { font-size: 14px; font-weight: 600; color: #1A1714; margin-bottom: 0.75rem; }
.mhf-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px,1fr)); gap: 14px; margin-bottom: 1.5rem; }
.mhf-product-card { background: #fff; border: 1.5px solid #E8E4DF; border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.mhf-product-card:hover { border-color: #C0392B; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(192,57,43,0.12); }
.mhf-product-img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 16px; background: #F7F5F2; border-bottom: 1px solid #E8E4DF; display: block; }
.mhf-product-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mhf-product-name { font-size: 13px; font-weight: 500; color: #1A1714; line-height: 1.4; }
.mhf-product-code { font-size: 10px; color: #9E9890; font-family: monospace; }
.mhf-product-dims { font-size: 11px; color: #6B6560; }
.mhf-product-load { font-size: 12px; font-weight: 600; color: #C0392B; margin-top: auto; padding-top: 8px; border-top: 1px solid #E8E4DF; margin-top: 8px; }

.mhf-no-results { padding: 2rem; text-align: center; color: #6B6560; background: #fff; border-radius: 12px; border: 1.5px solid #E8E4DF; font-size: 14px; line-height: 1.6; }
.mhf-results-back { border-top: 1px solid #E8E4DF; padding-top: 1.25rem; margin-top: 1rem; }

/* Spinner */
.mhf-spinner { width: 32px; height: 32px; border: 3px solid #eee; border-top-color: #C0392B; border-radius: 50%; animation: mhf-spin 0.7s linear infinite; margin: 0 auto; }
@keyframes mhf-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .mhf-calc-layout { grid-template-columns: 1fr; }
  .mhf-result-cards { grid-template-columns: 1fr 1fr; }
  .mhf-double-result { grid-template-columns: 1fr; }
  .mhf-pip span { display: none; }
  .mhf-type-grid { grid-template-columns: 1fr 1fr; }
}

/* Weight number + kg unit */
#mhf-wrap .mhf-weight-val { font-size: 52px !important; font-weight: 700 !important; color: #1A1714 !important; line-height: 1 !important; display: flex !important; align-items: baseline !important; gap: 6px !important; }
#mhf-wrap .mhf-weight-val span { font-size: 52px !important; font-weight: 700 !important; color: #1A1714 !important; }
#mhf-wrap .mhf-weight-kg { font-size: 26px !important; font-weight: 600 !important; color: #6B6560 !important; }
