/* =========================================================
   ERGESHOP – HOMEPAGE UX
   - homepage produkty + welcome blok
   - bez zásahu do benefitů / USP / banneru
   - boxy sjednocené s kategorií
   ========================================================= */

/* =========================================================
   1) NADPISY BLOKŮ NA HOMEPAGE
   ========================================================= */

body.type-index .homepage-group-title {
  display: block !important;
  margin: 34px 0 18px 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #111 !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: Roboto, Arial, sans-serif !important;
}

body.type-index #products-1.products {
  margin-bottom: 42px !important;
}

/* =========================================================
   2) ROZTAŽENÍ HOMEPAGE CONTENTU
   ========================================================= */

body.type-index .content-wrapper-in {
  max-width: 100% !important;
}

body.type-index main#content.content.narrow {
  max-width: 100% !important;
  width: 100% !important;
}

body.type-index #content {
  max-width: 100% !important;
  width: 100% !important;
}

body.type-index .welcome-wrapper {
  max-width: 100% !important;
}

/* =========================================================
   3) GRID PRODUKTŮ NA HOMEPAGE
   ========================================================= */

body.type-index #products-1.products,
body.type-index #products-2.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  margin-top: 0 !important;
  align-items: stretch !important;
  width: 100% !important;
}

body.type-index #products-1 > .product,
body.type-index #products-2 > .product,
body.type-index #products-1 > .product.highlight-product,
body.type-index #products-2 > .product.highlight-product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  min-width: 0 !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

body.type-index #products-1 > .product.highlight-product .p,
body.type-index #products-2 > .product.highlight-product .p,
body.type-index #products-1 > .product.highlight-product .p.big,
body.type-index #products-2 > .product.highlight-product .p.big {
  min-height: 438px !important;
  padding: 0 !important;
}

body.type-index #products-1 .product .p,
body.type-index #products-2 .product .p {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 438px !important;
  border: 1px solid #dde5eb !important;
  border-radius: 0 !important;
  background: #fff !important;
  overflow: hidden !important;
  box-shadow: none !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

body.type-index #products-1 .product .p:hover,
body.type-index #products-2 .product .p:hover {
  border-color: #c4d0da !important;
  box-shadow: 0 10px 22px rgba(28, 50, 69, 0.07) !important;
  transform: translateY(-1px) !important;
}

/* =========================================================
   4) OBRÁZEK PRODUKTU
   ========================================================= */

body.type-index #products-1 .product .image,
body.type-index #products-2 .product .image {
  height: 184px !important;
  padding: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-bottom: 1px solid #eef2f5 !important;
  background: #fff !important;
}

body.type-index #products-1 .product .image img,
body.type-index #products-2 .product .image img {
  max-width: 100% !important;
  max-height: 134px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* =========================================================
   5) VNITŘEK KARTY
   ========================================================= */

body.type-index #products-1 .p-in,
body.type-index #products-2 .p-in {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  padding: 15px 16px 0 16px !important;
}

body.type-index #products-1 .p-in-in,
body.type-index #products-2 .p-in-in {
  flex: 1 1 auto !important;
}

body.type-index #products-1 .name,
body.type-index #products-2 .name {
  display: block !important;
  min-height: 74px !important;
  font-size: 14px !important;
  line-height: 1.38 !important;
  font-weight: 600 !important;
  color: #1f1f1f !important;
  text-decoration: none !important;
  margin-bottom: 10px !important;
  word-break: break-word !important;
}

body.type-index #products-1 .name:hover,
body.type-index #products-2 .name:hover {
  color: #111 !important;
  text-decoration: none !important;
}

/* ==============================================
   6) SPODNÍ ČÁST KARTY
   ============================================== */

body.type-index #products-1 .p-bottom,
body.type-index #products-2 .p-bottom {
  padding: 11px 16px 16px 16px !important;
  margin-top: auto !important;
  border-top: 1px solid #eef2f5 !important;
  background: #fcfdfe !important;
}

body.type-index #products-1 .p-bottom > [data-micro="offer"],
body.type-index #products-2 .p-bottom > [data-micro="offer"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: 100% !important;
}

