/* The configurator page (/product/<slug>/) and the product index (/product/). */

.layer-stack { position: relative; width: 100%; background: #F1F1F1; overflow: hidden; user-select: none; }
.layer-stack img { position: absolute; display: block; max-width: none; }

.configurator h1.heading small { font-size: 55%; }
.cfg { display: grid; gap: 18px 28px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "views" "options"; margin-bottom: 30px; }
.cfg-main { grid-area: main; }
.cfg-views { grid-area: views; }
.cfg-options { grid-area: options; padding-left: 4px; }

.cfg-picture { width: 100%; }
.cfg-missing { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; background: #F1F1F1; color: #888; font-size: 12px; }

/* view thumbnails */
.cfg-views { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.cfg-views li { flex: 0 0 72px; }
.cfg-views button { display: block; width: 100%; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s; }
.cfg-views button:hover { opacity: 1; }
.cfg-views button.active { border-color: #555; opacity: 1; }

/* material choices */
.cfg-component { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.cfg-component legend { border: 0; margin: 0 0 6px; font-size: 13px; width: 100%; display: flex; justify-content: space-between; gap: 10px; color: #333; }
.cfg-component legend .subheading-font { font-size: 15px; }
.cfg-current { color: #777; text-align: right; }
.cfg-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); padding: 0; cursor: pointer;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.15), inset 0 3px 5px rgba(255,255,255,.55); transition: transform .12s; }
.cfg-swatch:hover { transform: scale(1.12); }
.cfg-swatch.selected { outline: 2px solid #333; outline-offset: 2px; }
.cfg-swatch.brushed { background-image: repeating-linear-gradient(100deg, rgba(255,255,255,.18) 0 1px, rgba(0,0,0,.06) 1px 3px) !important; background-blend-mode: normal; }
.cfg-swatch[disabled] { opacity: .3; cursor: not-allowed; }

.cfg-summary { border-top: 1px solid #ddd; padding-top: 14px; margin-top: 6px; }
.cfg-price { font-size: 22px; color: #222; }
.cfg-sku { font-size: 11px; color: #999; letter-spacing: .05em; margin: 2px 0 10px; }
.cfg-details { font-size: 12px; color: #555; margin-bottom: 14px; }
.cfg-details summary { cursor: pointer; color: #333; }
.cfg-details div { margin-top: 6px; line-height: 1.6; }
.cfg-enquire { display: inline-block; padding: 9px 18px; border: 1px solid #333; color: #222; text-decoration: none; letter-spacing: .04em; }
.cfg-enquire:hover, .cfg-enquire:focus { background: #333; color: #fff; text-decoration: none; }

/* desktop/tablet: choices | picture | views, fitting the window */
@media (min-width: 768px) {
  .cfg { grid-template-columns: minmax(230px, 4fr) minmax(0, 6fr) 92px; grid-template-areas: "options main views"; align-items: start; }
  .cfg-main .layer-stack, .cfg-main .cfg-missing { max-width: calc(100vh - 210px); margin: 0 auto; }
  .cfg-views { flex-direction: column; overflow: visible; }
  .cfg-views li { flex: none; }
  .cfg-options { max-height: calc(100vh - 210px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
}

/* product index */
.product-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; margin-bottom: 40px; }
.product-card { display: block; text-align: center; color: #333; text-decoration: none; }
.product-card .title { display: block; margin-top: 8px; font-size: 16px; }
.product-card:hover .title { text-decoration: underline; }

/* gallery pieces that are configurable */
.design-link { display: inline-block; margin-top: 10px; font-size: 12px; letter-spacing: .04em; color: #333; border-bottom: 1px solid #999; text-decoration: none; }
.design-link:hover { border-color: #333; text-decoration: none; }
