/* Global branded footer. Content remains editable through Shoptet banners. */
#footer { margin-top: 0; background: #351d0d; color: #f7f1e7; }
#footer .footer-rows { max-width: 1380px; padding: 58px 30px 42px; background: transparent; }
#footer .custom-footer {
  display: grid !important;
  grid-template-columns: 1.05fr .95fr .95fr 1.15fr;
  gap: clamp(34px,4vw,68px);
  align-items: start;
  padding: 0 !important;
}
#footer .custom-footer > [class*="custom-footer__banner"] { width: auto !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
#footer .custom-footer .banner,
#footer .custom-footer .banner-wrapper { height: 100%; margin: 0; padding: 0; background: transparent; }
#footer .custom-footer h4,
#footer .custom-footer h5,
#footer .custom-footer .topic { margin: 0 0 19px; color: #fff !important; font: inherit; font-size: 18px; font-weight: 800; line-height: 1.25; }
#footer .custom-footer p { color: #d9cabe; }
#footer .custom-footer ul { margin: 0; padding: 0; list-style: none; }
#footer .custom-footer li { margin: 0 0 10px; line-height: 1.4; }
#footer .custom-footer a { color: #e7d8ca !important; text-decoration: none; transition: color .18s ease; }
#footer .custom-footer a:hover { color: #e8ad5f !important; text-decoration: underline; }
#footer .custom-footer__banner5 {
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
}
#footer .custom-footer__banner5 .banner {
  padding: 28px !important;
  box-sizing: border-box;
}
#footer .custom-footer__banner5 img[alt="Chocolenka"] { width: 145px; max-height: 70px; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .96; }
#footer .custom-footer__banner5 strong { color: #fff; }
#footer .custom-footer__banner5 .project-phone,
#footer .custom-footer__banner5 .project-email { color: #fff !important; font-weight: 700; }
#footer .custom-footer__instagram { display: none !important; }
#footer .footer-links-icons {
  max-width: none;
  padding: 28px max(30px,calc((100% - 1320px)/2));
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,.12);
  background: #351d0d;
}
#footer .footer-icons {
  width: 100%;
  max-width: 1320px;
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(380px,1fr);
  gap: 16px;
}
#footer .ch-footer-logo-group {
  min-width: 0;
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #eadbca;
  border-radius: 12px;
  background: #f7f1e7;
}
#footer .ch-footer-logo-title {
  flex: 0 0 auto;
  margin: 0;
  color: #6b3c16;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
#footer .ch-footer-logo-row {
  min-width: 0;
  width: 100%;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 16px 22px;
}
#footer .footer-icon { margin: 0; display: flex; align-items: center; justify-content: center; }
#footer .footer-icon img { width: auto; max-width: 82px; max-height: 29px; object-fit: contain; }
#footer .ch-footer-logo-group--delivery .footer-icon img { max-width: 96px; }
#footer .ch-footer-icon--basileus { display: flex !important; width: 96px; height: 30px; visibility: visible !important; opacity: 1 !important; }
#footer .ch-footer-icon--basileus a {
  width: 96px;
  height: 30px;
  display: block !important;
  background: url('/user/documents/basileus-logo.svg?v=20260721-1') center / contain no-repeat;
}
#footer .ch-footer-icon--basileus img { width: 96px !important; height: 30px !important; display: block !important; opacity: 0; }
#footer .footer-bottom { max-width: 1380px; padding: 23px 30px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.12); background: transparent; color: #cdbbac; }
#footer .footer-bottom a { color: #f1dfcf; }
#footer .footer-bottom .image { filter: brightness(0) invert(1); opacity: .7; }
#footer .ch-footer-creators { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
#footer .ch-footer-coded { display: inline-flex; align-items: center; color: #f1dfcf; white-space: nowrap; }
#footer .ch-footer-coded::before { content: "•"; margin-right: 9px; color: #d27d1d; }
#footer .ch-footer-top-firma { margin-top: 16px; }
#footer .ch-footer-top-firma a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  transition: transform .18s ease, box-shadow .18s ease;
}
#footer .ch-footer-top-firma a:hover {
  transform: translateY(-2px);
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
#footer .ch-footer-top-firma img {
  width: 138px;
  height: 120px;
  display: block;
  object-fit: contain;
}

