/**
 * Giovision product description theme
 *
 * Consistent type + spacing over supplier HTML. Paired with
 * GVSC_Product_Description + themeProductDescriptions() JS.
 */

/* ---- Scope ---- */
.single-product .woocommerce-tabs .woocommerce-Tabs-panel--description,
.single-product .woocommerce-tabs #tab-description,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel[id*="description"],
.single-product .woocommerce-tabs .panel.woocommerce-Tabs-panel--description,
.single-product .summary .woocommerce-product-details__short-description,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description,
.ts-popup-modal .summary .woocommerce-product-details__short-description,
.single-product .product-content.gv-desc-theme,
.single-product .gv-desc-theme,
.gv-desc-theme {
  --gv-desc-text: #3d4a5c;
  --gv-desc-heading: var(--gv-color-blue, #1f2a7c);
  --gv-desc-bullet: var(--gv-color-blue, #1f2a7c);
  --gv-desc-gap: 0.75em;
  --gv-desc-gap-section: 1.35em;
  color: var(--gv-desc-text) !important;
  font-family: inherit !important;
  font-size: var(--gv-text-sm) !important;
  font-weight: var(--gv-font-weight-regular, 400) !important;
  line-height: 1.6 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Kill supplier presentation (exclude our structural markers) */
.gv-desc-theme *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(strong):not(b):not(.gv-desc-heading):not(.gv-desc-subhead):not(.gv-desc-label):not(.gv-desc-embed):not(.gv-desc-embed-inner),
.single-product .woocommerce-tabs #tab-description *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(strong):not(b):not(.gv-desc-heading):not(.gv-desc-subhead):not(.gv-desc-label):not(.gv-desc-embed):not(.gv-desc-embed-inner) {
  font-family: inherit !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.gv-desc-theme *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(strong):not(b):not(.gv-desc-heading):not(.gv-desc-subhead):not(.gv-desc-label):not(iframe):not(img):not(.gv-desc-embed):not(.gv-desc-embed-inner),
.single-product .woocommerce-tabs #tab-description *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(strong):not(b):not(.gv-desc-heading):not(.gv-desc-subhead):not(.gv-desc-label):not(iframe):not(img):not(.gv-desc-embed):not(.gv-desc-embed-inner) {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* ---- Body copy ---- */
.gv-desc-theme p,
.single-product .woocommerce-tabs #tab-description p,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel--description p {
  margin: 0 0 var(--gv-desc-gap) !important;
  padding: 0 !important;
  font-size: inherit !important;
  font-weight: var(--gv-font-weight-regular, 400) !important;
  color: var(--gv-desc-text) !important;
  line-height: inherit !important;
  float: none !important;
  clear: none !important;
  max-width: none !important;
}

.gv-desc-theme p:last-child,
.single-product .woocommerce-tabs #tab-description p:last-child {
  margin-bottom: 0 !important;
}

/* ---- Section headings ---- */
.gv-desc-theme h1,
.gv-desc-theme h2,
.gv-desc-theme h3,
.gv-desc-theme h4,
.gv-desc-theme h5,
.gv-desc-theme h6,
.gv-desc-theme .gv-desc-heading,
.gv-desc-theme p.gv-desc-heading,
.single-product .woocommerce-tabs #tab-description h2,
.single-product .woocommerce-tabs #tab-description h3,
.single-product .woocommerce-tabs #tab-description .gv-desc-heading,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel--description h2,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel--description h3,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel--description .gv-desc-heading {
  display: block !important;
  margin: var(--gv-desc-gap-section) 0 0.45em !important;
  padding: 0 0 0.3em !important;
  border: none !important;
  border-bottom: 1px solid var(--gv-color-border, rgba(31, 42, 124, 0.16)) !important;
  color: var(--gv-desc-heading) !important;
  font-size: var(--gv-text-md) !important;
  font-weight: var(--gv-font-weight-bold, 700) !important;
  line-height: 1.25 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  background: transparent !important;
  float: none !important;
  clear: both !important;
}

.gv-desc-theme .gv-desc-heading:first-child,
.gv-desc-theme > h2:first-child,
.gv-desc-theme > h3:first-child,
.gv-desc-theme > p.gv-desc-heading:first-child {
  margin-top: 0.25em !important;
}

