/* NenoWorks — Tools & Showcase highlight cards (homepage only).
   Additive: style.css is never edited. Linked from the _shop layout, so
   checkout and order-complete never load this file. The section is rendered
   in the homepage React tree (ToolsShowcase, after section#free) so it is
   present in SSR HTML and survives hydration. Light theme inherits shop
   glass tokens; dark theme follows the full-black skin already set by
   theme-toggle.css. */

.shop-page .nw-tools{
  padding-top: 88px;
  padding-bottom: 40px;
}
.shop-page .nw-tools-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.shop-page .nw-tools-card{
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.shop-page .nw-tools-preview{
  display: block;
  position: relative;
  margin: 8px 8px 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(30, 36, 80, .06);
  isolation: isolate;
}
.shop-page .nw-tools-preview img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.shop-page .nw-tools-body{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  flex: 1;
}
.shop-page .nw-tools-body h3{
  margin: 0;
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--text);
}
.shop-page .nw-tools-body p{
  margin: 0;
  flex: 1;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--muted);
}
.shop-page .nw-tools-open{
  align-self: flex-start;
  margin-top: 4px;
  text-decoration: none;
}
.shop-page .nw-tools-card:focus-within{
  outline: 2px solid var(--ink-violet);
  outline-offset: 3px;
}

@media (min-width: 700px){
  .shop-page .nw-tools-grid{
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop: 6-column track so 5 cards sit in a balanced 3+2 grid.
   Other counts stay even: 1 full-width, 2 large, 3 or 6 in a row,
   4 as a 2x2. Adding a tool to TOOLS in src/lib/tools-showcase.ts is enough. */
@media (min-width: 1100px){
  .shop-page .nw-tools-grid{
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
  }
  .shop-page .nw-tools-grid .nw-tools-card{ grid-column: span 2; }
  .shop-page .nw-tools-grid[data-count="1"] .nw-tools-card{ grid-column: span 6; }
  .shop-page .nw-tools-grid[data-count="2"] .nw-tools-card{ grid-column: span 3; }
  .shop-page .nw-tools-grid[data-count="4"] .nw-tools-card{ grid-column: span 3; }
  .shop-page .nw-tools-grid[data-count="5"] .nw-tools-card:nth-last-child(-n+2){
    grid-column: span 3;
  }
}

@media (prefers-reduced-motion: no-preference){
  .shop-page .nw-tools-card.nw-rv-wait{
    animation: none !important;
    opacity: 0;
    transform: translate3d(0, 34px, 0);
  }
  .shop-page .nw-tools-card.nw-rv-in{
    animation-name: nwReveal;
    animation-duration: 1.25s;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
    animation-delay: var(--nw-rv-delay, 0ms);
    animation-fill-mode: both;
    animation-iteration-count: 1;
  }
}

html[data-theme="dark"] .shop-page .nw-tools-preview{
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
html[data-theme="dark"] .shop-page .nw-tools-body p{
  color: var(--muted);
}

@media (max-width: 760px){
  .shop-page .nw-tools{ padding-top: 64px; padding-bottom: 24px; }
  .shop-page .nw-tools-preview{ margin: 6px 6px 0; border-radius: 12px; }
  .shop-page .nw-tools-body{ padding: 12px 14px 14px; }
  .shop-page .nw-tools-body h3{ font-size: 1.02rem; }
}