@media (max-width: 991px) {
  #footer .custom-footer { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 38px 34px; }
  #footer .footer-icons { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  #footer .footer-rows { padding: 42px 20px 34px; }
  #footer .custom-footer { grid-template-columns: 1fr; gap: 32px; }
  #footer .custom-footer__banner5 { padding: 0 !important; }
  #footer .custom-footer__banner5 .banner { padding: 22px !important; }
  #footer .footer-links-icons { padding: 22px 18px; }
  #footer .footer-icons { gap: 12px; }
  #footer .ch-footer-logo-group { padding: 18px; gap: 15px; }
  #footer .ch-footer-logo-title { white-space: normal; }
  #footer .ch-footer-logo-row { flex-wrap: wrap; gap: 16px 20px; }
  #footer .footer-icon img { max-width: 72px; max-height: 27px; }
  #footer .ch-footer-logo-group--delivery .footer-icon img { max-width: 84px; }
  #footer .footer-bottom { padding: 22px 20px; flex-direction: column; align-items: flex-start; gap: 14px; }
  #footer .ch-footer-creators { gap: 5px 8px; }
  #footer .ch-footer-coded::before { margin-right: 8px; }
}

/* Global header guard: keep the desktop search action as a circular icon. */
@media (min-width: 992px) {
  #footer .custom-footer {
    padding-top: 16px !important;
  }

  html body #header .search-form button[type="submit"],
  html body #header button[data-testid="searchBtn"] {
    min-width: 44px !important;
    width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    margin: 0 5px 0 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #6a3b17 !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    box-shadow: 0 3px 10px rgba(96,57,20,.18) !important;
  }
  html body #header .search-form button[type="submit"]::before,
  html body #header button[data-testid="searchBtn"]::before {
    content: "" !important;
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    display: block !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.2 4.2'/%3E%3C/svg%3E") center / contain no-repeat !important;
    transform: none !important;
  }
  html body #header .search-form button[type="submit"]:hover,
  html body #header button[data-testid="searchBtn"]:hover {
    background: #c97921 !important;
  }
}

/* Category and search product cards — visually aligned with the homepage product system. */
:is(body.type-category, body.type-search) #products.products-block {
  gap: 18px 0;
  align-items: stretch;
  background: transparent;
}
:is(body.type-category, body.type-search) #products.products-block > .product {
  min-width: 0;
  padding: 9px;
  display: flex;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #f5efe6;
  box-shadow: 0 5px 18px rgba(53,29,13,.045);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
:is(body.type-category, body.type-search) #products.products-block > .product:hover {
  z-index: 2;
  border-color: #ead9c6;
  box-shadow: 0 13px 30px rgba(53,29,13,.1);
  transform: translateY(-2px);
}
:is(body.type-category, body.type-search) #products.products-block .product > .p {
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
:is(body.type-category, body.type-search) #products.products-block .image {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}
:is(body.type-category, body.type-search) #products.products-block .image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .3s ease;
}
:is(body.type-category, body.type-search) #products.products-block .product:hover .image img {
  transform: scale(1.025);
}
:is(body.type-category, body.type-search) #products.products-block .p-in {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 13px 3px 3px;
}
:is(body.type-category, body.type-search) #products.products-block .p-in-in {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
:is(body.type-category, body.type-search) #products.products-block .name {
  min-height: 42px;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #321b0d;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
:is(body.type-category, body.type-search) #products.products-block .ratings-wrapper {
  min-height: 34px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}
:is(body.type-category, body.type-search) #products.products-block .stars-wrapper {
  width: auto !important;
  max-width: max-content;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1;
}
:is(body.type-category, body.type-search) #products.products-block .stars-wrapper::after {
  content: attr(data-micro-rating-value) " / 5 (" attr(data-micro-rating-count) ")";
  color: #6d5949;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
:is(body.type-category, body.type-search) #products.products-block .stars {
  display: inline-flex;
  align-items: center;
}
:is(body.type-category, body.type-search) #products.products-block .star {
  margin-right: 1px;
}
:is(body.type-category, body.type-search) #products.products-block .availability {
  width: auto !important;
  max-width: max-content;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf6e9;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
:is(body.type-category, body.type-search) #products.products-block .availability span {
  color: #248315 !important;
}
:is(body.type-category, body.type-search) #products.products-block .p-bottom {
  margin-top: auto;
  padding-top: 7px;
}
:is(body.type-category, body.type-search) #products.products-block .p-bottom > div[data-micro="offer"] {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
:is(body.type-category, body.type-search) #products.products-block .prices {
  min-width: 0;
  margin: 0;
}
:is(body.type-category, body.type-search) #products.products-block .price-final {
  color: #24170f;
  font-family: inherit;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}
