.wpt-content { overflow-wrap: anywhere; }
.wpt-content > :first-child { margin-top: 0; }
.wpt-content > :last-child { margin-bottom: 0; }
.wpt-content img, .wpt-content video, .wpt-content iframe { max-width: 100%; }
.wpt-content img, .wpt-content video { height: auto; }
.wpt-content table { display: block; max-width: 100%; overflow-x: auto; }
.wpt-content .wp-video { max-width: 100%; }
.wpt-content a:focus-visible { outline: 2px solid var(--wpt-accent, #3858e9); outline-offset: 3px; }

body.single-product .woocommerce-tabs .wpt-tabs-heading {
  clear: both; width: 100%; margin: 0 0 24px; grid-column: 1 / -1; grid-row: 1; overflow-wrap: anywhere;
}
body.single-product .woocommerce-tabs .wpt-tabs-heading h2 {
  margin: 0; font-family: inherit; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 500; line-height: 1.25;
}
body.single-product .woocommerce-tabs .wpt-tabs-subheading {
  margin: 8px 0 0; font-size: 0.8125rem; font-weight: 600; line-height: 1.6; letter-spacing: 0.08em;
}
body.wpt-style-vertical .woocommerce-tabs:has(> .wpt-tabs-heading) > .wpt-tabs-heading { margin-bottom: 0; }
body.wpt-style-vertical .woocommerce-tabs:has(> .wpt-tabs-heading) > ul.tabs,
body.wpt-style-vertical .woocommerce-tabs:has(> .wpt-tabs-heading) > .panel { grid-row: 2; }

/* Relocation keeps the gallery's native column width and the summary beside it. */
.wpt-gallery-with-tabs { container: wpt-gallery / inline-size; }
/* A tall summary/accordion must not stretch or distribute space in the gallery column. */
body.single-product div.product .woocommerce-product-gallery.wpt-gallery-with-tabs {
  align-self: start; height: auto; min-height: 0; justify-content: flex-start; align-content: start;
}
body.single-product div.product .woocommerce-product-gallery > .wpt-under-image {
  clear: none; float: none; flex: none; align-self: start; grid-column: 1 / -1;
  width: 100%; max-width: 100%; min-height: 0; margin: 24px 0 0; padding: 0;
}
body.single-product .wpt-under-image ul.tabs,
body.single-product .wpt-under-image .panel { float: none; width: 100%; margin-inline: 0; }
body.single-product .wpt-under-image .wpt-content img { width: auto; max-width: 100%; }
body.single-product .wpt-under-image ul.tabs li a { overflow-wrap: anywhere; }

/* Optional styles target WooCommerce's classic markup only. */
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs { display: block; }
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs {
  display: flex; flex-wrap: wrap; float: none; width: 100%; gap: 8px; margin: 0 0 24px; padding: 0; border: 0; list-style: none; overflow: visible;
}
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs .panel { float: none; width: 100%; }
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs::before,
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs::after,
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs li::before,
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs li::after { display: none; }
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs li {
  float: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs li a {
  display: block; padding: 12px 18px; text-decoration: none; font-weight: 600; line-height: 1.5; color: inherit; border: 2px solid transparent; box-shadow: none;
}
body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs li a:focus-visible { outline: 2px solid var(--wpt-accent); outline-offset: 3px; }
body.wpt-style-underline .woocommerce-tabs ul.tabs { border-bottom: 1px solid #ddd; gap: 4px; }
body.wpt-style-underline .woocommerce-tabs ul.tabs li.active a { border-bottom-color: var(--wpt-accent); color: var(--wpt-accent); }
body.wpt-style-pills .woocommerce-tabs ul.tabs li a { border-radius: 999px; background: #f3f4f6; color: #202124; }
body.wpt-style-pills .woocommerce-tabs ul.tabs li.active a { background: var(--wpt-accent); color: #fff; }
body.wpt-style-vertical .woocommerce-tabs { display: grid; grid-template-columns: minmax(160px, 24%) minmax(0, 1fr); gap: 32px; }
body.wpt-style-vertical .woocommerce-tabs::before, body.wpt-style-vertical .woocommerce-tabs::after { display: none; }
body.wpt-style-vertical .woocommerce-tabs ul.tabs { flex-direction: column; align-self: start; width: auto; }
body.wpt-style-vertical .woocommerce-tabs ul.tabs li a { border-inline-start: 3px solid transparent; background: #f6f7f8; color: #202124; }
body.wpt-style-vertical .woocommerce-tabs ul.tabs li.active a { border-inline-start-color: var(--wpt-accent); color: var(--wpt-accent); background: #eee; }
body.wpt-style-vertical .woocommerce-tabs .panel { grid-column: 2; grid-row: 1; min-width: 0; width: auto; margin: 0; }
@container wpt-gallery (max-width: 560px) {
  body.wpt-style-vertical .wpt-under-image { display: block; }
  body.wpt-style-vertical .wpt-under-image:has(> .wpt-tabs-heading) > .wpt-tabs-heading { margin-bottom: 24px; }
  body.wpt-style-vertical .wpt-under-image ul.tabs { flex-direction: row; width: 100%; }
  body.wpt-style-vertical .wpt-under-image .panel { width: 100%; }
}
@media (max-width: 680px) {
  body.wpt-style-vertical .woocommerce-tabs { display: block; }
  body.wpt-style-vertical .woocommerce-tabs:has(> .wpt-tabs-heading) > .wpt-tabs-heading { margin-bottom: 24px; }
  body.wpt-style-vertical .woocommerce-tabs ul.tabs { flex-direction: row; width: 100%; }
  body.wpt-style-vertical .woocommerce-tabs .panel { width: 100%; }
  body:is(.wpt-style-underline, .wpt-style-pills, .wpt-style-vertical) .woocommerce-tabs ul.tabs li a { padding: 10px 13px; }
}
