.header nav a[aria-current="page"] { color: #e4c99c; }
.gallery-page { max-width: 1640px; margin: 0 auto; padding-top: clamp(36px, 6vw, 88px); }
.gallery-heading { margin: 34px 0 40px; }
.gallery-heading h1 { font-size: clamp(38px, 6vw, 76px); }
.gallery-heading p, .gallery-contact p { color: var(--muted); line-height: 1.8; margin-top: 12px; }
.gallery-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.gallery-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.fabric-categories { display: grid; gap: 22px; padding: clamp(15px, 3vw, 28px); margin: 0 0 28px; background: #182228; border: 1px solid #414f55; }
.fabric-category-group h2 { margin: 0 0 10px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.4; }
.fabric-category-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fabric-category-options button { display: grid; gap: 5px; padding: 12px 14px; min-height: 60px; text-align: left; border: 1px solid #65747b; background: #111b21; color: var(--ink); font: inherit; }
.fabric-category-options button[aria-pressed="true"] { border-color: #c8ae82; background: #c8ae82; color: #17212a; }
.fabric-category-options strong { font-size: 14px; }
.fabric-category-options span { font-size: 12px; color: var(--muted); }
.fabric-category-options button[aria-pressed="true"] span { color: inherit; }
.fabric-weight-note { margin: 9px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.fabric-category-clear { justify-self: start; border: 0; border-bottom: 1px solid #86979c; background: transparent; color: var(--ink); padding: 2px 0 4px; font: inherit; font-size: 13px; }
.gallery-search { display: grid; gap: 8px; color: var(--muted); font-size: 13px; max-width: 100%; }
.gallery-search input { width: min(310px, 100%); min-height: 42px; padding: 10px 13px; border: 1px solid #66767e; background: #18232a; color: var(--ink); }
.gallery-search input::placeholder { color: #b8c0c0; }
.fabric-search-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.fabric-filter-toggle, .fabric-filter-clear { min-height: 42px; padding: 10px 18px; border: 1px solid #65747b; background: #1a252b; color: var(--ink); }
.fabric-filter-toggle[aria-expanded="true"] { border-color: #c8ae82; color: #e4c99c; }
.fabric-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin: 0 0 26px; padding: clamp(16px, 3vw, 24px); border: 1px solid #414f55; background: #182228; }
.fabric-filters[hidden], .fabric-filter-error[hidden] { display: none; }
.fabric-filters label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.fabric-filters input, .fabric-filters select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid #65747b; background: #111b21; color: var(--ink); font: inherit; }
.fabric-filters input::placeholder { color: #b8c0c0; }
.fabric-filters [aria-invalid="true"] { border-color: #e6a384; }
.fabric-filter-hint, .fabric-filter-error, .fabric-filter-clear { grid-column: 1 / -1; }
.fabric-filter-hint, .fabric-filter-error { margin: 0; font-size: 13px; }
.fabric-filter-hint { color: var(--muted); }
.fabric-filter-error { color: #f3b79c; }
.gallery-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-tabs button, .catalog-controls button { padding: 9px 13px; min-height: 40px; border: 1px solid #65747b; background: #1a252b; color: var(--ink); }
.gallery-tabs button[aria-pressed="true"], .catalog-controls button[aria-pressed="true"] { background: #c8ae82; border-color: #c8ae82; color: #17212a; }
.case-scenes { margin: 0 0 24px; }
.case-scenes-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.case-scenes-heading h2 { font: inherit; font-weight: 600; }
.case-scenes-all { padding: 5px 0; background: transparent; border: 0; border-bottom: 1px solid #65747b; color: var(--muted); }
.case-scenes-all[aria-pressed="true"] { color: #e4c99c; border-color: #c8ae82; }
.case-scene-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.case-scene-options button { display: grid; place-content: center; gap: 5px; padding: 9px 5px; min-height: 62px; text-align: center; background: #182228; border: 1px solid #65747b; color: var(--ink); }
.case-scene-options button[aria-pressed="true"] { background: #33414a; color: #f2deb8; border-color: #c8ae82; box-shadow: inset 0 -2px #c8ae82; }
.case-scene-options span { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 26px); }
.gallery-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-card { display: grid; grid-template-rows: auto 1fr; align-content: start; padding: 0; text-align: left; min-width: 0; border: 1px solid #414f55; color: var(--ink); background: #182228; }
.gallery-card:hover, .gallery-card:focus-visible { border-color: #c8ae82; }
.gallery-frame { position: relative; display: block; overflow: hidden; aspect-ratio: 4/3; background: #e6e3dd; }
.gallery-work .gallery-frame { aspect-ratio: 3/4; }
.gallery-card img { width: 100%; height: 100%; object-fit: contain; }
.gallery-model-badge { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 4px 7px; background: #17232ae8; color: #f2ebe0; font-size: 11px; line-height: 1.4; }
.gallery-card-name { display: flex; gap: 8px; justify-content: space-between; align-items: start; padding: 12px 14px; font-size: clamp(12px, 1.3vw, 16px); line-height: 1.5; overflow-wrap: anywhere; }
.gallery-fabric .gallery-card-name { font-family: "DM Sans", sans-serif; letter-spacing: .04em; }
.gallery-card-name > :last-child { color: #ddc49b; }
.gallery-more { display: flex; margin: 28px auto 0; }
.gallery-more[hidden], .gallery-empty[hidden] { display: none; }
.gallery-empty { padding: 28px 0; color: var(--muted); }
.gallery-contact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 18px; }
.gallery-feature .section-heading .text-link { white-space: nowrap; }
.gallery-feature { border-top: 1px solid var(--line); }
.catalog-dialog { position: fixed; inset: 0; margin: auto; width: min(880px, calc(100% - 28px)); max-height: 94dvh; overflow: auto; background: #17232a; color: var(--ink); border: 1px solid #65747b; padding: clamp(12px, 3vw, 26px); }
.catalog-dialog::backdrop { background: #080d12dd; }
.catalog-dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 14px; }
.catalog-dialog-head h2 { font-size: clamp(19px, 3vw, 30px); }
.catalog-close { width: 40px; min-height: 40px; flex: none; border: 1px solid #65747b; background: transparent; color: var(--ink); font-size: 23px; }
.catalog-figure img { height: min(62dvh, 650px); width: 100%; object-fit: contain; background: #e6e3dd; }
.catalog-figure figcaption { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 16px; color: #d2d9d6; font-size: 13px; }
.catalog-controls { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 8px; }
.catalog-controls button:disabled { opacity: .4; }
.catalog-views { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.catalog-caption { text-align: center; color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.catalog-specs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 18px; font-size: 13px; margin: 20px 0 0; }
.catalog-specs:empty { display: none; }
.catalog-specs dt { color: var(--muted); }
.catalog-specs dd { margin: 0; }
@media (min-width: 761px) {
  .catalog-dialog.with-specs[open] { display: grid; width: min(1100px, calc(100% - 28px)); grid-template-columns: minmax(0, 1fr) minmax(240px, .56fr); column-gap: 24px; align-items: start; }
  .with-specs .catalog-dialog-head { grid-column: 1 / -1; }
  .with-specs .catalog-figure { grid-column: 1; grid-row: 2; }
  .with-specs .catalog-controls, .with-specs .catalog-caption { grid-column: 1; }
  .with-specs .catalog-specs { grid-column: 2; grid-row: 2 / span 3; margin: 0; padding: 16px 0 16px 18px; border-left: 1px solid var(--line); line-height: 1.55; }
}
@media (max-width: 760px) {
  .catalog-dialog.with-specs[open] { display: flex; flex-direction: column; }
  .with-specs .catalog-specs { order: -1; margin: 0 0 16px; }
  .with-specs .catalog-dialog-head { order: -2; }
}
@media (max-width: 920px) { .gallery-grid, .case-scene-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-preview-grid > :last-child { display: none; }
  .gallery-feature .section-heading, .gallery-toolbar { align-items: start; flex-direction: column; gap: 16px; }
  .gallery-heading { margin-bottom: 24px; }
  .gallery-card-name { padding: 9px 10px; }
  .catalog-figure img { height: min(52dvh, 460px); }
}
@media (max-width: 460px) { .fabric-filters { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .fabric-category-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fabric-category-options button { padding: 10px; }
}
