/*
 * HejkaNaklejka – układ strony produktu z kalkulatorem.
 * Plik jest ładowany wyłącznie na produktach z aktywnym kalkulatorem.
 */

body.hkn-sc-product{
  --hkn-product-primary:#ff6b35;
}

/* --- Górna część produktu: galeria + krótki opis --- */
body.hkn-sc-product .product-entry-wrapper{
  display:grid!important;
  grid-template-columns:minmax(360px,.9fr) minmax(0,1.1fr)!important;
  gap:clamp(38px,5vw,76px)!important;
  align-items:start!important;
}

body.hkn-sc-product .product-entry-wrapper > .woocommerce-product-gallery,
body.hkn-sc-product .product-entry-wrapper > .images{
  width:100%!important;
  max-width:560px;
  float:none!important;
  margin:0 auto!important;
  align-self:start;
}

body.hkn-sc-product .product-entry-wrapper > .entry-summary,
body.hkn-sc-product .product-entry-wrapper > .summary{
  width:100%!important;
  float:none!important;
  margin:0!important;
  padding-top:4px;
}

/* Fallback dla klasycznego markup WooCommerce, gdy Blocksy zmieni wrapper. */
body.hkn-sc-product.single-product div.product div.images{
  max-width:560px;
}

body.hkn-sc-product .woocommerce-product-gallery__image{
  display:flex!important;
  align-items:center;
  justify-content:center;
}

body.hkn-sc-product .woocommerce-product-gallery__image img{
  display:block;
  width:100%!important;
  height:auto!important;
  max-height:560px;
  object-fit:contain;
}

body.hkn-sc-product .flex-control-thumbs,
body.hkn-sc-product .ct-product-gallery-container .flex-control-thumbs{
  margin-top:18px!important;
}

body.hkn-sc-product .entry-summary .product_title,
body.hkn-sc-product .entry-summary .entry-title,
body.hkn-sc-product .summary .product_title{
  margin-bottom:16px!important;
  line-height:1.08;
}

body.hkn-sc-product .entry-summary .woocommerce-product-details__short-description,
body.hkn-sc-product .summary .woocommerce-product-details__short-description{
  max-width:760px;
  font-size:clamp(16px,1.1vw,18px);
  line-height:1.58;
}

/* --- CTA w hero produktu --- */
.hkn-sc-product-cta{
  --hkn-product-primary:#ff6b35;
  display:grid;
  gap:14px;
  margin-top:22px;
  padding:18px;
  border:1px solid color-mix(in srgb,var(--hkn-product-primary) 20%,rgba(0,0,0,.08));
  border-radius:18px;
  background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--hkn-product-primary) 4%,#fff));
  box-shadow:0 10px 30px rgba(0,0,0,.045);
}

.hkn-sc-product-cta__benefits{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  color:inherit;
  font-size:12px;
  font-weight:700;
}

.hkn-sc-product-cta__benefits span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.hkn-sc-product-cta__benefits i{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:19px;
  height:19px;
  border-radius:50%;
  background:color-mix(in srgb,var(--hkn-product-primary) 12%,#fff);
  color:var(--hkn-product-primary);
  font-size:11px;
  font-style:normal;
  font-weight:900;
}

.hkn-sc-product-cta__button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  min-height:56px;
  padding:12px 20px;
  border:1px solid var(--hkn-product-primary);
  border-radius:14px;
  background:var(--hkn-product-primary);
  color:#fff!important;
  text-decoration:none!important;
  font-size:15px;
  font-weight:800;
  line-height:1.2;
  box-shadow:0 9px 22px color-mix(in srgb,var(--hkn-product-primary) 22%,transparent);
  transition:transform .18s ease,filter .18s ease,box-shadow .18s ease;
}

.hkn-sc-product-cta__button:hover{
  color:#fff!important;
  filter:brightness(.96);
  transform:translateY(-1px);
  box-shadow:0 12px 28px color-mix(in srgb,var(--hkn-product-primary) 27%,transparent);
}

