/* PSDFA 0.7.76 — unified site-wide breadcrumbs.
 * The single-product breadcrumb is the visual reference. Data/hierarchy remain
 * owned by WooCommerce, Yoast or the relevant PSDFA template.
 */

:where(
  .woocommerce .woocommerce-breadcrumb,
  .psdfa-market-breadcrumbs,
  .psdfa-market-blog-breadcrumbs,
  .psdfa-breadcrumb,
  .wp-block-yoast-seo-breadcrumbs,
  .yoast-breadcrumbs,
  .yoast-breadcrumb,
  #breadcrumbs
) {
  margin: 0 0 7px !important;
  padding: 0 !important;
  color: #8a8f96 !important;
  font-size: 13px ;
  font-weight: 500;
  line-height: 1.9 ;
  box-sizing: border-box;
}

:where(
  .woocommerce .woocommerce-breadcrumb,
  .psdfa-market-breadcrumbs,
  .psdfa-breadcrumb
) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0;
  row-gap: 4px;
}

:where(
  .woocommerce .woocommerce-breadcrumb,
  .psdfa-market-breadcrumbs,
  .psdfa-market-blog-breadcrumbs,
  .psdfa-breadcrumb,
  .wp-block-yoast-seo-breadcrumbs,
  .yoast-breadcrumbs,
  .yoast-breadcrumb,
  #breadcrumbs
) a {
  color: #61666e !important;
  font-weight: 500;
  text-decoration: none !important;
  transition: color .16s ease;
}

:where(
  .woocommerce .woocommerce-breadcrumb,
  .psdfa-market-breadcrumbs,
  .psdfa-market-blog-breadcrumbs,
  .psdfa-breadcrumb,
  .wp-block-yoast-seo-breadcrumbs,
  .yoast-breadcrumbs,
  .yoast-breadcrumb,
  #breadcrumbs
) a:hover {
  color: var(--psdfa-ink, #111318) !important;
}

/* WooCommerce keeps its hierarchy; PSDFA supplies the same chevron separator
 * already used on the product page. */
.woocommerce .woocommerce-breadcrumb > a::after {
  content: "" !important;
  display: inline-block !important;
  flex: 0 0 12px;
  width: 12px !important;
  height: 12px !important;
  margin-inline: 7px !important;
  background-color: #a8adb4 !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  vertical-align: middle;
  pointer-events: none;
}

/* Generic PSDFA page/search breadcrumb markup. */
.psdfa-market-breadcrumbs > span,
.psdfa-breadcrumb > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-inline: 7px;
  color: #a8adb4;
}
.psdfa-market-breadcrumbs > span svg,
.psdfa-breadcrumb > span svg {
  display: block;
  width: 12px;
  height: 12px;
  stroke: currentColor;
}
.psdfa-market-breadcrumbs > strong,
.psdfa-breadcrumb > strong {
  color: inherit;
  font: inherit;
  font-weight: 500;
}

