/* Self-contained homepage category grid, loaded after the legacy tile styles. */
#products .product-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-rows:1fr;
  gap:24px;
  padding:4px;
  overflow:visible;
}
#products .product-card {
  --card-duration:200ms;
  --card-ease:cubic-bezier(.2,.65,.3,1);
  position:relative;
  isolation:isolate;
  grid-column:auto;
  display:flex;
  flex-direction:column;
  min-width:0;
  width:auto;
  overflow:hidden;
  padding:16px;
  border:1px solid #c0d1e5;
  border-radius:16px;
  background:radial-gradient(ellipse at 5% 0%,#fff 0%,rgba(255,255,255,.55) 44%,transparent 75%),linear-gradient(145deg,#f4f8fd 0%,#e8f0fa 70%,#dce8f6 100%);
  box-shadow:inset 0 1px 0 #fff,0 10px 28px rgba(28,60,99,.09);
  text-decoration:none;
  opacity:1;
  transform:none;
  transition:transform var(--card-duration) var(--card-ease),box-shadow var(--card-duration) var(--card-ease),border-color var(--card-duration) var(--card-ease);
}
#products .product-card::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:radial-gradient(ellipse at 25% 12%,rgba(199,219,244,.8),transparent 62%);
  opacity:0;
  transition:opacity var(--card-duration) var(--card-ease);
}
#products .product-card::after {
  content:"";
  position:absolute;
  z-index:-1;
  width:185px;
  height:230px;
  bottom:0;
  right:0;
  background:url('/assets/optimized/category-botanical-lineart.svg') 32px 8px / 225px 245px no-repeat;
  opacity:.14;
  pointer-events:none;
  transition:transform var(--card-duration) var(--card-ease),opacity var(--card-duration) var(--card-ease);
}
#products .product-card > img {
  position:relative;
  width:100%;
  height:210px;
  aspect-ratio:auto;
  padding:4px 14px 10px;
  object-fit:contain;
  object-position:center;
  border-radius:0;
  background:transparent;
  filter:drop-shadow(0 10px 8px rgba(33,53,77,.09));
  transform:none;
  transition:transform var(--card-duration) var(--card-ease);
}
#products .product-card-copy {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  flex:1;
  min-width:0;
  padding:14px 6px 4px;
}
#products .product-card h3 {
  min-height:1.2em;
  margin:0;
  font:700 1.6rem/1.12 'Cormorant Garamond',serif;
  color:#163b65;
  text-wrap:balance;
}
#products .product-card p { margin:0;color:#425a73;font-size:.82rem;line-height:1.65; }
#products .product-card-copy > p { min-height:3.3em; }
#products .product-formats { display:block;min-height:112px;padding:14px 0 0;border-top:1px solid #bdcee1; }
#products .product-formats b { display:block;margin-bottom:6px;font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:#74562d; }
#products .format-tags { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0;padding:0;list-style:none; }
#products .format-tags li { display:flex;align-items:center;justify-content:flex-start;gap:4px;min-width:0;min-height:28px;padding:5px 6px;border:1px solid #b6cce3;border-radius:6px;background:rgba(255,255,255,.8);color:#234d7b;font-size:.75rem;font-weight:700;line-height:1.3;white-space:nowrap; }
#products .format-tags svg { flex:0 0 12px;color:#004aad; }
#products .format-tags li:only-child { grid-column:1 / -1;width:max-content;max-width:100%;padding-inline:9px; }
#products .product-formats small { display:block;margin-top:8px;font-size:.68rem;line-height:1.45;color:#52677c; }
#products .product-card-link { display:flex;justify-content:space-between;align-items:center;gap:14px;min-height:44px;margin-top:auto;padding:10px 0 0;color:#004aad;font-size:.83rem;font-weight:800; }
#products .product-card-link svg { flex:0 0 20px;transition:transform var(--card-duration) var(--card-ease); }
#products .product-card:focus-visible { outline:3px solid #004aad;outline-offset:4px; }
#products .product-card:focus-visible::before { opacity:1; }
@media (hover:hover) and (pointer:fine) {
  #products .product-card:hover { transform:translateY(-5px);border-color:#729bc8;box-shadow:inset 0 1px 0 #fff,0 17px 32px rgba(28,60,99,.16); }
  #products .product-card:hover::before { opacity:1; }
  #products .product-card:hover::after { opacity:.22;transform:translate(-5px,-3px); }
  #products .product-card:hover > img { transform:translateY(-4px) scale(1.035);background:transparent;filter:drop-shadow(0 10px 8px rgba(33,53,77,.09)); }
  #products .product-card:hover .product-card-link svg { transform:translateX(4px); }
}
@media (min-width:701px) and (max-width:1000px) {
  #products .product-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:20px; }
}
@media (max-width:700px) {
  #products .product-grid { grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;gap:18px; }
  #products .product-card { padding:16px; }
  #products .product-card h3 { min-height:0;font-size:1.85rem; }
  #products .product-card-copy > p,#products .product-formats { min-height:0; }
  #products .product-card-copy { gap:14px; }
}
@media (hover:none) {
  #products .product-card:hover { transform:none; }
  #products .product-card:hover > img { background:transparent;filter:drop-shadow(0 10px 8px rgba(33,53,77,.09)); }
}
@media (prefers-reduced-motion:reduce) {
  #products .product-card,#products .product-card::before,#products .product-card::after,#products .product-card > img,#products .product-card-link svg { transition:none!important; }
  #products .product-card:hover,#products .product-card:hover > img,#products .product-card:hover::after,#products .product-card:hover .product-card-link svg { transform:none; }
}