body.type-index #products-1 .p-bottom > [data-micro="offer"][data-micro-availability*="InStock"]::before,
body.type-index #products-2 .p-bottom > [data-micro="offer"][data-micro-availability*="InStock"]::before {
  content: "Sofort lieferbar" !important;
  display: block !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: #2f7d32 !important;
  margin: 0 0 9px 0 !important;
}

body.type-index #products-1 .p-bottom > [data-micro="offer"][data-micro-availability*="OutOfStock"]::before,
body.type-index #products-2 .p-bottom > [data-micro="offer"][data-micro-availability*="OutOfStock"]::before,
body.type-index #products-1 .p-bottom > [data-micro="offer"][data-micro-availability*="PreOrder"]::before,
body.type-index #products-2 .p-bottom > [data-micro="offer"][data-micro-availability*="PreOrder"]::before {
  content: none !important;
}

body.type-index #products-1 .offers,
body.type-index #products-2 .offers {
  width: 100% !important;
  display: block !important;
}

body.type-index #products-1 .prices,
body.type-index #products-2 .prices,
body.type-index #products-1 .price-wrapper,
body.type-index #products-2 .price-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  min-height: 106px !important;
  width: 100% !important;
  margin-bottom: 10px !important;
}

body.type-index #products-1 .price-standard-wrapper,
body.type-index #products-2 .price-standard-wrapper {
  display: none !important;
}

body.type-index #products-1 .price-final,
body.type-index #products-2 .price-final,
body.type-index #products-1 .price,
body.type-index #products-2 .price,
body.type-index #products-1 .price strong,
body.type-index #products-2 .price strong,
body.type-index #products-1 .price-final strong,
body.type-index #products-2 .price-final strong {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.type-index #products-1 .price-final,
body.type-index #products-2 .price-final {
  margin: 0 !important;
  line-height: 1 !important;
  min-height: 0 !important;
}

body.type-index #products-1 .price-final::after,
body.type-index #products-2 .price-final::after,
body.type-index #products-1 .price::after,
body.type-index #products-2 .price::after {
  content: "inkl. MwSt. zzgl. Versand" !important;
  display: block !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  color: #6b7280 !important;
  margin-top: 5px !important;
  margin-bottom: 0 !important;
  font-weight: 400 !important;
  white-space: normal !important;
  max-width: 180px !important;
}

body.type-index #products-1 .price-final strong,
body.type-index #products-2 .price-final strong,
body.type-index #products-1 .price strong,
body.type-index #products-2 .price strong {
  font-size: 30px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #101820 !important;
  letter-spacing: -0.02em !important;
}

/* ==============================================
   7) TLAČÍTKA – sjednocení s headerem
   ============================================== */

body.type-index #products-1 .p-tools,
body.type-index #products-2 .p-tools {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: 0 !important;
}

body.type-index #products-1 .p-tools .pr-action,
body.type-index #products-2 .p-tools .pr-action {
  margin: 0 !important;
  flex: 0 0 auto !important;
}

body.type-index #products-1 .btn,
body.type-index #products-2 .btn,
body.type-index #products-1 .btn-primary,
body.type-index #products-2 .btn-primary,
body.type-index #products-1 .btn-cart,
body.type-index #products-2 .btn-cart {
  border-radius: 0 !important;
  height: 46px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}

body.type-index #products-1 .btn-cart,
body.type-index #products-2 .btn-cart {
  min-width: 56px !important;
  width: 56px !important;
  padding: 0 !important;
  background: linear-gradient(135deg, var(--rg-blue-main), var(--rg-blue-dark)) !important;
  border: 1px solid var(--rg-blue-main) !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}

body.type-index #products-1 .btn-cart:hover,
body.type-index #products-2 .btn-cart:hover {
  filter: brightness(0.92) !important;
  border-color: var(--rg-blue-main) !important;
}

body.type-index #products-1 .btn-primary,
body.type-index #products-2 .btn-primary {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding: 0 18px !important;
  background: #e3edf4 !important;
  border: 1px solid #a9bccb !important;
  color: #0f3550 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
}

body.type-index #products-1 .btn-primary:hover,
body.type-index #products-2 .btn-primary:hover {
  background: #d9e7f0 !important;
  border-color: #93aabd !important;
  color: #0d3149 !important;
}