/* Soft subheads — "Really easy setup" */
.gv-desc-theme .gv-desc-subhead,
.single-product .woocommerce-tabs #tab-description .gv-desc-subhead {
  margin: 1.15em 0 0.35em !important;
  padding: 0 !important;
  border: none !important;
  color: var(--gv-color-text, #1a1a1a) !important;
  font-size: var(--gv-text-sm) !important;
  font-weight: var(--gv-font-weight-medium, 600) !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  float: none !important;
  clear: both !important;
}

/* ---- Emphasis / labels ---- */
.gv-desc-theme strong,
.gv-desc-theme b,
.gv-desc-theme .gv-desc-label,
.single-product .woocommerce-tabs #tab-description strong,
.single-product .woocommerce-tabs #tab-description b {
  color: var(--gv-color-text, #1a1a1a) !important;
  font-weight: var(--gv-font-weight-medium, 600) !important;
  font-size: inherit !important;
  background: transparent !important;
}

.gv-desc-theme em,
.gv-desc-theme i {
  font-style: italic !important;
  font-weight: inherit !important;
  color: inherit !important;
}

/* ---- Lists ----
 * Theme/icon-font markers collide with text in the buy-column short description.
 * Use inset blue discs (::before) so bullets never overlap copy.
 */
.gv-desc-theme ul,
.gv-desc-theme ol,
.single-product .woocommerce-tabs #tab-description ul,
.single-product .woocommerce-tabs #tab-description ol,
.single-product .summary .woocommerce-product-details__short-description ul,
.single-product .summary .woocommerce-product-details__short-description ol,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description ul,
.ts-popup-modal .summary .woocommerce-product-details__short-description ul {
  margin: 0 0 1em !important;
  padding: 0 !important;
  list-style: none !important;
  list-style-type: none !important;
  list-style-image: none !important;
  float: none !important;
  clear: both !important;
}

.gv-desc-theme ol,
.single-product .woocommerce-tabs #tab-description ol,
.single-product .summary .woocommerce-product-details__short-description ol {
  counter-reset: gv-desc-ol;
}

.gv-desc-theme li,
.single-product .woocommerce-tabs #tab-description li,
.single-product .summary .woocommerce-product-details__short-description li,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description li,
.ts-popup-modal .summary .woocommerce-product-details__short-description li {
  position: relative !important;
  margin: 0 0 0.4em !important;
  padding: 0 0 0 1.15em !important;
  list-style: none !important;
  list-style-type: none !important;
  color: var(--gv-desc-text) !important;
  font-size: inherit !important;
  font-weight: var(--gv-font-weight-regular, 400) !important;
  line-height: 1.5 !important;
}

/* Buy-column / Quick View Quick Specs — denser bullets */
.single-product .summary .woocommerce-product-details__short-description li,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description li,
.ts-popup-modal .summary .woocommerce-product-details__short-description li {
  margin: 0 0 0.2em !important;
  line-height: 1.4 !important;
}

.gv-desc-theme li::marker,
.single-product .woocommerce-tabs #tab-description li::marker,
.single-product .summary .woocommerce-product-details__short-description li::marker {
  content: none !important;
  color: transparent !important;
  font-size: 0 !important;
}

