/* Boxxi PDP related products — narrow offline candidate.
 * Match the ID specificity inherited by :is(#products,.products-block).
 * Native active/inactive state and next/previous controls remain the owner.
 */
@media (min-width:801px) {
 html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"] body.template-11.type-product:not(.ordering-process) #content .p-detail > :is(#products,.products-block).products-related.p-switchable {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:23px;
 }
}
/* The native "show all" control adds this class. Existing global !important
 * inactive/small-screen hides must not override that explicit native state.
 * Explicit hidden/js-hidden products remain excluded.
 */
html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"] body.template-11.type-product:not(.ordering-process) #content .p-detail > :is(#products,.products-block).products-related.p-switchable.show-all-related > .product:not([hidden]):not(.js-hidden) {
 display:flex!important;
}

/* WEB-027: tablet account forms have no spare gutter for the 36px fixed tab.
 * Mobile <=767px already has the same exact-widget exclusion in native CSS.
 * Keep reviews reachable through the existing first-party footer link. Fail open
 * if that link is absent; do not remove the widget, ratings, data, or SDK.
 */
@media (min-width:767px) and (max-width:1024px) {
 html[lang|="cs"][data-boxxi-native="1"] body.template-11:is(.in-login,.in-registrace,.customer-page):not(.ordering-process):has(#footer .footer-bottom > a.bxn-verified-reviews[href="https://obchody.heureka.cz/boxxi-cz/recenze/"]:not([hidden]):not([aria-hidden="true"])) #hw-87kwowifjjowiklsadh666left {
  display:none!important;
 }
}

/* WEB032: readable type in the native product-detail purchase form only.
   Preserve native form behavior, variants, availability colors, prices,
   quantity controls, product cards, gallery, and lower content. */
html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"]
body.template-11.type-product:not(.ordering-process)
#content .p-detail[data-bxpf-active="1"] #product-detail-form
.p-info-wrapper > .p-short-description {
  font-size: 16px;
  line-height: 1.65;
}

html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"]
body.template-11.type-product:not(.ordering-process)
#content .p-detail[data-bxpf-active="1"] #product-detail-form
.p-info-wrapper > .availability-value,
html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"]
body.template-11.type-product:not(.ordering-process)
#content .p-detail[data-bxpf-active="1"] #product-detail-form
.p-info-wrapper > .availability-value .availability-label {
  font-size: 15px;
  line-height: 1.5;
}

html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"]
body.template-11.type-product:not(.ordering-process)
#content .p-detail[data-bxpf-active="1"] #product-detail-form
.p-info-wrapper > .add-to-cart > .add-to-cart-button {
  font-size: 18px;
  line-height: 1.4;
}

@media (max-width:800px) {
  html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"]
  body.template-11.type-product:not(.ordering-process)
  #content .p-detail[data-bxpf-active="1"] #product-detail-form
  .p-info-wrapper > .add-to-cart > .add-to-cart-button {
    font-size: 16px;
  }
}

/* WEB031: two ready-food links are native tiles, not presenter-owned cards.
   Reset the native 51px/70px tile cap only after imagery v2 owns either route. */
html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"]
body.template-11.type-category:not(.ordering-process)
.category-top > .subcategories > li >
a[data-bxst-kind="listing"][data-bxst-owned="2"]:is([href$="/sous-vide-masa/"],[href$="/hotove-pokrmy-z-ryb-a-krevet/"]) {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
}

