/* Store — product grid + cards.
   Aligned with DESIGN.md (elegant-techy): warm surface, hairline borders,
   tightened 8px radius, calm motion (cards lift ~3px + teal border on hover),
   teal for navigation/secondary, brand red reserved for the single Buy CTA. */

:root {
  --brand-red: #eb4a4a;
  --brand-teal: #15caaa;
  --surface: #ffffff;
  --line: #e9e3da;
  --ink: #1f2733;
  --muted: #5b6573;
  --ease-standard: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Grid wrapper keeps the comfortable, spacious rhythm from DESIGN.md. */
.product-grid {
  margin-top: 8px;
}

/* Card — surface that pops off the warm paper, hairline border, md radius. */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 39, 51, 0.06);
  transition:
    transform 200ms var(--ease-standard),
    border-color 200ms var(--ease-standard),
    box-shadow 200ms var(--ease-standard);
}

/* Calm micro-interaction: lift ~3px + teal border on hover (DESIGN.md motion). */
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-teal);
  box-shadow: 0 8px 24px rgba(31, 39, 51, 0.1);
}

.product-card:focus-within {
  border-color: var(--brand-teal);
}

/* Media — fixed 4:3 frame so mismatched product photos still align in the grid. */
.product-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f1ede6;
  overflow: hidden;
}

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

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  flex: 1;
}

.product-card__name {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.2;
}

.product-card__desc {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
}

/* Footer pinned to the bottom so CTAs line up across uneven cards. */
.product-card__footer {
  margin-top: auto;
  padding-top: 8px;
}

/* Teal "View" affordance — secondary action per the color rules. */
.product-card__cta {
  color: var(--brand-teal);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 150ms var(--ease-standard);
}

.product-card:hover .product-card__cta {
  gap: 10px;
}

/* Empty state — quiet, centered, on-brand. */
.store-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* ── Detail page ───────────────────────────────────────────────── */

.product-detail__media {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f1ede6;
  aspect-ratio: 4 / 3;
}

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

.product-detail__desc {
  color: var(--ink);
  line-height: 1.6;
  max-width: 65ch;
}

/* The Buy button is the single brand-red emphasis on the page. */
.button.is-buy {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  font-weight: 600;
  transition:
    transform 100ms var(--ease-standard),
    filter 150ms var(--ease-standard);
}

.button.is-buy:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card__cta,
  .button.is-buy {
    transition: none;
  }
  .product-card:hover,
  .button.is-buy:hover {
    transform: none;
  }
}