.gv-desc-theme ul > li::before,
.single-product .woocommerce-tabs #tab-description ul > li::before,
.single-product .summary .woocommerce-product-details__short-description ul > li::before,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description ul > li::before,
.ts-popup-modal .summary .woocommerce-product-details__short-description ul > li::before {
  content: "" !important;
  position: absolute !important;
  left: 0.12em !important;
  top: 0.52em !important;
  width: 0.38em !important;
  height: 0.38em !important;
  border-radius: 50% !important;
  background: var(--gv-desc-bullet, var(--gv-color-blue, #1f2a7c)) !important;
  background-color: var(--gv-desc-bullet, var(--gv-color-blue, #1f2a7c)) !important;
  box-shadow: none !important;
  font: none !important;
  line-height: 0 !important;
  display: block !important;
}

.gv-desc-theme ol > li::before,
.single-product .woocommerce-tabs #tab-description ol > li::before,
.single-product .summary .woocommerce-product-details__short-description ol > li::before {
  counter-increment: gv-desc-ol;
  content: counter(gv-desc-ol) "." !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 1em !important;
  color: var(--gv-desc-bullet, var(--gv-color-blue, #1f2a7c)) !important;
  background: none !important;
  font-weight: var(--gv-font-weight-bold, 700) !important;
  font-size: 0.92em !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

.gv-desc-theme li::after,
.single-product .woocommerce-tabs #tab-description li::after,
.single-product .summary .woocommerce-product-details__short-description li::after {
  content: none !important;
  display: none !important;
}

.gv-desc-theme li:last-child,
.single-product .summary .woocommerce-product-details__short-description li:last-child,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description li:last-child,
.ts-popup-modal .summary .woocommerce-product-details__short-description li:last-child {
  margin-bottom: 0 !important;
}

.gv-desc-theme li > ul,
.gv-desc-theme li > ol {
  margin: 0.3em 0 0.1em !important;
}

/* Heading → list: neat gap under the rule (not flush, not sparse) */
.gv-desc-theme .gv-desc-heading + ul,
.gv-desc-theme .gv-desc-heading + ol,
.gv-desc-theme h2 + ul,
.gv-desc-theme h3 + ul,
.gv-desc-theme .gv-desc-subhead + ul,
.gv-desc-theme .gv-desc-subhead + ol,
.single-product .summary .woocommerce-product-details__short-description h2 + ul,
.single-product .summary .woocommerce-product-details__short-description h3 + ul,
.single-product .summary .woocommerce-product-details__short-description .gv-desc-heading + ul,
.single-product .summary .woocommerce-product-details__short-description p.gv-desc-heading + ul,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description h2 + ul,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description h3 + ul,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description .gv-desc-heading + ul,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description p.gv-desc-heading + ul,
.ts-popup-modal .summary .woocommerce-product-details__short-description h2 + ul,
.ts-popup-modal .summary .woocommerce-product-details__short-description h3 + ul,
.ts-popup-modal .summary .woocommerce-product-details__short-description .gv-desc-heading + ul {
  margin-top: 0.55em !important;
}

/* ---- Links ---- */
.gv-desc-theme a,
.single-product .woocommerce-tabs #tab-description a {
  color: var(--gv-color-blue, #1f2a7c) !important;
  font-weight: var(--gv-font-weight-medium, 600) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

/* ---- Tables ---- */
.gv-desc-theme table {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 1em !important;
  border-collapse: collapse !important;
  border: 1px solid var(--gv-color-border, rgba(31, 42, 124, 0.16)) !important;
  background: #fff !important;
}

.gv-desc-theme th,
.gv-desc-theme td {
  padding: 0.5rem 0.75rem !important;
  border: 1px solid var(--gv-color-border, rgba(31, 42, 124, 0.16)) !important;
  text-align: left !important;
  vertical-align: top !important;
  color: var(--gv-desc-text) !important;
  font-size: inherit !important;
  background: #fff !important;
}

.gv-desc-theme th {
  color: var(--gv-color-text, #1a1a1a) !important;
  font-weight: var(--gv-font-weight-medium, 600) !important;
  background: var(--gv-color-bg-subtle, #f5f7fb) !important;
}

/* ---- Images ---- */
.gv-desc-theme img {
  display: block !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  margin: 0.25em 0 1em !important;
  float: none !important;
  clear: both !important;
  border-radius: var(--gv-radius-sm, 4px);
}

/*
 * Video / oEmbed — full-width stack above copy.
 * Prevents iframe sitting inline beside paragraphs.
 */
.gv-desc-theme .gv-desc-embed,
.single-product .woocommerce-tabs #tab-description .gv-desc-embed {
  display: block !important;
  width: 100% !important;
  max-width: min(640px, 100%) !important;
  margin: 0 0 1.15em !important;
  padding: 0 !important;
  float: none !important;
  clear: both !important;
  aspect-ratio: 16 / 9;
  position: relative !important;
  overflow: hidden !important;
  border-radius: var(--gv-radius-sm, 4px);
  background: #0b1220;
}

.gv-desc-theme .gv-desc-embed .gv-desc-embed-inner,
.gv-desc-theme .gv-desc-embed > p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  float: none !important;
}

.gv-desc-theme .gv-desc-embed iframe,
.single-product .woocommerce-tabs #tab-description .gv-desc-embed iframe,
.gv-desc-theme iframe[src*="youtube"],
.gv-desc-theme iframe[src*="youtu.be"],
.gv-desc-theme iframe[src*="vimeo"],
.single-product .woocommerce-tabs #tab-description iframe[src*="youtube"],
.single-product .woocommerce-tabs #tab-description iframe[src*="youtu.be"],
.single-product .woocommerce-tabs #tab-description iframe[src*="vimeo"] {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  border: 0 !important;
}

/* Unwrapped iframe fallback (before JS runs) */
.gv-desc-theme > p:has(> iframe:only-child),
.single-product .woocommerce-tabs #tab-description .product-content > p:has(> iframe:only-child) {
  display: block !important;
  width: 100% !important;
  max-width: min(640px, 100%) !important;
  margin: 0 0 1.15em !important;
  float: none !important;
  clear: both !important;
  aspect-ratio: 16 / 9;
  position: relative !important;
  overflow: hidden !important;
}

.gv-desc-theme > p:has(> iframe:only-child) iframe,
.single-product .woocommerce-tabs #tab-description .product-content > p:has(> iframe:only-child) iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* ---- Short description (buy column + Quick View) ---- */
.single-product .summary .woocommerce-product-details__short-description,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description,
.ts-popup-modal .summary .woocommerce-product-details__short-description {
  max-width: none !important;
  font-size: var(--gv-text-sm) !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

.single-product .summary .woocommerce-product-details__short-description > p,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description > p,
.ts-popup-modal .summary .woocommerce-product-details__short-description > p {
  margin: 0 0 0.4em !important;
}

.single-product .summary .woocommerce-product-details__short-description > p:last-child,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description > p:last-child,
.ts-popup-modal .summary .woocommerce-product-details__short-description > p:last-child {
  margin-bottom: 0 !important;
}

.single-product .summary .woocommerce-product-details__short-description .gv-desc-heading,
.single-product .summary .woocommerce-product-details__short-description h2,
.single-product .summary .woocommerce-product-details__short-description h3,
.single-product .summary .woocommerce-product-details__short-description p.gv-desc-heading,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description .gv-desc-heading,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description h2,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description h3,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description p.gv-desc-heading,
.ts-popup-modal .summary .woocommerce-product-details__short-description .gv-desc-heading,
.ts-popup-modal .summary .woocommerce-product-details__short-description h2,
.ts-popup-modal .summary .woocommerce-product-details__short-description h3 {
  font-size: var(--gv-text-sm) !important;
  margin: 0.4em 0 0 !important;
  padding-bottom: 0.35em !important;
}

.single-product .summary .woocommerce-product-details__short-description .gv-desc-heading:first-child,
.single-product .summary .woocommerce-product-details__short-description > h2:first-child,
.single-product .summary .woocommerce-product-details__short-description > h3:first-child,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description .gv-desc-heading:first-child,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description > h2:first-child,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description > h3:first-child {
  margin-top: 0 !important;
}

.single-product .summary .woocommerce-product-details__short-description ul,
#ts-quickshop-modal .summary .woocommerce-product-details__short-description ul,
.ts-popup-modal .summary .woocommerce-product-details__short-description ul {
  margin: 0 0 0.35em !important;
}

/*
 * Tab already says "Product details" — hide Woo/theme duplicate h2 + caret.
 */
.single-product .woocommerce-tabs .woocommerce-Tabs-panel > h2:first-child,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel--description > h2:first-child,
.single-product .woocommerce-tabs #tab-description > h2:first-child,
.single-product .woocommerce-tabs .panel > h2:first-child,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel > .gv-desc-theme > h2:first-child,
.single-product .woocommerce-tabs .panel > .gv-desc-theme > h2:first-child {
  display: none !important;
  visibility: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  position: absolute !important;
  width: 1px !important;
}

.single-product .woocommerce-tabs .woocommerce-Tabs-panel > h2:first-child::before,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel > h2:first-child::after,
.single-product .woocommerce-tabs #tab-description > h2:first-child::before,
.single-product .woocommerce-tabs #tab-description > h2:first-child::after {
  content: none !important;
  display: none !important;
}

/* Attributes live under Product details — never show a separate Additional information tab. */
.single-product .woocommerce-tabs li.additional_information_tab,
.single-product .woocommerce-tabs #tab-title-additional_information,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel--additional_information {
  display: none !important;
}

.single-product .woocommerce-tabs .gv-product-attributes {
  margin-top: var(--gv-desc-gap-section, 1.35em);
}

.single-product .woocommerce-tabs .gv-product-attributes .woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
}

.single-product .woocommerce-tabs .gv-product-attributes .woocommerce-product-attributes th,
.single-product .woocommerce-tabs .gv-product-attributes .woocommerce-product-attributes td {
  padding: 0.55em 0.75em;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(31, 42, 124, 0.12);
}
