/* Astra Child overrides */

/* Force light color scheme even when the OS is in dark mode. */
:root,
html {
  color-scheme: only light;
}
html,
body {
  background: #ffffff; 
  color: #000000;
}
 
/* If a browser applies `prefers-color-scheme: dark` styles somewhere, keep the page itself light. */
@media (prefers-color-scheme: dark) {
  :root,
  html { 
    color-scheme: only light;
  }
  html,
  body { 
    background: #ffffff !important;
    color: #000000 !important;
  }
  /* Extra hardening for browsers that "force" dark mode by applying filters. */
  html,
  body,
  .site,
  #page,
  #content,
  .site-content,
  .ast-container {
    filter: none !important;
    -webkit-filter: none !important;
  }
}


/* Fix WooCommerce [products] shortcode inside posts: remove list indent and bullets */
.ast-separate-container .entry-content ul.products,
.entry-content ul.products {
  margin-left: 0 !important;
  padding-inline-start: 0 !important;
  list-style: none !important;
}

/* Ensure Woo product grid spacing inside posts matches shop */
.entry-content ul.products li.product { list-style: none !important; }

.ynm-products-shortcode {
  margin-top: 25px;
  margin-bottom: 25px;
} 
.ynm-single-card .ynm-badge {
  margin-bottom: 0px;
}

/* For YNM shortcode only: let images use their natural aspect ratio */
.ynm-products-shortcode ul.products li.product a img,
.ynm-products-shortcode ul.products li.product .astra-shop-thumbnail-wrap img,
.ynm-products-shortcode .ast-grid-common-col.product .astra-shop-thumbnail-wrap img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}


/* Show author byline on blog/archive lists (override theme's display:none) */
.blog .entry-meta .byline,
.archive .entry-meta .byline,
.blog .entry-meta .posted-by,
.archive .entry-meta .posted-by {
  display: inline !important;
}

