/* East Anglia Optics product layout. Scoped to the redesigned product template. */
body.eao-product-redesign {
  --eao-ink: #171717;
  --eao-muted: #5f6265;
  --eao-line: #e1e2e3;
  --eao-soft: #f5f5f4;
  --eao-red: #a71f2d;
}

body.eao-product-redesign .product-image-summary-inner {
  align-items: flex-start;
}

body.eao-product-redesign .product-images {
  min-width: 0;
}

body.eao-product-redesign .product-images .woocommerce-product-gallery {
  border: 1px solid var(--eao-line);
  border-radius: 12px;
  background: #fafafa;
}

body.eao-product-redesign .summary-inner {
  min-width: 0;
  color: var(--eao-ink);
}

body.eao-product-redesign .summary-inner .product_title {
  margin: 8px 0 14px;
  color: var(--eao-ink);
  font-size: clamp(27px, 2.25vw, 36px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.12;
}

body.eao-product-redesign .summary-inner > .price,
body.eao-product-redesign .summary-inner > .wd-product-price {
  margin-bottom: 14px;
  color: var(--eao-ink);
  font-size: clamp(22px, 1.8vw, 27px);
  font-weight: 700;
}

body.eao-product-redesign .summary-inner .price del {
  color: var(--eao-muted);
  font-size: .75em;
  font-weight: 400;
}

body.eao-product-redesign .summary-inner .price ins {
  color: var(--eao-ink);
  text-decoration: none;
}

body.eao-product-redesign .summary-inner .eao-product-vat {
  margin: 0 0 12px;
  color: var(--eao-muted);
  font-size: 14px;
  line-height: 1.45;
}

body.eao-product-redesign .summary-inner > .hummwidget {
  margin-block-end: 8px;
}

body.eao-product-redesign .eao-buy-panel {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid var(--eao-line);
  border-radius: 10px;
  background: #fff;
}

body.eao-product-redesign .eao-buy-panel form.cart {
  margin: 0;
}

body.eao-product-redesign .eao-buy-panel .eao-backorder-lead-time {
  margin: 0 0 12px;
  color: var(--eao-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

body.eao-product-redesign .eao-buy-panel .eaof-add-to-cart-wrapper {
  width: 100%;
}

body.eao-product-redesign .eao-buy-panel .eaof-finance-block {
  flex: 0 0 100%;
  min-width: 0;
}

body.eao-product-redesign .eao-buy-panel .eaof-add-to-cart-wrapper .eaof-toggle-btn {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 13px;
  border: 1px solid #bfc1c3;
  background: #fff !important;
  color: var(--eao-ink) !important;
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

body.eao-product-redesign .eao-buy-panel .eaof-add-to-cart-wrapper .eaof-toggle-btn:hover,
body.eao-product-redesign .eao-buy-panel .eaof-add-to-cart-wrapper .eaof-toggle-btn.eaof-open {
  background: var(--eao-soft) !important;
}

body.eao-product-redesign .eao-buy-panel .eaof-add-to-cart-wrapper .single_add_to_cart_button {
  margin-inline-start: 0;
  padding-inline: 14px;
  white-space: nowrap;
}

body.eao-product-redesign .eao-product-review-link {
  color: var(--eao-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.eao-product-redesign .eao-buy-panel .stock {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

body.eao-product-redesign .eao-buy-panel .single_add_to_cart_button {
  min-height: 48px;
  border-radius: 4px;
  font-weight: 700;
}

body.eao-product-redesign .summary-inner > .woocommerce-product-details__short-description {
  margin-block-end: 14px;
  color: #343638;
  font-size: 15px;
  line-height: 1.65;
}

body.eao-product-redesign .summary-inner > .woocommerce-product-details__short-description p:empty {
  display: none;
}

body.eao-product-redesign .summary-inner > .woocommerce-product-details__short-description img {
  max-width: 100%;
  height: auto;
}

body.eao-product-redesign .summary-inner > .woocommerce-product-details__short-description > :last-child {
  margin-block-end: 0;
}

body.eao-product-redesign .product-tabs-wrapper {
  margin-block-end: 0 !important;
  padding: 0 0 12px;
}

body.eao-product-redesign .eao-buy-panel :focus-visible {
  outline: 2px solid var(--eao-red);
  outline-offset: 3px;
}

body.eao-product-redesign .eao-product-section {
  display: block;
  padding: 28px 0;
  border-bottom: 1px solid var(--eao-line);
  scroll-margin-top: 100px;
}

body.eao-product-redesign .eao-product-section-title {
  margin: 0 0 16px;
  color: var(--eao-ink);
  font-size: clamp(21px, 1.65vw, 25px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}

body.eao-product-redesign .eao-product-section-body {
  min-width: 0;
  color: #343638;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

body.eao-product-redesign .eao-product-section-body > p:not(:has(img, iframe, video)) {
  max-inline-size: 88ch;
}

body.eao-product-redesign .eao-product-section-body img {
  max-width: min(100%, 720px);
  height: auto;
}

body.eao-product-redesign .eao-product-section-body iframe {
  max-width: min(100%, 720px);
}

body.eao-product-redesign .eao-product-section-body iframe[src*="youtube.com"],
body.eao-product-redesign .eao-product-section-body iframe[src*="youtube-nocookie.com"],
body.eao-product-redesign .eao-product-section-body iframe[src*="youtu.be"],
body.eao-product-redesign .eao-product-section-body iframe[src*="vimeo.com"] {
  width: min(100%, 720px);
  height: auto;
  aspect-ratio: 16 / 9;
}

body.eao-product-redesign .eao-product-section-body table {
  width: 100%;
}

body.eao-product-redesign .eao-product-section-body table th,
body.eao-product-redesign .eao-product-section-body table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--eao-line);
  text-align: left;
  vertical-align: top;
}

body.eao-product-redesign .eao-product-section-body table th {
  color: var(--eao-ink);
  font-weight: 650;
}

body.eao-product-redesign .eao-product-section-body .wd-single-reviews {
  max-width: 100%;
}

body.eao-product-redesign .product-tabs-inner > .eao-product-sections:not(:last-child) {
  margin-block-end: 0;
}

body.eao-product-redesign .eao-product-footer-meta,
body.eao-product-redesign .eao-product-footer-meta .product_meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0;
}

body.eao-product-redesign .eao-product-footer-meta {
  padding-block-start: 14px;
}

body.eao-product-redesign .related-and-upsells .related-products {
  margin-top: 24px;
}

@media (max-width: 767px) {
  body.eao-product-redesign .summary-inner .product_title {
    margin-top: 8px;
    font-size: 27px;
  }

  body.eao-product-redesign .eao-buy-panel {
    padding: 15px;
  }

  body.eao-product-redesign .wd-gallery-images .wd-carousel-item img:not(.zoomImg) {
    max-height: clamp(220px, 68vw, 300px);
    width: 100%;
    object-fit: contain;
  }

  body.eao-product-redesign .wd-gallery-thumb .wd-carousel-item img {
    max-height: 72px;
    width: 100%;
    object-fit: contain;
  }

  body.eao-product-redesign .eao-buy-panel .eaof-finance-block {
    margin-bottom: 0;
  }

  body.eao-product-redesign .eao-buy-panel .eaof-add-to-cart-wrapper .eaof-toggle-btn {
    min-height: 40px;
    height: auto;
    margin-bottom: 0;
  }

  body.eao-product-redesign .eao-product-section {
    padding: 24px 0;
    scroll-margin-top: 80px;
  }

  body.eao-product-redesign .eao-product-section-body table {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    height: auto !important;
    table-layout: fixed;
  }

  body.eao-product-redesign .eao-product-section-body table th,
  body.eao-product-redesign .eao-product-section-body table td {
    padding: 8px 6px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  body.eao-product-redesign .eao-product-section-body table th {
    text-transform: none;
  }
}

body.eao-product-redesign #tab-description :is(h2[id], h3[id]) {
  scroll-margin-top: 100px;
}

@media (max-width: 767px) {
  body.eao-product-redesign #tab-description :is(h2[id], h3[id]) {
    scroll-margin-top: 80px;
  }
}
