/* MISSION 67 -- gaps-catalog (R920 S001 S002 S003 S004 S007 S008 S036 S037 S039 S048).
   Everything is scoped to .pb-m67-* classes; mobile first, no fixed widths wider than 320px. */

.pb-m67-profile { max-width: 1040px; margin: 0 auto; }
.pb-m67-crumb { margin: 0 0 6px; }
.pb-m67-section { margin-bottom: 16px; min-width: 0; }
.pb-m67-card-title { font-size: 1.05rem; margin: 0 0 10px; }
.pb-m67-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.pb-m67-banner { margin: 0 0 14px; }

/* ---- key/value rows (S004 spec, S008 reliability) ---- */
.pb-m67-kv { margin: 0 0 10px; display: grid; gap: 6px; }
.pb-m67-kv > div { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; border-bottom: 1px solid var(--pb-border); padding-bottom: 4px; }
.pb-m67-kv dt { color: var(--pb-text-secondary); font-weight: 600; margin: 0; }
.pb-m67-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---- S004 gallery ---- */
.pb-m67-gallery-col { min-width: 0; width: 100%; }
.pb-m67-gallery-caption { margin: 6px 0 0; }
.pb-m67-gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; max-width: 100%; }
.pb-m67-gallery-thumb { flex: 0 0 64px; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--pb-surface-subtle); overflow: hidden; cursor: pointer; }
.pb-m67-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-m67-gallery-thumb.is-active, .pb-m67-gallery-thumb:focus-visible { border-color: var(--pb-brand); }
@media (min-width: 768px) {
    .pb-model-details > .pb-m67-gallery-col { flex: 0 0 58.3333%; min-width: 0; }
    .pb-m67-gallery-col > .pb-model-details-image { flex: none; width: 100%; }
}

/* ---- S004 spec card + "איך נבדק?" ---- */
.pb-m67-spec-card { border: 1px solid var(--pb-border); border-radius: 12px; padding: 12px 14px; background: var(--pb-surface); }
.pb-m67-howchecked { background: var(--pb-state-info-bg); border: 1px solid var(--pb-state-info-border); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.pb-m67-howchecked p { margin: 4px 0 0; }
.pb-m67-k { font-weight: 600; }

/* ---- S004 printers for the model (S008 entry) ---- */
.pb-m67-printers { margin-top: var(--space-6, 24px); }
.pb-m67-printer-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.pb-m67-printer-list li { overflow-wrap: anywhere; }

/* ---- S001 curated tiles ---- */
.pb-m67-curated { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pb-m67-curated-tile { display: flex; flex-direction: column; border: 1px solid var(--pb-border); border-radius: 12px; overflow: hidden; background: var(--pb-surface-alt, var(--pb-surface)); text-decoration: none; color: inherit; min-width: 0; }
.pb-m67-curated-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pb-m67-curated-text { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }

/* ---- S002 filter bar + active chips ---- */
.pb-m67-filterbar select, .pb-m67-filterbar input[type="number"] { max-width: 100%; }
.pb-m67-price { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pb-m67-price input { width: 100px; }
.pb-m67-filter-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pb-m67-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.pb-m67-chip { white-space: normal; max-width: 100%; }

/* ---- S008 reviews ---- */
.pb-m67-review-list { display: flex; flex-direction: column; gap: 10px; }
.pb-m67-review { padding: 12px; }

/* ---- S048 segmented filter + unavailable cards ---- */
.pb-m67-segmented { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--pb-border); border-radius: 999px; overflow: hidden; margin: 0 0 12px; max-width: 100%; }
.pb-m67-segmented a { padding: 6px 14px; text-decoration: none; color: inherit; border-inline-start: 1px solid var(--pb-border); }
.pb-m67-segmented a:first-child { border-inline-start: 0; }
.pb-m67-segmented a.is-active { background: var(--pb-brand); color: var(--pb-text-inverse); }
.pb-m67-unavailable { opacity: 0.85; }
.pb-m67-spec { margin: 2px 0; }

/* ---- S036 rights hub table: stacked on mobile ---- */
.pb-m67-table-wrap { max-width: 100%; overflow-x: auto; }
.pb-m67-rights-table { width: 100%; }
@media (max-width: 640px) {
    .pb-m67-rights-table thead { display: none; }
    .pb-m67-rights-table tr { display: block; border-bottom: 1px solid var(--pb-border); padding: 8px 0; }
    .pb-m67-rights-table td { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border: 0; }
    .pb-m67-rights-table td[data-label]::before { content: attr(data-label); color: var(--pb-text-secondary); font-weight: 600; }
}

/* ---- S039 third track ---- */
.pb-m67-third-track { border-style: dashed; }
.pb-m67-track-tag { margin: 0 0 2px; }

/* ---- S037 preview + spec fields ---- */
.pb-m67-preview-box { max-width: 100%; }
.pb-m67-preview-box canvas { width: 100%; max-width: 480px; height: auto; aspect-ratio: 3 / 2; border-radius: 10px; background: var(--pb-surface-subtle); display: block; }
.pb-m67-spec-fields { border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
.pb-m67-spec-fields input, .pb-m67-spec-fields select { max-width: 100%; }

@media (max-width: 420px) {
    .pb-m67-actions > .pb-btn, .pb-m67-filter-actions > .pb-btn { flex: 1 1 100%; text-align: center; }
    .pb-m67-segmented { display: flex; }
    .pb-m67-segmented a { flex: 1 1 auto; text-align: center; padding: 6px 8px; }
}
