/* 2.5.1 — contain the gallery grid track, not the slider's moving strip. */
body.single-product div.product {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
body.single-product div.product > * { min-width: 0; }
body.single-product div.product > .images,
body.single-product div.product > .summary { max-width: 100%; }
body.single-product div.product .woocommerce-product-gallery {
  width: 100% !important;
  min-width: 0;
  align-self: start;
}
body.single-product div.product .flex-viewport {
  width: 100%;
  max-width: 100%;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--color-border);
}
body.single-product div.product div.images .woocommerce-product-gallery__wrapper {
  margin: 0;
  max-width: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
body.single-product div.product .woocommerce-product-gallery__image > a { display: block; }
body.single-product div.product div.images .woocommerce-product-gallery__image img:not(.zoomImg) {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 560px;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
}
body.single-product div.product div.images .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  padding: 2px;
}
body.single-product div.product div.images .flex-control-thumbs li { min-width: 0; }
body.single-product div.product div.images .flex-control-thumbs img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
}
body.single-product div.product div.images .flex-control-thumbs img:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}
@media (min-width: 768px) {
  body.single-product div.product { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}
/* The classic checkout uses core WooCommerce fields, errors and payment hooks. */
body.woocommerce-checkout form.checkout,
body.woocommerce-checkout form.checkout .col2-set,
body.woocommerce-checkout form.checkout .col-1,
body.woocommerce-checkout form.checkout .col-2,
body.woocommerce-checkout form.checkout .form-row { min-width: 0; }
body.woocommerce-checkout #billing_phone_field,
body.woocommerce-checkout #billing_first_name_field,
body.woocommerce-checkout #shipping_first_name_field { grid-column: 1 / -1; width: 100%; }
body.woocommerce-checkout #billing_phone,
body.woocommerce-checkout #billing_postcode,
body.woocommerce-checkout #shipping_postcode { direction: ltr; text-align: left; }
body.woocommerce-checkout form.checkout input.input-text,
body.woocommerce-checkout form.checkout select,
body.woocommerce-checkout form.checkout textarea { max-width: 100%; font-size: 16px; }
body.woocommerce-checkout #order_review { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  body.single-product div.product { gap: 22px; }
  body.single-product div.product div.summary { padding: 20px !important; }
  body.woocommerce-checkout form.checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout form.checkout .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

body.woocommerce-checkout form.checkout #billing_country_field,
body.woocommerce-checkout form.checkout #shipping_country_field,
body.woocommerce-checkout form.checkout #billing_last_name_field,
body.woocommerce-checkout form.checkout #shipping_last_name_field { display: none !important; }
/* At narrow desktop widths, anchor the category panel to the header container. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .header__inner { position: relative; }
  .header .shop-mega { position: static; }
  .header .shop-mega__panel {
    inset-inline: 20px;
    width: auto;
    top: calc(100% - 4px);
  }
}
