/* Fat Farmer: matches warm cream / forest green storefront, not the purple reference. */
.ffvd-card {
  --ffvd-forest: #17482b;
  --ffvd-accent: #bf7827;
  --ffvd-cream: #f8f6ef;
  --ffvd-border: #d9e3d7;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  clear: both;
  flex: 0 0 100%;
  margin: 20px 0 22px;
  padding: 22px;
  background: var(--ffvd-cream);
  border: 1px solid var(--ffvd-border);
  border-radius: 16px;
  box-shadow: 0 5px 22px rgba(24, 53, 30, .035);
  color: #242c23;
  font-family: inherit;
}
.ffvd-card *, .ffvd-form .ffvd-quantity * {box-sizing: border-box;}
.ffvd-heading {display:flex; align-items:center; gap:14px; margin:0 0 4px;}
.ffvd-heading-line {height: 2px; flex:1; min-width: 15px; background: var(--ffvd-accent); opacity:.70;}
.ffvd-card .ffvd-heading h3 {
  margin: 0;
  text-align:center;
  color:var(--ffvd-forest);
  font-family:inherit;
  line-height:1.3;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -.4px;
}
.ffvd-intro {margin: 4px 0 17px; text-align:center; font-size: 13px; color: #576458;}
.ffvd-tiers {display:grid; gap:8px; background:#fff; padding:9px; border-radius:13px; border:1px solid #e2e8df;}
.ffvd-card button.ffvd-tier {
  all:unset;
  box-sizing:border-box;
  cursor:pointer;
  display:grid;
  grid-template-columns: minmax(70px, 1fr) auto;
  align-items:center;
  gap:3px;
  width:100%;
  padding:13px 14px;
  border-radius:10px;
  color:#273a2b;
  background:transparent;
  transition: background .18s ease, box-shadow .18s ease, color .18s ease;
  font-family:inherit;
  font-size:14px;
  line-height:1.2;
  text-align:left;
}
.ffvd-card button.ffvd-tier:hover {background:#edf3ea;}
.ffvd-card button.ffvd-tier:focus-visible {outline:3px solid var(--ffvd-accent); outline-offset:2px;}
.ffvd-card button.ffvd-tier.is-active,
.ffvd-card button.ffvd-tier.is-active:hover {
  color:#fff;
  background:var(--ffvd-forest);
  box-shadow:0 5px 12px rgba(18, 68, 35, .13);
}
.ffvd-tier-qty {font-weight:700;}
.ffvd-tier-right {min-width:0; display:flex; flex-direction:column; align-items:flex-end; gap:2px; text-align:right;}
.ffvd-tier-price {font-weight:800; white-space:nowrap;}
.ffvd-tier-price .woocommerce-Price-amount {font-weight:inherit; color:inherit;}
.ffvd-tier-unit {font-size:11px; opacity:.82; white-space:normal;}
.ffvd-muted {font-weight:500; font-size:12px; opacity:.7;}
.ffvd-progress {background:#eef2e8; border:1px solid #dbe7d8; border-radius:12px; padding:15px 17px 16px; margin-top:17px;}
.ffvd-progress-text {font-size:14px; font-weight:750; line-height:1.4; text-align:center; color:var(--ffvd-forest); margin-bottom:11px;}
.ffvd-track {height:7px; border-radius:20px; background:#ceddc9; overflow:hidden;}
.ffvd-fill {display:block; width:0; height:100%; background:linear-gradient(90deg,var(--ffvd-accent),var(--ffvd-forest)); border-radius:inherit; transition:width .24s ease;}
.ffvd-footnote {color:#6c766d; font-size:11px; text-align:center; margin-top:12px;}
/* Variant selectors inherit the existing WooCommerce form, with site-matched details. */
.ffvd-form .variations select {
  background-color:#fff;
  border:1px solid #d7dfd0;
  border-radius:9px;
  color:#26392a;
  min-height:42px;
  padding:8px 11px;
}
.ffvd-form .variations label {color:#24452a; font-weight:700;}
.ffvd-form .quantity.ffvd-quantity {display:inline-flex !important; flex-wrap:nowrap; align-items:stretch; border:1px solid #d6ddcf; overflow:hidden; border-radius:9px; background:#fff; height:45px; width:auto !important; max-width:180px; margin-right:12px !important;}
.ffvd-form .ffvd-quantity input.qty {box-sizing:border-box !important; border:0 !important; border-left:1px solid #e3e8de !important; border-right:1px solid #e3e8de !important; border-radius:0 !important; box-shadow:none !important; outline-offset:-2px; height:43px !important; width:60px !important; min-width:50px !important; margin:0 !important; background:#fff !important; text-align:center !important; color:var(--ffvd-forest,#17482b) !important; -moz-appearance:textfield; appearance:textfield; padding:0 5px !important;}
.ffvd-form .ffvd-quantity input.qty::-webkit-outer-spin-button,
.ffvd-form .ffvd-quantity input.qty::-webkit-inner-spin-button {-webkit-appearance:none; margin:0;}
.ffvd-form .ffvd-quantity button.ffvd-minus,
.ffvd-form .ffvd-quantity button.ffvd-plus {all:unset; box-sizing:border-box; width:37px; display:flex; align-items:center; justify-content:center; text-align:center; color:#24442b; cursor:pointer; font-size:19px; font-weight:500; user-select:none;}
.ffvd-form .ffvd-quantity button.ffvd-minus:hover,
.ffvd-form .ffvd-quantity button.ffvd-plus:hover {background:#eef2e8;}
.ffvd-form .ffvd-quantity button.ffvd-minus:focus-visible,
.ffvd-form .ffvd-quantity button.ffvd-plus:focus-visible {outline:2px solid #bf7827; outline-offset:-2px;}
@media (max-width: 767px) {
  .ffvd-card {padding:14px; margin:14px 0 18px; border-radius:13px;}
  .ffvd-heading {gap:9px;}
  .ffvd-card .ffvd-heading h3 {font-size:19px;}
  .ffvd-intro {font-size:12px;}
  .ffvd-tiers {padding:6px; gap:3px;}
  .ffvd-card button.ffvd-tier {padding:12px 10px; font-size:13px;}
  .ffvd-tier-unit {font-size:10px;}
  .ffvd-progress {padding:13px 11px;}
  .ffvd-progress-text {font-size:13px;}
}
@media (prefers-reduced-motion: reduce) {
  .ffvd-card button.ffvd-tier, .ffvd-fill {transition:none !important;}
}

/* Elementor layout repair: keep the full-width price ladder OUTSIDE form.cart.
   The automatic panel is now output at woocommerce_before_add_to_cart_form. */
.elementor-widget-woocommerce-product-add-to-cart .ffvd-card,
.elementor-widget-woocommerce-product-add-to-cart .ffvd-card,
.elementor-add-to-cart .ffvd-card {
  width:100% !important;
  max-width:100% !important;
  min-width:0;
  clear:both;
  flex-basis:100%;
}
/* Only simple-product forms are rearranged. Variable-product forms retain
   WooCommerce's normal variation dropdowns and single_variation_wrap. */
form.cart.ffvd-form:not(.variations_form):not(.grouped_form) {
  display:flex;
  flex-flow:row wrap;
  gap:12px;
  align-items:center;
}
.ffvd-form .quantity.ffvd-quantity {flex:0 0 auto; margin:0 !important;}
.ffvd-form button.single_add_to_cart_button,
.elementor-widget-woocommerce-product-add-to-cart .ffvd-form button.single_add_to_cart_button {
  box-sizing:border-box !important;
  flex:1 1 180px;
  width:auto !important;
  min-width:150px;
  max-width:100%;
  min-height:45px !important;
  height:auto !important;
  padding:12px 22px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:9px !important;
  background:var(--ffvd-forest,#17482b) !important;
  color:#fff !important;
  font-weight:750 !important;
  text-align:center;
  line-height:1.3 !important;
  align-self:center;
  box-shadow:none !important;
}
.ffvd-form button.single_add_to_cart_button:hover,
.ffvd-form button.single_add_to_cart_button:focus-visible {
  background:#0e3320 !important;
  color:#fff !important;
}
.ffvd-form button.single_add_to_cart_button:focus-visible {outline:2px solid var(--ffvd-accent,#bf7827) !important; outline-offset:3px;}
.ffvd-form.variations_form .woocommerce-variation-add-to-cart {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
}
@media (max-width: 440px) {
  form.cart.ffvd-form:not(.variations_form):not(.grouped_form) button.single_add_to_cart_button {
    flex-basis:100%;
    width:100% !important;
  }
}

/* v1.1.4: quantity-aware product price – original Elementor Product Price stays styled. */
.ffvd-live-price {display:block; max-width:100%; color:#17482b; font-family:inherit;}
.ffvd-live-price .ffvd-live-price-amount.price {
  display:block; margin:0; font-size:clamp(24px,2.5vw,34px);
  line-height:1.2; font-weight:800; color:inherit;
}
.ffvd-live-price-amount .woocommerce-Price-amount {font-weight:inherit;}
.ffvd-price-total[hidden] {display:none !important;}
.ffvd-price-total:not([hidden]) {display:block; margin:7px 0 0; font-size:13px;
  font-weight:600; line-height:1.35; color:#55705d;}
.elementor-widget-woocommerce-product-price .ffvd-native-total:not([hidden]) {margin-top:6px;}
@media (max-width:767px) {
  .ffvd-live-price .ffvd-live-price-amount.price {font-size:26px;}
}

/* v1.3.8 — 48px standard actions without altering product quantity stepper. */
.ffvd-card button.ffvd-tier {min-height: 48px;}
.ffvd-form button.single_add_to_cart_button,
.elementor-widget-woocommerce-product-add-to-cart .ffvd-form button.single_add_to_cart_button {
  box-sizing: border-box !important;
  min-height: 48px !important;
  border-radius: 11px !important;
}

/* v1.4.0 – unavailable quantity tiers due to WooCommerce stock/purchase limits. */
.ffvd-card button.ffvd-tier:disabled,.ffvd-card button.ffvd-tier.is-unavailable{opacity:.48;cursor:not-allowed;box-shadow:none;filter:grayscale(.15)}
.ffvd-card button.ffvd-tier:disabled:hover{background:#fff;color:inherit}
