/* Kit configurator — extends Partdo single-product layout */

.pk-kit-configurator__intro p:last-child {
  margin-bottom: 0;
}

.pk-kit-configurator__description {
  width: 100%;
  flex: 0 0 100%;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

body.custom-background .pk-kit-configurator__description {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

body.custom-background .pk-kit-configurator__description-title,
body.custom-background .pk-kit-configurator__description-content,
body.custom-background .pk-kit-configurator__description-content *:not(img):not(svg):not(path) {
  color: #fff !important;
}

.pk-kit-configurator__description-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
}

.pk-kit-configurator__description-content {
  font-size: 1rem;
  line-height: 1.7;
  color: inherit;
}

.pk-kit-configurator__description-content > :last-child {
  margin-bottom: 0;
}

.pk-kit-configurator__description-content .pk-kit-video-embed,
.pk-kit-configurator__description-content .wp-block-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0;
  clear: both;
}

.pk-kit-configurator__description-content .pk-kit-video-embed {
  aspect-ratio: 16 / 9;
}

.pk-kit-configurator__description-content .pk-kit-video-embed iframe,
.pk-kit-configurator__description-content .wp-block-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

.pk-kit-configurator__description-content .pk-kit-video-embed iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

@media screen and (min-width: 992px) {
  .pk-kit-configurator__description {
    margin-top: 3rem;
    padding-top: 3rem;
  }
}

.pk-kit-configurator__purchase {
  margin-top: 0.5rem;
}

.pk-kit-product-gallery .pk-kit-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: flex-start;
}

.pk-kit-product-gallery .pk-kit-gallery-thumbs .slider-item {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
  min-width: 4.5rem;
  max-width: 4.5rem;
  min-height: 4.5rem;
  max-height: 4.5rem;
}

.pk-kit-product-gallery .pk-kit-gallery-thumb {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--theme-theme-radius-base, 8px);
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
}

.pk-kit-product-gallery .pk-kit-gallery-thumb.is-active,
.pk-kit-product-gallery
  .pk-kit-gallery-thumbs
  .slider-item.slick-current
  .pk-kit-gallery-thumb {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff;
}

.pk-kit-product-gallery .pk-kit-gallery-thumb img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.single-product-wrapper
  .product-gallery
  .pk-kit-product-gallery
  .product-thumbnails-wrapper
  .slider-item {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
  min-width: 4.5rem;
  max-width: 4.5rem;
}

.pk-kit-product-gallery .pk-kit-gallery-main-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--theme-theme-radius-base, 12px);
  overflow: hidden;
  background: #fff;
}

.pk-kit-product-gallery .pk-kit-gallery-main-link {
  display: block;
  width: 100%;
  height: 100%;
}

