/* ==========================================================
   CHAOTIT CUSTOM CSS
   Vlastní úpravy e-shopu chaotit.cz
   ========================================================== */


/* ==========================================================
   1. VLASTNÍ PATIČKA
   ========================================================== */

.chaotit-custom-footer {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.25fr;
  gap: 90px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 65px 40px 45px;
  background: #fff;
}

.chaotit-custom-footer h3 {
  margin: 0 0 22px;
  color: #111;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.chaotit-custom-footer p,
.chaotit-custom-footer a {
  display: block;
  margin: 0 0 10px;
  color: #222;
  font-size: 15px;
  line-height: 1.55;
  text-decoration: none;
}

.chaotit-custom-footer a:hover {
  color: #7eb829 !important;
}


/* ==========================================================
   2. SOCIÁLNÍ SÍTĚ V PATIČCE
   ========================================================== */

.chaotit-social-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.chaotit-social-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.chaotit-social-icon {
  width: 20px;
  min-width: 20px;
  color: #111;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}


/* ==========================================================
   3. PLATEBNÍ IKONY V PATIČCE
   ========================================================== */

.chaotit-payments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.chaotit-visa {
  color: #1a1f71;
  font-size: 28px;
  font-style: italic;
  font-weight: 900;
}

.chaotit-mastercard {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 28px;
}

.chaotit-mastercard::before,
.chaotit-mastercard::after {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.chaotit-mastercard::before {
  left: 0;
  background: #eb001b;
}

.chaotit-mastercard::after {
  right: 0;
  background: #f79e1b;
  mix-blend-mode: multiply;
}

.chaotit-pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #222;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.chaotit-google-pay {
  border: 0;
  font-size: 17px;
}

.chaotit-pay-img {
  width: auto;
  height: 50px;
  object-fit: contain;
}


/* ==========================================================
   4. PRODUKTOVÉ CAROUSELY
   ========================================================== */

.products-block.slick-initialized {
  transition: opacity 0.25s ease;
}


/* ==========================================================
   5. BLOG NA HOMEPAGE
   ========================================================== */

.homepage-blog-wrapper .news-item .image {
  height: auto !important;
  overflow: visible !important;
  aspect-ratio: 583 / 330 !important;
}

.homepage-blog-wrapper .news-item .image img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
}

.chaotit-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.chaotit-blog-card {
  display: block;
  background: #fff;
  color: #111;
  text-decoration: none;
}

.chaotit-blog-card__image {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 581 / 330;
  background: #fff;
}

.chaotit-blog-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chaotit-blog-card__text {
  box-sizing: border-box;
  height: 90px;
  overflow: hidden;
  padding: 22px 25px 14px;
  background: #fff;
}

.chaotit-blog-card__title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}


/* ==========================================================
   6. SEKUNDÁRNÍ TLAČÍTKO „ZOBRAZIT“
   Cílí pouze na tlačítko obsahující vlastní ikonku oka.
   Tlačítka „Do košíku“ zůstávají beze změny.
   ========================================================== */

.products-block.products .product a.btn.btn-primary:has(.eye-icon) {
  position: relative !important;
  z-index: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden !important;
  isolation: isolate;

  background: transparent !important;
  color: #4d7418 !important;
  border: 3px solid #7eb829 !important;
  box-shadow: none !important;

  font-weight: 700 !important;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Titan vykresluje viditelné pozadí přes pseudoelement ::after. */
.products-block.products .product a.btn.btn-primary:has(.eye-icon)::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: -1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;

  background: #eef7e3 !important;
  opacity: 1 !important;
  pointer-events: none !important;

  transition: background-color 0.2s ease;
}

/* Skryje původní dekorativní ikonu šablony. */
.products-block.products .product a.btn.btn-primary:has(.eye-icon)::before {
  display: none !important;
  content: none !important;
}

/* Udrží text a oko nad barevným pozadím. */
.products-block.products .product a.btn.btn-primary:has(.eye-icon) .eye-icon,
.products-block.products .product a.btn.btn-primary:has(.eye-icon) .btn-text {
  position: relative;
  z-index: 1;
}

.products-block.products .product a.btn.btn-primary:has(.eye-icon) .eye-icon {
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.products-block.products .product a.btn.btn-primary:has(.eye-icon) .eye-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.products-block.products .product a.btn.btn-primary:has(.eye-icon) .btn-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* Hover: výraznější zelená, ale stále odlišná od hlavního CTA. */
.products-block.products .product a.btn.btn-primary:has(.eye-icon):hover {
  color: #fff !important;
  border-color: #6b9925 !important;
  box-shadow: 0 3px 10px rgba(94, 135, 33, 0.2) !important;
  transform: translateY(-1px);
}

.products-block.products .product a.btn.btn-primary:has(.eye-icon):hover::after {
  background: #6b9925 !important;
}


/* ==========================================================
   7. OPRAVY ŠABLONY
   ========================================================== */

/* Oprava rozbitých ikon u filtrů. */
#filters h4::before {
  display: none !important;
  content: none !important;
}


/* ==========================================================
   8. RESPONZIVNÍ ÚPRAVY
   ========================================================== */

