/* Category tiles share a 4:3 frame and align on the same grid row. */
body#category #products #js-product-list .products { align-items: stretch; }
body#category #products #js-product-list .products > .product-miniature { display: flex; }
body#category #products .product-miniature__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}
body#category #products .product-miniature__bottom {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
}
body#category #products .product-miniature__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.6em;
}
body#category #products .product-miniature__variants {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: .22rem;
  min-height: 28px;
  margin: .18rem 0;
}
body#category #products .product-miniature__variants a {
  flex: 0 0 auto;
  width: clamp(16px, 4vw, 24px);
  height: clamp(16px, 4vw, 24px);
  margin: 0;
}
body#category #products .product-miniature__variants .vp-card-more-colors {
  display: inline-grid;
  place-items: center;
  width: auto;
  min-width: 25px;
  padding-inline: 3px;
  color: #213337;
  font-size: .69rem;
  text-decoration: underline;
}
/* Restrict the uniform gallery frame to the main carousel, leaving its zoom native. */
body#product .vooby-product-layout .product__images > .product__carousel > .carousel-inner > .carousel-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f2e9df;
}
body#product .vooby-product-layout .product__images > .product__carousel > .carousel-inner > .carousel-item > picture:not([hidden]) {
  display: block;
  width: 100%;
  height: 100%;
}
body#product .vooby-product-layout .product__images > .product__carousel > .carousel-inner > .carousel-item > :is(picture:not([hidden]), video) {
  position: absolute;
  inset: 0;
}
body#product .vooby-product-layout .product__images > .product__carousel > .carousel-inner > .carousel-item :is(img, video) {
  display: block;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 4 / 3;
  object-fit: contain !important;
}
body#product .product__right #product_accordion :is(.accordion-button, .vp-dimensions-module .vd-open) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: .65rem .55rem !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  color: #213337;
  font: 650 .92rem/1.4 system-ui, sans-serif;
  text-align: start;
  text-decoration: none;
}
body#product .product__right #product_accordion .vp-dimensions-module { padding: 0; background: transparent; }
body#product .product__right #product_accordion .vd-open::after {
  content: "+";
  font-size: 1.15rem;
  font-weight: 400;
}

/* The existing swatch picker keeps native combination inputs and opens as a side panel. */
dialog.vp-fabric-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(560px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  overflow: auto;
}
.vp-fabric-dialog .vp-fabric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; }
.vp-fabric-dialog .vp-fabric-tile:disabled { opacity: .5; cursor: not-allowed; }
.vp-fabric-dialog .vp-fabric-footer { padding-bottom: max(15px, env(safe-area-inset-bottom)); }

.vp-showroom-related[hidden] { display: none; }
.vp-showroom-related {
  margin: clamp(1.4rem, 4vw, 3.2rem) auto;
  padding: clamp(1rem, 3vw, 2.2rem);
  max-width: 1500px;
  background: #fff9f3;
  border-top: 1px solid #e3d3c3;
  color: #213337;
}
.vp-showroom-related h2 { margin-bottom: .85rem; font: 400 clamp(1.5rem, 3vw, 2.25rem)/1.2 Georgia, serif; }
.vp-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.55rem, 2vw, 1.2rem); }
.vp-related-card { display: flex; flex-direction: column; gap: .4rem; color: inherit; }
.vp-related-card:hover strong { text-decoration: underline; }
.vp-related-media { display: block; aspect-ratio: 4 / 3; background: #efe4d7; overflow: hidden; }
.vp-related-media img { width: 100%; height: 100%; object-fit: contain; }
.vp-related-price { font-weight: 650; }
@media (max-width: 620px) {
  .vp-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  .vp-related-card { animation: vp-card-enter .25s ease-out both; }
  .vp-related-media img { transition: transform .25s ease-out; }
  .vp-related-card:is(:hover, :focus-visible) img { transform: scale(1.035); }
}
@keyframes vp-card-enter {
  from { opacity: 0; transform: translateY(.35rem); }
  to { opacity: 1; transform: translateY(0); }
}
