/* Česká reklamka – produktové sekce titulní stránky */
body.type-index .overall-wrapper > .content-wrapper.container:has(> .content-wrapper-in > main.content > .homepage-group-title + .products-block),
body.type-index .overall-wrapper > .content-wrapper.container:has(> .content-wrapper-in > main.content > .homepage-group-title + .products-block) > .content-wrapper-in,
body.type-index main.content:has(> .homepage-group-title + .products-block) {
  background-color: transparent;
}

body.type-index main.content > .homepage-group-title:is(.homepage-products-heading-1,.homepage-products-heading-2) {
  box-sizing: border-box;
  min-height: 44px;
  margin: clamp(24px, 3vw, 42px) 0 12px;
  padding: 4px 108px 4px 16px !important;
  border-inline-start: 4px solid #009640;
  background: transparent;
  color: #24242e;
  font-size: clamp(23px, 2.2vw, 34px);
  font-weight: 750;
  line-height: 1.15;
  display: flex;
  align-items: center;
}

body.type-index main.content > :is(.homepage-products-1,.homepage-products-2) {
  position: relative;
  box-sizing: border-box;
  margin-inline: 0;
  background-color: #fff;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 0 0 1px #deded8, 0 5px 16px rgba(30, 40, 30, .06);
}

/* Tvar a poloha šipek vůči nadpisu. Ovládání dál zajišťuje Shoptet. */
body.type-index main.content > :is(.homepage-products-1,.homepage-products-2) > :is(.slick-prev,.slick-next) {
  top: auto !important;
  bottom: calc(100% + 15px);
  margin-top: 0;
  border-radius: 9px;
}

body.type-index main.content > :is(.homepage-products-1,.homepage-products-2) > .slick-prev {
  left: auto;
  right: 51px;
}

body.type-index main.content > :is(.homepage-products-1,.homepage-products-2) > .slick-next {
  right: 3px;
}

@media (max-width: 767px) {
  body.type-index main.content > .homepage-group-title:is(.homepage-products-heading-1,.homepage-products-heading-2) {
    padding: 4px 80px 4px 12px !important;
  }
  body.type-index main.content > :is(.homepage-products-1,.homepage-products-2) > :is(.slick-prev,.slick-next) {
    bottom: calc(100% + 19px);
  }
  body.type-index main.content > :is(.homepage-products-1,.homepage-products-2) > .slick-prev {
    right: 41px;
  }
}

/* Vnitřní stránky: odsazení podle šířky obrazovky. */
body.template-11 #content-wrapper > .content-wrapper-in > main#content {
  --cr-inset: clamp(14px, 2.4vw, 36px);
}

body.template-11:is(.type-category,.type-page,.type-product,.type-search,.type-post,.type-posts-listing,.type-blog)
  #content-wrapper > .content-wrapper-in > main#content {
  box-sizing: border-box;
  min-width: 0;
  padding: var(--cr-inset);
  border-radius: 14px;
}

body.template-11:is(.type-category,.type-page,.type-product,.type-search,.type-post,.type-posts-listing,.type-blog)
  #content-wrapper {
  background-color: transparent;
}

body.template-11.type-category #content .products-top-wrapper > h2.products-top-header,
body.template-11.type-category #content > .category-top > h1,
body.template-11.type-search #content :is(#productsListHeading,.search-products-heading) {
  margin: 0 0 16px;
  padding: 3px 0 3px 12px;
  border-inline-start: 4px solid #009640;
  color: #24242e;
  font-size: clamp(23px, 2.2vw, 34px);
  line-height: 1.15;
}

/* Bílá pod celou kartou, včetně průhledných částí fotografie. */
body.template-11 main.content .products .product,
body.template-11 main.content .products .product > .p,
body.template-11 main.content .products .product .image,
body.template-11.type-product main#content .p-image,
body.template-11.type-product main#content .p-thumbnails,
body.template-11.type-category main#content .subcategories > li > a {
  background-color: #fff;
}

body.template-11:is(.type-category,.type-search) main#content :is(#products,#productsTop) {
  background-color: #fff;
  border-radius: 12px;
}

body.template-11:is(.type-page,.type-post,.type-posts-listing,.type-product) main#content {
  background-color: #fff;
}

/* Vlastní skript obchodu skrývá #productsTop. Ovladač pak nemá co rozbalit. */
body.type-category #content .products-top-wrapper:has(> #productsTop:is([hidden],[style*="display: none"],[style*="display:none"])) {
  display: none;
}

body.type-category #content #productsTop + .button-wrapper {
  position: static;
  inset: auto;
  margin: 0 0 16px;
  padding: 10px 12px;
  background: #fff;
}

body.type-category #content .category-top:not(:has(> :not(.products-top-wrapper))):has(> .products-top-wrapper > #productsTop:is([hidden],[style*="display: none"],[style*="display:none"])) {
  display: none;
}

