/*
 * EAF Laminate Layout v1.3.0
 * ONLY cosmetic changes. IMPORTANT: do not override display, width, float,
 * grid, gap or margins on ul.products / li.product. The shop's theme correctly
 * controls the three-column grid; overriding it previously narrowed the cards.
 */
body.eaf-laminate-layout-v13 {
  --eaf-lam-accent: #24725e;
  --eaf-lam-ink: #20382f;
  --eaf-lam-border: #e3eae6;
}

/* Keep the tidy category introduction from the successful v1.2 layout. */
body.eaf-laminate-layout-v13 .term-description,
body.eaf-laminate-layout-v13 .woocommerce-products-header__description {
  box-sizing: border-box;
  padding: 17px 22px;
  margin-top: 6px;
  margin-bottom: 20px;
  border-left: 3px solid var(--eaf-lam-accent);
  border-radius: 0 10px 10px 0;
  background: #f5f8f5;
  color: #51645d;
  line-height: 1.6;
  font-size: 14px;
}
body.eaf-laminate-layout-v13 .term-description p,
body.eaf-laminate-layout-v13 .woocommerce-products-header__description p {
  margin-top: 0;
  margin-bottom: 0;
}

/* Cards: appearance only. Position and size remain theme controlled. */
body.eaf-laminate-layout-v13 ul.products li.product {
  box-sizing: border-box;
  border: 1px solid var(--eaf-lam-border);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(20, 44, 33, .045);
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.eaf-laminate-layout-v13 ul.products li.product:hover {
    border-color: #c9dcd2;
    box-shadow: 0 10px 24px rgba(20, 44, 33, .10);
  }
}

/* Consistent square preview photographs. No alteration of original images. */
body.eaf-laminate-layout-v13 ul.products li.product img.wp-post-image,
body.eaf-laminate-layout-v13 ul.products li.product img.attachment-woocommerce_thumbnail {
  display: block;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 10px 10px 0 0;
  background: #f4f6f4;
}

/* Readable product names without the large reserved blank area of v1.2. */
body.eaf-laminate-layout-v13 ul.products li.product h2.woocommerce-loop-product__title,
body.eaf-laminate-layout-v13 ul.products li.product .woocommerce-loop-product__title,
body.eaf-laminate-layout-v13 ul.products li.product .product-meta h3 {
  box-sizing: border-box;
  padding: 0;
  margin: 11px 11px 4px !important;
  min-height: 0;
  font-size: 15px !important;
  font-weight: 650;
  line-height: 1.38 !important;
  color: var(--eaf-lam-ink) !important;
  overflow-wrap: break-word;
}

/* No change to value / currency: this styles WooCommerce's existing output. */
body.eaf-laminate-layout-v13 ul.products li.product .price {
  display: block;
  margin: 0 11px 12px !important;
  min-height: 0;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--eaf-lam-accent) !important;
  line-height: 1.4;
}
body.eaf-laminate-layout-v13 ul.products li.product .price ins {
  color: var(--eaf-lam-accent);
  text-decoration: none;
}
body.eaf-laminate-layout-v13 ul.products li.product .price del {
  color: #82928a;
  font-size: 12px;
  font-weight: 400;
}

/* Existing links/buttons, filters and sorting retain their functionality. */
body.eaf-laminate-layout-v13 ul.products li.product a.button,
body.eaf-laminate-layout-v13 ul.products li.product a.added_to_cart {
  border-radius: 7px;
}
body.eaf-laminate-layout-v13 ul.products li.product .onsale {
  z-index: 3;
}
body.eaf-laminate-layout-v13 .woocommerce-result-count {
  color: #65766e;
  font-size: 13px;
}
body.eaf-laminate-layout-v13 .woocommerce-ordering select {
  border-radius: 8px;
  border: 1px solid var(--eaf-lam-border);
  background: #fff;
}
body.eaf-laminate-layout-v13 #sidebar .widget,
body.eaf-laminate-layout-v13 .sidebar .widget {
  border-bottom: 1px solid var(--eaf-lam-border);
}

@media (max-width: 600px) {
  body.eaf-laminate-layout-v13 .term-description,
  body.eaf-laminate-layout-v13 .woocommerce-products-header__description {
    padding: 13px 15px;
    font-size: 13px;
  }
  body.eaf-laminate-layout-v13 ul.products li.product h2.woocommerce-loop-product__title,
  body.eaf-laminate-layout-v13 ul.products li.product .woocommerce-loop-product__title,
  body.eaf-laminate-layout-v13 ul.products li.product .product-meta h3 {
    font-size: 13px !important;
    margin: 9px 10px 3px !important;
  }
  body.eaf-laminate-layout-v13 ul.products li.product .price {
    margin: 0 10px 11px !important;
    font-size: 14px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.eaf-laminate-layout-v13 ul.products li.product { transition: none; }
}