.hkn-sc-product-cta__button span{
  font-size:20px;
  line-height:1;
  transition:transform .18s ease;
}

.hkn-sc-product-cta__button:hover span{
  transform:translateY(2px);
}

.hkn-sc-product-cta p{
  margin:0!important;
  color:inherit;
  opacity:.65;
  font-size:12px;
  line-height:1.45;
  text-align:center;
}

/* --- Konfigurator pod hero, ale w szerokości treści Blocksy --- */
body.hkn-sc-product .hkn-sc-theme-container{
  box-sizing:border-box;
  display:block!important;
  width:var(--theme-container-width,calc(100% - 40px))!important;
  max-width:var(--theme-normal-container-max-width,1290px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
}

.hkn-sc-configurator-anchor{
  display:block;
  width:100%;
  height:1px;
  margin-top:clamp(44px,6vw,78px);
  scroll-margin-top:120px;
}

body.hkn-sc-product .hkn-sc-theme-container > .hkn-sc{
  width:100%;
  max-width:100%;
  margin:0 0 36px;
}

body.hkn-sc-product .hkn-sc__section,
body.hkn-sc-product .hkn-sc__summary{
  padding:clamp(18px,2vw,28px);
}

body.hkn-sc-product .hkn-sc__section-head h3{
  font-size:clamp(22px,2vw,28px);
}

body.hkn-sc-product .hkn-sc__section-head p{
  max-width:720px;
}

/* W szerokiej sekcji dajemy więcej miejsca konfiguracji i podglądowi. */
body.hkn-sc-product .hkn-sc__workspace-grid{
  grid-template-columns:minmax(0,1fr) minmax(380px,1fr);
  gap:clamp(22px,3vw,38px);
}

body.hkn-sc-product .hkn-sc__preview-wrap{
  min-height:390px;
}

body.hkn-sc-product .hkn-sc__summary{
  grid-template-columns:minmax(0,1fr) minmax(280px,.38fr);
}

/* Opis / zakładki zaczynają się dopiero po konfiguratorze. */
body.hkn-sc-product .woocommerce-tabs,
body.hkn-sc-product .ct-woo-tabs{
  margin-top:clamp(38px,5vw,64px)!important;
}

/* --- Tablet --- */
@media (max-width:1024px){
  body.hkn-sc-product .product-entry-wrapper{
    grid-template-columns:minmax(300px,.9fr) minmax(0,1.1fr)!important;
    gap:34px!important;
  }

  body.hkn-sc-product .hkn-sc__workspace-grid{
    grid-template-columns:1fr;
  }

  body.hkn-sc-product .hkn-sc__designer-panel{
    padding-left:0;
    padding-top:20px;
    border-left:0;
    border-top:1px solid rgba(0,0,0,.065);
  }
}

/* --- Mobile / mały tablet --- */
@media (max-width:767px){
  body.hkn-sc-product .product-entry-wrapper{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:28px!important;
  }

  body.hkn-sc-product .product-entry-wrapper > .woocommerce-product-gallery,
  body.hkn-sc-product .product-entry-wrapper > .images{
    max-width:520px;
  }

  body.hkn-sc-product .woocommerce-product-gallery__image img{
    max-height:500px;
  }

  .hkn-sc-product-cta{
    margin-top:18px;
    padding:15px;
    border-radius:16px;
  }

  .hkn-sc-product-cta__benefits{
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
  }

  .hkn-sc-product-cta__button{
    min-height:54px;
  }

  .hkn-sc-configurator-anchor{
    margin-top:38px;
    scroll-margin-top:86px;
  }

  body.hkn-sc-product .hkn-sc-theme-container{
    width:calc(100% - 28px)!important;
  }

  body.hkn-sc-product .hkn-sc__preview-wrap{
    min-height:260px;
  }
}
