/* ==========================================================================
   Guimaras Wonder's Farm — WooCommerce surfaces

   woocommerce-general.css is dequeued in inc/woocommerce.php, so everything
   Woo renders from its own templates arrives with no styling at all. The shop
   archive is fully ours (archive-product.php + the card partial); this file
   covers the product page, the variation form and the cart/checkout blocks,
   which still come out of the plugin.
   ========================================================================== */

/* ---- Breadcrumb ---------------------------------------------------------- */

.woocommerce-breadcrumb {
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 600;
  font-size: var(--gwf-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gwf-moss);
  margin: 0 0 28px;
}
.woocommerce-breadcrumb a { color: var(--gwf-moss); text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--gwf-green); text-decoration: underline; }

/* ---- Product page: two columns above 820px -------------------------------
   The plate is held to 480px so a portrait jar does not tower over its own
   description on a wide screen. */

.single-product div.product {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.single-product div.product > .woocommerce-product-gallery { grid-column: 1; }
.single-product div.product > .summary { grid-column: 2; }
/* Tabs, related products and anything else run the full width beneath. */
.single-product div.product > .woocommerce-tabs,
.single-product div.product > .related,
.single-product div.product > .up-sells,
.single-product div.product > .woocommerce-product-gallery + .summary ~ * {
  grid-column: 1 / -1;
}

.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image {
  clip-path: polygon(0 0, calc(100% - var(--gwf-notch-md)) 0, 100% var(--gwf-notch-md), 100% 100%, 0 100%);
  overflow: hidden;
}
.woocommerce-product-gallery__image + .woocommerce-product-gallery__image { margin-top: 12px; }
.woocommerce-product-gallery img { width: 100%; height: auto; display: block; }
.woocommerce-product-gallery__trigger { display: none; }

/* Gallery thumbnail strip.
   flexslider builds this <ol class="flex-control-nav flex-control-thumbs">
   itself, at runtime, from each slide's data-thumb. Its stylesheet lives in
   woocommerce-general.css, which this theme dequeues (see inc/woocommerce.php),
   so without the rules below it renders as a raw numbered list and every
   thumbnail is painted at the full 480px column width -- a 100px source blown
   up 4.4x, which is what "the images are distorted" was pointing at.
   Figma's thumbnails-row (node 13:27) is a row of squares under the main
   image, so that is what this is. */
.flex-control-nav.flex-control-thumbs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.flex-control-nav.flex-control-thumbs li { margin: 0; }
.flex-control-nav.flex-control-thumbs img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--gwf-radius-card);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--gwf-dur) var(--gwf-ease);
}
.flex-control-nav.flex-control-thumbs img:hover,
.flex-control-nav.flex-control-thumbs img.flex-active {
  opacity: 1;
  outline: 2px solid var(--gwf-green);
  outline-offset: 2px;
}

/* ---- Summary column ------------------------------------------------------ */

.product_title { margin-bottom: 12px; }

.gwf-pdp__tagline {
  font-size: var(--gwf-lead);
  font-style: italic;
  line-height: 1.4;
  color: var(--gwf-green);
  margin: 0 0 20px;
  max-width: var(--gwf-measure-lead);
}

/* The spec block: net weight, and the export mark where it applies. */
.gwf-pdp__spec {
  list-style: none;
  margin: 0 0 24px;
  padding: 18px 0;
  border-top: 1px solid var(--gwf-hairline);
  border-bottom: 1px solid var(--gwf-hairline);
  display: grid;
  gap: 10px;
}
.gwf-pdp__spec > li {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: 0 20px;
  align-items: baseline;
  font-size: var(--gwf-small);
}
.gwf-pdp__spec dt, .gwf-pdp__spec .gwf-pdp__k {
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 700;
  font-size: var(--gwf-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gwf-moss);
}
.gwf-pdp__spec .is-export {
  color: var(--gwf-green);
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--gwf-micro);
}

.single-product p.price,
.single-product .woocommerce-variation-price {
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-normal), 'wght' 800;
  font-variant-numeric: tabular-nums;
  font-size: 1.75rem;
  color: var(--gwf-ink);
  margin: 0 0 20px;
}
.single-product .woocommerce-product-details__short-description {
  margin-bottom: 28px;
}
.single-product .woocommerce-product-details__short-description p {
  font-size: var(--gwf-lead);
  line-height: 1.5;
  max-width: var(--gwf-measure-lead);
}

