/* EGLearn 1.0.3 — classic WooCommerce loops only. No template or data overrides.
 * Explicit shortcode context wins through inherited section custom properties.
 * Deliberate !important declarations neutralize theme heading/link/button decoration.
 */
:is(body.eglearn-microsite, .eg-section-products) ul.products {
  --eg-card-columns: 3;
  display: grid;
  grid-template-columns: repeat(var(--eg-card-columns), minmax(0, 1fr));
  align-items: stretch;
  gap: 26px;
  padding: 0;
  margin: 0 0 32px;
  list-style: none;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products::before,
:is(body.eglearn-microsite, .eg-section-products) ul.products::after { content: none; }
:is(body.eglearn-microsite, .eg-section-products) ul.products.columns-1 { --eg-card-columns: 1; }
:is(body.eglearn-microsite, .eg-section-products) ul.products.columns-2 { --eg-card-columns: 2; }
:is(body.eglearn-microsite, .eg-section-products) ul.products.columns-3 { --eg-card-columns: 3; }
:is(body.eglearn-microsite, .eg-section-products) ul.products.columns-4 { --eg-card-columns: 4; }
:is(body.eglearn-microsite, .eg-section-products) ul.products.columns-5 { --eg-card-columns: 5; }
:is(body.eglearn-microsite, .eg-section-products) ul.products.columns-6 { --eg-card-columns: 6; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  float: none;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 20px;
  gap: 0;
  text-align: left;
  color: #52606a;
  background: #fff;
  background-image: none;
  border: 1px solid #e6e2dc;
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(34, 39, 43, .045);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  transition: border-color .18s ease, box-shadow .18s ease;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product:hover {
  border-color: var(--eg-accent, #77532f);
  box-shadow: 0 10px 28px rgba(34, 39, 43, .09);
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product a:not(.button) {
  text-decoration: none !important;
  background-image: none;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .woocommerce-loop-product__link {
  display: block;
  color: inherit;
  margin: 0 0 14px;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(.ct-media-container, figure) {
  display: block;
  margin: 0 0 18px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--eg-soft, #f7f0e6);
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(img.attachment-woocommerce_thumbnail, img.wp-post-image, .ct-media-container img) {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  border-radius: 10px;
  margin: 0 0 18px;
  background: var(--eg-soft, #f7f0e6);
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(figure, .ct-media-container) img { margin: 0; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(.woocommerce-loop-product__title, h2, h3) {
  margin: 0 0 12px;
  padding: 0;
  min-height: 0;
  color: #263640 !important;
  font-family: inherit !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: -.025em;
  text-transform: none;
  text-decoration: none !important;
  border: 0;
  background-image: none;
  overflow-wrap: anywhere;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(h2, h3) a {
  color: inherit !important;
  font: inherit !important;
  border: 0;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(h2, h3)::after,
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(h2, h3) a::after { content: none !important; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 16px 0 12px;
  color: #263640 !important;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.35;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .price del {
  color: #68737b;
  font-size: 14px;
  font-weight: 400;
  opacity: 1;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .price ins {
  color: #263640;
  background: transparent;
  text-decoration: none;
  font-weight: 750;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .price .amount { white-space: nowrap; }
/* Blocksy groups price/actions. The core template keeps them as direct children. */
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .ct-woo-card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  width: 100%;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .ct-woo-card-actions .price { margin: 0; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product > .price { margin-top: auto; padding-top: 16px; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product :is(.button, .added_to_cart) {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  height: auto;
  margin: 12px 0 0;
  padding: 12px 16px;
  color: var(--eg-on-accent, #fff) !important;
  background: var(--eg-accent, #77532f) !important;
  border: 1px solid var(--eg-accent, #77532f);
  border-radius: 9px;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none !important;
  white-space: normal;
  text-align: center;
  transition: filter .18s ease;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product > .button { margin-top: auto; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product > .price ~ .button { margin-top: 12px; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .ct-woo-card-actions .button { margin-top: 0; }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .button:hover { filter: brightness(.94); }
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product a:focus-visible {
  outline: 3px solid #263640;
  outline-offset: 4px;
}
@media (max-width: 999px) {
  :is(body.eglearn-microsite, .eg-section-products) ul.products[class] { --eg-card-columns: 2; gap: 20px; }
  :is(body.eglearn-microsite, .eg-section-products) ul.products.columns-1 { --eg-card-columns: 1; }
}
@media (max-width: 600px) {
  :is(body.eglearn-microsite, .eg-section-products) ul.products[class] { --eg-card-columns: 1; gap: 18px; }
  :is(body.eglearn-microsite, .eg-section-products) ul.products li.product { padding: 18px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(body.eglearn-microsite, .eg-section-products) ul.products li.product,
  :is(body.eglearn-microsite, .eg-section-products) ul.products li.product .button { transition: none; }
}

/* EGLearn Course Dates uses flex-direction: column on category archives.
 * Use normal block flow here: flex-wrap + percentage flex-basis would wrap
 * the metadata into a second column outside the date box.
 */
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .egcd-loop-date {
  display: block;
  box-sizing: border-box;
  align-self: stretch;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e6e2dc;
  border-radius: 8px;
  background: var(--eg-soft, #f7f0e6);
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  text-align: left;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .egcd-loop-date > .egcd-loop-date__label {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.4;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .egcd-loop-date > strong {
  display: block;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .egcd-loop-date__meta {
  display: block;
  flex: none;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .egcd-loop-date--empty {
  display: block;
  align-self: flex-start;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 7px;
  background: var(--eg-soft, #f7f0e6);
  color: #52606a;
  opacity: 1;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .egcd-loop-date--empty > .egcd-loop-date__label {
  display: none;
}
:is(body.eglearn-microsite, .eg-section-products) ul.products li.product .egcd-loop-date--empty > strong {
  font-weight: 600;
}
