/* ==========================================================================
   Green Foods Import — single product page
   Rebuilt to match the original storefront:
   vendor mark, ticked selling points, VAT note, offer chips, pill picker,
   quantity stepper, green add-to-cart, cream trust block, description section.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAYOUT
   -------------------------------------------------------------------------- */

.gfi-product { margin-top: 2.4rem; }

.gfi-product__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 6rem;
  align-items: start;
  margin-bottom: 6rem;
}

.gfi-product__media { min-width: 0; }
.gfi-product__summary { min-width: 0; }

.gfi-product__bottom { display: block; }

/* WooCommerce floats the gallery/summary by default — we use grid. */
.gfi-product div.images,
.gfi-product div.summary {
  float: none;
  width: auto;
  margin: 0;
}

@media screen and (max-width: 989px) {
  .gfi-product__top {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2.4rem;
    margin-bottom: 4rem;
  }
}

/* --------------------------------------------------------------------------
   2. VENDOR MARK + NAME
   -------------------------------------------------------------------------- */

.gfi-vendor {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 1.2rem;
}

.gfi-vendor__mark {
  display: grid;
  place-items: center;
  width: 5.2rem;
  height: 5.2rem;
  flex: 0 0 5.2rem;
  background: var(--color-organic);
  color: #fff;
}

