/* ECOJAM v0.9.1: static categories, responsive product descriptions, editor image UI. */
.categories-section .category-rail.ecojam-category-grid {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 13px;
  width: 100%;
  overflow: visible;
  scroll-snap-type: none;
  scroll-behavior: auto;
  padding: 0;
  align-items: stretch;
}
.categories-section .category-rail.ecojam-category-grid > div {
  min-width: 0;
  width: auto;
  flex: initial !important;
  scroll-snap-align: none;
}
.categories-section .ecojam-category-grid .category-card {
  width: 100%;
  height: var(--category-height, 205px);
  max-height: 205px;
}
.categories-section .ecojam-category-grid .category-label {
  font-size: clamp(10px, .84vw, 12px);
  inset-inline: 9px;
  bottom: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.categories-section .ecojam-category-grid .category-label span { font-size: 13px; flex-shrink: 0; }
.product-card { display:flex; flex-direction:column; min-width:0; }
.product-card .product-info { display:flex; flex:1; flex-direction:column; min-width:0; }
.product-card .product-card-excerpt {
  color: var(--muted, #52616c);
  font-size: 12px;
  line-height: 1.65;
  margin: 0 0 12px;
  min-height: calc(1.65em * 3);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
}
.product-card .product-price { align-self: flex-start; margin-top:auto; }
.product-card .product-card-more {
  display:block;
  margin-top: 11px;
  color: var(--copper, #c78552);
  font-size: 12px;
  font-weight: 700;
}
.product-detail .detail-info p { white-space: pre-line; overflow-wrap:anywhere; }
.ecojam-image-replace {
  margin: 14px 0 6px;
  padding: 15px;
  border: 1px solid #d8e1e7;
  border-radius: 12px;
  background: #f5f8fa;
}
.ecojam-image-replace img { width:110px; max-width:100%; height:100px; object-fit:contain; background:white; border-radius:9px; }
.ecojam-image-replace label { display:block; margin-block:8px; }
.ecojam-image-replace button { cursor:pointer; }
@media (max-width:1099px) {
  .categories-section .category-rail.ecojam-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
  .categories-section .ecojam-category-grid .category-label { font-size:12px; }
  .categories-section .ecojam-category-grid .category-card { max-height:200px; height: min(var(--category-height,205px),200px); }
}
@media (max-width:600px) {
  .categories-section .category-rail.ecojam-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap:10px; }
  .categories-section .ecojam-category-grid .category-card { height:170px; max-height:170px; }
  .product-card .product-card-excerpt { font-size:11px; line-height:1.55; min-height:calc(1.55em * 3); }
  .product-card .product-card-more { font-size:11px; }
}
@media (max-width:360px) {
  .categories-section .ecojam-category-grid .category-card { height:144px; }
  .categories-section .ecojam-category-grid .category-label { font-size:10px; }
}
