/*
 * TMG Professional Product Page
 * Scoped to body.tmg-product-pro so shop archives, header, footer and other pages are untouched.
 */
body.tmg-product-pro {
  --tmg-yellow: #ffe500;
  --tmg-yellow-soft: #fff8bf;
  --tmg-black: #111214;
  --tmg-charcoal: #25282d;
  --tmg-muted: #6d737a;
  --tmg-line: #e7e9ec;
  --tmg-bg: #f6f7f8;
  --tmg-white: #ffffff;
  --tmg-red: #e6322b;
  --tmg-radius-xl: 26px;
  --tmg-radius-lg: 18px;
  --tmg-radius-md: 12px;
  --tmg-shadow: 0 18px 54px rgba(17, 18, 20, .08);
  --tmg-shadow-hover: 0 22px 64px rgba(17, 18, 20, .13);
}

/* Product-page background only */
body.tmg-product-pro .main-page-wrapper,
body.tmg-product-pro #main,
body.tmg-product-pro main.site-main {
  background: var(--tmg-bg);
}

body.tmg-product-pro .site-content,
body.tmg-product-pro .container,
body.tmg-product-pro .main-page-wrapper > .container {
  --wd-container-w: 1320px;
}

/* Breadcrumb */
body.tmg-product-pro .woocommerce-breadcrumb,
body.tmg-product-pro .wd-breadcrumbs,
body.tmg-product-pro .breadcrumbs {
  color: #8a9096 !important;
  font-size: 13px !important;
  font-weight: 600;
  margin-bottom: 18px !important;
}
body.tmg-product-pro .woocommerce-breadcrumb a,
body.tmg-product-pro .wd-breadcrumbs a,
body.tmg-product-pro .breadcrumbs a {
  color: #6e747b !important;
}
body.tmg-product-pro .woocommerce-breadcrumb a:hover,
body.tmg-product-pro .wd-breadcrumbs a:hover,
body.tmg-product-pro .breadcrumbs a:hover {
  color: var(--tmg-black) !important;
}

/* Main product hero/card. Woodmart + generic WooCommerce selectors. */
body.tmg-product-pro .product-image-summary,
body.tmg-product-pro div.product.tmgpp-layout > .product-image-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: clamp(28px, 4vw, 58px) !important;
  align-items: start !important;
  padding: clamp(18px, 2.4vw, 32px) !important;
  margin-bottom: 34px !important;
  border: 1px solid rgba(17,18,20,.055);
  border-radius: var(--tmg-radius-xl);
  background: var(--tmg-white);
  box-shadow: var(--tmg-shadow);
}

/* Gallery */
body.tmg-product-pro .product-image-summary .product-images,
body.tmg-product-pro .product-image-summary .woocommerce-product-gallery,
body.tmg-product-pro .tmgpp-gallery {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  padding: clamp(8px, 1vw, 14px) !important;
  border-radius: 22px;
  background: linear-gradient(145deg, #fbfbfb 0%, #f2f3f4 100%);
  border: 1px solid #eceef0;
  overflow: hidden;
}
body.tmg-product-pro .woocommerce-product-gallery__wrapper,
body.tmg-product-pro .product-image-wrap {
  border-radius: 18px;
  overflow: hidden;
}
body.tmg-product-pro .woocommerce-product-gallery__image img,
body.tmg-product-pro .product-image-wrap img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .35s ease;
}
body.tmg-product-pro .woocommerce-product-gallery__image:hover img,
body.tmg-product-pro .product-image-wrap:hover img {
  transform: scale(1.015);
}