/* ---- Variation form ------------------------------------------------------ */

.variations { border: none; margin: 0 0 20px; width: 100%; }
.variations th, .variations td { padding: 0 0 12px; border: none; text-align: left; vertical-align: middle; }
.variations .label label {
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 700;
  font-size: var(--gwf-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gwf-moss);
  display: block;
  margin-bottom: 6px;
}

.variations select,
.quantity input[type="number"],
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce textarea {
  font-family: var(--gwf-body);
  font-size: 1rem;
  color: var(--gwf-ink);
  background: var(--gwf-bone);
  border: 1px solid var(--gwf-moss);
  border-radius: var(--gwf-radius);
  padding: 11px 12px;
  min-height: 44px;
  max-width: 100%;
}
.variations select { min-width: 220px; }
.variations select:focus-visible,
.quantity input:focus-visible {
  outline: 2px solid var(--gwf-green);
  outline-offset: 2px;
}
.reset_variations {
  font-size: var(--gwf-small);
  color: var(--gwf-moss);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.woocommerce-variation-availability { font-size: var(--gwf-small); color: var(--gwf-moss); }

/* ---- Buttons -------------------------------------------------------------
   Woo hands out .button everywhere. Gold with ink text is the buy action; the
   1.82:1 contrast of gold-on-bone means gold may only ever be a GROUND. */

.single-product .single_add_to_cart_button,
.woocommerce .button.alt,
.wc-block-components-button {
  font-family: var(--gwf-body);
  font-weight: 800;
  font-size: 1rem;
  background: var(--gwf-gold);
  color: var(--gwf-ink);
  border: none;
  border-radius: var(--gwf-radius);
  padding: 15px 28px;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.single-product .single_add_to_cart_button:hover,
.woocommerce .button.alt:hover { background: #d0a31d; color: var(--gwf-ink); }
.single-product .single_add_to_cart_button:disabled,
.single-product .single_add_to_cart_button.disabled {
  background: var(--gwf-sage);
  color: var(--gwf-moss);
  cursor: not-allowed;
}

.woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.quantity { display: inline-flex; }
.quantity input[type="number"] { width: 5.5rem; text-align: center; }

/* ---- Product meta ------------------------------------------------------- */

.product_meta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gwf-hairline);
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 600;
  font-size: var(--gwf-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gwf-moss);
  display: grid;
  gap: 6px;
}
.product_meta a { color: var(--gwf-green); text-decoration: none; }
.product_meta a:hover { text-decoration: underline; }

/* ---- Tabs --------------------------------------------------------------- */

.woocommerce-tabs { margin-top: 72px; }
.woocommerce-tabs ul.tabs {
  list-style: none;
  margin: 0 0 28px;
  padding: 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  border-bottom: 1px solid var(--gwf-hairline);
}
.woocommerce-tabs ul.tabs li { margin: 0; }
.woocommerce-tabs ul.tabs li a {
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 700;
  font-size: var(--gwf-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gwf-moss);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover { color: var(--gwf-green); border-bottom-color: var(--gwf-green); }
.woocommerce-Tabs-panel h2 { display: none; } /* The tab already names the panel. */
.woocommerce-Tabs-panel p { max-width: var(--gwf-measure); }

.woocommerce-product-attributes { border-collapse: collapse; width: 100%; max-width: 620px; }
.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gwf-hairline);
  text-align: left;
  font-size: var(--gwf-small);
}
.woocommerce-product-attributes th {
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 700;
  font-size: var(--gwf-micro);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gwf-moss);
  width: 12rem;
}
.woocommerce-product-attributes p { margin: 0; }

/* ---- Related products --------------------------------------------------- */

.related.products, .up-sells.products { margin-top: 80px; }
.related.products > h2, .up-sells.products > h2 { margin-bottom: 32px; }

/* ---- Cart and checkout blocks ------------------------------------------
   These render themselves; only the type needs bringing into line. */

.wc-block-components-title,
.wp-block-woocommerce-cart h2,
.wc-block-cart__submit-container + * { font-family: var(--gwf-display); }
.wc-block-components-product-name { color: var(--gwf-ink); text-decoration: none; }
.wc-block-components-totals-item__value,
.wc-block-formatted-money-amount { font-variant-numeric: tabular-nums; }