.pk-kit-product-gallery .pk-kit-gallery-main {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/*
 * Kit hero: match product PDPs — play + expand stacked in the bottom-left
 * corner of the main image (same values as Partdo image-zoom.css).
 */
.pk-kit-product-gallery:not(.pk-kit-product-gallery--component) .klb-single-video {
  position: absolute;
  top: auto;
  right: auto;
  bottom: 15px;
  left: 13px;
  z-index: 10;
}

.pk-kit-product-gallery:not(.pk-kit-product-gallery--component)
  .woocommerce-product-gallery__trigger {
  position: absolute;
  top: auto !important;
  right: auto !important;
  left: 13px;
  bottom: 15px;
  z-index: 9;
}

/* Bump expand above Watch video whenever a corner play button exists. */
.pk-kit-product-gallery:not(.pk-kit-product-gallery--component)
  .pk-kit-gallery-main-wrap:has(.klb-single-video)
  .woocommerce-product-gallery__trigger {
  bottom: 70px !important;
}

/* Components: play bottom-left, expand top-right so they never overlap. */
.pk-kit-product-gallery--component .klb-single-video {
  position: absolute;
  top: auto;
  right: auto;
  bottom: 12px;
  left: 12px;
  z-index: 10;
}

.pk-kit-product-gallery--component .woocommerce-product-gallery__trigger,
.pk-kit-product-gallery--component
  .klb-single-video
  + .woocommerce-product-gallery__trigger {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: auto;
  left: auto;
  z-index: 9;
}

.pk-kit-product-gallery .pk-kit-gallery-thumb--video::after,
.pk-kit-product-gallery .pk-kit-gallery-thumb__overlay {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.pk-kit-product-gallery .pk-kit-gallery-thumb--video::before {
  display: none;
}

.pk-kit-product-gallery .pk-kit-gallery-thumb__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  margin: -0.45rem 0 0 -0.35rem;
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent #fff;
  pointer-events: none;
}

.pk-kit-product-gallery.is-video-active .woocommerce-product-gallery__trigger {
  display: none;
}

.pk-kit-product-gallery .pk-kit-gallery-video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.pk-kit-product-gallery .pk-kit-gallery-video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.pk-kit-product-gallery--component .pk-kit-gallery-thumbs,
.pk-kit-product-gallery--single .pk-kit-gallery-thumbs {
  display: none !important;
}

.pk-kit-product-gallery--component .pk-kit-gallery-main-wrap {
  aspect-ratio: auto;
  width: 100%;
  height: auto;
  background: transparent;
  border: 0;
  border-radius: var(--theme-theme-radius-base, 12px);
  overflow: hidden;
}

.pk-kit-product-gallery--component .pk-kit-gallery-main-link {
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
}

.pk-kit-product-gallery--component .pk-kit-gallery-main,
.pk-kit-component-cards .pk-kit-card__thumb .pk-kit-gallery-main,
.pk-kit-component-cards .pk-kit-card__thumb img,
.pk-kit-component-cards
  .thumbnail-wrapper
  .woocommerce-product-gallery__image
  img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: var(--theme-theme-radius-base, 12px);
}

.pk-kit-product-gallery--component .pk-kit-gallery-thumbs .slider-item,
.single-product-wrapper
  .product-gallery
  .pk-kit-product-gallery--component
  .product-thumbnails-wrapper
  .slider-item {
  flex: 0 0 3.25rem;
  width: 3.25rem;
  height: 3.25rem;
  min-width: 3.25rem;
  max-width: 3.25rem;
  min-height: 3.25rem;
  max-height: 3.25rem;
}

.pk-kit-card__thumb .pk-kit-product-gallery {
  width: 100%;
}

.pk-kit-card__thumb .thumbnail-wrapper,
.pk-kit-component-cards .thumbnail-wrapper {
  border: 0;
  background: transparent;
  padding: 0;
}

/* Gray overlay while a component's options are unselected. */
.pk-kit-card__thumb {
  position: relative;
}

.pk-kit-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(90, 90, 90, 0.45);
  border-radius: var(--theme-theme-radius-base, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.pk-kit-card.is-unselected .pk-kit-card__thumb::after {
  opacity: 1;
}

/* Variation selects: under-card on mobile, sidebar on desktop. */
.pk-kit-variations--mobile {
  display: none;
}

.pk-kit-card__variations {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-info-dark, #dee2e6);
  clear: both;
}

.pk-kit-card__variations .pk-kit-variation-row + .pk-kit-variation-row,
.pk-kit-sidebar-item__variations .pk-kit-variation-row + .pk-kit-variation-row {
  margin-top: 0.5rem;
}

.pk-kit-sidebar-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-info-dark, #dee2e6);
}

.pk-kit-sidebar-item:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
}

.pk-kit-sidebar-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pk-kit-sidebar-item__header .pk-kit-sidebar-item__title {
  flex: 1;
}

.pk-kit-sidebar-item.is-excluded {
  opacity: 0.55;
}

