/* === CENTIFOLIA – Skupina #4 (Bestsellers)
   full-bleed, centrovaná, vlastní text + tlačítko u dna === */

/* 0) Wrapper slideru nesmí ořezávat (kvůli full-bleed pozadí) */
.products-wrapper.product-slider-holder,
.products-wrapper.product-slider-holder.has-navigation {
  overflow: visible !important;
}

/* 1) Sekce – pozadí přes celou obrazovku pomocí pseudo-elementu */
#products-4,
.products.homepage-products-4,
.products[data-testid="productGroup_4"] {
  position: relative !important;
  background: transparent !important;
  padding: 20px 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  z-index: 0 !important;
  box-sizing: border-box !important;
}

/* full-bleed pruh přes celý viewport */
#products-4::before,
.products.homepage-products-4::before,
.products[data-testid="productGroup_4"]::before {
  content: "" !important;
  position: absolute !important;
  top: 0;
  left: 50% !important;
  width: 100vw !important;
  height: 100% !important;
  margin-left: -50vw !important;
  background: #f3ede3 !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

/* 2) Reset slideru a centrování vnitřního obsahu */
#products-4.product-slider,
.products.homepage-products-4.product-slider,
.products[data-testid="productGroup_4"].product-slider {
  transform: none !important;
}
#products-4 .products-block,
.products.homepage-products-4 .products-block,
.products[data-testid="productGroup_4"] .products-block {
  transform: none !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  white-space: normal !important;
}
#products-4 > .products-block,
.products.homepage-products-4 > .products-block,
.products[data-testid="productGroup_4"] > .products-block {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 15px !important;
  box-sizing: border-box !important;
}

/* 3) Použij jen první produkt jako kostru sekce */
#products-4 .product:not(:first-child),
.products.homepage-products-4 .product:not(:first-child),
.products[data-testid="productGroup_4"] .product:not(:first-child) {
  display: none !important;
}
#products-4 .product:first-child,
.products.homepage-products-4 .product:first-child,
.products[data-testid="productGroup_4"] .product:first-child {
  width: 100% !important;
  float: none !important;
  transform: none !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* 4) Dvousloupec – obrázek 56 % / box 44 % */
#products-4 .product:first-child > .p,
.products.homepage-products-4 .product:first-child > .p,
.products[data-testid="productGroup_4"] .product:first-child > .p {
  display: grid !important;
  grid-template-columns: 1.3fr 1fr !important;
  gap: 24px !important;
  align-items: stretch !important;
}

/* 5) Levý sloupec – obrazová plocha */
#products-4 .product:first-child a.image,
.products.homepage-products-4 .product:first-child a.image,
.products[data-testid="productGroup_4"] .product:first-child a.image {
  pointer-events: none !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 3 / 2 !important;
  min-height: 260px !important;
  background-image: url("https://cdn.myshoptet.com/usr/www.centifolia.cz/user/documents/upload/diagnostika.png") !important;
  background-size: cover !important;
  background-position: center !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}
#products-4 .product:first-child a.image img { display: none !important; }

/* 6) Pravý sloupec – bílý box */
#products-4 .product:first-child .p-in,
.products.homepage-products-4 .product:first-child .p-in,
.products[data-testid="productGroup_4"] .product:first-child .p-in {
  position: relative !important;
  background: #fff !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;   /* vycentruje obsah na výšku */
  align-items: center !important;
  min-height: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  text-align: center !important;
  cursor: default !important;
}

/* skryj původní obsah v boxu */
#products-4 .product:first-child .p-in-in,
#products-4 .product:first-child .p-bottom,
#products-4 .product:first-child .flags,
#products-4 .product:first-child .no-display,
#products-4 .product:first-child .p-desc {
  display: none !important;
}

/* 7) Wrapper pro text (nadpis + popis) */
#products-4 .product:first-child .p-in::before {
  content: "Diagnostika vaší pleti";
  white-space: pre-line;
  display: block;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
  color: #333;
}
#products-4 .product:first-child .p-in::before {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  color: #000;
  line-height: 1.3;
  margin-bottom: 12px;
  display: block;
}
#products-4 .product:first-child .p-in::after {
  content: "Přizpůsobte péči o pleť svému typu pleti!\A Diagnóza pleti vám pomůže vytvořit si svou kosmetickou rutinu.";
  white-space: pre-line;
  display: block;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
  color: #333;
  margin-bottom: 60px; /* rezerva pro tlačítko */
}

/* 8) Tlačítko – fixně u dna */
#products-4 .product:first-child .p-in a.cta-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block !important;
  padding: 10px 20px;
  font-size: 16px;
  line-height: 1;
  background: #37322d;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0;
  transition: background .25s ease;
  cursor: pointer;
  z-index: 15;
}
#products-4 .product:first-child .p-in a.cta-overlay:hover {
  background: #6d6665;
}

/* 9) Skryj nadpis skupiny + navigaci slideru */
.homepage-products-heading-4 { display: none !important; }
#products-4 ~ .navigation,
#products-4 ~ .slider-navigation { display: none !important; }

/* 10) Mobil */
@media (max-width: 767.98px) {
  #products-4 .product:first-child > .p {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  #products-4 {
    padding: 24px 0 !important;
    margin: 24px 0 !important;
  }
  #products-4 .product:first-child .p-in {
    padding: 16px !important;
  }
  #products-4 .product:first-child .p-in::after {
    margin-bottom: 50px;
  }
  #products-4 .product:first-child .p-in a.cta-overlay {
    bottom: 16px;
  }
}

/* === Deaktivace slideru jen pro sekci #products-4 === */
  /* vypnout transformace a posuv */
  #products-4.product-slider {
    transform: none !important;
    width: auto !important;
    overflow: visible !important;
  }
  #products-4 .products-block {
    transform: none !important;
    width: auto !important;
    display: flex !important;
    flex-wrap: wrap !important; /* aby se položky skládaly pod sebe */
  }

  /* schovat navigační šipky a pagination jen u #products-4 */
  #products-4 ~ .product-slider-pagination,
  #products-4 ~ .product-slider-navigation.navigation-prev,
  #products-4 ~ .product-slider-navigation.navigation-next {
    display: none !important;
  }