:is(body.type-category, body.type-search) #products.products-block .p-tools {
  margin: 0 0 0 auto;
}
:is(body.type-category, body.type-search) #products.products-block .btn-cart,
:is(body.type-category, body.type-search) #products.products-block .btn-primary {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #d17b1b;
  border-radius: 6px;
  background: #d17b1b;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
:is(body.type-category, body.type-search) #products.products-block .btn-cart:hover,
:is(body.type-category, body.type-search) #products.products-block .btn-primary:hover {
  border-color: #b56512;
  background: #b56512;
  transform: translateY(-1px);
}
:is(body.type-category, body.type-search) #products.products-block .p-desc {
  display: none;
}
:is(body.type-category, body.type-search) #products.products-block .flags {
  top: 10px;
  left: 10px;
}
:is(body.type-category, body.type-search) #products.products-block .flag {
  margin-bottom: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

@media (max-width: 767px) {
  :is(body.type-category, body.type-search) #products.products-block {
    margin-left: -5px;
    margin-right: -5px;
  }
  :is(body.type-category, body.type-search) #products.products-block > .product {
    padding: 6px;
    border-radius: 9px;
    box-shadow: 0 4px 14px rgba(53,29,13,.055);
  }
  :is(body.type-category, body.type-search) #products.products-block .image {
    border-radius: 7px;
  }
  :is(body.type-category, body.type-search) #products.products-block .p-in {
    padding: 10px 2px 2px;
  }
  :is(body.type-category, body.type-search) #products.products-block .name {
    min-height: 38px;
    font-size: 13px;
    line-height: 1.4;
  }
  :is(body.type-category, body.type-search) #products.products-block .ratings-wrapper {
    min-height: 29px;
    margin-top: 7px;
    gap: 5px;
  }
  :is(body.type-category, body.type-search) #products.products-block .stars-wrapper::after {
    display: none;
  }
  :is(body.type-category, body.type-search) #products.products-block .star {
    margin-right: 0;
    transform: scale(.88);
    transform-origin: left center;
  }
  :is(body.type-category, body.type-search) #products.products-block .availability {
    padding: 4px 7px;
    font-size: 9px;
  }
  :is(body.type-category, body.type-search) #products.products-block .p-bottom {
    padding-top: 5px;
  }
  :is(body.type-category, body.type-search) #products.products-block .p-bottom > div[data-micro="offer"] {
    min-height: 0;
    display: block;
  }
  :is(body.type-category, body.type-search) #products.products-block .price-final {
    margin-bottom: 8px;
    font-size: 18px;
  }
  :is(body.type-category, body.type-search) #products.products-block .p-tools {
    width: 100%;
    margin: 0;
  }
  :is(body.type-category, body.type-search) #products.products-block .p-tools form,
  :is(body.type-category, body.type-search) #products.products-block .btn-cart,
  :is(body.type-category, body.type-search) #products.products-block .btn-primary {
    width: 100%;
  }
  :is(body.type-category, body.type-search) #products.products-block .btn-cart,
  :is(body.type-category, body.type-search) #products.products-block .btn-primary {
    min-height: 40px;
    padding: 8px 6px;
    font-size: 12px;
  }
}

/*
 * Semantic availability colours
 *
 * Shoptet supplies the status colour inline. The redesign turns that value
 * into a readable pill, so the mapping stays correct across all languages.
 */
.products-block .availability {
  width: auto !important;
  max-width: max-content;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid #e2dcd6 !important;
  border-radius: 999px;
  background: #f3f1ee !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.products-block .availability > span {
  color: #5d534c !important;
}

/* Skladem + Ruční výroba – odeslání do 5 dnů */
.products-block .availability:has(> span[style*="#009901" i]) {
  border-color: #d6e9cf !important;
  background: #edf6e9 !important;
}

.products-block .availability:has(> span[style*="#009901" i]) > span {
  color: #248315 !important;
}

/* Momentálně nedostupné + Vyprodáno */
.products-block .availability:has(> span[style*="#cb0000" i]) {
  border-color: #f1cbc7 !important;
  background: #fdeceb !important;
}

