[hidden] { display: none !important; }
.shop { min-height: 50vh; padding-block: clamp(2rem, 6vw, 4rem); }
.shop h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.12; margin-top: 0; }
.shop h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.shop h3 { font-size: 1.1rem; line-height: 1.3; }
.shop p { max-width: 72ch; }
.shop-categories, .shop-grid, .shop-layout { display: grid; gap: 1rem; }
.shop-categories, .shop-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.shop-categories { margin-block: 1.5rem 2.5rem; }
.shop-categories a { background: var(--navy); padding: 1.2rem; border-radius: .8rem; color: white; font-weight: 700; }
.shop-category { margin-block: 2rem; scroll-margin-top: 2rem; }
.shop-card { display: flex; flex-direction: column; gap: .6rem; }
.shop-card h3, .shop-card p { margin: 0; }
.shop-card .shop-actions { margin-top: auto; }
/* Separate the square frame from the bitmap so small originals keep their natural size. */
.shop-image,
.shop-product-frame {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #d5e1f0;
  border-radius: .65rem;
  background: #fff;
}
.shop-image img,
.shop-product-photo {
  position: absolute;
  inset: .25rem;
  display: block;
  margin: auto;
  width: auto;
  height: auto;
  max-width: calc(100% - .5rem);
  max-height: calc(100% - .5rem);
  object-fit: contain;
}
.shop-placeholder { display: grid; gap: 1rem; place-content: center; justify-items: center; place-self: stretch; background: #e8effa; color: var(--ink); }
.shop-device { display: block; width: 3.5rem; height: 6rem; border: .16rem solid #51658d; border-radius: .7rem; background: linear-gradient(155deg, #f9fbff, #becce8); }
.shop-stock { color: #155c3a; font-weight: 700; }
.shop-price { font-weight: 800; font-size: 1.35rem; }
.shop-actions, .shop-thumbnails { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding-top: .55rem; }
.shop-actions .button, .shop-outline { font: inherit; font-weight: 700; padding: .55rem .8rem; border-radius: .6rem; cursor: pointer; }
.shop-actions .button { border: 1px solid transparent; }
.shop-outline { border: 1px solid var(--blue); background: white; color: var(--ink); text-decoration: none; }
.shop-outline:hover, .shop-outline[aria-pressed="true"] { background: var(--paper); }
.shop-cart-link { white-space: nowrap; text-decoration: none; font-weight: 700; }
.shop-cart-link [data-cart-count] { background: var(--cyan); color: var(--navy); border-radius: 2rem; padding: .08rem .37rem; }
.shop-layout { grid-template-columns: minmax(0, 3fr) minmax(15rem, 2fr); align-items: start; }
.shop-product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 5vw, 3rem); }
.shop-specs div, .shop-totals div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; padding-block: .55rem; border-bottom: 1px solid #d3deed; }
.shop-specs div { grid-template-columns: minmax(6.6rem, .8fr) 2fr; }
.shop dd { margin: 0; }
.shop-totals div:last-child { font-weight: 800; }
.shop-lines { margin: 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.shop-line { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.shop-line > div { flex: 1 1 12rem; }
.shop-line p { margin: .25rem 0; }
.shop label { font-weight: 700; }
.shop input:not([type="radio"]), .shop select { font: inherit; padding: .5rem; border: 1px solid #6a7891; border-radius: .35rem; background: white; }
.shop input[type="number"] { display: block; width: 5rem; }
.shop-form { display: grid; gap: 1rem; }
.shop-form h2 { margin: .2rem 0; }
.shop-form input:not([type="radio"]) { display: block; width: 100%; margin-top: .2rem; }
.shop-form fieldset { min-width: 0; border: 1px solid #a9b9d0; border-radius: .6rem; }
.shop-form fieldset label { display: block; margin-block: .5rem; }
.shop-status { position: fixed; z-index: 5; inset: auto 1rem 1rem auto; width: fit-content; max-width: calc(100% - 2rem); padding: .85rem 1rem; color: white; background: var(--navy); border-radius: .5rem; box-shadow: 0 .2rem 1rem #091b3950; pointer-events: none; }
@media (max-width: 700px) {
  .shop-layout, .shop-product { grid-template-columns: minmax(0, 1fr); }
}
.shop-quantity-form { display: flex; flex-wrap: wrap; align-items: end; gap: .4rem; }
.shop-product-figure { margin: 0; }
.shop-product-figure figcaption { padding-top: .4rem; font-size: .9rem; }
.shop-thumbnail { display: grid; justify-items: center; align-content: start; gap: .3rem; max-width: 8.5rem; font-size: .84rem; }
.shop-thumb-frame { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: .25rem; background: #fff; }
.shop-thumbnail img { display: block; width: auto; height: auto; max-width: 100%; max-height: 64px; object-fit: contain; }
.shop-thumbnail[aria-pressed="true"] { outline: 2px solid var(--blue); outline-offset: -2px; }
@media (max-width: 400px) {
  .shop-thumbnail { padding: .35rem .46rem; }
  .shop-thumb-frame { width: 50px; height: 50px; }
  .shop-thumbnail img { max-height: 50px; }
}
.shop-studio-sheet { display: inline-block; margin-top: .65rem; font-size: .875rem; }
