/* US GeneratePress pilot. Every selector is scoped to the gated body class.
   CSS only: keep native forms, currency, stock, price, schema and gallery scripts.
   Never crop product hardware; source images and original zoom URLs stay unchanged. */
body.us-gp-pilot {
  --usgp-ink: #142d29;
  --usgp-muted: #54645b;
  --usgp-paper: #f6f5ef;
  --usgp-line: #d8ded3;
  --usgp-green: #254f3d;
  --usgp-accent: #d7f273;
  --usgp-radius: 20px;
  background: var(--usgp-paper);
  color: var(--usgp-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.us-gp-pilot #page {
  max-width: 1280px;
  margin-inline: auto;
  background: transparent;
}
body.us-gp-pilot #page .site-content { padding: 32px 32px 56px; }
body.us-gp-pilot #main { min-width: 0; }
body.us-gp-pilot #main .inside-article { padding: 0; background: transparent; }
body.us-gp-pilot #main .entry-content { margin-top: 0; }
body.us-gp-pilot #main :where(h1,h2,h3,h4,p,li,td,th,a) { overflow-wrap: anywhere; }
body.us-gp-pilot #main :where(h1,h2,h3,h4) { color: var(--usgp-ink); line-height: 1.2; }
body.us-gp-pilot #main :where(a,button,input,select,textarea):focus-visible {
  outline: 3px solid #527329;
  outline-offset: 4px;
}
body.us-gp-pilot #main .woocommerce-breadcrumb {
  margin: 0 0 28px;
  color: var(--usgp-muted);
  font-size: 13px;
  line-height: 1.7;
}
body.us-gp-pilot #main .woocommerce-breadcrumb a {
  color: var(--usgp-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The existing GP Element contains the sole H1. Preserve its content and location.
   !important overrides its existing inline presentation, not the retirement hero. */
body.us-gp-pilot-product:not(.us-gp-pilot-retired) .page-hero.us-product-hero-compact .gb-hero {
  background: var(--usgp-paper) !important;
  color: var(--usgp-ink) !important;
  border-bottom: 1px solid var(--usgp-line);
  padding: clamp(30px,4vw,52px) 24px !important;
}
body.us-gp-pilot-product:not(.us-gp-pilot-retired) .page-hero.us-product-hero-compact .gb-hero h1 {
  color: var(--usgp-ink) !important;
  font-size: clamp(28px,4vw,48px) !important;
  line-height: 1.12 !important;
  letter-spacing: -.035em;
  text-wrap: balance;
  max-width: 1060px;
}
body.us-gp-pilot-product:not(.us-gp-pilot-retired) .page-hero.us-product-hero-compact .gb-hero :where(p,h2,h3) {
  color: var(--usgp-muted) !important;
}

/* Only the inner Woo product wrapper: never target article.product or li.product. */
body.us-gp-pilot-product #main div.product[id^="product-"] {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1fr);
  column-gap: clamp(24px,4vw,52px);
  align-items: start;
  position: relative;
}
body.us-gp-pilot-product #main div.product[id^="product-"] > * { min-width: 0; grid-column: 1 / -1; }
body.us-gp-pilot-product #main div.product[id^="product-"]::before,
body.us-gp-pilot-product #main div.product[id^="product-"]::after { content: none; }
body.us-gp-pilot-product #main div.product[id^="product-"] > .woocommerce-product-gallery {
  grid-column: 1;
  grid-row: 1;
  float: none;
  width: 100%;
  margin: 0 0 32px;
  border: 1px solid var(--usgp-line);
  border-radius: var(--usgp-radius);
  background: #fff;
  box-sizing: border-box;
}
body.us-gp-pilot-product #main div.product[id^="product-"] > .summary {
  grid-column: 2;
  grid-row: 1;
  float: none;
  width: 100%;
  margin: 0 0 32px;
  text-align: left;
}
/* Do not alter opacity, transforms or .zoomImg: native FlexSlider/zoom owns those. */
body.us-gp-pilot-product #main .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
  display: block;
  width: 100%;
  height: clamp(320px,39vw,510px);
  max-width: 100%;
  object-fit: contain;
  box-sizing: border-box;
  padding: clamp(16px,2.4vw,30px);
  background: #fff;
}
body.us-gp-pilot-product #main .woocommerce-product-gallery .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 8px;
  padding: 12px;
  margin: 0;
  border-top: 1px solid var(--usgp-line);
}
body.us-gp-pilot-product #main .woocommerce-product-gallery .flex-control-thumbs li {
  float: none;
  width: auto;
  margin: 0;
  min-width: 0;
}
body.us-gp-pilot-product #main .woocommerce-product-gallery .flex-control-thumbs img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--usgp-line);
  border-radius: 6px;
  box-sizing: border-box;
  background: #fff;
}
body.us-gp-pilot-product #main .summary .price {
  color: var(--usgp-ink);
  font-size: clamp(24px,2.6vw,32px);
  font-weight: 650;
  line-height: 1.35;
  margin-bottom: 18px;
}
body.us-gp-pilot #main .price del { color: var(--usgp-muted); }
body.us-gp-pilot #main .price ins { background: transparent; text-decoration: none; }
body.us-gp-pilot-product #main .summary .woocommerce-product-details__short-description {
  color: var(--usgp-muted);
  font-size: 16px;
  line-height: 1.75;
  margin: 20px 0;
}
body.us-gp-pilot-product #main .summary .woocommerce-product-details__short-description a,
body.us-gp-pilot #main .woocommerce-Tabs-panel a {
  color: var(--usgp-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.us-gp-pilot-product #main .summary .product_meta {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--usgp-line);
  color: var(--usgp-muted);
  font-size: 13px;
}
/* Native disabled/purchasability logic remains untouched. */
body.us-gp-pilot #main :where(.button,button.button,input.button) {
  border-radius: 7px;
  background-color: var(--usgp-ink);
  color: #fff;
  font: inherit;
  font-weight: 650;
  line-height: 1.35;
  padding: 13px 18px;
  min-height: 46px;
  box-sizing: border-box;
  text-align: center;
}
body.us-gp-pilot #main :where(.button,button.button,input.button):hover {
  background-color: var(--usgp-green);
  color: #fff;
}
body.us-gp-pilot #main :where(.button,button.button,input.button):disabled,
body.us-gp-pilot #main .button.disabled { opacity: .65; }
body.us-gp-pilot-product #main .summary form.cart { margin: 24px 0; }
body.us-gp-pilot #main :where(input.qty,select,.input-text,textarea) {
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--usgp-line);
  border-radius: 6px;
  background: #fff;
  color: var(--usgp-ink);
  box-sizing: border-box;
}
body.us-gp-pilot #main .woocommerce-tabs { margin-top: 16px; }
body.us-gp-pilot #main .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 18px 0;
  margin: 0;
  border-block: 1px solid var(--usgp-line);
}
body.us-gp-pilot #main .woocommerce-tabs ul.tabs::before,
body.us-gp-pilot #main .woocommerce-tabs ul.tabs li::before,
body.us-gp-pilot #main .woocommerce-tabs ul.tabs li::after { content: none; }
body.us-gp-pilot #main .woocommerce-tabs ul.tabs li {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
}
body.us-gp-pilot #main .woocommerce-tabs ul.tabs li a {
  color: var(--usgp-muted);
  padding: 10px 0;
  font-size: 15px;
  font-weight: 650;
}
body.us-gp-pilot #main .woocommerce-tabs ul.tabs li.active a {
  color: var(--usgp-ink);
  box-shadow: inset 0 -2px var(--usgp-green);
}
body.us-gp-pilot #main .woocommerce-Tabs-panel {
  padding: clamp(22px,3.5vw,40px);
  margin: 28px 0;
  border: 1px solid var(--usgp-line);
  border-radius: var(--usgp-radius);
  background: #fff;
  color: var(--usgp-muted);
  line-height: 1.75;
}
body.us-gp-pilot #main .woocommerce-Tabs-panel :where(h2,h3,h4) {
  margin-top: 30px;
  margin-bottom: 14px;
  letter-spacing: -.02em;
}
body.us-gp-pilot #main .woocommerce-Tabs-panel > :first-child { margin-top: 0; }
body.us-gp-pilot #main .woocommerce-Tabs-panel :where(img,video,iframe) { max-width: 100%; }
body.us-gp-pilot #main .woocommerce-Tabs-panel img { height: auto; }
body.us-gp-pilot #main table.shop_attributes { border-collapse: collapse; width: 100%; }
body.us-gp-pilot #main table.shop_attributes :where(th,td) {
  padding: 13px 12px;
  border: 0;
  border-bottom: 1px solid var(--usgp-line);
  background: transparent;
  text-align: left;
}
body.us-gp-pilot #main table.shop_attributes th { width: 40%; color: var(--usgp-muted); font-weight: 500; }
body.us-gp-pilot #main .woocommerce-Tabs-panel table { max-width: 100%; }

