.mat-picker [hidden] { display: none !important; }
.mat-models-wrap { position: relative; margin-bottom: 20px; }
.mat-models-controls { margin: 0 0 12px; }
.mat-models {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 12px) / 6); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px;
}
.mat-models::-webkit-scrollbar { display: none; }
.mat-model { scroll-snap-align: start; }
.mat-model {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0;
  border: 2px solid transparent; border-radius: 18px; overflow: hidden;
  background: var(--forest); color: #fff; cursor: pointer; text-align: left;
  box-shadow: 0 8px 24px -18px rgba(28,43,26,.45);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.mat-model img { width: 100%; height: 128px; object-fit: cover; object-position: 30% 70%; transition: transform .4s; }
.mat-model span {
  position: absolute; inset: auto 6px 6px; padding: 9px 10px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.5); background: rgba(24,38,25,.4);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font: 600 13px/1.2 var(--font-body); overflow-wrap: anywhere;
}
.mat-model:hover img { transform: scale(1.04); }
.mat-model[aria-pressed="true"] { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 8px 24px -12px rgba(28,43,26,.35); }
.mat-model:focus-visible, .mat-sizes button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.mat-panel { min-width: 0; }
.mat-scene {
  position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  min-height: 480px; align-items: center; border: 1px solid var(--lg-line); border-radius: 28px;
  overflow: hidden; background: #493f30; box-shadow: var(--lg-shadow);
}
.mat-backdrop { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(24px) brightness(.78); transform: scale(1.1); }
.mat-scene::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(110deg, rgba(37,32,22,.02), rgba(37,32,22,.12)); pointer-events: none; }
.mat-photos { min-width: 0; padding: 22px 0 22px 22px; }
.mat-photo { display: block; width: 100%; height: 440px; object-fit: contain; border-radius: 18px; }
.mat-landscape { min-height: 560px; }
.mat-landscape .mat-backdrop { filter: none; transform: none; object-position: center bottom; }
.mat-landscape .mat-photos { opacity: 0; pointer-events: none; }
.mat-controls.ch-cfg {
  display: flex; flex-direction: column; align-items: stretch; gap: 26px;
  min-width: 0; margin: 28px; padding: 28px; background: rgba(255,251,240,.58);
  border-color: rgba(255,255,255,.8); border-radius: 24px;
}
.mat-name { margin: 0; font-family: var(--font-display); color: var(--forest); font-size: clamp(24px, 2.5vw, 32px); line-height: 1.15; overflow-wrap: anywhere; }
.mat-desc { margin: -12px 0 0; color: var(--text-muted); font-size: 15px; line-height: 1.55; }
.mat-more { align-self: flex-start; color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mat-more:hover { color: var(--green-dark); }
.mat-size-field { margin: 0; min-width: 0; padding: 0; }
.mat-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.mat-sizes button {
  padding: 10px 12px; min-height: 44px; border: 1px solid rgba(37,64,43,.22);
  border-radius: 12px; color: var(--forest); background: rgba(255,255,255,.45);
  font: 500 13px/1.25 var(--font-body); cursor: pointer; transition: background .2s, border-color .2s;
}
.mat-sizes button:hover { background: rgba(255,255,255,.85); border-color: var(--forest); }
.mat-sizes button[aria-pressed="true"] { color: #fff; background: var(--forest); border-color: var(--forest); }
.mat-purchase { display: flex; flex-direction: column; gap: 20px; padding-top: 22px; border-top: 1px solid rgba(37,64,43,.16); }
.mat-purchase .ch-price { font-size: 34px; line-height: 1.1; }
.mat-purchase .ch-btn { width: 100%; }
@media (max-width: 900px) {
  .mat-models { grid-auto-columns: calc((100% - 2 * 12px) / 3); }
  .mat-model img { height: 116px; }
  .mat-scene { grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr); }
  .mat-controls.ch-cfg { margin: 18px; padding: 22px; }
}
@media (max-width: 600px) {
  .mat-models { gap: 8px; grid-auto-columns: 40%; }
  .mat-model { border-radius: 14px; }
  .mat-model img { height: 106px; }
  .mat-model span { inset: auto 4px 4px; padding: 8px 5px; font-size: 11px; border-radius: 9px; }
  .mat-scene { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 22px; }
  .mat-photos { padding: 0; }
  .mat-photo { height: auto; max-height: 360px; border-radius: 0; }
  .mat-landscape .mat-photos { opacity: 1; pointer-events: auto; }
  .mat-landscape .mat-backdrop { filter: blur(18px) brightness(.72); transform: scale(1.1); }
  .mat-controls.ch-cfg { margin: 14px; padding: 22px; gap: 22px; }
}
@media (prefers-reduced-motion: reduce) { .mat-model, .mat-model img, .mat-sizes button { transition: none; } }
