.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 18px;
}

.products.v3 { grid-template-columns: repeat(3, 1fr); }
.products.v2 { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }

.product {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: product-fade .6s var(--ease) both;
}

@keyframes product-fade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.product-media {
  position: relative;
  aspect-ratio: .78;
  background: var(--bg-2);
  overflow: hidden;
  border: 1px solid var(--line);
}

.product-img {
  position: absolute;
  inset: 0;
  transition: transform .9s var(--ease), opacity .5s var(--ease);
  background: var(--bg-2);
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img.b { opacity: 0; }
.product:hover .product-img.a { opacity: 0; }
.product:hover .product-img.b { opacity: 1; transform: scale(1.04); }

.wishlist,
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: var(--paper);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  cursor: pointer;
  z-index: 2;
}

.product:hover .wishlist,
.product:hover .wishlist-btn { opacity: 1; transform: none; }

.wishlist svg,
.wishlist-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.3;
}

.wishlist.is-active svg,
.wishlist-btn.is-active svg { fill: var(--accent); stroke: var(--accent); }

.quick-add {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  transform: translateY(110%);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.product:hover .quick-add { transform: none; opacity: 1; }

.quick-add .sizes { display: flex; gap: 7px; }
.quick-add .sizes span { cursor: pointer; padding: 2px 3px; }
.quick-add .sizes span:hover { background: var(--accent); color: var(--ink); }
.quick-add .sizes span.oos { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.quick-add .add { font-weight: 700; }

.p-brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.p-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.p-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -.005em;
}

.p-sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

.p-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
  padding-top: 2px;
  font-weight: 500;
}

.p-price s { color: var(--ink-2); opacity: .55; margin-right: 6px; }
.p-price b { color: var(--accent); font-weight: 500; }

.p-low-stock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #c45a14;
  display: flex;
  align-items: center;
  gap: 6px;
}

.p-low-stock::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c45a14;
  flex: none;
  animation: low-stock-pulse 1.8s ease-in-out infinite;
}

@keyframes low-stock-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.detail-low-stock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #c45a14;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-low-stock::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c45a14;
  flex: none;
  animation: low-stock-pulse 1.8s ease-in-out infinite;
}

.p-preorder {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5b7fd4;
}

.detail-preorder {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5b7fd4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-preorder::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b7fd4;
  flex: none;
}

.swatches { display: flex; gap: 5px; margin-top: 8px; }

.sw {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .15);
  cursor: pointer;
  transition: transform .25s var(--ease);
}

.sw:hover { transform: scale(1.25); }

@media (max-width: 1100px) {
  .products { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .products { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
}
