/* =========================================================
   EDITORIAL PRODUCT GRID (Home + Shop)
   The "Blueprint" Grid Logic
   ========================================================= */

[data-mount="products-grid"] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px; /* This creates the hairline divider effect */
  background-color: var(--os-ink); /* The divider color */
  border: 1px solid var(--os-ink);
  margin-top: 2rem;
}

@media (max-width: 1100px) {
  [data-mount="products-grid"] { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  [data-mount="products-grid"] { grid-template-columns: 1fr; }
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */

.product-card {
  position: relative;
  padding: 40px; /* Generous editorial padding */
  background: var(--os-surface);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: background-color 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  background-color: #fafafa;
}

/* --- IMAGE FRAME --- */
.product-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--os-border);
  margin-bottom: 24px;
  background: #f8f8f8;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-thumb img {
  transform: scale(1.08);
}

/* --- BADGE: Minimalist Tag --- */
.product-badge {
  position: absolute;
  top: 52px;
  left: 52px;
  z-index: 2;
  padding: 6px 10px;
  background: var(--os-ink);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* --- TEXT CONTENT --- */
.product-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  color: var(--os-ink);
}

.product-desc {
  font-size: 0.9rem;
  color: var(--os-ink-dim);
  line-height: 1.6;
  margin-bottom: 24px;
  /* Limit to 2 lines for grid consistency */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- ACTION ROW --- */
.product-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--os-border);
}

.product-price {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--os-ink);
}

.product-actions {
  display: flex;
  gap: 8px;
}

/* Ensure buttons in cards are razor-sharp */
.product-actions .os-btn-primary,
.product-actions .os-btn-outline {
  padding: 8px 16px;
  font-size: 0.65rem;
  height: auto;
  min-width: unset;
}