/* Shared layout for catalog content; navigation and bag use the home stylesheet. */
.catalog-page-shell {
  --surface: #1c1f22;
  --card: #292d31;
  --text: #f2eee7;
  --muted: #c6c2bc;
  --edge: #494c4e;
  --sand: #c7ad86;
  background: var(--surface);
  color: var(--text);
}
.catalog-page-shell :focus-visible { outline: 2px solid var(--sand); outline-offset: 4px; }
.catalog-page-shell main.collection-page, .catalog-page-shell main.product-page {
  width: min(100%, 1480px);
  min-height: 65vh;
  margin-inline: auto;
  padding: 24px clamp(20px, 5vw, 80px) clamp(48px, 7vw, 100px);
  color: var(--text);
  background: var(--surface);
}
.catalog-page-shell .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.breadcrumbs a:hover, .product-help a:hover { color: var(--sand); text-decoration: underline; }
.catalog-page-shell .collection-hero {
  width: 100%;
  padding: clamp(20px, 4vw, 54px) 0;
  border-block: 1px solid var(--edge);
}
.catalog-page-shell .collection-hero h1, .catalog-page-shell .product-detail h1 {
  max-width: 22ch;
  margin: 0;
  color: var(--text);
  font-weight: 720;
  line-height: 1.06;
  letter-spacing: -.042em;
  text-wrap: balance;
}
.catalog-page-shell .collection-hero h1 { font-size: clamp(34px, 5vw, 74px); }
.catalog-page-shell .collection-hero p { max-width: 66ch; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.catalog-page-shell .directory-tools {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px 20px;
  align-items: center;
  margin-top: 24px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--edge);
}
.directory-tools > label:first-child { grid-column: 1; font-size: 13px; font-weight: 650; }
.catalog-page-shell input[type=search][data-product-search], .catalog-page-shell .variant-select {
  padding: 12px 14px;
  min-height: 46px;
  width: 100%;
  margin: 0;
  color-scheme: dark;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #777572;
  border-radius: 4px;
}
.directory-tools input[type=search] { grid-column: 1; }
.directory-tools input::placeholder { color: #afaaa3; }
.directory-check { display: flex; align-items: center; gap: 8px; min-height: 42px; font-size: 13px; }
.directory-check input { accent-color: var(--sand); }
.directory-tools p { margin: 0; color: var(--muted); font-size: 12px; grid-column: 1/-1; }
.catalog-page-shell .collection-product-links {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,225px),1fr));
  align-items: stretch;
  gap: clamp(12px, 2vw, 24px);
  margin-top: 28px;
}
.catalog-page-shell .catalog-product-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 8px;
  overflow: hidden;
  padding: 0 0 17px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--edge);
  border-radius: 5px;
}
.catalog-page-shell .catalog-product-card:hover { border-color: var(--sand); }
.catalog-page-shell .catalog-product-card[hidden] { display: none; }
.catalog-page-shell .collection-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
  margin-bottom: 5px;
  background: #f2eee7;
  color: #343434;
}
.catalog-page-shell .collection-photo img { width: 100%; height: 100%; object-fit: contain; }
.catalog-product-card > :not(.collection-photo) { margin-inline: 15px; }
.catalog-product-card strong { font-size: clamp(15px,1.2vw,19px); font-weight: 650; line-height: 1.35; }
.catalog-product-card small { margin-top: auto; font-size: 15px; font-weight: 650; color: var(--text); }
.catalog-availability { color: var(--muted); font-size: 12px; }
.catalog-availability[data-availability=available] { color: #cdddbf; }
.related-collections, .product-collections, .product-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}
.related-collections > span, .product-collections > span { margin-right: 5px; color: var(--muted); font-size: 13px; }
.related-collections a, .product-collections a {
  padding: 9px 12px;
  border: 1px solid var(--edge);
  background: var(--card);
  color: var(--text);
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.3;
}
.related-collections a:hover, .product-collections a:hover { border-color: var(--sand); }
.catalog-page-shell .product-page .product-layout {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0,1.07fr) minmax(0,1fr);
  align-items: start;
  gap: clamp(25px,5vw,72px);
}
.catalog-page-shell .product-page .product-gallery-placeholder {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  height: auto;
  aspect-ratio: 1.08;
  max-height: none;
  background: #f2eee7;
  color: #343434;
  border-radius: 5px;
}
.catalog-page-shell .product-gallery-placeholder img { display: block; width: 100%; height: 100%; object-fit: contain; }
.catalog-page-shell .product-detail h1 { font-size: clamp(29px,3.25vw,50px); overflow-wrap: break-word; }
.catalog-page-shell .product-intro { margin: 15px 0 20px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.product-purchase { display: grid; gap: 10px; margin: 18px 0 0; }
.product-purchase label { font-size: 13px; font-weight: 650; }
.catalog-page-shell .product-page .detail-price { margin: 2px 0 10px; color: var(--text); font-size: 27px; font-weight: 680; }
.catalog-page-shell .product-purchase .button { justify-content: center; min-height: 49px; border: 0; border-radius: 4px; }
.product-purchase .button:focus-visible { outline-color: var(--opal-blue); }
.purchase-status:empty { display: none; }
.availability-note { display: grid; gap: 4px; margin: 14px 0; font-size: 13px; color: var(--muted); }
.availability-note strong { color: var(--text); }
.product-help { margin-top: 18px; gap: 16px; }
.product-help a, .related-guides a, .collection-placeholder a { color: var(--opal-blue); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.spec-panel, .variant-price-preview { margin: 18px 0; border-block: 1px solid var(--edge); }
.spec-panel summary, .variant-price-preview summary { padding: 15px 0; cursor: pointer; font-size: 14px; font-weight: 650; }
.spec-panel dl { margin: 0 0 12px; }
.spec-panel dl div, .variant-price-preview li { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid var(--edge); font-size: 13px; }
.spec-panel dt { color: var(--muted); }
.spec-panel dd { margin: 0; text-align: right; }
.variant-price-preview li small { display: block; margin-top: .3rem; line-height: 1.45; }
.variant-price-preview ul { margin: 0 0 12px; padding: 0; list-style: none; max-height: 250px; overflow: auto; }
.related-guides, .collection-placeholder { margin-top: 32px; padding: 22px; background: var(--card); }
.related-guides h2, .collection-placeholder h2 { margin: 0 0 12px; font-size: 19px; }
.related-guides a { display: block; width: fit-content; padding: 5px 0; }
@media(max-width:760px) {
  .catalog-page-shell .breadcrumbs { margin-bottom: 16px; }
  .catalog-page-shell .collection-product-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-page-shell .product-page .product-layout { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .catalog-page-shell .product-page .product-gallery-placeholder { aspect-ratio: auto; height: clamp(205px,32vh,310px); }
  .related-collections > span, .product-collections > span { flex-basis: 100%; }
  .catalog-product-card > :not(.collection-photo) { margin-inline: 10px; }
  .catalog-page-shell .directory-tools { grid-template-columns: 1fr; }
}
@media(max-width:340px) { .catalog-page-shell .collection-product-links { grid-template-columns: 1fr; } }
.availability-note a{color:#dbc39e;text-decoration:underline;text-underline-offset:.22em}
.product-gallery-placeholder.has-image:has(.product-example){display:block;aspect-ratio:auto;height:auto}
.product-gallery-placeholder.has-image .product-example{margin:1rem 0 0}
.product-gallery-placeholder.has-image .product-example img{width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.product-example figcaption{padding:.5rem .75rem;color:#f2eee7;background:#292d31;font-size:.8rem}

.item-gallery { min-width: 0; width: 100%; }
.item-gallery .gallery-figure { margin: 0; }
.item-gallery figcaption { color: var(--muted); margin-top: 8px; font-size: 13px; }
.gallery-thumbnails { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 2px 3px; }
.gallery-thumbnails a { display: grid; width: clamp(45px, 6.4vw, 62px); aspect-ratio: 1; padding: 2px; border: 2px solid transparent; border-radius: 5px; background: var(--surface,#292d31); }
.gallery-thumbnails a[aria-current="true"] { border-color: var(--sand,#c7ad86); }
.gallery-thumbnails a:focus-visible { outline: 2px solid #f2eee7; outline-offset: 2px; }
.gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: contain; background: #e9e5de; border-radius: 2px; }

.collection-shortcuts { display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center; margin:0 0 24px; }
.collection-shortcuts a { color:var(--opal-blue); padding:6px 0; text-decoration:underline; text-underline-offset:3px; }

.directory-tools [data-clear-filters][hidden] { display: none; }

/* Department shelves on the catalog directory */
.products-directory .directory-masthead, .products-directory .shelf-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.directory-masthead h1, .shelf-header h2 { margin: 0; color: var(--text); letter-spacing: -.035em; line-height: 1.15; }
.directory-masthead h1 { font-size: clamp(30px, 4vw, 58px); }
.directory-masthead p { margin: 0; font-size: .86rem; color: var(--muted); }
.products-directory .directory-tools {
  grid-template-columns: minmax(12rem,1.5fr) minmax(10rem,1fr) minmax(8rem,.75fr) auto auto;
  align-items: end;
  gap: 12px 16px;
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 6px;
}
.products-directory .directory-field { display: grid; gap: 6px; font-size: .8rem; font-weight: 650; }
.directory-field select {
  min-width: 0; width: 100%; min-height: 46px; padding: 8px 10px; font: inherit; font-size: 1rem;
  color: var(--text); background: var(--surface); border: 1px solid #777572; border-radius: 4px; color-scheme: dark;
}
.products-directory .directory-reset { background: transparent; color: var(--text); border: 0; text-decoration: underline; min-height: 44px; cursor: pointer; }
.products-directory [hidden] { display: none; }
.catalog-shelf { margin-top: clamp(27px, 3vw, 46px); }
.shelf-header { padding: 0 0 10px; border-bottom: 1px solid var(--edge); }
.shelf-header h2 { font-size: clamp(20px, 2.3vw, 33px); }
.shelf-header a { color: var(--opal-blue); font-size: .85rem; }
.pending-directory-photos .products-directory .collection-photo img { display: none; }
.products-directory .all-products-grid { gap: clamp(10px, 1.4vw, 20px); margin-top: 14px; }
@media(max-width:850px) {
  .products-directory .directory-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:500px) {
  .products-directory .directory-tools { padding: 11px; gap: 8px; }
  .products-directory .directory-field:first-child { grid-column: 1/-1; }
  .products-directory .directory-field select { padding-inline: 6px; font-size: .94rem; font-weight: 500; }
  .products-directory .directory-check { align-self:center; }
  .products-directory .all-products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .products-directory .directory-reset { justify-self: end; }
  .products-directory .directory-check { font-size: .75rem; }
  .products-directory .catalog-product-card strong { font-size: .88rem; }
  .products-directory .collection-photo { aspect-ratio: 1; }
  .products-directory .shelf-header a { font-size: .75rem; }
}

.product-purchase { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.product-purchase [data-option-detail] { font-size: .875rem; overflow-wrap: anywhere; }

[data-option-preview] summary { cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
[data-option-preview] img { display: block; width: min(100%, 21rem); height: auto; margin-top: .65rem; border-radius: 4px; }

.catalog-choice-detail { font-size: .81rem; line-height: 1.4; color: #c8c6c2; }

.products-directory .directory-order { display:flex; justify-content:flex-end; align-items:center; gap:.65rem; margin:1rem 0; font-size:.85rem; }
.directory-order select { min-height:44px; max-width:100%; padding:0 .55rem; background:var(--surface); color:var(--text); border:1px solid #777572; border-radius:4px; font:inherit; color-scheme:dark; }
.products-directory .directory-order[hidden] { display:none; }
.product-purchase [data-add-to-bag]:disabled { cursor:default; opacity:.55; }

.purchase-controls { display: grid; grid-template-columns: minmax(5rem, 6rem) minmax(0, 1fr); gap: 12px; align-items: end; }
.purchase-controls label { display: grid; gap: 4px; }
.purchase-controls input { box-sizing: border-box; width: 100%; min-height: 49px; padding: 8px 10px; background: var(--card); color: var(--text); border: 1px solid #777572; border-radius: 4px; color-scheme: dark; font: inherit; font-size: 1rem; }
[data-quantity-summary] { color: var(--text); font-size: .9rem; font-variant-numeric: tabular-nums; }
.color-sample { display: inline-flex; align-items: center; gap: .6rem; font-size: .85rem; }
.color-sample[hidden] { display: none; }
.color-sample img { width: 36px; height: 24px; object-fit: cover; border: 1px solid #777572; border-radius: 3px; }

.directory-recovery { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; margin:1rem 0 2rem; }
.directory-recovery[hidden], .directory-recovery [hidden] { display:none; }
.directory-recovery a { display:inline-flex; align-items:center; min-height:44px; text-decoration:underline; text-underline-offset:3px; }

.department-index { display:flex; flex-wrap:wrap; align-items:center; gap:0 18px; border-block:1px solid var(--line); padding-block:4px; }
.department-index a { display:inline-flex; align-items:center; min-height:40px; text-decoration:underline; text-underline-offset:4px; color:var(--opal-blue); font-size:.875rem; }
.department-shelf { margin:clamp(24px,3vw,42px) 0; }
.department-shelf h2 { font-size:clamp(1.15rem,2vw,1.6rem); letter-spacing:-.035em; line-height:1.22; margin:0 0 14px; }

.product-comparisons { margin-block:clamp(24px,4vw,48px) 20px; }
.product-comparisons h2 { margin:0 0 12px; font-size:clamp(1.15rem,2vw,1.5rem); line-height:1.25; }
.comparison-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr)); gap:12px; }
.comparison-cards .guide-product {
  display:flex; align-items:center; gap:14px; padding:14px;
  background:var(--store-panel); border:1px solid var(--store-line); border-radius:4px;
}
.comparison-cards .guide-product:only-child { max-width:40rem; }
.comparison-cards img { width:72px; height:72px; flex:none; object-fit:contain; border-radius:2px; }
.comparison-cards .guide-product > span { display:grid; gap:5px; min-width:0; }
.comparison-cards strong { color:var(--store-text); font-size:.97rem; line-height:1.35; }
.comparison-cards .comparison-fact, .comparison-cards .guide-choice, .comparison-cards small {
  color:var(--store-muted); font-size:.85rem; line-height:1.4;
}
.comparison-cards a:is(:hover,:focus-visible) strong { text-decoration:underline; text-underline-offset:.2em; }