/* Blog breadcrumb uses list markup; visually make it identical to product. */
.psdfa-market-blog-breadcrumbs ol {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.psdfa-market-blog-breadcrumbs li {
  display: inline-flex !important;
  align-items: center;
  min-width: 0;
  gap: 0 !important;
  color: inherit;
}
.psdfa-market-blog-breadcrumbs li:not(:last-child)::after {
  content: "" !important;
  display: inline-block;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-inline: 7px;
  background-color: #a8adb4 !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.psdfa-market-blog-breadcrumbs [aria-current="page"] span {
  display: inline;
  max-width: none !important;
  overflow: visible;
  color: inherit !important;
  text-overflow: clip;
  white-space: normal;
}

/* Yoast separator follows exactly the same dimensions and tone. */
.psdfa-yoast-breadcrumb-separator {
  width: 12px !important;
  height: 12px !important;
  margin-inline: 7px !important;
  color: #a8adb4 !important;
}
.psdfa-yoast-breadcrumb-separator svg {
  width: 12px !important;
  height: 12px !important;
}

/* Do not let archive/page component CSS shrink or recolor the shared pattern. */
.woocommerce-shop .woocommerce-breadcrumb,
.tax-product_cat .woocommerce-breadcrumb,
.tax-product_tag .woocommerce-breadcrumb,
.post-type-archive-product .woocommerce-breadcrumb,
.psdfa-market-page .psdfa-market-breadcrumbs,
.psdfa-market-blog .psdfa-market-blog-breadcrumbs {
  margin-bottom: 7px !important;
  color: #8a8f96 !important;
  font-size: 13px ;
  line-height: 1.9 ;
}

/* One-row mobile behavior, matching the product breadcrumb. Long paths scroll
 * inside the breadcrumb itself and never create horizontal page overflow. */
@media (max-width: 640px) {
  :where(
    .woocommerce .woocommerce-breadcrumb,
    .psdfa-market-breadcrumbs,
    .psdfa-market-blog-breadcrumbs,
    .psdfa-breadcrumb,
    .wp-block-yoast-seo-breadcrumbs,
    .yoast-breadcrumbs,
    .yoast-breadcrumb,
    #breadcrumbs
  ) {
    margin-bottom: 6px !important;
    font-size: 11.5px ;
    line-height: 1.9 ;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  :where(
    .woocommerce .woocommerce-breadcrumb,
    .psdfa-market-breadcrumbs,
    .psdfa-breadcrumb
  ) {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
  }

  .psdfa-market-blog-breadcrumbs ol {
    flex-wrap: nowrap !important;
    width: max-content;
    min-width: 100%;
  }
  .psdfa-market-blog-breadcrumbs li,
  .psdfa-market-blog-breadcrumbs [aria-current="page"] span {
    flex: 0 0 auto;
    white-space: nowrap !important;
  }

  :where(
    .woocommerce .woocommerce-breadcrumb,
    .psdfa-market-breadcrumbs,
    .psdfa-market-blog-breadcrumbs,
    .psdfa-breadcrumb,
    .wp-block-yoast-seo-breadcrumbs,
    .yoast-breadcrumbs,
    .yoast-breadcrumb,
    #breadcrumbs
  )::-webkit-scrollbar { display: none; }

  .woocommerce .woocommerce-breadcrumb > a,
  .psdfa-market-breadcrumbs > *,
  .psdfa-breadcrumb > * {
    flex: 0 0 auto;
  }

  .woocommerce .woocommerce-breadcrumb > a::after,
  .psdfa-market-blog-breadcrumbs li:not(:last-child)::after {
    flex-basis: 11px;
    width: 11px !important;
    height: 11px !important;
    margin-inline: 5px !important;
  }
  .psdfa-market-breadcrumbs > span,
  .psdfa-breadcrumb > span,
  .psdfa-yoast-breadcrumb-separator {
    flex-basis: 11px;
    width: 11px !important;
    height: 11px !important;
    margin-inline: 5px !important;
  }
  .psdfa-market-breadcrumbs > span svg,
  .psdfa-breadcrumb > span svg,
  .psdfa-yoast-breadcrumb-separator svg {
    width: 11px !important;
    height: 11px !important;
  }
}

/* Dark mode keeps the exact same hierarchy and spacing, only the tones change. */
html[data-psdfa-theme="dark"] :where(
  .woocommerce .woocommerce-breadcrumb,
  .psdfa-market-breadcrumbs,
  .psdfa-market-blog-breadcrumbs,
  .psdfa-breadcrumb,
  .wp-block-yoast-seo-breadcrumbs,
  .yoast-breadcrumbs,
  .yoast-breadcrumb,
  #breadcrumbs
) {
  color: var(--psdfa-muted) !important;
}
html[data-psdfa-theme="dark"] :where(
  .woocommerce .woocommerce-breadcrumb,
  .psdfa-market-breadcrumbs,
  .psdfa-market-blog-breadcrumbs,
  .psdfa-breadcrumb,
  .wp-block-yoast-seo-breadcrumbs,
  .yoast-breadcrumbs,
  .yoast-breadcrumb,
  #breadcrumbs
) a {
  color: var(--psdfa-muted) !important;
}
html[data-psdfa-theme="dark"] :where(
  .woocommerce .woocommerce-breadcrumb,
  .psdfa-market-breadcrumbs,
  .psdfa-market-blog-breadcrumbs,
  .psdfa-breadcrumb,
  .wp-block-yoast-seo-breadcrumbs,
  .yoast-breadcrumbs,
  .yoast-breadcrumb,
  #breadcrumbs
) a:hover {
  color: var(--psdfa-ink) !important;
}
html[data-psdfa-theme="dark"] .woocommerce .woocommerce-breadcrumb > a::after,
html[data-psdfa-theme="dark"] .psdfa-market-blog-breadcrumbs li:not(:last-child)::after {
  background-color: color-mix(in srgb, var(--psdfa-muted) 72%, transparent) !important;
}
html[data-psdfa-theme="dark"] .psdfa-market-breadcrumbs > span,
html[data-psdfa-theme="dark"] .psdfa-breadcrumb > span,
html[data-psdfa-theme="dark"] .psdfa-yoast-breadcrumb-separator {
  color: color-mix(in srgb, var(--psdfa-muted) 72%, transparent) !important;
}


/* PSDFA 0.7.77 — center archive breadcrumbs in the breathing room between
 * the sticky header and archive content, without moving the content block. */
body.woocommerce-shop .psdfa-woocommerce-main,
body.tax-product_cat .psdfa-woocommerce-main,
body.tax-product_tag .psdfa-woocommerce-main,
body.post-type-archive-product .psdfa-woocommerce-main {
  padding-top: 0 !important;
}
body.woocommerce-shop .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb,
body.tax-product_cat .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb,
body.tax-product_tag .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb,
body.post-type-archive-product .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb {
  margin: 0 !important;
  padding-block: 15px !important;
}

/* Blog archives use a larger top rhythm, so split that space evenly around
 * the breadcrumb as well. Single posts keep their existing spacing. */
.psdfa-market-blog-archive {
  padding-top: 0 !important;
}
.psdfa-market-blog-archive > .psdfa-container > .psdfa-market-blog-breadcrumbs {
  margin: 0 !important;
  padding-block: 18px !important;
}

@media (max-width: 760px) {
  body.woocommerce-shop .psdfa-woocommerce-main,
  body.tax-product_cat .psdfa-woocommerce-main,
  body.tax-product_tag .psdfa-woocommerce-main,
  body.post-type-archive-product .psdfa-woocommerce-main,
  .psdfa-market-blog-archive {
    padding-top: 0 !important;
  }
  body.woocommerce-shop .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb,
  body.tax-product_cat .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb,
  body.tax-product_tag .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb,
  body.post-type-archive-product .psdfa-woocommerce-main > .psdfa-container > .woocommerce-breadcrumb {
    margin: 0 !important;
    padding-block: 11px !important;
  }
  .psdfa-market-blog-archive > .psdfa-container > .psdfa-market-blog-breadcrumbs {
    margin: 0 !important;
    padding-block: 10px !important;
  }
}


/* PSDFA 0.7.78 — archive breadcrumb spacing based on the actual Yoast DOM.
 * Actual archive markup:
 * .breadcrumb.breadcrumbs.woo-breadcrumbs > .breadcrumb-trail > span
 * Keep single-product spacing untouched. */
body.woocommerce-shop .breadcrumb.breadcrumbs.woo-breadcrumbs,
body.tax-product_cat .breadcrumb.breadcrumbs.woo-breadcrumbs,
body.tax-product_tag .breadcrumb.breadcrumbs.woo-breadcrumbs,
body.post-type-archive-product .breadcrumb.breadcrumbs.woo-breadcrumbs {
  width: min(calc(100% - 36px), var(--psdfa-site-width));
  max-width: var(--psdfa-site-width);
  min-height: 30px;
  margin: 16px auto !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

body.woocommerce-shop .breadcrumb.breadcrumbs.woo-breadcrumbs .breadcrumb-trail,
body.tax-product_cat .breadcrumb.breadcrumbs.woo-breadcrumbs .breadcrumb-trail,
body.tax-product_tag .breadcrumb.breadcrumbs.woo-breadcrumbs .breadcrumb-trail,
body.post-type-archive-product .breadcrumb.breadcrumbs.woo-breadcrumbs .breadcrumb-trail {
  width: 100%;
  min-width: 0;
}

/* The 0.7.77 rules targeted WooCommerce's native breadcrumb class, while this
 * site currently renders Yoast's woo-breadcrumbs wrapper on archives. Restore
 * the archive shell's own top rhythm and let the real breadcrumb own the gap. */
body.woocommerce-shop .psdfa-woocommerce-main,
body.tax-product_cat .psdfa-woocommerce-main,
body.tax-product_tag .psdfa-woocommerce-main,
body.post-type-archive-product .psdfa-woocommerce-main {
  padding-top: initial !important;
}

@media (max-width: 760px) {
  body.woocommerce-shop .breadcrumb.breadcrumbs.woo-breadcrumbs,
  body.tax-product_cat .breadcrumb.breadcrumbs.woo-breadcrumbs,
  body.tax-product_tag .breadcrumb.breadcrumbs.woo-breadcrumbs,
  body.post-type-archive-product .breadcrumb.breadcrumbs.woo-breadcrumbs {
    width: min(calc(100% - 24px), var(--psdfa-site-width));
    min-height: 26px;
    margin: 10px auto 12px !important;
    padding: 0 !important;
  }
}