/* Existing archive/related query, ordering, pagination and product links are reused. */
body.us-gp-pilot #main .woocommerce-products-header {
  margin: 0 0 30px;
  max-width: 850px;
}
body.us-gp-pilot #main .woocommerce-products-header .page-title {
  margin-bottom: 16px;
  font-size: clamp(30px,4vw,48px);
  letter-spacing: -.035em;
}
body.us-gp-pilot #main :where(.term-description,.woocommerce-result-count) { color: var(--usgp-muted); }
body.us-gp-pilot #main .woocommerce-ordering { max-width: 100%; margin-bottom: 24px; }
body.us-gp-pilot #main .woocommerce-ordering select { width: 100%; }
body.us-gp-pilot #main ul.products,
body.us-gp-pilot-catalog #main #wc-column-container > ul.products {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 22px;
  padding: 0;
  margin: 28px 0;
  clear: both;
}
body.us-gp-pilot #main ul.products::before,
body.us-gp-pilot #main ul.products::after { content: none; }
body.us-gp-pilot #main ul.products > li.product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: auto !important;
  float: none;
  margin: 0 !important;
  padding: 0 0 22px;
  background: #fff;
  border: 1px solid var(--usgp-line);
  border-radius: 14px;
  box-sizing: border-box;
  text-align: left;
  position: relative;
}
/* GP wraps the image in .wc-product-image; keep its native zoom/hover structure. */
body.us-gp-pilot #main ul.products > li.product .wc-product-image {
  border-bottom: 1px solid #edf0e8;
  border-radius: 14px 14px 0 0;
  background: #fff;
}
body.us-gp-pilot #main ul.products > li.product a.woocommerce-LoopProduct-link > img,
body.us-gp-pilot #main ul.products > li.product .inside-wc-product-image > img,
body.us-gp-pilot #main ul.products > li.product .wc-product-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  padding: clamp(16px,2.3vw,28px);
  box-sizing: border-box;
  margin: 0;
  background: #fff;
}
body.us-gp-pilot #main ul.products > li.product .woocommerce-loop-product__title {
  padding: 22px 22px 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.02em;
}
body.us-gp-pilot #main ul.products > li.product .price {
  display: block;
  padding: 0 22px;
  margin: 0 0 14px;
  color: var(--usgp-ink);
  font-size: 17px;
  line-height: 1.5;
}
body.us-gp-pilot #main ul.products > li.product .star-rating { margin: 6px 22px 12px; }
body.us-gp-pilot #main ul.products > li.product > .button {
  margin: auto 22px 0;
  align-self: stretch;
}
body.us-gp-pilot #main .related.products { margin-top: 32px; }
body.us-gp-pilot #main .related.products > h2 { font-size: 30px; letter-spacing: -.025em; }
body.us-gp-pilot #main nav.woocommerce-pagination { margin-top: 32px; }
body.us-gp-pilot #main nav.woocommerce-pagination ul { border: 0; display: inline-flex; flex-wrap: wrap; gap: 8px; }
body.us-gp-pilot #main nav.woocommerce-pagination li { border: 0; }
body.us-gp-pilot #main nav.woocommerce-pagination :where(a,span) {
  border: 1px solid var(--usgp-line);
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 12px;
  background: #fff;
}
body.us-gp-pilot #main nav.woocommerce-pagination .current {
  background: var(--usgp-ink);
  color: #fff;
}