/* Gallery thumbnails */
body.tmg-product-pro .flex-control-thumbs,
body.tmg-product-pro .wd-gallery-thumb,
body.tmg-product-pro .product-thumbnails {
  gap: 10px !important;
  margin-top: 14px !important;
}
body.tmg-product-pro .flex-control-thumbs li,
body.tmg-product-pro .wd-gallery-thumb .wd-carousel-item,
body.tmg-product-pro .product-thumbnails .product-image-thumbnail {
  overflow: hidden;
  border-radius: 12px !important;
  border: 1px solid #e3e5e7 !important;
  background: #fff;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.tmg-product-pro .flex-control-thumbs li:hover,
body.tmg-product-pro .wd-gallery-thumb .wd-carousel-item:hover,
body.tmg-product-pro .product-thumbnails .product-image-thumbnail:hover {
  border-color: var(--tmg-black) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(17,18,20,.09);
}

/* Summary */
body.tmg-product-pro .product-image-summary .summary,
body.tmg-product-pro .product-image-summary .summary-inner,
body.tmg-product-pro .tmgpp-summary {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  padding: clamp(8px, 1.2vw, 18px) 0 !important;
}

body.tmg-product-pro div.product .product_title,
body.tmg-product-pro .product-image-summary .product_title,
body.tmg-product-pro .summary .product_title {
  max-width: 760px;
  margin: 0 0 12px !important;
  color: var(--tmg-black) !important;
  font-size: clamp(30px, 3vw, 42px) !important;
  line-height: 1.06 !important;
  font-weight: 850 !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
}

body.tmg-product-pro div.product .summary .price,
body.tmg-product-pro .product-image-summary .price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px !important;
  color: var(--tmg-black) !important;
  font-size: clamp(26px, 2.5vw, 34px) !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  letter-spacing: -.025em;
}
body.tmg-product-pro div.product .summary .price del {
  color: #9aa0a6 !important;
  font-size: .64em;
  font-weight: 600;
}
body.tmg-product-pro div.product .summary .price ins {
  color: var(--tmg-black) !important;
  text-decoration: none;
}

body.tmg-product-pro .woocommerce-product-details__short-description,
body.tmg-product-pro .summary .short-description,
body.tmg-product-pro .summary > p:not(.price) {
  color: var(--tmg-muted) !important;
  font-size: 15.5px !important;
  line-height: 1.75 !important;
}

/* Forms / variations */
body.tmg-product-pro .summary form.cart,
body.tmg-product-pro .summary .variations_form {
  margin-top: 22px !important;
  margin-bottom: 18px !important;
}
body.tmg-product-pro table.variations {
  margin-bottom: 16px !important;
}
body.tmg-product-pro table.variations th,
body.tmg-product-pro table.variations td {
  padding: 8px 0 !important;
  border: 0 !important;
  vertical-align: middle;
}
body.tmg-product-pro table.variations label {
  color: var(--tmg-black);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
body.tmg-product-pro .summary select,
body.tmg-product-pro .summary input[type="text"],
body.tmg-product-pro .summary input[type="number"] {
  min-height: 48px;
  border: 1px solid #dfe2e5 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}
body.tmg-product-pro .summary select:focus,
body.tmg-product-pro .summary input:focus {
  border-color: var(--tmg-black) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255,229,0,.28) !important;
}

/* Quantity control */
body.tmg-product-pro .summary .quantity {
  display: inline-flex !important;
  align-items: stretch;
  height: 50px;
  overflow: hidden;
  border: 1px solid #dfe2e5 !important;
  border-radius: 11px !important;
  background: #fff;
  vertical-align: middle;
}
body.tmg-product-pro .summary .quantity input.qty {
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--tmg-black) !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  text-align: center;
  box-shadow: none !important;
}
body.tmg-product-pro .summary .quantity .minus,
body.tmg-product-pro .summary .quantity .plus,
body.tmg-product-pro .summary .quantity button {
  width: 38px !important;
  min-width: 38px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f4f5f6 !important;
  color: var(--tmg-black) !important;
  font-weight: 850 !important;
  transition: background .2s ease;
}
body.tmg-product-pro .summary .quantity .minus:hover,
body.tmg-product-pro .summary .quantity .plus:hover,
body.tmg-product-pro .summary .quantity button:hover {
  background: var(--tmg-yellow) !important;
}

