/*
 * SK Product Layout v0.6.5
 * One global automatic layout for all product pages.
 * No theme/core patches.
 */

html[data-sk-product-layout="auto"] {
  --skpl-option-gap: var(--skpl-option-gap-desktop, 14px);
  --skpl-option-label-gap: 8px;
  --skpl-option-label-size: var(--skpl-option-label-size, 13px);
}

/* ---------- visibility ---------- */
html[data-skpl-show-title="0"] .cs-page-product__name,
html[data-skpl-show-rating="0"] .cs-product__rating,
html[data-skpl-show-badges="0"] .cs-page-product__badges-wrapper,
html[data-skpl-show-gallery="0"] .cs-page-product__gallery,
html[data-skpl-show-variants="0"] .product-options-wrapper,
html[data-skpl-show-price="0"] #kh-product-prices,
html[data-skpl-show-add-to-cart="0"] #kh-product-add-to-cart,
html[data-skpl-show-reference="0"] [data-skpl-block="reference"],
html[data-skpl-show-delivery="0"] [data-skpl-block="delivery"],
html[data-skpl-show-key-features="0"] [data-skpl-block="key-features"],
html[data-skpl-show-fuel-icons="0"] [data-skpl-block="fuel-icons"] {
  display: none !important;
}

/* ---------- header ---------- */
html[data-sk-product-layout="auto"] .cs-page-product__top-start {
  min-width: 0;
}

html[data-sk-product-layout="auto"] .cs-page-product__name .page-title,
html[data-sk-product-layout="auto"] .cs-page-product__name h1,
html[data-sk-product-layout="auto"] .cs-page-product__name .base {
  font-size: var(--skpl-title-font-desktop, 28px) !important;
  line-height: 1.22 !important;
  font-weight: 600 !important;
}

html[data-sk-product-layout="auto"] .cs-page-product__top-start > .cs-page-product__badges-wrapper,
html[data-sk-product-layout="auto"] .cs-page-product__top-start > .cs-page-product__badges-wrapper > .cs-page-product__badges-wrapper,
html[data-sk-product-layout="auto"] .cs-page-product__top-start > .cs-page-product__badges-wrapper ul {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
}