.gfi-vendor__mark svg {
  width: 3.4rem;
  height: 3.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gfi-vendor__name {
  font-size: 1.5rem;
  font-weight: 400;
  color: rgb(var(--color-foreground));
}

@media screen and (max-width: 749px) {
  .gfi-vendor__mark { width: 4.4rem; height: 4.4rem; flex-basis: 4.4rem; }
  .gfi-vendor__mark svg { width: 2.8rem; height: 2.8rem; }
  .gfi-vendor__name { font-size: 1.4rem; }
}

/* --------------------------------------------------------------------------
   3. TITLE
   -------------------------------------------------------------------------- */

.gfi-product .product_title {
  margin: 0 0 1.2rem;
  font-size: clamp(2.6rem, 2.6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
}

@media screen and (max-width: 749px) {
  .gfi-product .product_title { font-size: 2.4rem; }
}

/* --------------------------------------------------------------------------
   4. SELLING POINTS
   -------------------------------------------------------------------------- */

.gfi-selling-points {
  margin: 0 0 1.8rem;
  padding: 0;
  list-style: none;
}

.gfi-selling-points li {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  margin: 0 0 .15rem;
  font-size: 1.45rem;
  line-height: 1.42;
}

.gfi-selling-points__tick {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: .4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media screen and (max-width: 749px) {
  .gfi-selling-points li { font-size: 1.4rem; }
}

/* --------------------------------------------------------------------------
   5. PRICE + VAT NOTE
   -------------------------------------------------------------------------- */

.gfi-product .summary .price {
  display: block;
  margin: 0 0 .3rem;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: rgb(var(--color-foreground));
}

.gfi-product .summary .price del {
  font-size: 1.8rem;
  font-weight: 500;
  color: rgba(var(--color-foreground), .55);
  margin-right: .8rem;
}

.gfi-product .summary .price ins {
  text-decoration: none;
  color: var(--color-sale);
}

.gfi-vat-note {
  margin: 0 0 1.2rem;
  font-size: 1.25rem;
  color: rgba(var(--color-foreground), .62);
}

/* --------------------------------------------------------------------------
   6. OFFER CHIPS
   -------------------------------------------------------------------------- */

.gfi-offer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.8rem;
}

.gfi-offer-chip {
  display: inline-block;
  padding: .5rem .9rem;
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .08rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.gfi-offer-note {
  font-size: 1.35rem;
  font-weight: 600;
  color: rgb(var(--color-foreground));
}

/* --------------------------------------------------------------------------
   7. VARIANT PILLS
   -------------------------------------------------------------------------- */

/* The real <select> controls WooCommerce drives — kept, but out of sight. */
.gfi-variations-source {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.gfi-picker { margin: 0 0 1.2rem; }

.gfi-picker__group + .gfi-picker__group { margin-top: 1.6rem; }

.gfi-picker__label {
  display: block;
  margin: 0 0 .6rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .02rem;
}

/* Equal-width columns, so the pills line up in a neat grid instead of the
   ragged content-width row flexbox produced (and so a pill left alone on the
   last row does not stretch to full width).
   auto-fill (not auto-fit) keeps the empty tracks, which is what stops the
   final pill from spanning the whole row. */
.gfi-pills {
  display: grid;
  /* 18rem min keeps this at exactly two columns across the whole 488-552px
     range the summary column spans on desktop. A smaller minimum produced a
     third column at 1440px wide, which was too narrow for the longest label
     and made it wrap. */
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: .8rem;
  align-items: stretch;
}

/* Radios are visually hidden; the label is the visible pill. */
.gfi-pill__input {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.gfi-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  min-width: 0;
  min-height: 100%;
  padding: 1.2rem 1.4rem;
  border: 0;
  border-bottom: .4rem solid transparent;
  border-radius: 0;
  background: #efe8dc;
  color: rgb(var(--color-foreground));
  font-size: 1.5rem;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.gfi-pill:hover { background: #e7dfd1; }

.gfi-pill__name { display: block; max-width: 100%; overflow-wrap: break-word; }

.gfi-pill__price {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #b71924;
}

.gfi-pill__unavailable { display: none; }

/* Selected: lighter surface + thick black underline. */
.gfi-pill__input:checked + .gfi-pill {
  background: #f7f4ee;
  border-bottom-color: #121212;
}

.gfi-pill__input:focus-visible + .gfi-pill {
  outline: .2rem solid rgb(var(--color-foreground));
  outline-offset: .2rem;
}

/* Unavailable combinations, mirrored from WooCommerce's own select state. */
.gfi-pill__input.gfi-is-disabled + .gfi-pill {
  background: #f2f0ec;
  color: rgba(var(--color-foreground), .45);
  cursor: not-allowed;
  border-bottom-color: transparent;
}

.gfi-pill__input.gfi-is-disabled + .gfi-pill .gfi-pill__price {
  color: rgba(var(--color-foreground), .45);
}

.gfi-pill__input.gfi-is-disabled + .gfi-pill .gfi-pill__name {
  text-decoration: line-through;
}

.gfi-pill__input.gfi-is-disabled + .gfi-pill:hover { background: #f2f0ec; }

/*
 * Measured with the real labels: "Cookies & Cream 5 kg" needs 169px on one
 * line at 14px. A 390px phone gives a 177px column, so the text has to come
 * down to 13px to keep every pill on a single line.
 */
@media screen and (max-width: 749px) {
  .gfi-pills {
    /* auto-fill picks the column count from the available width: 1 column on
       a 375px phone, 2 at 390px, 3 on a tablet. Every track stays equal and
       an odd last pill never stretches. */
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: .6rem;
  }
  .gfi-pill { padding: .95rem .6rem; font-size: 1.3rem; }
  .gfi-pill__price { font-size: 1.3rem; }
}

/* --------------------------------------------------------------------------
   8. QUANTITY STEPPER + ADD TO CART
   -------------------------------------------------------------------------- */

/* The original stacks the quantity row above a full-width button, so the form
   is a plain block rather than a flex row. */
.gfi-product form.cart { display: block; margin: 1.2rem 0 0; }

.gfi-product form.cart .single_variation_wrap,
.gfi-product form.cart .woocommerce-variation-add-to-cart { display: block; width: 100%; }

.gfi-product form.cart .woocommerce-variation-price { margin: 0 0 1.2rem; }

.gfi-qty {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 1.2rem;
}

.gfi-qty__label {
  font-size: 1.5rem;
  color: rgb(var(--color-foreground));
}

.gfi-qty__box {
  display: flex;
  align-items: stretch;
  border: .1rem solid #d5d0c8;
  background: #fff;
}

.gfi-qty__btn {
  display: grid;
  place-items: center;
  width: 4rem;
  min-height: 4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(var(--color-foreground), .55);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.gfi-qty__btn:hover { color: rgb(var(--color-foreground)); background: #f4f2ee; }
.gfi-qty__btn:disabled { opacity: .35; cursor: not-allowed; }

.gfi-qty__box .qty {
  width: 6rem;
  min-height: 4rem;
  padding: 0 .4rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  -moz-appearance: textfield;
}

.gfi-qty__box .qty::-webkit-outer-spin-button,
.gfi-qty__box .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.gfi-qty__box .qty:focus { outline: 0; box-shadow: none; }

/* The primary action: solid green, uppercase, full width. */
.gfi-product form.cart .single_add_to_cart_button,
.gfi-product form.cart .button.single_add_to_cart_button {
  display: block;
  width: 100%;
  min-height: 5.6rem;
  margin: 0;
  padding: 1.4rem 2.4rem;
  border: 0;
  border-radius: 0;
  background: #21823a;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .12rem;
  text-transform: uppercase;
}

.gfi-product form.cart .single_add_to_cart_button:hover {
  background: #1a6b2f;
  color: #fff;
}

.gfi-product form.cart .single_add_to_cart_button.disabled,
.gfi-product form.cart .single_add_to_cart_button:disabled {
  background: #9dbfa8;
  color: #fff;
  cursor: not-allowed;
}

.reset_variations { display: none !important; }

/* --------------------------------------------------------------------------
   9. TRUST BADGES
   -------------------------------------------------------------------------- */

.gfi-trust {
  margin: 1.8rem 0 0;
  padding: 2.2rem 2.4rem;
  background: #f7f4ee;
  list-style: none;
}

.gfi-trust__item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 1.35rem;
  color: #4b4a49;
  font-size: 1.5rem;
  line-height: 1.4;
}

.gfi-trust__item:last-child { margin-bottom: 0; }

.gfi-trust__icon {
  flex: 0 0 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media screen and (max-width: 749px) {
  .gfi-trust { padding: 2rem 1.6rem; }
  .gfi-trust__item { font-size: 1.4rem; gap: 1rem; margin-bottom: 1.3rem; }
}

/* --------------------------------------------------------------------------
   10. DESCRIPTION SECTION
   -------------------------------------------------------------------------- */

.gfi-description,
.gfi-additional {
  max-width: 100%;
  margin: 0 0 4rem;
  padding-top: 2rem;
  border-top: .1rem solid rgba(var(--color-foreground), .15);
}

.gfi-description__heading {
  margin: 0 0 1.6rem;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: .01rem;
}

.gfi-description__body { max-width: 100%; font-size: 1.5rem; line-height: 1.75; }
.gfi-description__body h3 { margin: 2.8rem 0 1rem; font-size: 1.9rem; font-weight: 800; }
.gfi-description__body ul { padding-left: 2.2rem; }
.gfi-description__body li { margin-bottom: .4rem; }

.gfi-additional__body table { font-size: 1.4rem; }

@media screen and (max-width: 749px) {
  .gfi-description__body { font-size: 1.45rem; }
  .gfi-description__heading { font-size: 1.5rem; }
}

/* --------------------------------------------------------------------------
   11. RELATED PRODUCTS
   -------------------------------------------------------------------------- */

.gfi-product__bottom .related.products,
.gfi-product__bottom .upsells.products { margin-top: 4rem; }