/* Existing add-to-cart + product designer button */
body.tmg-product-pro .summary .single_add_to_cart_button,
body.tmg-product-pro .summary button.single_add_to_cart_button,
body.tmg-product-pro .summary .tmgpp-design-button,
body.tmg-product-pro .tmgpp-design-button {
  min-height: 50px !important;
  padding: 0 24px !important;
  border: 1px solid var(--tmg-yellow) !important;
  border-radius: 11px !important;
  background: var(--tmg-yellow) !important;
  color: var(--tmg-black) !important;
  box-shadow: 0 10px 24px rgba(255,229,0,.22) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 48px !important;
  letter-spacing: .01em;
  text-transform: none !important;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
}
body.tmg-product-pro .summary .single_add_to_cart_button:hover,
body.tmg-product-pro .summary .tmgpp-design-button:hover,
body.tmg-product-pro .tmgpp-design-button:hover {
  transform: translateY(-2px);
  background: #ffef3b !important;
  box-shadow: 0 14px 30px rgba(255,229,0,.3) !important;
}
body.tmg-product-pro .summary .single_add_to_cart_button.disabled,
body.tmg-product-pro .summary .single_add_to_cart_button:disabled {
  opacity: .45 !important;
  transform: none !important;
}

/* Dynamic express payment: presentation only */
body.tmg-product-pro .tmgpp-payment {
  overflow: hidden;
  border-radius: 11px !important;
}
body.tmg-product-pro .summary [id*="express"],
body.tmg-product-pro .summary [class*="express-checkout"] {
  margin-top: 12px !important;
  border-radius: 11px !important;
}