.pk-kit-variation-row label {
  display: block;
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.pk-kit-variation-row select {
  width: 100%;
}

.pk-kit-configurator__line-items {
  margin: 0.75rem 0 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-info-dark, #dee2e6);
}

.pk-kit-line-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.pk-kit-line-item__label {
  flex: 1;
  min-width: 0;
}

.pk-kit-line-item__price {
  flex-shrink: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

/* Normalize WC price markup inside line items (theme PDP price is much larger). */
.pk-kit-configurator__summary .pk-kit-line-item__price .price,
.pk-kit-configurator__summary
  .pk-kit-line-item__price
  .woocommerce-Price-amount,
.pk-kit-configurator__summary .pk-kit-line-item__price .amount,
.pk-kit-configurator__summary .pk-kit-line-item__price ins,
.pk-kit-configurator__summary .pk-kit-line-item__price del,
.pk-kit-configurator__summary .pk-kit-line-item__price bdi,
.pk-kit-configurator__summary .pk-kit-line-item__price span {
  font-size: inherit !important;
  line-height: inherit;
}

.pk-kit-configurator__summary .pk-kit-line-item__price .price {
  display: inline;
  margin: 0;
}

.pk-kit-configurator__message {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #fff;
}

/* Components + summary side by side */
.pk-kit-configurator__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.875rem;
  width: 100%;
  flex: 0 0 100%;
  margin-top: 1.875rem;
}

@media screen and (min-width: 992px) {
  .pk-kit-configurator__main {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
    gap: 3.5rem;
    align-items: start;
    margin-top: 3.75rem;
  }

  .pk-kit-configurator__components {
    padding-right: 1.25rem;
  }

  .pk-kit-configurator__summary {
    position: sticky;
    top: 1.5rem;
  }
}

.pk-kit-configurator__components {
  min-width: 0;
}

.pk-kit-configurator__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  font-size: 1.875rem;
  font-weight: 700;
}