/* ---- Shop page -------------------------------------------------------------
   .gwf-cta / .gwf-cta__bg / .gwf-cta__content are defined in pages.css (loaded
   on every page, including this one) -- this variant only adds the rounded,
   column-width treatment this specific placement needs.

   It deliberately does NOT override the shared band height or sub-line colour.
   Those were raised 420 -> 500px and white -> bone for the homepage's final-cta
   (4:227), and this banner inherited the change; checked against this page's
   OWN Figma frame afterwards, farm-story-banner (10:140) is 1440x504 with a
   #F7F3E8 sub-line, so the inherited values are the right ones here too and
   scoping them back off would have re-introduced a 84px shortfall. The only
   thing the inheritance got wrong was the sub-line's SIZE and measure, which is
   fixed at the markup end -- see the .gwf-lead note in archive-product.php. */

.gwf-cta--inline {
  border-radius: var(--gwf-radius-lg);
  overflow: hidden;
  margin-top: 64px;
}

.products.gwf-cards {
  margin-top: 40px;
}

/* ---- Shop category filter pills --------------------------------------------*/

.gwf-shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 8px;
}

/* ---- Cart (WooCommerce Blocks) ---------------------------------------------
   The live Cart/Checkout pages use the WooCommerce Cart/Checkout BLOCKS
   (wp:woocommerce/cart), not a classic table.cart template. Every selector
   below is a real class taken from the hydrated DOM in a real browser (Cart
   Blocks render client-side via the Store API, so a plain server fetch shows
   only an empty loading skeleton and nothing else). */

.wc-block-cart-items {
  width: 100%;
}
.wc-block-cart-items__header th {
  text-align: left;
  font-size: var(--gwf-micro);
  text-transform: uppercase;
  color: var(--gwf-sage);
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gwf-hairline);
}
.wc-block-cart-items__row td {
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid var(--gwf-hairline);
  vertical-align: middle;
}
.wc-block-cart-item__image img {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: var(--gwf-radius);
}
.wc-block-components-quantity-selector {
  border-radius: var(--gwf-radius-pill);
  border-color: var(--gwf-hairline);
}
.wc-block-cart-item__remove-link {
  /* WooCommerce Blocks ships table.wc-block-cart-items ... .wc-block-cart-item__remove-link
     { color: inherit; } (specificity 0,4,1) which beats this single-class selector
     (0,1,0) and silently swallows the error-red remove cue -- confirmed via
     getComputedStyle in a real browser, not assumed. Targeted !important on just this
     property, not the whole rule. */
  color: var(--gwf-error) !important;
}

.wc-block-components-sidebar {
  background: var(--gwf-white);
  border-radius: var(--gwf-radius-card);
  padding: 24px;
  box-shadow: var(--gwf-shadow);
}
.wc-block-cart__totals-title {
  /* WooCommerce Blocks' own @container (min-width: 700px) rule
     (.wc-block-cart .wc-block-cart__totals-title, specificity 0,2,0) beats this
     single-class selector (0,1,0) and sets font-family: inherit / font-size: 14px,
     silently shrinking "Cart totals" back to WooCommerce's plain micro-heading --
     confirmed via getComputedStyle in a real browser. Targeted !important on just
     these two losing properties, not the whole rule. */
  font-family: var(--gwf-display) !important;
  font-size: 1.25rem !important;
}
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value {
  font-size: var(--gwf-small);
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-weight: 700;
  font-size: 1.0625rem;
}

.wc-block-cart__submit-button.wc-block-components-button {
  display: flex;
  width: 100%;
  justify-content: center;
  border-radius: var(--gwf-radius-pill);
  background: var(--gwf-green);
  color: var(--gwf-white);
  font-family: var(--gwf-body);
  font-weight: 700;
  padding: 14px;
}
.wc-block-cart__submit-button.wc-block-components-button:hover {
  background: #0d2a1c;
  color: var(--gwf-white);
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 820px) {
  .single-product div.product {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .single-product div.product > .woocommerce-product-gallery,
  .single-product div.product > .summary { grid-column: 1; }
  .woocommerce-product-gallery { max-width: 480px; }
  .gwf-pdp__spec > li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---- Core notices (order-tracking "please enter a valid order ID" etc.) --
   woocommerce-general.css is dequeued, so wc_print_notice()'s default markup
   arrives unstyled without this. */

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  list-style: none;
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--gwf-radius);
  border-left: 4px solid;
  font-size: 0.9375rem;
}
.woocommerce-message { background: var(--gwf-sand); border-color: var(--gwf-sage); color: var(--gwf-green); }
.woocommerce-info    { background: var(--gwf-sand); border-color: var(--gwf-green); color: var(--gwf-green); }
.woocommerce-error   { background: var(--gwf-error-bg); border-color: var(--gwf-error); color: var(--gwf-error); }

