/* hk-product-tabs: tuotetabien tyylit (yhdistetty live + hyvakone2025). Teemakohtainen tabinavigaation tyyli jää teemaan. */

/* PRODUCT CONTACT / SALES (Kysy lisää) */
.hk-sales-intro {
    margin-bottom: 32px;
}
.hk-sales__heading {
    margin: 0 0 24px;
    color: #243f55;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}
.hk-sales-list {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 48px;
    align-items: flex-start;
}
.hk-sales-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    flex: 0 1 220px;
    max-width: 260px;
}
.hk-sales-card__media {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    background: #e8e8e8;
    flex-shrink: 0;
}
.hk-sales-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.hk-sales-card__content {
    width: 100%;
}
.hk-sales-card__name {
    margin: 0 0 6px;
    color: #243f55;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}
.hk-sales-card__title {
    margin: 0 0 12px;
    color: #243f55;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}
.hk-sales-card__contacts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hk-sales-card__link {
    color: #243f55;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
    text-decoration: none;
    word-break: break-word;
}
.hk-sales-card__link:hover {
    color: #BE1C1E;
}
.hk-sales-card__langs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.hk-sales-card__lang {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%;
}
@media (max-width: 600px) {
    .hk-sales-list {
        gap: 36px 24px;
    }
    .hk-sales-card {
        flex: 1 1 100%;
        max-width: none;
    }
}


/* PRODUCT ADDONS (Lisävarusteet) */
.hk-addons-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.hk-addon {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 40px 48px;
    align-items: start;
    padding: 36px 0;
    border-bottom: 1px solid #d7d7d7;
}
.hk-addon:first-child {
    padding-top: 12px;
}
.hk-addon:last-child {
    border-bottom: 0;
}
.hk-addon-gallery__main {
    position: relative;
    aspect-ratio: 4 / 3;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}
.hk-addon-gallery__slide {
    position: absolute;
    inset: 0;
    display: none;
}
.hk-addon-gallery__slide.is-active {
    display: block;
}
.hk-addon-gallery__slide img,
.hk-addon-gallery__slide iframe,
.hk-addon-gallery__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}
.hk-addon-gallery__video {
    position: relative;
    cursor: pointer;
}
.hk-addon-gallery__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #BE1C1E;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.hk-addon-gallery__video.is-playing img,
.hk-addon-gallery__video.is-playing .hk-addon-gallery__play {
    display: none;
}
.hk-addon-gallery__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.hk-addon-gallery__play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
}
.hk-addon-gallery__thumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.hk-addon-gallery__thumb-track {
    display: flex;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}
.hk-addon-gallery__thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    position: relative;
}
.hk-addon-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hk-addon-gallery__thumb.is-active {
    border-color: #BE1C1E;
    box-shadow: 0 0 0 1px #BE1C1E;
}
.hk-addon-gallery__thumb.is-video::after {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #BE1C1E;
    filter: drop-shadow(0 0 2px #fff);
}
.hk-addon-gallery__nav {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    line-height: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hk-addon-gallery__nav svg {
    display: block;
    width: 40px;
    height: 40px;
}
.hk-addon-gallery__nav--prev svg {
    transform: scaleX(-1);
}
.hk-addon-gallery__nav:hover {
    opacity: 0.9;
}
.hk-addon__title {
    margin: 0 0 14px;
    color: #243f55;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}
.hk-addon__text {
    color: #4a4a4a;
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 22px;
}
.hk-addon__text p:last-child {
    margin-bottom: 0;
}
.hk-addon__price {
    margin-bottom: 22px;
}
.hk-addon__price-value {
    display: block;
    color: #BE1C1E;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
}
.hk-addon__price-vat {
    display: block;
    margin-top: 4px;
    color: #6b6b6b;
    font-size: 14px;
}
.hk-addon__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #BE1C1E;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s ease;
}
.hk-addon__cta:hover {
    background: #BE1C1E;
    color: #fff !important;
}
@media (max-width: 900px) {
    .hk-addon {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .hk-addon__title {
        font-size: 24px;
    }
    .hk-addon__price-value {
        font-size: 30px;
    }
}

/* Generic content in ACF product tabs */
.acf-tab-content > p {
    font-size: 16px;
    line-height: 1.6;
}
.acf-tab-content > h2 {
    font-size: 24px;
    margin-bottom: 30px;
}
.acf-tab-content > h3 {
    font-size: 18px;
    line-height: 1.2;
    margin: 0;
}
.acf-tab-content > table {
    width: 100% !important;
    margin: 0;
    font-size: inherit;
}
.acf-tab-content > table thead th {
    font-weight: bold !important;
    padding: 15px 0;
    border-bottom: 1px solid #dbdbdb;
}
.acf-tab-content > table td {
    padding: 15px 0;
    border-bottom: 1px solid #dbdbdb;
}
.acf-tab-content > table tr:nth-child(even) {
    background: #f5f5f566 !important;
}

/* Tuotenostot (product_info_grid) */
.hk-info-grid {
  --hk-info-gap: 10rem;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(100%, max(260px, calc((100% - 2 * var(--hk-info-gap)) / 3))), 1fr)
  );
  gap: var(--hk-info-gap);
  margin-top: 2.5rem;
  align-items: stretch;
}

.hk-info-intro + .hk-info-grid {
  margin-top: 2.5rem;
}

.hk-info-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.hk-info-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.hk-info-card__media img {
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hk-info-gallery {
  position: absolute;
  inset: 0;
}

.hk-info-gallery__main,
.hk-info-gallery__slide {
  height: 100%;
}

.hk-info-gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.hk-info-gallery__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.hk-info-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #bd1d1d;
  transform: translateY(-50%);
  cursor: pointer;
}

.hk-info-gallery__nav::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto;
  border-left: 2px solid #dad8d2;
  border-bottom: 2px solid #dad8d2;
}

.hk-info-gallery__nav--prev {
  left: 10px;
}

.hk-info-gallery__nav--prev::before {
  transform: rotate(45deg);
  margin-left: 4px;
}

.hk-info-gallery__nav--next {
  right: 10px;
}

.hk-info-gallery__nav--next::before {
  transform: rotate(-135deg);
  margin-right: 4px;
}

.hk-info-gallery__nav:focus-visible {
  outline: 2px solid #bd1d1d;
  outline-offset: 2px;
}

.hk-info-gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.hk-info-gallery__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: auto;
  cursor: pointer;
}

.hk-info-gallery__dot.is-active {
  background: #bd1d1d;
}

.hk-info-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 0 0 0;
  flex: 1;
}

.hk-info-card__title {
  margin: 0;
}

.hk-info-card__text,
.hk-info-card__text p {
  margin: 0;
}

.hk-info-card__text p + p {
  margin-top: 0.75em;
}

.hk-info-card__videos {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.hk-info-card__video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.hk-info-card__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .hk-info-grid {
    --hk-info-gap: 1.25rem;
    margin-top: 1.75rem;
  }
}