/* Quantity / wholesale pricing table discovered by JS */
body.tmg-product-pro .tmgpp-tier-wrap {
  width: 100%;
  max-width: 100%;
  margin: 18px 0 20px !important;
  overflow-x: auto;
  border: 1px solid var(--tmg-line);
  border-radius: 15px;
  background: #fff;
  scrollbar-width: thin;
}
body.tmg-product-pro table.tmgpp-tier-table {
  width: 100% !important;
  min-width: 560px;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
}
body.tmg-product-pro table.tmgpp-tier-table thead th,
body.tmg-product-pro table.tmgpp-tier-table thead td,
body.tmg-product-pro table.tmgpp-tier-table tr.tmgpp-tier-heading-row th,
body.tmg-product-pro table.tmgpp-tier-table tr.tmgpp-tier-heading-row td {
  padding: 14px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid #2b2e33 !important;
  background: var(--tmg-black) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .055em;
  text-transform: uppercase;
}
body.tmg-product-pro table.tmgpp-tier-table td,
body.tmg-product-pro table.tmgpp-tier-table th {
  padding: 13px 16px !important;
  border-width: 0 0 1px !important;
  border-style: solid !important;
  border-color: #edf0f2 !important;
  background: #fff !important;
  color: var(--tmg-black) !important;
  font-size: 14px !important;
  text-align: center !important;
  vertical-align: middle !important;
}
/* v1.0.5: never treat the first DATA row as the dark header. */
body.tmg-product-pro table.tmgpp-tier-table tbody tr:not(.tmgpp-tier-heading-row) > td,
body.tmg-product-pro table.tmgpp-tier-table tbody tr:not(.tmgpp-tier-heading-row) > th {
  background: #fff !important;
  color: var(--tmg-black) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body.tmg-product-pro table.tmgpp-tier-table tbody tr:not(.tmgpp-tier-heading-row) > td:first-child,
body.tmg-product-pro table.tmgpp-tier-table tbody tr:not(.tmgpp-tier-heading-row) > th:first-child,
body.tmg-product-pro table.tmgpp-tier-table tbody tr:not(.tmgpp-tier-heading-row) > td:last-child {
  color: #8d7a00 !important;
  font-weight: 750 !important;
}
body.tmg-product-pro table.tmgpp-tier-table tbody tr:last-child td,
body.tmg-product-pro table.tmgpp-tier-table tbody tr:last-child th {
  border-bottom: 0 !important;
}
body.tmg-product-pro table.tmgpp-tier-table tbody tr:hover td,
body.tmg-product-pro table.tmgpp-tier-table tbody tr:hover th {
  background: #fffdf0 !important;
}
body.tmg-product-pro table.tmgpp-tier-table tbody td:first-child,
body.tmg-product-pro table.tmgpp-tier-table tbody th:first-child,
body.tmg-product-pro table.tmgpp-tier-table tbody td:last-child {
  color: #8d7a00 !important;
  font-weight: 750 !important;
}

/* Meta, SKU, categories, share */
body.tmg-product-pro .product_meta,
body.tmg-product-pro .tmgpp-meta {
  display: grid;
  gap: 8px;
  margin-top: 18px !important;
  padding: 18px 0 0 !important;
  border-top: 1px solid var(--tmg-line) !important;
  color: #737980 !important;
  font-size: 13px !important;
}
body.tmg-product-pro .product_meta > span {
  color: #737980 !important;
}
body.tmg-product-pro .product_meta a {
  color: var(--tmg-black) !important;
  font-weight: 650;
}
body.tmg-product-pro .product_meta a:hover {
  color: #8b7900 !important;
}
body.tmg-product-pro .summary .wd-social-icons,
body.tmg-product-pro .summary .product-share {
  margin-top: 14px !important;
}
body.tmg-product-pro .summary .wd-social-icon,
body.tmg-product-pro .summary .social-icon {
  border-radius: 50% !important;
  transition: transform .2s ease, background .2s ease !important;
}
body.tmg-product-pro .summary .wd-social-icon:hover,
body.tmg-product-pro .summary .social-icon:hover {
  transform: translateY(-2px);
}

/* Tabs */
body.tmg-product-pro .woocommerce-tabs,
body.tmg-product-pro .wd-tabs,
body.tmg-product-pro .tmgpp-tabs {
  margin-top: 34px !important;
  margin-bottom: 40px !important;
  padding: clamp(22px, 3vw, 38px) !important;
  border: 1px solid rgba(17,18,20,.06);
  border-radius: var(--tmg-radius-xl);
  background: #fff;
  box-shadow: var(--tmg-shadow);
}
body.tmg-product-pro .woocommerce-tabs ul.tabs,
body.tmg-product-pro .wd-tabs .wd-nav-tabs {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px !important;
  margin: 0 0 24px !important;
  padding: 6px !important;
  border: 0 !important;
  border-radius: 13px;
  background: #f3f4f5;
}
body.tmg-product-pro .woocommerce-tabs ul.tabs::before,
body.tmg-product-pro .woocommerce-tabs ul.tabs::after {
  display: none !important;
}
body.tmg-product-pro .woocommerce-tabs ul.tabs li,
body.tmg-product-pro .wd-tabs .wd-nav-tabs > li {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
}
body.tmg-product-pro .woocommerce-tabs ul.tabs li a,
body.tmg-product-pro .wd-tabs .wd-nav-tabs a {
  display: block;
  padding: 11px 16px !important;
  color: #70767d !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .045em;
  text-transform: uppercase;
}
body.tmg-product-pro .woocommerce-tabs ul.tabs li.active,
body.tmg-product-pro .wd-tabs .wd-nav-tabs .wd-active,
body.tmg-product-pro .wd-tabs .wd-nav-tabs .active {
  background: var(--tmg-black) !important;
  box-shadow: 0 8px 18px rgba(17,18,20,.14);
}
body.tmg-product-pro .woocommerce-tabs ul.tabs li.active a,
body.tmg-product-pro .wd-tabs .wd-nav-tabs .wd-active a,
body.tmg-product-pro .wd-tabs .wd-nav-tabs .active a {
  color: #fff !important;
}
body.tmg-product-pro .woocommerce-Tabs-panel,
body.tmg-product-pro .wd-tab-content {
  color: #5f666d !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
}
body.tmg-product-pro .woocommerce-Tabs-panel h2,
body.tmg-product-pro .woocommerce-Tabs-panel h3,
body.tmg-product-pro .wd-tab-content h2,
body.tmg-product-pro .wd-tab-content h3 {
  color: var(--tmg-black) !important;
  font-weight: 820 !important;
  letter-spacing: -.025em;
}
body.tmg-product-pro .woocommerce-Tabs-panel h2,
body.tmg-product-pro .wd-tab-content h2 {
  font-size: clamp(26px, 2.7vw, 36px) !important;
}
body.tmg-product-pro .woocommerce-Tabs-panel h3,
body.tmg-product-pro .wd-tab-content h3 {
  font-size: 20px !important;
}
body.tmg-product-pro .woocommerce-Tabs-panel ul,
body.tmg-product-pro .wd-tab-content ul {
  padding-left: 20px;
}
body.tmg-product-pro .woocommerce-Tabs-panel li::marker,
body.tmg-product-pro .wd-tab-content li::marker {
  color: #d1b900;
}

/* Related products */
body.tmg-product-pro .related,
body.tmg-product-pro .related-products,
body.tmg-product-pro .tmgpp-related {
  margin-top: 34px !important;
  margin-bottom: 56px !important;
}
body.tmg-product-pro .related > h2,
body.tmg-product-pro .related-products > h2,
body.tmg-product-pro .related-products .title {
  margin-bottom: 24px !important;
  color: var(--tmg-black) !important;
  font-size: clamp(28px, 3vw, 38px) !important;
  line-height: 1.1 !important;
  font-weight: 850 !important;
  letter-spacing: -.03em !important;
}
body.tmg-product-pro .related .product,
body.tmg-product-pro .related-products .product-grid-item,
body.tmg-product-pro .related-products .wd-product {
  overflow: hidden;
  border: 1px solid #e5e7e9 !important;
  border-radius: 17px !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(17,18,20,.045);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease !important;
}
body.tmg-product-pro .related .product:hover,
body.tmg-product-pro .related-products .product-grid-item:hover,
body.tmg-product-pro .related-products .wd-product:hover {
  transform: translateY(-5px);
  border-color: #d8dade !important;
  box-shadow: var(--tmg-shadow-hover);
}
body.tmg-product-pro .related .product img,
body.tmg-product-pro .related-products .product-grid-item img,
body.tmg-product-pro .related-products .wd-product img {
  transition: transform .35s ease;
}
body.tmg-product-pro .related .product:hover img,
body.tmg-product-pro .related-products .product-grid-item:hover img,
body.tmg-product-pro .related-products .wd-product:hover img {
  transform: scale(1.025);
}
body.tmg-product-pro .related .woocommerce-loop-product__title,
body.tmg-product-pro .related-products .wd-entities-title,
body.tmg-product-pro .related-products .product-title {
  color: var(--tmg-black) !important;
  font-weight: 760 !important;
  line-height: 1.35 !important;
}
body.tmg-product-pro .related .price,
body.tmg-product-pro .related-products .price {
  color: #8b7900 !important;
  font-weight: 800 !important;
}

/* Sale labels / badges */
body.tmg-product-pro .onsale,
body.tmg-product-pro .product-label.onsale,
body.tmg-product-pro .product-labels .onsale {
  border-radius: 999px !important;
  background: var(--tmg-yellow) !important;
  color: var(--tmg-black) !important;
  font-weight: 850 !important;
}

/* Keep text readable; replace the excessive yellow body copy seen on the old page. */
body.tmg-product-pro .woocommerce-tabs p,
body.tmg-product-pro .woocommerce-tabs li,
body.tmg-product-pro .wd-tab-content p,
body.tmg-product-pro .wd-tab-content li {
  color: #5f666d !important;
}
body.tmg-product-pro .woocommerce-tabs a,
body.tmg-product-pro .wd-tab-content a {
  color: #7e6f00;
}

/* Tablet */
@media (max-width: 1024px) {
  body.tmg-product-pro .product-image-summary,
  body.tmg-product-pro div.product.tmgpp-layout > .product-image-summary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 28px !important;
  }
  body.tmg-product-pro div.product .product_title,
  body.tmg-product-pro .product-image-summary .product_title,
  body.tmg-product-pro .summary .product_title {
    font-size: clamp(28px, 4vw, 38px) !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  body.tmg-product-pro .main-page-wrapper,
  body.tmg-product-pro #main,
  body.tmg-product-pro main.site-main {
    padding-top: 12px !important;
  }
  body.tmg-product-pro .product-image-summary,
  body.tmg-product-pro div.product.tmgpp-layout > .product-image-summary {
    display: block !important;
    padding: 12px !important;
    border-radius: 18px;
  }
  body.tmg-product-pro .product-image-summary .product-images,
  body.tmg-product-pro .product-image-summary .woocommerce-product-gallery,
  body.tmg-product-pro .tmgpp-gallery {
    margin-bottom: 22px !important;
    padding: 8px !important;
    border-radius: 16px;
  }
  body.tmg-product-pro .product-image-summary .summary,
  body.tmg-product-pro .product-image-summary .summary-inner,
  body.tmg-product-pro .tmgpp-summary {
    padding: 8px 4px 10px !important;
  }
  body.tmg-product-pro div.product .product_title,
  body.tmg-product-pro .product-image-summary .product_title,
  body.tmg-product-pro .summary .product_title {
    font-size: 30px !important;
  }
  body.tmg-product-pro div.product .summary .price,
  body.tmg-product-pro .product-image-summary .price {
    font-size: 28px !important;
  }
  body.tmg-product-pro .summary form.cart {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
  }
  body.tmg-product-pro .summary .single_add_to_cart_button,
  body.tmg-product-pro .summary .tmgpp-design-button,
  body.tmg-product-pro .tmgpp-design-button {
    flex: 1 1 180px;
    text-align: center;
  }
  body.tmg-product-pro .woocommerce-tabs,
  body.tmg-product-pro .wd-tabs,
  body.tmg-product-pro .tmgpp-tabs {
    padding: 16px !important;
    border-radius: 18px;
  }
  body.tmg-product-pro .woocommerce-tabs ul.tabs,
  body.tmg-product-pro .wd-tabs .wd-nav-tabs {
    flex-direction: column;
  }
  body.tmg-product-pro .woocommerce-tabs ul.tabs li a,
  body.tmg-product-pro .wd-tabs .wd-nav-tabs a {
    width: 100%;
    text-align: center;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.tmg-product-pro *,
  body.tmg-product-pro *::before,
  body.tmg-product-pro *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }
}


/* v1.0.2 desktop ratio: true 50% gallery / 50% product information.
   The explicit child sizing below also overrides Woodmart column width rules. */
@media (min-width: 768px) {
  body.tmg-product-pro .product-image-summary,
  body.tmg-product-pro div.product.tmgpp-layout > .product-image-summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: clamp(28px, 3vw, 44px) !important;
  }

  body.tmg-product-pro .product-image-summary > .product-images,
  body.tmg-product-pro .product-image-summary > .woocommerce-product-gallery,
  body.tmg-product-pro .product-image-summary > .tmgpp-gallery,
  body.tmg-product-pro .product-image-summary .product-images,
  body.tmg-product-pro .product-image-summary .woocommerce-product-gallery,
  body.tmg-product-pro .product-image-summary .tmgpp-gallery {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 100% !important;
    float: none !important;
  }

  body.tmg-product-pro .product-image-summary > .summary,
  body.tmg-product-pro .product-image-summary > .summary-inner,
  body.tmg-product-pro .product-image-summary > .tmgpp-summary,
  body.tmg-product-pro .product-image-summary .summary,
  body.tmg-product-pro .product-image-summary .summary-inner,
  body.tmg-product-pro .product-image-summary .tmgpp-summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 100% !important;
    float: none !important;
  }

  /* Let Woodmart's internal gallery use the whole 50% column. */
  body.tmg-product-pro .product-images-inner,
  body.tmg-product-pro .woocommerce-product-gallery__wrapper,
  body.tmg-product-pro .product-image-wrap,
  body.tmg-product-pro .woocommerce-product-gallery__image,
  body.tmg-product-pro .woocommerce-product-gallery__image > a {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  body.tmg-product-pro .woocommerce-product-gallery__image img,
  body.tmg-product-pro .product-image-wrap img,
  body.tmg-product-pro .product-images img.wp-post-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

/* v1.0.3 — Related-product action button readability
   Woodmart can lower action text opacity on hover. Keep TMG CTA text fully readable. */
body.tmg-product-pro .related .product .button,
body.tmg-product-pro .related-products .product-grid-item .button,
body.tmg-product-pro .related-products .wd-product .button,
body.tmg-product-pro .related-products .wd-product .wd-add-btn > a,
body.tmg-product-pro .related-products .wd-product .wd-add-btn a,
body.tmg-product-pro .related-products .product-grid-item .wd-add-btn > a,
body.tmg-product-pro .related-products .product-grid-item .wd-add-btn a,
body.tmg-product-pro .tmgpp-related .button,
body.tmg-product-pro .tmgpp-related .wd-add-btn > a,
body.tmg-product-pro .tmgpp-related .wd-add-btn a {
  position: relative !important;
  z-index: 5 !important;
  min-height: 46px !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--tmg-yellow, #ffed00) !important;
  color: var(--tmg-black, #111214) !important;
  font-weight: 800 !important;
  line-height: 46px !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  box-shadow: none !important;
  -webkit-text-fill-color: var(--tmg-black, #111214) !important;
}

body.tmg-product-pro .related .product .button *,
body.tmg-product-pro .related-products .product-grid-item .button *,
body.tmg-product-pro .related-products .wd-product .button *,
body.tmg-product-pro .related-products .wd-product .wd-add-btn a *,
body.tmg-product-pro .tmgpp-related .button *,
body.tmg-product-pro .tmgpp-related .wd-add-btn a * {
  color: inherit !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: currentColor !important;
}

body.tmg-product-pro .related .product:hover .button,
body.tmg-product-pro .related-products .product-grid-item:hover .button,
body.tmg-product-pro .related-products .wd-product:hover .button,
body.tmg-product-pro .related-products .wd-product:hover .wd-add-btn > a,
body.tmg-product-pro .related-products .wd-product:hover .wd-add-btn a,
body.tmg-product-pro .tmgpp-related .product:hover .button,
body.tmg-product-pro .tmgpp-related .wd-product:hover .wd-add-btn a {
  background: var(--tmg-black, #111214) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
}

/* Also neutralize Woodmart's hover-fade opacity on the action container itself. */
body.tmg-product-pro .tmgpp-related .wd-add-btn,
body.tmg-product-pro .tmgpp-related .wd-buttons,
body.tmg-product-pro .related-products .wd-add-btn,
body.tmg-product-pro .related-products .wd-buttons {
  opacity: 1 !important;
}

/* v1.0.4 — Woodmart layout hierarchy fix
   Woodmart nests the actual 12-column gallery/summary grid inside
   .product-image-summary. The outer shell must NOT be the 50/50 grid. */
@media (min-width: 768px) {
  /* JS adds this class immediately; :has() covers modern browsers before JS runs. */
  body.tmg-product-pro .product-image-summary.tmgpp-woodmart-shell,
  body.tmg-product-pro .product-image-summary:has(> .product-image-summary-inner) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* The actual Woodmart inner grid owns the 50/50 layout. */
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner,
  body.tmg-product-pro .product-image-summary.tmgpp-woodmart-shell > .product-image-summary-inner {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: clamp(28px, 3vw, 44px) !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Force Woodmart's inline 4/8 desktop column variables to 6/6. */
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .product-images,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .tmgpp-gallery,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .woocommerce-product-gallery {
    --wd-col-lg: 6 !important;
    --wd-col-md: 6 !important;
    --wd-col-sm: 12 !important;
    grid-column: span 6 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    float: none !important;
  }

  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .summary-entry,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .summary,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .tmgpp-summary {
    --wd-col-lg: 6 !important;
    --wd-col-md: 6 !important;
    --wd-col-sm: 12 !important;
    grid-column: span 6 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    float: none !important;
  }

  /* Ensure gallery internals fill only their own 50% column, not the summary side. */
  body.tmg-product-pro .product-image-summary-inner > .product-images .product-images-inner,
  body.tmg-product-pro .product-image-summary-inner > .product-images .woocommerce-product-gallery,
  body.tmg-product-pro .product-image-summary-inner > .product-images .woocommerce-product-gallery__wrapper,
  body.tmg-product-pro .product-image-summary-inner > .product-images .product-image-wrap,
  body.tmg-product-pro .product-image-summary-inner > .product-images .woocommerce-product-gallery__image,
  body.tmg-product-pro .product-image-summary-inner > .product-images .woocommerce-product-gallery__image > a {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.tmg-product-pro .product-image-summary-inner > .product-images img,
  body.tmg-product-pro .product-image-summary-inner > .tmgpp-gallery img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

/* Tablet/mobile: preserve Woodmart's natural full-width stacking. */
@media (max-width: 767px) {
  body.tmg-product-pro .product-image-summary.tmgpp-woodmart-shell,
  body.tmg-product-pro .product-image-summary:has(> .product-image-summary-inner) {
    display: block !important;
  }

  body.tmg-product-pro .product-image-summary > .product-image-summary-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .product-images,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .tmgpp-gallery,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .summary-entry,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .summary,
  body.tmg-product-pro .product-image-summary > .product-image-summary-inner > .tmgpp-summary {
    --wd-col-lg: 12 !important;
    --wd-col-md: 12 !important;
    --wd-col-sm: 12 !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}