/* ---- Track Your Order (/track-order/) ------------------------------------ */

.gwf-track { max-width: 640px; margin-inline: auto; padding-bottom: 40px; }
.gwf-track .gwf-formcard { padding: 40px; }
.gwf-track .gwf-form { margin-top: 0; }

.gwf-track__heading { font-size: 1.0625rem; margin-bottom: 24px; }
.gwf-track__heading strong { color: var(--gwf-green); }

.gwf-track-status {
  list-style: none; margin: 0 0 32px; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.gwf-track-status li {
  position: relative;
  text-align: center;
  padding-top: 40px;
}
.gwf-track-status li::before {
  /* the connecting line, drawn behind every circle in one pass */
  content: "";
  position: absolute; top: 13px; left: -50%; width: 100%; height: 2px;
  background: var(--gwf-hairline);
}
.gwf-track-status li:first-child::before { display: none; }
.gwf-track-status li.is-done::before { background: var(--gwf-gold); }
.gwf-track-status__n {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--gwf-body); font-weight: 700; font-size: 0.8125rem;
  background: var(--gwf-sand); color: var(--gwf-ink); opacity: 0.5;
}
.gwf-track-status li.is-done .gwf-track-status__n {
  background: var(--gwf-gold); color: var(--gwf-green); opacity: 1;
}
.gwf-track-status__label { font-size: 0.8125rem; color: var(--gwf-ink); opacity: 0.75; }
.gwf-track-status li.is-done .gwf-track-status__label { opacity: 1; font-weight: 700; }

.gwf-track__items { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.gwf-track__items td { padding: 10px 0; border-bottom: 1px solid var(--gwf-hairline); font-size: 0.9375rem; }
.gwf-track__items-total { text-align: right; font-variant-numeric: tabular-nums; }
.gwf-track__items-grand td { border-bottom: none; padding-top: 14px; font-weight: 700; color: var(--gwf-green); }

.gwf-track__ship-to { margin-bottom: 16px; }

.gwf-track__notes { list-style: none; margin: 16px 0 0; padding: 0; }
.gwf-track__notes li { padding: 12px 0; border-top: 1px solid var(--gwf-hairline); }
.gwf-track__notes li:first-child { border-top: none; }

/* ---- Manual payment gateways (GCash / Maya / Bank Transfer) -------------- */

.gwf-pay-pending {
  background: var(--gwf-sand);
  border-left: 4px solid var(--gwf-sage);
  border-radius: var(--gwf-radius);
  padding: 14px 18px;
  font-size: 0.9375rem;
  color: var(--gwf-green);
}
.gwf-pay-details {
  display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap;
  margin-top: 12px;
}
.gwf-pay-details__qr {
  width: 140px; height: 140px; object-fit: contain;
  border: 1.5px solid var(--gwf-hairline); border-radius: var(--gwf-radius);
  padding: 8px; background: var(--gwf-white);
}
.gwf-pay-details__account { margin: 0; font-size: 0.9375rem; }
.gwf-pay-details__account div { margin-bottom: 10px; }
.gwf-pay-details__account dt { font-weight: 700; color: var(--gwf-green); }
.gwf-pay-details__account dd { margin: 0; }

.gwf-pay-proof { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--gwf-hairline); }
.gwf-pay-proof .gwf-form { margin-top: 16px; }

/* ---- Cart/Checkout Blocks loading skeleton, on-brand instead of default
   grey. Additive only -- targets Woo Blocks' own skeleton classes, doesn't
   touch their layout. ---------------------------------------------------- */

.wc-block-components-skeleton__element {
  background: linear-gradient(90deg, var(--gwf-sand) 25%, var(--gwf-white) 37%, var(--gwf-sand) 63%);
  background-size: 400% 100%;
  animation: gwf-skeleton-shimmer 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .wc-block-components-skeleton__element { animation: none; background: var(--gwf-sand); }
}
@keyframes gwf-skeleton-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