html[data-sk-product-layout="auto"] .cs-page-product__badge-item,
html[data-sk-product-layout="auto"] .skpl-feature-asset {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-page-product__badge,
html[data-sk-product-layout="auto"] .skpl-feature-asset__control {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  box-sizing: border-box !important;
}

html[data-sk-product-layout="auto"] .skpl-feature-asset__control {
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-sk-product-layout="auto"] .skpl-feature-asset__image,
html[data-sk-product-layout="auto"] .skpl-feature-asset__image img,
html[data-sk-product-layout="auto"] .skpl-feature-asset__image svg {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  height: 32px !important;
  margin: 0 !important;
  object-fit: contain !important;
}

html[data-sk-product-layout="auto"] .skpl-energy-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  background: #efe51d;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* ---------- buy box ---------- */
html[data-sk-product-layout="auto"] .cs-buybox {
  box-sizing: border-box;
  min-width: 0;
  padding: 14px !important;
  background: #f8f8f8 !important;
  border: 1px solid #e3e3e3 !important;
  border-radius: var(--skpl-panel-radius, 0);
  box-shadow: none !important;
}

/* Desktop follow-purchase uses a small fixed panel instead of sticking the whole buy-box. */

/* All option systems share exactly the same rhythm. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper,
html[data-sk-product-layout="auto"] .cs-buybox .product-options-wrapper,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper > .fieldset,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper > .fieldset > .swatch-opt,
html[data-sk-product-layout="auto"] .cs-buybox .product-options-wrapper > .fieldset,
html[data-sk-product-layout="auto"] .cs-buybox .product-options-wrapper > .fieldset > .swatch-opt {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--skpl-option-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-group,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--skpl-option-label-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item > *,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-group > *,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .control-label,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-heading,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-customise-title {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #222 !important;
  font-family: inherit !important;
  font-size: var(--skpl-option-label-size) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Native variant lists. */
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item ul,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .variant-links,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .values,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .options,
html[data-sk-product-layout="auto"] .cs-buybox [data-skpl-linked-options="1"],
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-swatches {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item [data-skpl-variant-grid="1"],
html[data-sk-product-layout="auto"] .cs-buybox [data-skpl-linked-options="1"],
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-swatches {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

html[data-sk-product-layout="auto"][data-skpl-variant-auto-desktop="0"]
.cs-buybox .product-variants-item [data-skpl-variant-grid="1"],
html[data-sk-product-layout="auto"][data-skpl-variant-auto-desktop="0"]
.cs-buybox [data-skpl-linked-options="1"] {
  grid-template-columns: repeat(var(--skpl-variant-columns-desktop, 3), minmax(0, 1fr)) !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item li,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-swatch {
  min-width: 0 !important;
  margin: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-swatch {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 38px !important;
  padding: 7px 10px !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item select,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .form-control-select {
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
}

/* Reference + delivery. */
html[data-sk-product-layout="auto"] .skpl-buybox-meta {
  margin: 4px 0 14px !important;
  padding: 12px 0 !important;
  border-top: 1px solid #e4e4e4;
  border-bottom: 1px solid #e4e4e4;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta__section {
  margin: 0 0 9px !important;
  padding: 0 !important;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta__section:last-child {
  margin-bottom: 0 !important;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta__section[data-skpl-block="reference"] > .cs-pdp-info__label {
  display: none !important;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta .cs-pdp-info__label {
  margin: 0 0 6px !important;
  color: #222;
  font-size: 13px;
  font-weight: 700;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta .cs-pdp-info__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  min-height: 28px;
  padding: 5px 0;
  border-bottom: 1px dotted #ddd;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta .cs-pdp-info__row:last-child {
  border-bottom: 0;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta .cs-pdp-info__row > span:first-child {
  color: #666;
  font-size: 13px;
  font-weight: 400;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta .cs-pdp-info__row > span:last-child {
  color: #171717;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

html[data-sk-product-layout="auto"] .skpl-buybox-meta .available {
  color: #56b51f !important;
}

/* Price. */
html[data-sk-product-layout="auto"] #kh-product-prices {
  margin: 0 0 14px !important;
  padding: 2px 0 14px !important;
  border-bottom: 1px solid #e5e5e5;
  text-align: right;
}

html[data-sk-product-layout="auto"] #kh-product-prices .current-price,
html[data-sk-product-layout="auto"] #kh-product-prices .product-price,
html[data-sk-product-layout="auto"] #kh-product-prices .price,
html[data-sk-product-layout="auto"] #kh-product-prices [itemprop="price"] {
  color: #111 !important;
  font-size: var(--skpl-price-font-desktop, 48px) !important;
  font-weight: 800 !important;
  line-height: 1.02 !important;
  letter-spacing: -0.5px !important;
  white-space: nowrap;
}

html[data-sk-product-layout="auto"] #kh-product-prices .skpl-brutto-label {
  display: none !important;
}

html[data-sk-product-layout="auto"] #kh-product-prices .regular-price,
html[data-sk-product-layout="auto"] #kh-product-prices .product-discount,
html[data-sk-product-layout="auto"] #kh-product-prices .tax-shipping-delivery-label {
  font-size: 12px !important;
}

/* Quantity + cart. */
html[data-sk-product-layout="auto"] .cs-buybox .cs-buybox__addtocart-fieldset {
  display: grid !important;
  grid-template-columns: 124px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: stretch !important;
  width: 100% !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .cs-buybox__qty-wrapper,
html[data-sk-product-layout="auto"] .cs-buybox .cs-buybox__addtocart-actions,
html[data-sk-product-layout="auto"] .cs-buybox .cs-buybox__addtocart-actions .cs-addtocart__wrapper {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .cs-qty-increment {
  display: grid !important;
  grid-template-columns: 38px minmax(42px, 1fr) 38px !important;
  width: 100% !important;
  height: var(--skpl-cta-height, 52px) !important;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .cs-qty-increment__input,
html[data-sk-product-layout="auto"] .cs-buybox .cs-qty-increment__button {
  height: calc(var(--skpl-cta-height, 52px) - 2px) !important;
  margin: 0 !important;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .cs-qty-increment__input {
  min-width: 0 !important;
  padding: 0 !important;
  border-left: 1px solid #ededed !important;
  border-right: 1px solid #ededed !important;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

html[data-sk-product-layout="auto"] .cs-buybox [data-button-action="add-to-cart"],
html[data-sk-product-layout="auto"] .cs-buybox .cs-addtocart__button,
html[data-sk-product-layout="auto"] .cs-buybox .js-add-to-cart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: var(--skpl-cta-height, 52px) !important;
  padding: 0 20px !important;
  border: 1px solid #ef3128 !important;
  border-radius: 4px !important;
  background: #ef3128 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

/* ---------- fuels ---------- */
html[data-sk-product-layout="auto"] .skpl-generated-fuels {
  box-sizing: border-box;
  width: 100%;
  margin: 18px 0 0;
  padding: 14px 14px 12px;
  background: #fff;
  border: 1px solid #e3e3e3;
}

html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__label {
  margin: 0 0 13px;
  color: #171717;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__row {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 14px 20px;
  width: 100%;
  margin: 0 auto;
}

html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__item {
  display: flex;
  flex: 0 0 70px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__icon {
  display: block;
  width: var(--skpl-fuel-icon-desktop, 58px);
  height: var(--skpl-fuel-icon-desktop, 58px);
  object-fit: contain;
}

html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__item-label {
  color: #333;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

/* ---------- desktop key features ---------- */
html[data-sk-product-layout="auto"] .skpl-key-features {
  width: 100%;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #e3e3e3;
  overflow: hidden;
}

html[data-sk-product-layout="auto"] .skpl-key-features__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid #e7e7e7;
}

html[data-sk-product-layout="auto"] .skpl-key-features__title {
  margin: 0;
  color: #171717;
  font-size: 18px;
  font-weight: 700;
}

html[data-sk-product-layout="auto"] .skpl-key-features__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e5322d;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

html[data-sk-product-layout="auto"] .skpl-key-features__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-sk-product-layout="auto"] .skpl-key-features__column {
  min-width: 0;
  padding: 8px 18px 12px;
}

html[data-sk-product-layout="auto"] .skpl-key-features__column--right {
  border-left: 1px solid #e7e7e7;
}

html[data-sk-product-layout="auto"] .skpl-key-features__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 42%);
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding: 8px 0;
  border-bottom: 1px solid #ededed;
}

html[data-sk-product-layout="auto"] .skpl-key-features__item:last-child {
  border-bottom: 0;
}

html[data-sk-product-layout="auto"] .skpl-key-features__label {
  color: #666;
  font-size: 14px;
  line-height: 1.35;
}

html[data-sk-product-layout="auto"] .skpl-key-features__value {
  color: #222;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

@media (min-width: 992px) {
  html[data-sk-product-layout="auto"].skpl-key-features-built .cs-page-product__top-info,
  html[data-sk-product-layout="auto"] .cs-page-product__top-info.skpl-top-info-empty {
    display: none !important;
  }
}

/* ---------- mobile ---------- */
@media (max-width: 991.98px) {
  html[data-sk-product-layout="auto"] {
    --skpl-option-gap: var(--skpl-option-gap-mobile, 12px);
    --skpl-option-label-gap: 7px;
  }

  html[data-sk-product-layout="auto"] .cs-page-product__top-info,
  html[data-sk-product-layout="auto"] .skpl-key-features {
    display: none !important;
  }

  html[data-sk-product-layout="auto"] .cs-container--page-pdp-top > .cs-container__inner {
    display: flex !important;
    flex-direction: column;
  }

  html[data-sk-product-layout="auto"] .cs-page-product__top-main {
    display: contents !important;
  }

  html[data-sk-product-layout="auto"] .cs-page-product__top-start {
    order: 10;
  }

  html[data-sk-product-layout="auto"] .cs-page-product__gallery {
    order: var(--skpl-mobile-gallery-order, 20);
    width: 100%;
  }

  html[data-sk-product-layout="auto"] .cs-buybox {
    order: var(--skpl-mobile-buybox-order, 30);
    width: 100%;
    margin-top: var(--skpl-gap-mobile, 16px);
    padding: 12px !important;
  }

  html[data-sk-product-layout="auto"] .cs-page-product__name .page-title,
  html[data-sk-product-layout="auto"] .cs-page-product__name h1,
  html[data-sk-product-layout="auto"] .cs-page-product__name .base {
    font-size: var(--skpl-title-font-mobile, 22px) !important;
    line-height: 1.25 !important;
  }

  html[data-sk-product-layout="auto"] #kh-product-prices .current-price,
  html[data-sk-product-layout="auto"] #kh-product-prices .product-price,
  html[data-sk-product-layout="auto"] #kh-product-prices .price,
  html[data-sk-product-layout="auto"] #kh-product-prices [itemprop="price"] {
    font-size: var(--skpl-price-font-mobile, 40px) !important;
  }

  html[data-sk-product-layout="auto"][data-skpl-variant-auto-mobile="0"]
  .cs-buybox .product-variants-item [data-skpl-variant-grid="1"],
  html[data-sk-product-layout="auto"][data-skpl-variant-auto-mobile="0"]
  .cs-buybox [data-skpl-linked-options="1"] {
    grid-template-columns: repeat(var(--skpl-variant-columns-mobile, 3), minmax(0, 1fr)) !important;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels {
    display: block !important;
    margin-top: 14px;
    padding: 13px 10px 11px;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__row {
    gap: 12px 10px;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__item {
    flex-basis: 62px;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__icon {
    width: var(--skpl-fuel-icon-mobile, 48px);
    height: var(--skpl-fuel-icon-mobile, 48px);
  }

  html[data-sk-product-layout="auto"] .cs-buybox .cs-buybox__addtocart-fieldset {
    grid-template-columns: 110px minmax(0, 1fr) !important;
  }
}

@media (max-width: 767px) {
  /* 3D and AR: full width 50/50 row when both exist. */
  html[data-sk-product-layout="auto"] .cs-page-product__gallery .sk3dviewer-gallery-slot {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin: 12px 0 0 !important;
    padding: 0 !important;
  }

  html[data-sk-product-layout="auto"] .cs-page-product__gallery .sk3dviewer-gallery-slot .sk3dviewer-launch-group {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  html[data-sk-product-layout="auto"] .cs-page-product__gallery .sk3dviewer-gallery-slot .sk3dviewer-launch,
  html[data-sk-product-layout="auto"] .cs-page-product__gallery .sk3dviewer-gallery-slot .sk3dviewer-ar-launch {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 9px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    text-align: center !important;
  }
}


/* ===== 0.6.1 native variant rhythm hard reset =====
 * The theme wraps native PrestaShop variants inside
 * #product-options-wrapper > .fieldset > .swatch-opt.
 * Their internal margins caused the large gaps visible above linked variants.
 */
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item > *,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item > * > *,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .input-container,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item label,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item ul,
html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item li {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item > *:not(.control-label) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .control-label,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-heading,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-customise-title {
  min-height: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants-item .control-label + *,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-heading + *,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-customise-title + * {
  margin-top: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .product-variants + .skpl-linked-variant-group,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper + .skpl-linked-variant-group,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-group + .skpl-linked-variant-group,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block + .skpl-linked-variant-group {
  margin-top: var(--skpl-option-gap) !important;
}

/* The last native option and the first linked option use exactly one section gap. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper {
  margin-bottom: var(--skpl-option-gap) !important;
}

/* No separator line between linked variant groups unless it belongs to another block. */
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-group {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-group::before,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-group::after {
  display: none !important;
  content: none !important;
}


/* ===== 0.6.2 HUMMINGBIRD NATIVE VARIANTS =====
 * Superkomin uses Hummingbird's current variant markup:
 * .product__variants > .product-variant > legend.product-variant__legend
 * Previous rules targeted the older .product-variants-item markup, so the theme
 * kept its own font sizes and margins. These rules intentionally make the native
 * groups visually identical to linked variants (Średnica / Wysokość komina).
 */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product__variants {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--skpl-option-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--skpl-option-label-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-inline-size: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__legend,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-heading,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-customise-title {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #222 !important;
  font-family: inherit !important;
  font-size: var(--skpl-option-label-size) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__selected {
  display: none !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__attributes,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__radios,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__colors {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__radios {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)) !important;
  gap: 8px !important;
}

html[data-sk-product-layout="auto"][data-skpl-variant-auto-desktop="0"]
.cs-buybox #product-options-wrapper .product-variant__radios {
  grid-template-columns: repeat(var(--skpl-variant-columns-desktop, 3), minmax(0, 1fr)) !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__radio {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__radio .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .product-variant__attributes .form-select {
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
}

/* Exactly one gap after the whole native variant stack before linked selectors. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper {
  margin-bottom: var(--skpl-option-gap) !important;
}

@media (max-width: 991.98px) {
  html[data-sk-product-layout="auto"][data-skpl-variant-auto-mobile="0"]
  .cs-buybox #product-options-wrapper .product-variant__radios {
    grid-template-columns: repeat(var(--skpl-variant-columns-mobile, 3), minmax(0, 1fr)) !important;
  }
}


/* ===== 0.6.3 EXACT SUPERKOMIN VARIANT MARKUP =====
 * Exact frontend markup supplied from Superkomin.pl:
 * .swatch-opt > .swatch-attribute
 * .swatch-attribute-label + .swatch-attribute-options / select
 * Linked variants:
 * .mlv-swatches-block > .pd-customise-title + .pd-swatches
 */

/* The native combination wrapper becomes the same vertical rhythm as MLV linked groups. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-opt {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--skpl-option-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--skpl-option-label-gap) !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* EXACT same typography as Średnica / Wysokość komina / Rodzaj pustaka. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute-label,
html[data-sk-product-layout="auto"] .cs-buybox .skpl-linked-variant-heading,
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-customise-title {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #222 !important;
  font-family: inherit !important;
  font-size: var(--skpl-option-label-size) !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Native buttons/select sit exactly the same distance below the label as linked variants. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute-options,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute > select,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute .form-select {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

html[data-sk-product-layout="auto"][data-skpl-variant-auto-desktop="0"]
.cs-buybox #product-options-wrapper .swatch-attribute-options {
  grid-template-columns: repeat(var(--skpl-variant-columns-desktop, 3), minmax(0, 1fr)) !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-option {
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-option .form-check-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}

/* The select group must not introduce its own vertical spacing. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute > .form-select {
  width: 100% !important;
  min-height: 44px !important;
}

/* Pustak: restore the tight top spacing it had before. */
html[data-sk-product-layout="auto"] .cs-buybox .cs-buybox__section--product-form {
  padding-top: 0 !important;
}

html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block:first-child,
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper:first-child {
  margin-top: 0 !important;
}

/* Fuel icons: no unnecessary section title. */
html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__label {
  display: none !important;
}

html[data-sk-product-layout="auto"] .skpl-generated-fuels {
  padding-top: 12px !important;
}

@media (max-width: 991.98px) {
  html[data-sk-product-layout="auto"][data-skpl-variant-auto-mobile="0"]
  .cs-buybox #product-options-wrapper .swatch-attribute-options {
    grid-template-columns: repeat(var(--skpl-variant-columns-mobile, 3), minmax(0, 1fr)) !important;
  }
}


/* ===== 0.6.4 COMPACT NATIVE BUTTONS + ONE-LINE MOBILE FUELS ===== */

/* Native Nie/Tak buttons should use the same 3-column geometry as linked selectors.
   With two choices the third column simply remains empty instead of stretching both
   buttons to half of the buy-box. */
html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-attribute-options {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-option.color.simple {
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

html[data-sk-product-layout="auto"] .cs-buybox #product-options-wrapper .swatch-option.color.simple .form-check-label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}

/* Keep linked and native option button heights visually identical. */
html[data-sk-product-layout="auto"] .cs-buybox .mlv-swatches-block .pd-swatch {
  min-height: 38px !important;
  height: 38px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Mobile fuels: every available fuel stays in ONE row.
   The row distributes whatever number of icons exists across the gallery width. */
@media (max-width: 991.98px) {
  html[data-sk-product-layout="auto"] .skpl-generated-fuels {
    overflow: hidden !important;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__row {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    grid-template-columns: none !important;
    gap: 4px !important;
    width: 100% !important;
    align-items: start !important;
    justify-content: stretch !important;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__item {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    gap: 4px !important;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__icon {
    width: min(var(--skpl-fuel-icon-mobile, 48px), 40px) !important;
    height: min(var(--skpl-fuel-icon-mobile, 48px), 40px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  html[data-sk-product-layout="auto"] .skpl-generated-fuels .cs-fuel-icons__item-label {
    font-size: 9px !important;
    line-height: 1.1 !important;
    overflow-wrap: anywhere !important;
  }

  html[data-sk-product-layout="auto"][data-skpl-variant-auto-mobile="0"]
  .cs-buybox #product-options-wrapper .swatch-attribute-options {
    grid-template-columns: repeat(var(--skpl-variant-columns-mobile, 3), minmax(0, 1fr)) !important;
  }
}

/* Explicit configured desktop columns still win over the default 3-column geometry. */
@media (min-width: 992px) {
  html[data-sk-product-layout="auto"][data-skpl-variant-auto-desktop="0"]
  .cs-buybox #product-options-wrapper .swatch-attribute-options {
    grid-template-columns: repeat(var(--skpl-variant-columns-desktop, 3), minmax(0, 1fr)) !important;
  }
}


/* ===== 0.6.5 NATIVE OPTIONS FILL AVAILABLE WIDTH ===== */

/* 2 options = 2 equal columns, 3 = 3, etc.
   This restores the full-width behaviour while keeping the compact height. */
html[data-sk-product-layout="auto"] .cs-buybox
#product-options-wrapper .swatch-attribute-options[data-skpl-option-count="1"] {
  grid-template-columns: minmax(0, 1fr) !important;
}

html[data-sk-product-layout="auto"] .cs-buybox
#product-options-wrapper .swatch-attribute-options[data-skpl-option-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html[data-sk-product-layout="auto"] .cs-buybox
#product-options-wrapper .swatch-attribute-options[data-skpl-option-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html[data-sk-product-layout="auto"] .cs-buybox
#product-options-wrapper .swatch-attribute-options[data-skpl-option-count="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

html[data-sk-product-layout="auto"] .cs-buybox
#product-options-wrapper .swatch-attribute-options[data-skpl-option-count="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

/* Manual column setting still wins only when the user explicitly sets it. */
@media (min-width: 992px) {
  html[data-sk-product-layout="auto"][data-skpl-variant-auto-desktop="0"]
  .cs-buybox #product-options-wrapper .swatch-attribute-options {
    grid-template-columns: repeat(var(--skpl-variant-columns-desktop, 3), minmax(0, 1fr)) !important;
  }
}

@media (max-width: 991.98px) {
  html[data-sk-product-layout="auto"][data-skpl-variant-auto-mobile="0"]
  .cs-buybox #product-options-wrapper .swatch-attribute-options {
    grid-template-columns: repeat(var(--skpl-variant-columns-mobile, 3), minmax(0, 1fr)) !important;
  }
}


/* ===== 0.6.10 PURCHASE FOLLOWS CUSTOMER ===== */

.skpl-mobile-sticky-cart,
.skpl-desktop-sticky-cart {
  display: none;
}

html[data-sk-product-layout="auto"] .skpl-sticky-price__label {
  display: block;
  margin: 0 0 3px;
  color: #777;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

html[data-sk-product-layout="auto"] .skpl-sticky-price__value {
  display: block;
  max-width: 100%;
  color: #171717;
  font-family: inherit;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.04;
  white-space: nowrap;
}

html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__price[hidden],
html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__price[hidden] {
  display: none !important;
}

@media (min-width: 992px) {
  html[data-sk-product-layout="auto"][data-skpl-sticky="1"] .skpl-desktop-sticky-cart {
    position: fixed;
    top: 20px;
    z-index: 1000;
    display: block;
    box-sizing: border-box;
    padding: 9px 10px;
    background: rgba(248, 248, 248, 0.985);
    border: 1px solid #dedede;
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -10px, 0);
    transition:
      transform 170ms ease,
      opacity 150ms ease,
      visibility 0s linear 170ms;
  }

  html[data-sk-product-layout="auto"][data-skpl-sticky="1"] .skpl-desktop-sticky-cart.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition:
      transform 170ms ease,
      opacity 150ms ease,
      visibility 0s linear 0s;
  }

  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__inner {
    display: grid;
    grid-template-columns: minmax(135px, 0.95fr) minmax(160px, 1.05fr);
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 135px;
    text-align: center;
  }

  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #ef3128;
    border-radius: 4px;
    background: #ef3128;
    color: #fff;
    box-shadow: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    cursor: pointer;
  }

  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__button:hover {
    background: #df2c24;
    border-color: #df2c24;
  }

  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__button:disabled,
  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__button[aria-disabled="true"] {
    border-color: #c9c9c9;
    background: #c9c9c9;
    color: #fff;
    cursor: default;
  }

  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart__price[hidden] + .skpl-desktop-sticky-cart__button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991.98px) {
  html[data-sk-product-layout="auto"][data-skpl-sticky-mobile-cart="1"] .skpl-mobile-sticky-cart {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: block;
    box-sizing: border-box;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.985);
    border-top: 1px solid #dedede;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 110%, 0);
    transition:
      transform 180ms ease,
      opacity 160ms ease,
      visibility 0s linear 180ms;
  }

  html[data-sk-product-layout="auto"][data-skpl-sticky-mobile-cart="1"] .skpl-mobile-sticky-cart.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition:
      transform 180ms ease,
      opacity 160ms ease,
      visibility 0s linear 0s;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__inner {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(170px, 1.1fr);
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0;
    text-align: center;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__price .skpl-sticky-price__value {
    font-size: 21px;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #ef3128;
    border-radius: 5px;
    background: #ef3128;
    color: #fff;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__button:active {
    background: #d92b23;
    border-color: #d92b23;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__button:disabled,
  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__button[aria-disabled="true"] {
    border-color: #c9c9c9;
    background: #c9c9c9;
    color: #fff;
    cursor: default;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__price[hidden] + .skpl-mobile-sticky-cart__button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__inner {
    grid-template-columns: minmax(112px, 0.86fr) minmax(158px, 1.14fr);
    gap: 9px;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__price .skpl-sticky-price__value {
    font-size: 20px;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__price .skpl-sticky-price__label {
    font-size: 9px;
  }

  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart__button {
    padding: 0 10px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-sk-product-layout="auto"] .skpl-mobile-sticky-cart,
  html[data-sk-product-layout="auto"] .skpl-desktop-sticky-cart {
    transition: none !important;
  }
}