@media (max-width: 900px) {
  .chaotit-custom-footer {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 45px 25px 35px;
  }

  .chaotit-blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .chaotit-custom-footer {
    grid-template-columns: 1fr;
  }
}
<style>
@media (max-width: 767px) {
  .products-block .product .p-bottom.single-button {
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }

  .products-block .product .p-bottom.single-button .p-tools {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .products-block .product .p-bottom.single-button .btn-primary {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
}
</style>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "CHAOTIT",
  "url": "https://www.chaotit.cz/",
  "hasMerchantReturnPolicy": {
    "@type": "MerchantReturnPolicy",
    "applicableCountry": "CZ",
    "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
    "merchantReturnDays": 14,
    "returnMethod": "https://schema.org/ReturnByMail",
    "returnFees": "https://schema.org/ReturnFeesCustomerResponsibility",
    "merchantReturnLink": "https://www.chaotit.cz/obchodni-podminky/"
  }
  
}

</script>

<style>
/* Skrytí sekce Nejprodávanější v kategoriích */
.type-category .products-top-wrapper {
    display: none !important;
}
</style>

<script>
document.addEventListener("DOMContentLoaded", function () {
    if (!document.body.classList.contains("ordering-process")) return;

    var giftsBlock = document.querySelector(".cart-summary");
    var helpBlock = document.querySelector(".checkout-box-wrapper");

    if (!giftsBlock || !helpBlock) return;

    var giftsHeading = giftsBlock.querySelector("h2");
    var helpHeading = helpBlock.querySelector("h2");

    if (
        !giftsHeading ||
        !helpHeading ||
        giftsHeading.textContent.trim() !== "Dárky a slevy" ||
        helpHeading.textContent.trim() !== "Potřebujete pomoc?"
    ) {
        return;
    }

    giftsBlock.replaceWith(helpBlock);
    helpBlock.classList.add("chaotit-cart-help");
});
</script>

<script>
document.addEventListener("DOMContentLoaded", function () {
    if (!document.body.classList.contains("ordering-process")) return;

    var giftsBlock = document.querySelector(".cart-summary");
    var helpBlock = document.querySelector(".checkout-box-wrapper");

    if (!giftsBlock || !helpBlock) return;

    var giftsHeading = giftsBlock.querySelector("h2");
    var helpHeading = helpBlock.querySelector("h2");

    if (
        !giftsHeading ||
        !helpHeading ||
        giftsHeading.textContent.trim() !== "Dárky a slevy" ||
        helpHeading.textContent.trim() !== "Potřebujete pomoc?"
    ) {
        return;
    }

    /* Přesun kontaktu na místo Dárky a slevy */
    giftsBlock.replaceWith(helpBlock);
    helpBlock.classList.add("chaotit-cart-help");

    /*
     * Srovnání telefonu s textem e-mailu.
     * Najdeme telefon podle jeho obsahu, takže nejsme závislí
     * na konkrétní Shoptet třídě.
     */
    var elements = helpBlock.querySelectorAll("a, p, li, span, div");

    elements.forEach(function (el) {
        var text = el.textContent.trim();

        if (
            text === "+420 773 597 137" ||
            text === "420 773 597 137"
        ) {
            el.classList.add("chaotit-cart-phone");
        }
    });
});
</script>

<style>
/* =========================================================
   KONTAKT V KOŠÍKU
   ========================================================= */

.ordering-process .chaotit-cart-help {
    width: 450px !important;
    max-width: 100% !important;
    margin: 35px 0 20px !important;
    padding: 0 !important;
}

/* Potřebujete pomoc? */
.ordering-process .chaotit-cart-help > h2 {
    margin: 0 0 14px !important;
    padding: 0 !important;

    font-size: 24px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

/* Kontaktní box */
.ordering-process .chaotit-cart-help .box {
    width: 100% !important;
    max-width: 450px !important;
    margin: 0 !important;
    padding: 20px 22px !important;

    box-sizing: border-box !important;

    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
}

/* Vnitřní obsah */
.ordering-process .chaotit-cart-help .box,
.ordering-process .chaotit-cart-help .box * {
    text-align: left !important;
}

/* Miloslav Zíka */
.ordering-process .chaotit-cart-help strong {
    display: block !important;
    margin: 0 0 10px !important;

    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}

/* Seznam kontaktů */
.ordering-process .chaotit-cart-help ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.ordering-process .chaotit-cart-help li {
    margin: 0 0 7px !important;
    padding: 0 !important;
}

/* Velikost e-mailu a telefonu */
.ordering-process .chaotit-cart-help a,
.ordering-process .chaotit-cart-help li,
.ordering-process .chaotit-cart-help p {
    font-size: 14px !important;
    line-height: 1.45 !important;
}

/* E-mail */
.ordering-process .chaotit-cart-help a[href^="mailto:"] {
    display: inline-flex !important;
    align-items: center !important;
}

/*
 * Telefon posuneme doprava tak,
 * aby začínal stejně jako text e-mailu za obálkou.
 */
.ordering-process .chaotit-cart-help .chaotit-cart-phone {
    margin-left: 25px !important;
}

/* MOBIL */
@media (max-width: 767px) {

    .ordering-process .chaotit-cart-help {
        width: 100% !important;
        margin-top: 25px !important;
    }

    .ordering-process .chaotit-cart-help > h2 {
        font-size: 21px !important;
    }

    .ordering-process .chaotit-cart-help .box {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px 18px !important;
    }
}
/* =========================================================
   COOKIE LIŠTA – tlačítko Nastavení
   ========================================================= */

.siteCookies .siteCookies__link {
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid #ffffff !important;
    opacity: 1 !important;

    padding: 9px 16px !important;
    border-radius: 2px !important;

    font-weight: 600 !important;
    text-decoration: none !important;

    transition:
        background-color 0.2s ease,
        color 0.2s ease !important;
}

/* Hover */
.siteCookies .siteCookies__link:hover {
    color: #222222 !important;
    background: #ffffff !important;
    border-color: #ffffff !important;
    text-decoration: none !important;
}
</style>