/* Shop page. Whole card is a link to the product page (no Add To Cart here).

   LAYOUT BY PRODUCT COUNT (assets/cms.js writes the count into data-count)
     Computer:  1 → 1   2 → 2 across   3 → 3 across   4 → 2×2   5+ → 3 across
     Phone:     1–3 → stacked, one per row      4+ → 2 across
   A leftover item on the last row is centered.
   On a computer every product is the same size no matter how many there are. */
.shop{
  padding:40px 6vw 130px;
  max-width:1100px;                  /* wide enough that 3 across keeps products big */
  margin:0 auto;
}
.shop-grid{
  --cols:3;          /* products per row */
  --size:3;          /* product width = 1/size of the full shop width */
  --gap-x:28px;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;            /* centers a leftover item on the last row */
  align-items:flex-start;
  gap:48px var(--gap-x);
  width:calc((100% - (var(--size) - 1) * var(--gap-x)) / var(--size) * var(--cols) + (var(--cols) - 1) * var(--gap-x));
  max-width:100%;
  margin:0 auto;
}
.shop-grid > .shop-item{
  flex:0 0 calc((100% - (var(--cols) - 1) * var(--gap-x)) / var(--cols));
  min-width:0;
}
.shop-grid[data-count="1"]{ --cols:1; }
.shop-grid[data-count="2"], .shop-grid[data-count="4"]{ --cols:2; }
.shop-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.shop-link{
  display:block;
  width:100%;
  text-decoration:none;
  color:inherit;
  cursor:pointer;
}
.shop-media{
  width:100%;
  aspect-ratio:4/5;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  margin-bottom:18px;
}
.shop-media img{
  width:88%; height:88%;
  object-fit:contain;
  transition:transform .35s ease;
}
.shop-link:hover .shop-media img{ transform:scale(1.06); }
.shop-name{
  font-size:13px;
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--cream);
  margin-bottom:4px;
}
.shop-item-soon .shop-name{ color:var(--dim); }
.shop-price{
  font-size:14px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--cream);
}
.shop-item-soon .shop-price{ color:var(--dim); }
.shop-notify{
  display:inline-block;
  padding:12px 16px;                 /* bigger tap area, same look */
  margin-top:-2px;
  font-size:11px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  text-decoration:underline;
  color:var(--cream);
  transition:color var(--ease);
}
.shop-notify:hover{ color:var(--hover); }

@media (max-width:600px){
  .shop{ padding:32px 5vw 110px; }
  .shop-grid{ --gap-x:14px; row-gap:36px; }
  /* phone: 4 or more products → 2 across */
  .shop-grid, .shop-grid[data-count]{ --cols:2; --size:2; }
  /* phone: 1–3 products → stacked, one per row (a bit narrower than the screen) */
  .shop-grid[data-count="1"], .shop-grid[data-count="2"], .shop-grid[data-count="3"]{ --cols:1; --size:1.25; }
  .shop-name{ font-size:11px; }
  .shop-price{ font-size:12px; }
  .shop-notify{ font-size:10px; }
}

/* grid stays invisible until the real products have loaded (cms.js adds .is-ready) */
.shop-grid[data-shop-grid]{ opacity:0; }
.shop-grid[data-shop-grid].is-ready{ opacity:1; transition:opacity .25s ease; }