html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"]
body.template-11.type-category:not(.ordering-process)
.category-top > .subcategories > li >
a[data-bxst-kind="listing"][data-bxst-owned="2"]:is([href$="/sous-vide-masa/"],[href$="/hotove-pokrmy-z-ryb-a-krevet/"]) > .text {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  padding: 14px 36px 14px 16px;
  font-size: 18px;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"]
body.template-11.type-category:not(.ordering-process)
.category-top > .subcategories > li >
a[data-bxst-kind="listing"][data-bxst-owned="2"]:is([href$="/sous-vide-masa/"],[href$="/hotove-pokrmy-z-ryb-a-krevet/"])::before {
  top: auto;
  right: 14px;
  bottom: 22px;
  margin-top: 0;
}

@media (max-width:800px) {
  html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"]
  body.template-11.type-category:not(.ordering-process)
  .category-top > .subcategories > li >
  a[data-bxst-kind="listing"][data-bxst-owned="2"]:is([href$="/sous-vide-masa/"],[href$="/hotove-pokrmy-z-ryb-a-krevet/"]) > .text {
    font-size: 16px;
    padding-left: 12px;
    padding-right: 28px;
  }
}

/* WEB033: POBO fallback image in the legacy review widget only.
   The failed relative placeholder has no provenance value. Keep all review
   text, genuine attribution images, recipes, and POBO lazy-loading untouched.
   A later real src automatically stops matching this rule. */
html[lang|="cs"][data-boxxi-native="1"]
body.template-11.type-product:not(.ordering-process)
#content .p-detail .evaluation-review-sites
.pb-evaluation-two__single > img.pb-evaluation-two__logo[src="placeholder.png"]:not([srcset]) {
  display: none !important;
}

/* Boxxi mobile menu layer repair v1 — offline candidate.
 * The legacy sticky-header addon raises the closed header's topbar to9999
 * while the native drawer is inside the header's56 stacking context.
 * Restore the addon's normal topbar layer only while the drawer is open.
 * Native menu controls, focus, close button, scroll and interactions stay owned by Shoptet.
 */
@media (max-width:767px){
 html[data-boxxi-native="1"][data-bxl-layout="1"] body.template-11.sticky-mobile.navigation-window-visible:not(.ordering-process) .top-navigation-bar{
  z-index:9!important;
 }
}

/* WEB033: derive visible related cards from the native active window.
   Static related-sm-screen-hide/show classes describe original positions only.
   Keep the native index and explicit show-all/hidden states unchanged. */
html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"]
body.template-11.type-product:not(.ordering-process)
#content .p-detail > :is(#products,.products-block).products-related.p-switchable:not(.show-all-related)
> .product.active:not(.inactive):not([hidden]):not(.js-hidden) {
  display: flex !important;
}

@media (max-width:800px) {
  /* The third and following eligible active siblings stay hidden on two columns.
     Unlike nth-child(n+3), inactive/explicitly hidden earlier cards do not count. */
  html[lang|="cs"][data-boxxi-native="1"][data-bxcf-commerce="1"]
  body.template-11.type-product:not(.ordering-process)
  #content .p-detail > :is(#products,.products-block).products-related.p-switchable:not(.show-all-related)
  > .product.active:not(.inactive):not([hidden]):not(.js-hidden)
  ~ .product.active:not(.inactive):not([hidden]):not(.js-hidden)
  ~ .product.active:not(.inactive):not([hidden]):not(.js-hidden) {
    display: none !important;
  }
}

/* WEB031 follow-up: equal mobile ready-food cards despite unequal title wrapping.
   Native UL keeps its own layout; only the two owned LI opt into row stretching.
   Load after boxxi-ready-tiles-v1.css. Desktop and menu are outside this scope. */
@media (max-width: 800px) {
  html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"]
  body.template-11.type-category:not(.ordering-process)
  .category-top > .subcategories > li:has(> a[data-bxst-kind="listing"][data-bxst-owned="2"]:is([href$="/sous-vide-masa/"],[href$="/hotove-pokrmy-z-ryb-a-krevet/"])) {
    align-self: stretch;
    display: flex;
    align-items: stretch;
  }

  html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"]
  body.template-11.type-category:not(.ordering-process)
  .category-top > .subcategories > li > a[data-bxst-kind="listing"][data-bxst-owned="2"]:is([href$="/sous-vide-masa/"],[href$="/hotove-pokrmy-z-ryb-a-krevet/"]) {
    align-self: stretch;
    flex: 1 1 auto;
  }
}

/* WEB031/v30: the prepared-food presenter inherits four generic columns.
   Only the exact two already-owned ready links form a full-width desktop pair.
   Existing v29 mobile geometry remains untouched. Load after ui-followup-v29. */
@media (min-width: 801px) {
  html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"] body.template-11.type-category:not(.ordering-process)
  .category-top[data-bxcat-top] > .subcategories:has(> li > a[data-bxst-kind="listing"][data-bxst-owned="2"][href="/sous-vide-masa/"]):has(> li > a[data-bxst-kind="listing"][data-bxst-owned="2"][href="/hotove-pokrmy-z-ryb-a-krevet/"]):not(:has(> li:nth-child(3))) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"] body.template-11.type-category:not(.ordering-process)
  .category-top[data-bxcat-top] > .subcategories:has(> li > a[data-bxst-kind="listing"][data-bxst-owned="2"][href="/sous-vide-masa/"]):has(> li > a[data-bxst-kind="listing"][data-bxst-owned="2"][href="/hotove-pokrmy-z-ryb-a-krevet/"]):not(:has(> li:nth-child(3))) > li {
    display: flex;
    align-self: stretch;
    align-items: stretch;
  }

  html[lang|="cs"][data-boxxi-native="1"][data-bxl-layout="1"] body.template-11.type-category:not(.ordering-process)
  .category-top[data-bxcat-top] > .subcategories:has(> li > a[data-bxst-kind="listing"][data-bxst-owned="2"][href="/sous-vide-masa/"]):has(> li > a[data-bxst-kind="listing"][data-bxst-owned="2"][href="/hotove-pokrmy-z-ryb-a-krevet/"]):not(:has(> li:nth-child(3))) > li > a[data-bxst-kind="listing"][data-bxst-owned="2"] {
    align-self: stretch;
    flex: 1 1 auto;
  }
}