/* Blog archive Read More button styling to match site buttons (square corners, no blue hover) */
.read-more .ast-button,
.ast-the-content-more-link .ast-button,
.ast-read-more-container .ast-button {
  display: inline-block;
  border-radius: 0 !important; /* no rounding like on homepage */
  padding: 12px 18px !important; /* make it more button-like */
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  color: #ffffff !important;
  background-color: var(--ast-global-color-0, #1fa37d) !important; /* fallback to green if vars not set */
  border: 0;
}
.read-more .ast-button:hover,
.ast-the-content-more-link .ast-button:hover,
.ast-read-more-container .ast-button:hover {
  color: #ffffff !important;
  background-color: var(--ast-global-color-1, #148a68) !important; /* darker on hover, avoid blue */
  text-decoration: none !important;
}

/* Blog/archive pagination - mimic Woo style and center (Astra default markup) */
body.blog .ast-pagination,
body.archive .ast-pagination {
  text-align: center;
  margin-top: 30px;
}
body.blog .ast-pagination .page-numbers,
body.archive .ast-pagination .page-numbers {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
body.blog .ast-pagination .page-numbers li,
body.archive .ast-pagination .page-numbers li { list-style: none; }
body.blog .ast-pagination .page-numbers a,
body.archive .ast-pagination .page-numbers a,
body.blog .ast-pagination .page-numbers span,
body.archive .ast-pagination .page-numbers span {
  display: inline-block;
  min-width: 38px;
  padding: 8px 12px;
  line-height: 1.2;
  text-align: center;
  border: 1px solid #e6e6e6;
  color: var(--ast-global-color-3, #3a3a3a);
  background: #ffffff;
}
body.blog .ast-pagination .page-numbers a:hover,
body.archive .ast-pagination .page-numbers a:hover {
  color: #ffffff;
  background: var(--ast-global-color-1, #148a68);
  border-color: var(--ast-global-color-1, #148a68);
}
body.blog .ast-pagination .page-numbers .current,
body.archive .ast-pagination .page-numbers .current {
  color: #ffffff;
  background: var(--ast-global-color-0, #1fa37d);
  border-color: var(--ast-global-color-0, #1fa37d);
}
body.blog .ast-pagination .page-numbers .prev,
body.blog .ast-pagination .page-numbers .next,
body.archive .ast-pagination .page-numbers .prev,
body.archive .ast-pagination .page-numbers .next {
  font-weight: 600;
}

/* Blog/archive/search pagination (posts) - use Woo-like markup emitted by child theme.
   IMPORTANT: Scope to .ynm-posts-pagination so we don't accidentally restyle real WooCommerce product pagination. */
body.blog nav.ynm-posts-pagination, 
body.archive nav.ynm-posts-pagination,
body.search nav.ynm-posts-pagination,
nav.ynm-posts-pagination {
  text-align: center;
  margin-top: 30px;
}
body.blog nav.ynm-posts-pagination .page-numbers,
body.archive nav.ynm-posts-pagination .page-numbers,
body.search nav.ynm-posts-pagination .page-numbers,
nav.ynm-posts-pagination .page-numbers {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
body.blog nav.ynm-posts-pagination .page-numbers li,
body.archive nav.ynm-posts-pagination .page-numbers li,
body.search nav.ynm-posts-pagination .page-numbers li,
nav.ynm-posts-pagination .page-numbers li {
  list-style: none;
}
body.blog nav.ynm-posts-pagination .page-numbers a,
body.archive nav.ynm-posts-pagination .page-numbers a,
body.search nav.ynm-posts-pagination .page-numbers a,
nav.ynm-posts-pagination .page-numbers a,
body.blog nav.ynm-posts-pagination .page-numbers span,
body.archive nav.ynm-posts-pagination .page-numbers span,
body.search nav.ynm-posts-pagination .page-numbers span,
nav.ynm-posts-pagination .page-numbers span {
  display: inline-block;
  min-width: 38px;
  padding: 8px 12px;
  line-height: 1.2;
  text-align: center;
  border: 1px solid #e6e6e6;
  color: var(--ast-global-color-3, #3a3a3a);
  background: #ffffff;
}
body.blog nav.ynm-posts-pagination .page-numbers a:hover,
body.archive nav.ynm-posts-pagination .page-numbers a:hover,
body.search nav.ynm-posts-pagination .page-numbers a:hover, 
nav.ynm-posts-pagination .page-numbers a:hover {
  color: #ffffff;
  background: var(--ast-global-color-1, #148a68);
  border-color: var(--ast-global-color-1, #148a68);
}
body.blog nav.ynm-posts-pagination .page-numbers .current,
body.archive nav.ynm-posts-pagination .page-numbers .current,
body.search nav.ynm-posts-pagination .page-numbers .current,
nav.ynm-posts-pagination .page-numbers .current {
  color: #ffffff;
  background: var(--ast-global-color-0, #1fa37d);
  border-color: var(--ast-global-color-0, #1fa37d);
}
/* Ensure prev/next buttons render as simple chevrons we output in markup */
body.blog nav.ynm-posts-pagination .page-numbers a.prev,
body.archive nav.ynm-posts-pagination .page-numbers a.prev,
body.search nav.ynm-posts-pagination .page-numbers a.prev,
nav.ynm-posts-pagination .page-numbers a.prev,
body.blog nav.ynm-posts-pagination .page-numbers a.next,
body.archive nav.ynm-posts-pagination .page-numbers a.next,
body.search nav.ynm-posts-pagination .page-numbers a.next,
nav.ynm-posts-pagination .page-numbers a.next {
  font-weight: 600;
}

/* Search page tweaks */
body.search .ast-related-posts-title { margin-bottom: 0 !important; }
body.search nav.ynm-posts-pagination { margin-top: 25px !important; }
body.search .products.columns-4 {margin-bottom:-10px;}
.ast-woocommerce-container .woocommerce-products-header__title.page-title {margin-bottom:10px;}
.ast-woocommerce-container .woocommerce-products-header .ynm-affiliate-notice {margin-bottom:60px;}

/* Remove bottom border from post cards in separate container layout */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single {
  border-bottom: 0 !important;
}

/* Keep list bullets within container edges in Separate Container layout */
.ast-separate-container .entry-content ul,
.ast-separate-container .entry-content ol,
.ast-separate-container .entry-content .wp-block-list {
  /* Remove negative/extra margins that can push markers outside */
  margin-left: 0 !important;
  /* Use logical property so it works for LTR and RTL */
  padding-inline-start: 1.4em !important;
  list-style-position: outside !important; /* keep classic hanging bullets but within padding */
}
/* Nested lists: a bit tighter */
.ast-separate-container .entry-content li > ul,
.ast-separate-container .entry-content li > ol {
  margin: 0 !important;
  padding-inline-start: 1.2em !important;
}

/* Keep Gutenberg full/wide blocks inside container at all widths */
/* Separate Container */
/* Limit alignfull constraint to blog contexts so pages can have true full-bleed sections */
.single-post .entry-content .alignfull,
.blog .entry-content .alignfull,
.archive .entry-content .alignfull,
.search .entry-content .alignfull,
.single-post .entry-content [data-ast-blocks-layout] .alignwide,
.blog .entry-content [data-ast-blocks-layout] .alignwide,
.archive .entry-content [data-ast-blocks-layout] .alignwide,
.search .entry-content [data-ast-blocks-layout] .alignwide,
.single-post .entry-content .wp-block-group.alignfull,
.blog .entry-content .wp-block-group.alignfull,
.archive .entry-content .wp-block-group.alignfull,
.search .entry-content .wp-block-group.alignfull,
.single-post .entry-content .wp-block-image.alignfull,
.blog .entry-content .wp-block-image.alignfull,
.archive .entry-content .wp-block-image.alignfull,
.search .entry-content .wp-block-image.alignfull,
.single-post .entry-content .wp-block-cover.alignfull,
.blog .entry-content .wp-block-cover.alignfull,
.archive .entry-content .wp-block-cover.alignfull,
.search .entry-content .wp-block-cover.alignfull,
.single-post .entry-content .wp-block-table.alignfull,
.blog .entry-content .wp-block-table.alignfull,
.archive .entry-content .wp-block-table.alignfull,
.search .entry-content .wp-block-table.alignfull,
.single-post .entry-content .wp-block-columns.alignfull,
.blog .entry-content .wp-block-columns.alignfull,
.archive .entry-content .wp-block-columns.alignfull,
.search .entry-content .wp-block-columns.alignfull,
.single-post .entry-content .wp-block-media-text.alignfull,
.blog .entry-content .wp-block-media-text.alignfull,
.archive .entry-content .wp-block-media-text.alignfull,
.search .entry-content .wp-block-media-text.alignfull {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}
/* Alignwide should not bleed; keep centered */
.ast-separate-container .entry-content .alignwide,
.ast-plain-container .entry-content .alignwide,
.ast-separate-container .entry-content [data-ast-blocks-layout] .alignwide,
.ast-plain-container .entry-content [data-ast-blocks-layout] .alignwide {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
}

/* WooCommerce shop loop: show full image without cropping inside product cards */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
.ast-grid-common-col.product .astra-shop-thumbnail-wrap img {
  width: 100% !important;
  height: auto !important;          /* keep natural aspect ratio */
  object-fit: contain !important;   /* ensure no sides are cut */
}
/* If wrapper imposes square aspect, neutralize it */
/* If wrapper imposes square aspect, we avoid setting aspect-ratio to not conflict with devtools rule */
/* .astra-shop-thumbnail-wrap { aspect-ratio: auto !important; } */
/* Prevent fixed heights on product thumbnails */
.woocommerce ul.products li.product .ast-woo-product-gallery,
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap { height: auto !important; }

/* Strong reset for Astra/Woo square thumbnail wrappers */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
  position: relative !important;   /* allow absolute-positioned overlay icons */
  padding: 0 !important;           /* kill padding-top:100% square hacks */
  height: auto !important;
  min-height: 0 !important;
  display: block;
}
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap a:not(.ast-on-card-button) {
  position: static !important;     /* product link stays normal */
  display: block;
}
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img,
.woocommerce ul.products li.product img.wp-post-image {
  position: relative !important;    /* keep stacking context for overlay */
  width: 100% !important;
  height: auto !important;          /* natural ratio */
  max-height: none !important;
  object-fit: contain !important;   /* no cropping */
  z-index: 1;
}
/* Cancel any forced aspect-ratio on wrappers */
/* Cancel any forced aspect-ratio on wrappers — disabled to avoid conflicts */
/* .woocommerce ul.products li.product .astra-shop-thumbnail-wrap { aspect-ratio: auto !important; } */