/* ==============================================
   8) WELCOME BLOK – sjednocení s kategoriemi
   ============================================== */

body.type-index .welcome-wrapper {
  margin-top: 44px !important;
}

body.type-index .welcome h1,
body.type-index .welcome h2,
body.type-index .welcome .h1,
body.type-index .welcome .h2 {
  font-size: 32px !important;
  line-height: 1.12 !important;
  font-weight: 700 !important;
  color: #111 !important;
  margin: 0 0 16px 0 !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
}

body.type-index .welcome p {
  font-size: 16px !important;
  line-height: 1.78 !important;
  color: #3f454a !important;
  margin: 0 0 12px 0 !important;
}

body.type-index .welcome strong {
  color: #161616 !important;
  font-weight: 700 !important;
}

body.type-index .welcome a {
  color: #00AEEF !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

/* ==============================================
   9) RESPONSIVE
   ============================================== */

@media (max-width: 1480px) {
  body.type-index #products-1.products,
  body.type-index #products-2.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1100px) {
  body.type-index #products-1.products,
  body.type-index #products-2.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.type-index .homepage-group-title {
    font-size: 19px !important;
  }

  body.type-index .welcome h1,
  body.type-index .welcome h2,
  body.type-index .welcome .h1,
  body.type-index .welcome .h2 {
    font-size: 29px !important;
  }

  body.type-index .welcome p {
    font-size: 17px !important;
    line-height: 1.8 !important;
  }
}

@media (max-width: 767px) {
  body.type-index #products-1.products,
  body.type-index #products-2.products {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  body.type-index #products-1 .product .p,
  body.type-index #products-2 .product .p,
  body.type-index #products-1 > .product.highlight-product .p,
  body.type-index #products-2 > .product.highlight-product .p,
  body.type-index #products-1 > .product.highlight-product .p.big,
  body.type-index #products-2 > .product.highlight-product .p.big {
    min-height: auto !important;
  }

  body.type-index #products-1 .product .image,
  body.type-index #products-2 .product .image {
    height: 188px !important;
  }

  body.type-index #products-1 .name,
  body.type-index #products-2 .name {
    min-height: 0 !important;
    font-size: 15px !important;
    line-height: 1.46 !important;
  }

  body.type-index #products-1 .prices,
  body.type-index #products-2 .prices,
  body.type-index #products-1 .price-wrapper,
  body.type-index #products-2 .price-wrapper {
    min-height: 108px !important;
    margin-bottom: 14px !important;
  }

  body.type-index #products-1 .p-bottom > [data-micro="offer"][data-micro-availability*="InStock"]::before,
  body.type-index #products-2 .p-bottom > [data-micro="offer"][data-micro-availability*="InStock"]::before {
    font-size: 13px !important;
  }

  body.type-index #products-1 .price-final strong,
  body.type-index #products-2 .price-final strong,
  body.type-index #products-1 .price strong,
  body.type-index #products-2 .price strong {
    font-size: 26px !important;
  }

  body.type-index #products-1 .price-final::after,
  body.type-index #products-2 .price-final::after,
  body.type-index #products-1 .price::after,
  body.type-index #products-2 .price::after {
    font-size: 13px !important;
    max-width: 190px !important;
  }

  body.type-index #products-1 .btn,
  body.type-index #products-2 .btn,
  body.type-index #products-1 .btn-primary,
  body.type-index #products-2 .btn-primary,
  body.type-index #products-1 .btn-cart,
  body.type-index #products-2 .btn-cart {
    height: 46px !important;
    font-size: 11px !important;
  }

  body.type-index #products-1 .btn-cart,
  body.type-index #products-2 .btn-cart {
    min-width: 54px !important;
    width: 54px !important;
  }

  body.type-index .welcome h1,
  body.type-index .welcome h2,
  body.type-index .welcome .h1,
  body.type-index .welcome .h2 {
    font-size: 27px !important;
    line-height: 1.14 !important;
  }

  body.type-index .welcome p {
    font-size: 17px !important;
    line-height: 1.82 !important;
  }
}