@media (max-width: 950px) {
  body.us-gp-pilot #page .site-content { padding-inline: 24px; }
  /* GP's mobile archive rule includes #wc-column-container at <=768px.
     Match the real archive wrapper explicitly; do not use a global !important. */
  body.us-gp-pilot #main ul.products,
  body.us-gp-pilot-catalog #main #wc-column-container > ul.products { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
}
@media (max-width: 700px) {
  body.us-gp-pilot #page .site-content { padding: 24px 18px 42px; }
  body.us-gp-pilot-product #main div.product[id^="product-"] { grid-template-columns: minmax(0,1fr); }
  body.us-gp-pilot-product #main div.product[id^="product-"] > .woocommerce-product-gallery { grid-column: 1; grid-row: auto; }
  body.us-gp-pilot-product #main div.product[id^="product-"] > .summary { grid-column: 1; grid-row: auto; }
  body.us-gp-pilot-product #main .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
    height: clamp(260px,80vw,400px);
    padding: 18px;
  }
  body.us-gp-pilot-product #main .woocommerce-product-gallery .flex-control-thumbs { grid-template-columns: repeat(4,minmax(0,1fr)); }
  body.us-gp-pilot #main .woocommerce-Tabs-panel { padding: 22px 18px; }
  body.us-gp-pilot #main .woocommerce-tabs ul.tabs { gap: 6px 18px; }
  body.us-gp-pilot #main .woocommerce-tabs ul.tabs li a { font-size: 14px; }
  body.us-gp-pilot #main .woocommerce-ordering { float: none; }
}
@media (max-width: 520px) {
  body.us-gp-pilot #main ul.products,
  body.us-gp-pilot-catalog #main #wc-column-container > ul.products { grid-template-columns: minmax(0,1fr); }
  body.us-gp-pilot #main ul.products > li.product .wc-product-image img { max-height: 330px; }
  body.us-gp-pilot #main .woocommerce-Tabs-panel table { table-layout: fixed; width: 100%; }
}

/* v0.2.1: GP sale-overlay badges can cover the currency plugin's TRY row.
   Only catalog cards with a direct currency-row + badge pair use normal flow.
   Preserve both visible values, the badge text, all images and source DOM. */
body.us-gp-pilot-catalog #main ul.products > li.product .inside-wc-product-image > .wmc-shortcode-price-collate.wmc-collate-archive-page + .onsale {
  position: static;
  display: table;
  float: none;
  margin: 8px 12px 8px auto;
  max-width: calc(100% - 24px);
  box-sizing: border-box;
}