.products-block .availability:has(> span[style*="#cb0000" i]) > span {
  color: #b4231b !important;
}

/* Předobjednávky + termín bude upřesněn */
.products-block .availability:has(> span[style*="#f8a102" i]) {
  border-color: #f0d3ad !important;
  background: #fff3e3 !important;
}

.products-block .availability:has(> span[style*="#f8a102" i]) > span {
  color: #b8670a !important;
}

/* Na objednání, nahrazeno, vyrábíme */
.products-block .availability:has(> span[style*="#3166ff" i]) {
  border-color: #cad9ee !important;
  background: #edf4ff !important;
}

.products-block .availability:has(> span[style*="#3166ff" i]) > span {
  color: #245fae !important;
}

@media (max-width: 767px) {
  .products-block .availability {
    max-width: 100%;
    white-space: normal;
    text-align: right;
  }
}

/* Newsletter submit: show only the branded label, not Shoptet's native text. */
html body .custom-footer__newsletter button[type="submit"].btn-arrow-right {
  font-size: 0 !important;
}
html body .custom-footer__newsletter button[type="submit"] .ch-newsletter-submit-text {
  font-size: 13px !important;
  line-height: 1.2;
}

/* Custom-production page typography: neutralize its embedded Inter override. */
html body.id-1585,
html body.in-zakazkova-vyroba {
  font-family: "Exo 2", sans-serif !important;
}
html body.id-1585 .choco-wrap,
html body.id-1585 .choco-wrap *,
html body.in-zakazkova-vyroba .choco-wrap,
html body.in-zakazkova-vyroba .choco-wrap * {
  font-family: inherit !important;
}

/* Homepage flow: remove stacked spacing between articles and product reviews. */
html body.in-index .homepage-blog-wrapper {
  margin-bottom: 24px !important;
}
html body.in-index main.content {
  padding-bottom: 0 !important;
}
html body.in-index .latest-contribution-box {
  margin-top: 0 !important;
}
html body.in-index .latest-contribution-box > .content-wrapper-in > .container,
html body.in-index .latest-contribution-box .container {
  padding-top: 32px !important;
}

@media (max-width: 767px) {
  html body.in-index .homepage-blog-wrapper {
    margin-bottom: 16px !important;
  }
  html body.in-index .latest-contribution-box > .content-wrapper-in > .container,
  html body.in-index .latest-contribution-box .container {
    padding-top: 28px !important;
  }
}

/* Search results: present categories, brands and articles as branded discovery cards. */
body.type-search #content > h2 {
  margin: 12px 0 22px;
  color: #321b0d;
  font-size: clamp(25px, 2vw, 34px);
  font-weight: 800;
  line-height: 1.2;
}

body.type-search .search-results-groups {
  margin: 0 0 34px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border: 1px solid #ead9c6;
  border-radius: 14px;
  background: #fbf7f1;
  box-shadow: 0 8px 24px rgba(53, 29, 13, .05);
}

body.type-search .search-results-group {
  min-width: 0;
  padding: 20px;
  border: 1px solid #ead9c6;
  border-radius: 11px;
  background: #fff;
}

body.type-search .search-results-group h4 {
  margin: 0 0 14px;
  color: #321b0d;
  font-size: 18px;
  font-weight: 800;
}

body.type-search .search-results-group-list {
  display: grid;
  gap: 8px;
}

body.type-search .search-results-group-list a {
  color: #5c3318;
  font-weight: 600;
  text-decoration: none;
}

body.type-search .search-results-group-list a:hover {
  color: #d17b1b;
}

body.type-search .display-results-group {
  width: fit-content;
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  color: #b56512;
  font-weight: 800;
  text-decoration: none;
}

body.type-search .display-results-group::after {
  content: " →";
}

body.type-search #products-found > h2,
body.type-search #products-found > h3 {
  margin-bottom: 20px;
  color: #321b0d;
  font-weight: 800;
}

/* The announcement bar must remain the top-most header layer while scrolling. */
html body .site-msg {
  z-index: 1000 !important;
}

@media (max-width: 767px) {
  body.type-search #content > h2 {
    margin-bottom: 16px;
    font-size: 25px;
  }

  body.type-search .search-results-groups {
    margin-bottom: 24px;
    padding: 12px;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: 11px;
  }

  body.type-search .search-results-group {
    padding: 16px;
    border-radius: 9px;
  }
}