.pk-kit-configurator__total-amount {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.pk-kit-configurator__total-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.pk-kit-configurator__summary .pk-kit-add-to-cart {
  width: 100%;
}

.pk-kit-configurator__summary .pk-kit-add-to-cart:disabled,
.pk-kit-configurator__summary .pk-kit-add-to-cart.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Horizontal shop-style component cards */
.pk-kit-component-cards {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pk-kit-component-cards > .pk-kit-card {
  margin-bottom: 0.9375rem;
}

.pk-kit-component-cards .product-wrapper {
  position: relative;
}

.pk-kit-component-cards .product-content {
  align-items: flex-start;
  width: 100%;
}

.pk-kit-component-cards .content-wrapper {
  flex: 1;
  min-width: 0;
}

.pk-kit-component-cards.large-list > * .product-wrapper .product-content {
  flex: 0 0 100%;
  max-width: 100%;
}

.pk-kit-component-cards .thumbnail-wrapper {
  border-radius: var(--theme-theme-radius-base, 12px);
  overflow: hidden;
  margin-right: 1.5rem;
  flex-shrink: 0;
  background: transparent;
  border: 0;
}

.pk-kit-component-cards.large-list
  > *
  .product-wrapper
  .product-content
  .thumbnail-wrapper {
  margin-right: 1.5rem;
}

.pk-kit-card__sku {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-info-dark, rgba(255, 255, 255, 0.15));
  font-size: 0.875rem;
  line-height: 1.4;
}

.pk-kit-card__sku.is-empty,
.pk-kit-card__sku[hidden] {
  display: none;
}

.pk-kit-card__sku-label {
  font-weight: 600;
  margin-right: 0.35rem;
  opacity: 0.85;
}

.pk-kit-card__sku-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.pk-kit-card__accordion {
  margin-top: 0.5rem;
  border-top: 1px solid var(--color-info-dark, rgba(255, 255, 255, 0.15));
}

.pk-kit-component-cards .content-wrapper .product-title {
  margin-bottom: 0.35rem;
}

.pk-kit-component-cards .content-wrapper .product-title a {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  color: inherit;
  text-decoration: none;
}

.pk-kit-component-cards .content-wrapper .product-title a:hover {
  color: inherit;
  text-decoration: none;
}

.pk-kit-sidebar-item__title a {
  color: inherit;
  text-decoration: none;
}

.pk-kit-sidebar-item__title a:hover {
  color: inherit;
  text-decoration: none;
}

.pk-kit-component-cards .content-wrapper .price {
  display: block;
  margin-bottom: 0.35rem;
}

.pk-kit-component-cards .product-stock {
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

.pk-kit-component-cards .product-stock.is-empty {
  display: none;
}

.pk-kit-component-cards .product-stock i {
  margin-right: 0.35rem;
}

.pk-kit-card.is-out-of-stock,
.pk-kit-sidebar-item.is-out-of-stock {
  opacity: 0.55;
}

.pk-kit-component-cards .product-stock.outof-stock,
.pk-kit-component-cards .product-stock.outof-stock i,
.pk-kit-component-cards .product-stock.outof-stock .pk-kit-card__stock-text {
  color: var(--color-primary, #ef233c);
}

.pk-kit-card__accordion-item {
  border-bottom: 1px solid var(--color-info-dark, rgba(255, 255, 255, 0.15));
}

.pk-kit-card__accordion-item:last-child {
  border-bottom: 0;
}

.pk-kit-card__accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.pk-kit-card__accordion-trigger::-webkit-details-marker {
  display: none;
}

.pk-kit-card__accordion-trigger::after {
  content: "+";
  font-size: 1.125rem;
  line-height: 1;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.pk-kit-card__accordion-item[open] .pk-kit-card__accordion-trigger::after {
  content: "−";
}

.pk-kit-card__accordion-panel {
  padding: 0 0 0.875rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.pk-kit-card__accordion-panel > :last-child {
  margin-bottom: 0;
}

.pk-kit-card__accordion-panel table {
  width: 100%;
  font-size: 0.8125rem;
}

.pk-kit-card__accordion-panel .pk-kit-video-embed,
.pk-kit-card__accordion-panel .wp-block-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  clear: both;
}

.pk-kit-card__accordion-panel .pk-kit-video-embed {
  aspect-ratio: 16 / 9;
}

.pk-kit-card__accordion-panel .pk-kit-video-embed iframe,
.pk-kit-card__accordion-panel .wp-block-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

.pk-kit-card__accordion-panel .pk-kit-video-embed iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

.pk-kit-card__accordion-panel .wp-block-embed__wrapper {
  position: relative;
}

.pk-kit-card__accordion-panel .wp-block-embed__wrapper::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.pk-kit-card__accordion-panel .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

.pk-kit-related-products {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pk-kit-related-products__item + .pk-kit-related-products__item {
  margin-top: 0.625rem;
}

.pk-kit-related-products__link {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.pk-kit-related-products__thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--theme-theme-radius-small, 6px);
}

.pk-kit-related-products__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pk-kit-related-products__title {
  font-weight: 600;
  line-height: 1.35;
}

.pk-kit-related-products__price {
  font-size: 0.8125rem;
  opacity: 0.9;
}

@media (max-width: 767px) {
  .pk-kit-component-cards.large-list > * .product-wrapper .product-content {
    display: flex;
    flex: 0 0 100%;
    max-width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .pk-kit-component-cards.large-list
    > *
    .product-wrapper
    .product-content
    .thumbnail-wrapper,
  .pk-kit-component-cards .thumbnail-wrapper.pk-kit-card__thumb,
  .pk-kit-component-cards .pk-kit-card__thumb {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 1rem;
  }

  .pk-kit-component-cards.large-list
    > *
    .product-wrapper
    .product-content
    .content-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .pk-kit-component-cards .pk-kit-card__thumb .pk-kit-product-gallery,
  .pk-kit-component-cards
    .pk-kit-card__thumb
    .pk-kit-gallery-main-wrap {
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }

  .pk-kit-component-cards
    .thumbnail-wrapper
    .woocommerce-product-gallery__image
    img,
  .pk-kit-component-cards
    .pk-kit-card__thumb
    .pk-kit-gallery-main {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
    display: block;
  }

  /* Mobile: selects under each product; hide desktop sidebar option rows. */
  .pk-kit-variations--mobile {
    display: block;
  }

  .pk-kit-variations--desktop {
    display: none;
  }

  .pk-kit-configurator__summary .pk-kit-sidebar-item {
    display: none;
  }

  .pk-kit-card__variations {
    margin-top: 0.875rem;
    padding: 0.75rem 0 0;
  }

  .pk-kit-card__variations .pk-kit-variation-row select {
    min-height: 2.5rem;
    font-size: 1rem;
  }
}

/* Related + recently viewed below configurator */
.pk-kit-configurator section.related.products,
.pk-kit-merchandising-footer {
  width: 100%;
  margin-top: 3.75rem;
}
