/* Men's Trousers room only. Do not load on other shop pages. */

.room-trousers .hero .lead { max-width: 40rem; }

/* On-page sub-menu and live filters */
.room-trousers {
  --shop-header-h: 64px;
}
.trouser-sub {
  position: sticky;
  top: var(--shop-header-h, 64px);
  z-index: 25; /* below .site-header (40), .cat-menu-list (50), .ed-search-panel (80) */
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 0 6px;
}
.trouser-sub .wrap { display: grid; gap: 0; }
.t-search {
  display: grid;
  gap: 6px;
  max-width: 28rem;
}
.t-search label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.t-search input[type="search"] {
  appearance: none;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font: 15px var(--font);
  color: var(--text);
  background: #0c0c0e;
  border: 1px solid var(--line-2);
  border-radius: 0;
}
.t-search input[type="search"]:focus {
  outline: 1px solid color-mix(in oklab, var(--accent) 45%, var(--line-2));
  outline-offset: 2px;
}
.t-groups { display: grid; gap: 14px; }
.t-group { display: grid; gap: 8px; }
.t-group h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  font-weight: 400;
}
.t-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fog);
  background: transparent;
  border: 1px solid var(--line-2);
  padding: .5rem .85rem;
  cursor: pointer;
  line-height: 1.3;
}
.tchip:hover { color: var(--text); }
.tchip[aria-pressed="true"] {
  color: #f4f1ec;
  border-color: color-mix(in oklab, var(--accent) 50%, var(--line-2));
}
.t-status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}
.t-empty {
  color: var(--fog);
  margin: 28px 0 0;
  display: none;
}
.t-empty.is-on { display: block; }

/* Product cards: tall portrait image, clean background, clear glass edge */
.tgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px 16px;
  margin: 24px 0 8px;
}
@media (min-width: 640px) {
  .tgrid { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
}
@media (min-width: 980px) {
  .tgrid { grid-template-columns: 1fr 1fr 1fr; gap: 24px 16px; }
}
@media (min-width: 1280px) {
  .tgrid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
.tcard {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--accent) 30%, #2a2a2f);
  box-shadow: inset 0 1px 0 color-mix(in oklab, var(--accent) 22%, transparent);
  transition: transform .55s cubic-bezier(.22, 1, .36, 1), border-color .55s ease;
}
.tcard.is-hidden { display: none; }
.tcard:hover {
  transform: translateY(-8px);
  border-color: color-mix(in oklab, var(--accent) 52%, #2a2a2f);
}
.timg {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-height: 280px;
  background: #f4f1ec;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.timg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.tbody {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 12px 14px;
  flex: 1;
}
.tbody .pbrand {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}
.tbody h2 {
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -.02em;
  font-weight: 600;
}
.t-cat {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 1px 0 0;
  padding: 0;
  list-style: none;
}
.t-cat li {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fog);
  border: 1px solid var(--line-2);
  padding: .2rem .4rem;
}
.t-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 2px 0 1px;
  padding: 0;
  list-style: none;
}
.t-features li {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid color-mix(in oklab, var(--accent) 28%, var(--line-2));
  padding: .18rem .4rem;
}
.tbody .prating,
.tbody .price { margin: 0; }
.tbody .price {
  font-size: 1rem;
  color: var(--text);
}
.tbody .pactions { margin-top: auto; padding-top: 6px; }
.tbody .btn { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .tcard, .tcard:hover { transition: none; transform: none; }
}

.tbody .pnote { margin: 0; color: var(--fog); font-size: 0.82rem; line-height: 1.4; }

@media (max-width: 720px) {
  nav.trouser-sub { display: block; }
}

/* Compact the header Categories dropdown on this page only. */
.room-trousers .cat-menu-list {
  top: calc(100% + 4px);
  min-width: 152px;
  padding: 4px 0;
}
.room-trousers .cat-menu-list a {
  padding: 5px 11px;
  font-size: 10px;
  letter-spacing: .11em;
}
.room-trousers .tbody .btn {
  padding: 8px 14px;
  font: 600 13px/1.2 var(--font);
  border-radius: 10px;
  min-width: 0;
}

/* Search / Brand / Price bar — Everyday layout, trousers-room tokens.
   Does not change .tchip or .tcard colours, hovers, or animations. */
.t-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 24px;
  padding: 0 0 12px;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--line);
}
.t-bar .t-search,
.t-bar .t-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.t-bar .t-search {
  flex: 1 1 200px;
  max-width: 320px;
}
.t-bar .t-select { flex: 0 1 180px; }
.t-bar .t-search label,
.t-bar .t-select label {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.t-bar .t-search input[type="search"],
.t-bar .t-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background-color: transparent;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  padding: 8px 0;
  font: 14px/1.4 var(--font);
}
.t-bar .t-select select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23a3a3ab' stroke-width='1' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}
.t-bar .t-search input[type="search"]:hover,
.t-bar .t-search input[type="search"]:focus,
.t-bar .t-select select:hover,
.t-bar .t-select select:focus {
  border-bottom-color: var(--accent);
  outline: none;
}
.t-bar .t-search input[type="search"]::placeholder { color: var(--dim); opacity: 0.85; }
.t-bar .t-meta {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 8px;
  min-width: 0;
}
.t-bar .t-status {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-family: inherit;
  color: var(--dim);
  margin: 0;
  padding: 0;
}
.t-reset {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.t-reset:hover,
.t-reset:focus-visible {
  color: var(--text);
  border-bottom-color: var(--accent);
  outline: none;
}
@media (max-width: 700px) {
  .t-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .t-bar .t-search,
  .t-bar .t-select,
  .t-bar .t-search input[type="search"],
  .t-bar .t-select select {
    max-width: none;
    width: 100%;
    flex: 1 1 auto;
  }
  .t-bar .t-meta { margin-left: 0; padding-bottom: 0; }
}

/* Chip rows removed from the trousers filter bar. Options live in .t-select dropdowns. */
.t-groups,
.t-chips,
.tchip {
  display: none !important;
}
.t-bar .t-select select option {
  background: var(--bg-2, #0a0a0c);
  color: var(--text, #ececee);
}

@media (min-width: 701px) {
  .t-bar {
    flex-wrap: nowrap;
    gap: 10px 14px;
  }
  .t-bar .t-select { flex: 1 1 0; min-width: 0; max-width: 180px; }
  .t-bar .t-search { flex: 1.1 1 140px; max-width: 240px; }
  .t-bar .t-meta { flex: 0 0 auto; margin-left: 8px; }
}

/* Hide uppercase filter labels (duplicated by All … options / placeholder). */
.t-bar .t-search label,
.t-bar .t-select label,
.t-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.t-bar {
  align-items: center;
  padding: 0 0 4px;
}
.t-bar .t-search,
.t-bar .t-select {
  position: relative;
  gap: 0;
}
.t-search { gap: 0; }