/* Výpis s právě třemi produkty vyplní na počítači celou šířku. */
@media (min-width: 992px) {
  body.type-category.in-picjam #content #products.products-block:has(> .product:nth-child(3):last-child) > .product {
    width: calc(100% / 3);
    flex: 0 0 calc(100% / 3);
  }
  body.type-category.in-picjam #content #products.products-block:has(> .product:nth-child(3):last-child) > .product:last-child {
    border-inline-end: 0;
  }
}

/* Patička: logo, navigace, kontakt a Instagram. */
body.template-11 #footer {
  --cr-footer-gap: clamp(18px, 2.7vw, 42px);
  --cr-footer-line: #ded8ce;
  margin-top: clamp(32px, 5vw, 72px);
  padding-top: clamp(18px, 3vw, 40px);
  background: #f7f3eb;
  color: #232a25;
}

#footer .footer-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "newsletter newsletter newsletter newsletter" "brand nav contact instagram";
  gap: var(--cr-footer-gap);
  align-items: start;
  padding: 0 16px clamp(22px, 3vw, 42px);
}

#footer .footer-rows > .custom-footer { display: contents; }

#footer .footer-rows > .site-name {
  grid-area: brand;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  display: block;
  width: auto;
  max-width: 230px;
  margin: 0;
  padding: 0;
}

#footer .footer-rows > .site-name > a {
  position: static !important;
  display: block;
}

#footer .footer-rows > .site-name img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

#footer :is(.custom-footer__articles,.custom-footer__contact,.custom-footer__instagram) {
  box-sizing: border-box;
  float: none;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0 0 0 clamp(12px, 1.8vw, 28px);
  border-inline-start: 1px solid var(--cr-footer-line);
}

#footer .custom-footer__articles { grid-area: nav; }
#footer .custom-footer__contact { grid-area: contact; }
#footer .custom-footer__instagram { grid-area: instagram; }

#footer :is(.custom-footer__articles,.custom-footer__contact,.custom-footer__instagram) > .pageElement__heading {
  position: static;
  display: block;
  margin: 0 0 14px;
  padding: 0;
  color: #18251e;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.2;
}

#footer .custom-footer__articles ul { margin: 0; padding: 0; list-style: none; }
#footer .custom-footer__articles li { padding: 0; margin: 0 0 10px; }
#footer .custom-footer__articles li::before { content: none; }
#footer .custom-footer__articles a { color: #232a25; }

#footer .custom-footer__contact .contact-box {
  box-sizing: border-box;
  clear: both;
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  overflow-wrap: anywhere;
}
#footer .custom-footer__contact .contact-box::before { content: none; }

#footer .custom-footer__contact .contact-box ul {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
#footer .custom-footer__contact .contact-box li { margin: 0; }
#footer .custom-footer__contact .contact-box li:has(> :is(.mail,.tel)) { flex: 0 0 100%; }
#footer .custom-footer__contact .contact-box li:has(> :is(.facebook,.instagram,.tiktok)) a {
  font-size: 13px;
}

#footer .custom-footer__instagram .instagram-widget {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}
#footer .instagram-widget > a {
  display: block;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}
#footer .instagram-widget > a:nth-of-type(n+7) { display: none; }
#footer .instagram-widget > a img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
#footer .instagram-widget .instagram-follow-btn {
  grid-column: 1 / -1;
  width: auto;
  margin: 4px 0 0;
  text-align: start;
}

/* Formulář Shoptetu včetně CAPTCHA, validace a souhlasů. */
#footer .custom-footer__newsletter {
  grid-area: newsletter;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 16px var(--cr-footer-gap);
  width: auto;
  max-width: none;
  margin: 0;
  padding: clamp(18px, 3vw, 40px);
  border: 0;
  border-radius: 18px;
  background: linear-gradient(120deg, #155337, #0b3425);
  color: #fff;
}
#footer .custom-footer__newsletter .newsletter-header,
#footer .custom-footer__newsletter #formNewsletterWidget {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: start;
}
#footer .custom-footer__newsletter .newsletter-header h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.1;
}
#footer #formNewsletterWidget fieldset { min-width: 0; }
#footer #formNewsletterWidget .box { background: transparent; color: #fff; }
#footer #formNewsletterWidget .box h2 { color: #fff; }
#footer #formNewsletterWidget img { max-width: 100%; height: auto; }
#footer #formNewsletterWidget a { color: #fff; text-decoration: underline; }
#footer #formNewsletterWidget .btn { border-radius: 8px; }
#footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (max-width: 991px) {
  #footer .footer-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "newsletter newsletter" "brand nav" "contact instagram";
  }
  #footer .custom-footer__contact { padding-inline-start: 0; border-inline-start: 0; }
}
@media (max-width: 575px) {
  #footer .footer-rows {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "newsletter" "brand" "contact" "nav" "instagram";
  }
  #footer .custom-footer__newsletter { grid-template-columns: minmax(0, 1fr); }
  #footer :is(.custom-footer__articles,.custom-footer__contact,.custom-footer__instagram) {
    padding: 16px 0 0;
    border-inline-start: 0;
    border-top: 1px solid var(--cr-footer-line);
  }
}
