/* slevir-prepaint.css v3 (2026-11-06; v3 = v2 + checkout-clean block at the end: B8 service rows hidden before paint, #sx-fs reservations re-measured for the narrower v4 box, krok-1 basics line reservation)
   v2 (2026-10-31; v2 = v1 + round 3 block + Q1/Q2 + cookie buttons at the end) - loaded in <head> (Záhlaví) so it applies BEFORE first paint (no layout shift).
   Every rule is scoped by html:not(.sd-off); the inline head script sets .sd-off for ?declutter=off, iframe preview and /objednavka/.
   Per-item rollback: delete that block, re-upload, bump ?v=. */

/* B4 + D08: desktop nav row (63px) holds only theme-hidden category items -> hide before paint; the sidebar pull-up is reset */
@media (min-width:768px){
 html:not(.sd-off) #navigation:not(:has(.menu-level-1>li:not(.appended-category):not(.sd-login-item))){display:none!important}
 html:not(.sd-off):has(#navigation:not(:has(.menu-level-1>li:not(.appended-category):not(.sd-login-item)))) .sidebar-left{top:0!important}
/* B4: theme JS moves the full-width breadcrumbs row into #content at document.ready (40px jump of the whole page).
   Hide the original row before paint and reserve the same 40px inside #content until the move happened. */
 html:not(.sd-off) .overall-wrapper>.breadcrumbs-wrapper{display:none!important}
 html:not(.sd-off):has(.overall-wrapper>.breadcrumbs-wrapper) #content:not(:has(.breadcrumbs-wrapper))::before{content:"";display:block;height:40px}
/* D09: top-bar e-mail/phone */
 html:not(.sd-off) .top-navigation-bar .top-navigation-contacts{display:none!important}
}
/* D06: mobile login row (the "Přihlášení" link is added to the end of the mobile menu by slevir-declutter.js) */
@media (max-width:767px){
 html:not(.sd-off) #header .navigation-buttons .top-nav-button-login{display:none!important}
 html:not(.sd-off) #header .header-top{min-height:0!important;height:auto!important;padding:0!important}
 html:not(.sd-off) #header .navigation-buttons{min-height:0!important}
/* B4 mobile: the theme's breadcrumbs move stops a margin-collapse and shifts the whole content box by 17px; establish it up front */
 html:not(.sd-off) .content-wrapper-in{padding-top:.1px}
/* sorting tabs wrap to 2 rows with the fallback font until the web font loads (41px jump) - keep them on one row */
 html:not(.sd-off) .type-category .listSorting__controls{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none}
 html:not(.sd-off) .type-category .listSorting__controls>li{flex:0 0 auto}
/* the item counter is hidden by the theme after load anyway - hide it before paint (removes a 41px jump) */
 html:not(.sd-off) .type-category #category-header .listItemsTotal{display:none!important}
}

/* B2 + B3: mobile category - drop "Nejprodávanější", 2-column compact tiles */
@media (max-width:767px){
 html:not(.sd-off) .type-category .products-top-wrapper{display:none!important}
 html:not(.sd-off) .type-category #products.products-page{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0!important}
 html:not(.sd-off) .type-category #products.products-page>.product{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;float:none!important}
 html:not(.sd-off) .type-category #products.products-page>.product>.p{height:100%;display:flex;flex-direction:column;padding:6px!important;margin:0!important}
 html:not(.sd-off) .type-category #products.products-page .p>a.image{display:block;height:130px!important;padding:0!important;margin:0 0 6px!important}
 html:not(.sd-off) .type-category #products.products-page .p>a.image img{width:100%!important;height:130px!important;object-fit:contain}
 html:not(.sd-off) .type-category #products.products-page .p-in{display:flex;flex-direction:column;flex:1;padding:0!important}
 html:not(.sd-off) .type-category #products.products-page .p-in-in{padding:0!important;min-height:0!important}
 html:not(.sd-off) .type-category #products.products-page a.name{font-size:13px!important;line-height:1.3!important;min-height:0!important;height:auto!important;margin:0 0 4px!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 html:not(.sd-off) .type-category #products.products-page .ratings-wrapper{display:block!important;margin:0 0 4px!important;min-height:0!important}
 html:not(.sd-off) .type-category #products.products-page .availability{font-size:11px!important;line-height:1.3}
 html:not(.sd-off) .type-category #products.products-page .stars-placeholder,
 html:not(.sd-off) .type-category #products.products-page .p-desc{display:none!important}
 html:not(.sd-off) .type-category #products.products-page .p-bottom{margin-top:auto!important;padding:0!important}
 html:not(.sd-off) .type-category #products.products-page .p-bottom>div{display:block!important}
 html:not(.sd-off) .type-category #products.products-page .prices{display:block!important;width:auto!important;margin:0 0 6px!important;text-align:left}
 html:not(.sd-off) .type-category #products.products-page .price-final{font-size:16px!important}
 html:not(.sd-off) .type-category #products.products-page .price-standard,
 html:not(.sd-off) .type-category #products.products-page .price-save{font-size:11px!important}
 html:not(.sd-off) .type-category #products.products-page .p-tools{display:block!important;width:100%!important;margin:0!important}
 html:not(.sd-off) .type-category #products.products-page .p-tools form,
 html:not(.sd-off) .type-category #products.products-page .p-tools .btn{width:100%!important;margin:0!important}
 html:not(.sd-off) .type-category #products.products-page .p-tools .btn{padding:8px 4px!important;font-size:13px!important;min-height:0!important;line-height:1.2!important}
 html:not(.sd-off) .type-category #products.products-page .flags{transform:scale(.8);transform-origin:top left}
}

/* B9: compact cookie bar - one short block, three EQUAL buttons (Nastavení / Odmítnout / Souhlasím) */
@media (max-width:767px){
 html:not(.sd-off) .siteCookies{padding:10px 12px 12px!important;left:0!important;right:0!important;bottom:0!important;width:auto!important;max-width:none!important;border-radius:0!important}
 html:not(.sd-off) .siteCookies__form{display:grid!important;grid-template-columns:1fr 2fr;gap:8px;align-items:stretch;padding:0!important;margin:0!important}
 html:not(.sd-off) .siteCookies__content{display:contents!important}
 html:not(.sd-off) .siteCookies__text{grid-column:1/-1;font-size:12px!important;line-height:1.35!important;margin:0!important;padding:0!important}
 html:not(.sd-off) .siteCookies__links{grid-column:1;margin:0!important;padding:0!important;display:flex}
 html:not(.sd-off) .siteCookies__buttonWrap{grid-column:2;display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0!important;padding:0!important;width:auto!important}
}
@media (min-width:768px){
 html:not(.sd-off) .siteCookies{max-width:820px!important;width:auto!important;padding:12px 16px!important}
 html:not(.sd-off) .siteCookies__form{display:flex!important;align-items:center;gap:10px}
 html:not(.sd-off) .siteCookies__content{display:contents!important}
 html:not(.sd-off) .siteCookies__text{flex:1 1 auto;font-size:13px!important;line-height:1.4!important;margin:0!important}
 html:not(.sd-off) .siteCookies__links{order:2;margin:0!important;display:flex;flex:0 0 120px}
 html:not(.sd-off) .siteCookies__buttonWrap{order:3;display:flex!important;gap:10px;margin:0!important;flex:0 0 250px}
}
html:not(.sd-off) .siteCookies .siteCookies__link,
html:not(.sd-off) .siteCookies .siteCookies__button{flex:1;width:100%;margin:0!important;padding:9px 6px!important;min-height:40px;font-size:14px!important;font-weight:600!important;line-height:1.2!important;text-decoration:none!important;text-transform:none!important;border:1px solid #fff!important;border-radius:4px!important;background:transparent!important;color:#fff!important;cursor:pointer}

/* B10 seasonal menu - NEEDS PETR. To enable: remove the comment markers, re-upload, bump ?v=.
   Keeps 🔥 VÝPRODEJ (2707) + 🕯️ Dušičky (3493); hides ✅ NOVÉ (1202), 🍁 Podzim (3216), 👻 Halloween (3231). URLs stay live.
   Mobile menu = #navigation li.menu-item-ID, desktop sidebar = #categories #cat-ID. After 2 Nov swap 3493 for the Vánoce category ID.
html:not(.sd-off) #navigation .menu-level-1>li.menu-item-1202,
html:not(.sd-off) #navigation .menu-level-1>li.menu-item-3216,
html:not(.sd-off) #navigation .menu-level-1>li.menu-item-3231,
html:not(.sd-off) #categories #cat-1202,
html:not(.sd-off) #categories #cat-3216,
html:not(.sd-off) #categories #cat-3231{display:none!important}
*/

/* ================= v2 (2026-10-31): round 3 (Petr approved 31 Oct) - pure-CSS parts, applied before paint ================= */
/* Q1: desktop horizontal scroll (page 1580px wide at 1366): the 1178px .container breadcrumbs row sits inside the narrow content column */
html:not(.sd-off) .content .breadcrumbs-wrapper,html:not(.sd-off) #content .breadcrumbs-wrapper{width:auto!important;max-width:100%!important}
/* Q2: "Jak o nás mluví zákazníci" (Shoptet add-on 425) fills itself ~2.5 s after load; keep the box hidden until reviews are in,
   so a slow/failed add-on never shows an empty header-only box */
html:not(.sd-off) .hodnoceni:not(:has(.vote-wrap)){display:none!important}
/* R2 product cards: one flag (Akce wins over Novinka), no description text, title max 2 lines */
html:not(.sd-off) .products-block .product .flags-default:has(.flag-action) .flag-new{display:none!important}
html:not(.sd-off) .products-block .product .p-desc{display:none!important}
html:not(.sd-off) .products-block .product a.name{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* R3 desktop category: top "Nejprodávanější" block (mobile already hidden by B2) */
html:not(.sd-off) .type-category .category-top .products-top-wrapper{display:none!important}
/* R4 product: short description once (mobile: hidden, it repeats the text below; desktop: 3 lines), no "Detailní informace" link on mobile.
   Both sit BELOW the add-to-cart button, so the ATC position (experiment 107977) does not move. */
@media (max-width:767px){
 html:not(.sd-off) .type-detail .p-info-wrapper .p-short-description,
 html:not(.sd-off) .type-detail .p-info-wrapper p[data-testid=productCardDescr]{display:none!important}
}
@media (min-width:768px){
 html:not(.sd-off) .type-detail .p-info-wrapper .p-short-description{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-height:4.6em}
}
/* R5 homepage: hide "Poslední komentáře" (Q&A from 2024), ratings box full width */
html:not(.sd-off) .latest-contribution-discussion{display:none!important}
html:not(.sd-off) .latest-contribution-wrapper .latest-contribution-rating{width:100%!important;max-width:100%!important;flex:1 1 100%!important}
/* R6 desktop product: second "Zákazníci také nakoupili" strip (= Podobné, #productsAlternative) */
@media (min-width:768px){html:not(.sd-off) .type-detail #productsAlternative{display:none!important}}
/* R7 (cart part): price without VAT in the cart summary */
html:not(.sd-off) .summary-wrapper .price-wrapper .price-secondary{display:none!important}
/* R9 cart: "Související" links and the "Dostupnost" label in rows */
html:not(.sd-off) .cart-table a.show-related{display:none!important}
html:not(.sd-off) .cart-table td.p-availability .p-label{display:none!important}

/* B: cookie bar v2 - "Odmítnout" and "Souhlasím" are the SAME solid style and size (equal prominence = legal);
   "Nastavení" stays an outline button. Solid buttons read as "make a choice" instead of a dismissable notice. */
html:not(.sd-off) .siteCookies .siteCookies__button{background:#fff!important;color:#1A1937!important;border-color:#fff!important}
html:not(.sd-off) .siteCookies .siteCookies__button:hover,html:not(.sd-off) .siteCookies .siteCookies__button:focus-visible{background:#e9eaf2!important}
html:not(.sd-off) .siteCookies .siteCookies__text a{color:#fff!important;text-decoration:underline!important}

/* ===== v2 performance (Lighthouse mobile 31 Oct): reserve the space of OUR late widgets, so inserting them is not a layout shift.
   Not scoped by .sd-off on purpose (checkout pages carry .sd-off). Every reservation releases itself after 5 s (animation),
   so a missing/failed script can never leave a permanent gap. ===== */
@keyframes sxRelMb{to{margin-bottom:20px}}
@keyframes sxRelMt{to{margin-top:0}}
@keyframes sxRelBox{to{max-height:none;visibility:visible;overflow:visible}}
/* cart: #sx-fs (slevir-checkout-ux.js) + .sd-ups (slevir-declutter.js B8) are inserted right after the cart table */
.in-kosik .cart-table{margin-bottom:calc(20px + var(--sx-ru,0px) + var(--sx-rf,0px));animation:sxRelMb 0s 5s forwards}
html:not(.sx-fs-none) .in-kosik .cart-table:not(:has(~ #sx-fs)){--sx-rf:95px}
html:not(.sd-off) .in-kosik .cart-table:not(:has(~ .sd-ups)){--sx-ru:130px}
@media (min-width:768px){html:not(.sx-fs-none) .in-kosik .cart-table:not(:has(~ #sx-fs)){--sx-rf:83px}}
.in-kosik #sx-fs{min-height:79px}
@media (min-width:768px){.in-kosik #sx-fs{min-height:67px}}
/* cart summary: Shoptet's own free-shipping bar is replaced by #sx-fs, "Dárky a slevy" heading (R9) - hide before paint */
html:not(.sx-fs-none) .in-kosik .cart-summary .extra.delivery{display:none!important}
html:not(.sd-off) .in-kosik .cart-summary>h2.h4:first-child{display:none!important}
/* krok-1: #sx-fs is inserted before the shipping methods */
.in-krok-1 :has(> #order-shipping-methods):not(:has(> #sx-fs)) > #order-shipping-methods{margin-top:171px;animation:sxRelMt 0s 5s forwards}
@media (min-width:768px){.in-krok-1 :has(> #order-shipping-methods):not(:has(> #sx-fs)) > #order-shipping-methods{margin-top:143px}}
html.sx-fs-none .in-krok-1 #order-shipping-methods{margin-top:0!important}
.in-krok-1 #sx-fs{min-height:119px}
@media (min-width:768px){.in-krok-1 #sx-fs{min-height:90px}}
/* krok-1 R10: country/currency box is folded into one line by checkout-ux - before paint its form is clipped to the height the line will need (61px = 6+43+12, margins stay inside while clipped) */
/* v3: the reservation is 91px (checkout-ux-4 line = heading + value/Změnit, 79px + 12px margin) and stops once checkout-ux has processed
   the box ([data-sx-bi]) - in v2 it re-applied after "Změnit" and hid the selects again for 5 s */
.in-krok-1 :has(> .co-basic-information:not([data-sx-bi])):not(:has(> .sx-bi-sum)){max-height:91px;overflow:hidden;animation:sxRelBox 0s 5s forwards}
.in-krok-1 :has(> .co-basic-information:not([data-sx-bi])):not(:has(> .sx-bi-sum)) > .co-basic-information{visibility:hidden;animation:sxRelBox 0s 5s forwards}
/* checkout R10 pre-paint (avoids late reflow of header + recap): same hides checkout-ux v3 applies; ?cux=off adds html.sx-cux-off and restores them */
html:not(.sx-cux-off) .ordering-process .price-wrapper .price-secondary{display:none!important}
@media (min-width:768px){html:not(.sx-cux-off) .ordering-process .top-navigation-bar .top-navigation-contacts{display:none!important}}
/* cookie bar: reserve 5 lines for the text on mobile so a late web-font swap / re-wrap cannot change the bar height (bottom-fixed bar => any height change is a layout shift) */
@media (max-width:767px){html:not(.sd-off) .siteCookies__text{min-height:81px}}
/* cookie bar uses the system font (all pages incl. checkout): no web-font swap => no re-wrap => no layout shift of the bottom-fixed bar */
.siteCookies,.siteCookies *{font-family:Arial,Helvetica,sans-serif!important}
@media (max-width:767px){.ordering-process .siteCookies__text{min-height:5.4em}}
/* cart D13: the coupon field is folded into the 'Mám slevový kód' link by declutter - before that, keep exactly the link's slot (19px + 6/10px margins) so the summary does not jump; released after 5 s if the JS never runs */
html:not(.sd-off) .in-kosik .cart-summary .discount-coupon:not([data-sd-done]){visibility:hidden;max-height:35px;margin-bottom:0;overflow:hidden;animation:sxRelBox 0s 5s forwards}
/* cart R9: on mobile the unit price of qty-1 rows is hidden by declutter - do it before the JS so the cart does not shrink by 19px after paint (after the JS, its own .sd-qty1 rule takes over) */
@media (max-width:767px){html:not(.sd-r9):not(.sd-off) .in-kosik .cart-table tr.removeable:has(input[name=amount][value="1"]) td.p-price{display:none!important}}

/* ===== v3 checkout-clean (2026-11-06, Petr t126u) ===== */
/* B8: the service add-ons (coffee 94575, returns 94578) are controlled only by the "Přidat k objednávce" checkbox list, so their
   cart lines are never shown - hidden before paint so the cart does not jump when declutter-5 marks them (.sd-svc-row covers
   re-rendered rows without the SKU). html.sd-svc-show = declutter-5 kill switch (?svcrows=off / SLV_SVCROWS_OFF / B8 off). */
html:not(.sd-off):not(.sd-svc-show) .in-kosik .cart-table tr.removeable[data-micro-sku="94575"],
html:not(.sd-off):not(.sd-svc-show) .in-kosik .cart-table tr.removeable[data-micro-sku="94578"]{display:none!important}
/* #sx-fs v4 (checkout-ux-4): 24px narrower box, headline + "Chybí … Kč" row. Re-measured natural heights (Chrome, Source Sans):
   cart 84px mobile / 87px desktop, krok-1 (with the GLS note) 108px mobile / 112px desktop; +16px bottom margin. Overrides the v2 values above. */
html:not(.sx-fs-none) .in-kosik .cart-table:not(:has(~ #sx-fs)){--sx-rf:100px}
@media (min-width:768px){html:not(.sx-fs-none) .in-kosik .cart-table:not(:has(~ #sx-fs)){--sx-rf:103px}}
.in-kosik #sx-fs{min-height:84px}
@media (min-width:768px){.in-kosik #sx-fs{min-height:87px}}
.in-krok-1 :has(> #order-shipping-methods):not(:has(> #sx-fs)) > #order-shipping-methods{margin-top:124px}
@media (min-width:768px){.in-krok-1 :has(> #order-shipping-methods):not(:has(> #sx-fs)) > #order-shipping-methods{margin-top:128px}}
.in-krok-1 #sx-fs{min-height:108px}
@media (min-width:768px){.in-krok-1 #sx-fs{min-height:112px}}
/* krok-1 shipping rows (checkout-ux-4 has the same rules; here so the rows do not change height after first paint):
   name left, the store's own carrier logo smaller and inline, price right. ?cux=off (html.sx-cux-off) restores Shoptet's layout. */
html:not(.sx-cux-off) .in-krok-1 #order-shipping-methods .radio-wrapper>label{display:flex!important;flex-wrap:nowrap!important;align-items:flex-start!important;column-gap:10px}
html:not(.sx-cux-off) .in-krok-1 #order-shipping-methods .radio-wrapper>label>.payment-info{order:1;flex:1 1 auto!important;min-width:0;width:auto!important;max-width:none!important;float:none!important}
html:not(.sx-cux-off) .in-krok-1 #order-shipping-methods .radio-wrapper>label>.payment-logo{order:2;flex:0 0 auto!important;display:flex!important;align-items:center;width:auto!important;max-width:none!important;height:24px;margin:0!important;padding:0!important;float:none!important;position:static!important}
html:not(.sx-cux-off) .in-krok-1 #order-shipping-methods .radio-wrapper>label>.payment-logo img{display:block;width:auto!important;max-width:72px!important;height:auto!important;max-height:24px!important;margin:0!important;object-fit:contain;mix-blend-mode:multiply}
html:not(.sx-cux-off) .in-krok-1 #order-shipping-methods .radio-wrapper>label>.payment-shipping-price{order:3;flex:0 0 auto!important;white-space:nowrap;margin-left:0!important;float:none!important;position:static!important;width:auto!important;text-align:right;min-width:3.4em}
@media (max-width:399px){html:not(.sx-cux-off) .in-krok-1 #order-shipping-methods .radio-wrapper>label>.payment-logo{height:20px}html:not(.sx-cux-off) .in-krok-1 #order-shipping-methods .radio-wrapper>label>.payment-logo img{max-width:60px!important;max-height:20px!important}}
