/* Plug — Shop All Gadgets page. Loaded alongside plug-base.css. Reuses
   the .plug-product-card/.plug-btn primitives plug-base.css already
   defines, plus this page's own header/toolbar/grid. */

.plug-theme .plug-shop-header {
  padding: 40px 0 8px;
}
.plug-theme .plug-shop-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
}
.plug-theme .plug-shop-header p {
  color: var(--plug-muted);
  margin: 0;
}
.plug-theme .plug-shop-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--plug-border);
  margin-bottom: 20px;
}
.plug-theme .plug-shop-cats button {
  border: 1.5px solid var(--plug-border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--plug-ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.plug-theme .plug-shop-cats button.is-active,
.plug-theme .plug-shop-cats button:hover {
  background: var(--plug-navy);
  border-color: var(--plug-navy);
  color: #fff;
}
.plug-theme .plug-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--plug-muted);
}
.plug-theme .plug-shop-toolbar select {
  border: 1.5px solid var(--plug-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--plug-ink);
}
.plug-theme .plug-shop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px 24px;
  padding-bottom: 60px;
}
.plug-theme .plug-shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--plug-muted);
  padding: 40px 0;
}

/* Plain click-through card — image, title, price, no button/border/
   radius box, matching the reference exactly. */
.plug-theme .plug-shop-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Real, confirmed bug (found via Playwright at 375px viewport): a CSS
     Grid item's default min-width is `auto`, not 0 — it refuses to
     shrink below its own content's natural (min-content) width even
     though the track itself is `1fr`. With no override here, the grid
     computed actual columns of 211px + 205px inside a 327px-wide
     container (measured), pushing the whole page 81px wider than the
     viewport on mobile. min-width:0 lets the card genuinely shrink to
     fit its track, so text wraps instead of forcing the column wide. */
  min-width: 0;
}
.plug-theme .plug-shop-card-media {
  position: relative;
  height: 190px;
  margin-bottom: 4px;
}
.plug-theme .plug-shop-new-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  background: var(--plug-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}
.plug-theme .plug-shop-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--plug-ink);
  line-height: 1.4;
  margin: 0;
}
.plug-theme .plug-shop-card-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--plug-ink);
}
.plug-theme .plug-shop-price-sale {
  color: var(--plug-red);
  font-weight: 800;
}
.plug-theme .plug-shop-sale-word {
  color: var(--plug-red);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .plug-theme .plug-shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .plug-theme .plug-shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }
  .plug-theme .plug-shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
