/* ============================================================
   homepage.css — tělo homepage Knihy&Škola (Fáze B), 1:1 dle artefaktu.
   Vlastní homepage agent. Scope: body#index (nesmí utéct do kategorie).
   Mapování artefakt → Elementor DOM:
     .top-shell → section.ks-topshell (rail = ps_categorytree, hero = html widget)
     .usp → .ks-usp-sekce | .tiles → .ks-tiles-sekce | .sezona → .ks-sezona
     .prodsec ×3 → .ks-prodsec | obsahové sekce → .ks-hp2 (styl v custom.css)
   Karty: Warehouse .product-miniature (layout 1) → artefakt .card rodina.
   ============================================================ */

/* ---- lokální tokeny (scope body#index + 404, neprosakují) ---- */
:is(body#index, body#pagenotfound) {
  --ksh-paper: #FFFDF6;
  --ksh-surface: #FFFFFF;
  --ksh-cream: #FDF4D8;
  --ksh-cream2: #FFF7E0;
  --ksh-ink: #2B2620;
  --ksh-text: #4C473F;
  --ksh-muted: #9C9483;
  --ksh-faint: #BDB7A6;
  --ksh-line: #EDE7D8;
  --ksh-line-strong: #DED6C2;
  --ksh-coral: #F07E7E;
  --ksh-coral-deep: #E06A6A;
  --ksh-coral-soft: #FCE6E4;
  --ksh-yellow: #FFD54A;
  --ksh-yellow-btn: #FFCE3B;
  --ksh-yellow-deep: #EDAF06;
  --ksh-hi: #FFE68C;
  --ksh-green: #3EA24A;
  --ksh-shadow-sm: 0 1px 2px rgba(43,38,32,.05), 0 5px 14px rgba(43,38,32,.05);
  --ksh-shadow: 0 3px 8px rgba(43,38,32,.06), 0 16px 36px rgba(43,38,32,.08);
  --ksh-shadow-lift: 0 10px 22px rgba(43,38,32,.12), 0 26px 54px rgba(43,38,32,.14);
  --ksh-r: 14px;
}

body#index .elementor { padding-bottom: 48px; }

/* ---- tlačítka v html widgetech (artefakt .btn rodina) ---- */
body#index .ks-btn {
  display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  gap: .5em;
  border: 1.5px solid transparent;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14.5px;
  padding: 11px 22px;
  min-height: 44px;
  -webkit-transition: -webkit-transform .12s ease, box-shadow .12s ease, background .12s ease;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
body#index .ks-btn:active { -webkit-transform: translateY(1px); transform: translateY(1px); }
body#index .ks-btn-buy { background: var(--ksh-yellow-btn); color: #3A2E00; box-shadow: var(--ksh-shadow-sm); }
body#index .ks-btn-buy:hover { background: var(--ksh-yellow); color: #3A2E00; box-shadow: var(--ksh-shadow); -webkit-transform: translateY(-1px); transform: translateY(-1px); }
body#index .ks-btn-outline { background: var(--ksh-surface); color: var(--ksh-ink); border-color: var(--ksh-line-strong); }
body#index .ks-btn-outline:hover { border-color: var(--ksh-ink); color: var(--ksh-ink); }

/* žlutý zvýrazňovač (artefakt .hl) */
body#index .ks-prodsec-head .hl {
  background: -webkit-linear-gradient(top, transparent 58%, var(--ksh-hi) 58%, var(--ksh-hi) 95%, transparent 95%);
  background: linear-gradient(180deg, transparent 58%, var(--ksh-hi) 58%, var(--ksh-hi) 95%, transparent 95%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 4px;
  margin: 0 -2px;
  border-radius: 3px;
}

/* ============================================================
   1. TOP-SHELL (rail + hero)
   ============================================================ */
body#index .ks-topshell { padding-top: 24px; }
body#index .ks-topshell > .elementor-container > .elementor-row {
  display: -ms-grid; display: grid;
  -ms-grid-columns: 264px 24px 1fr;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 24px;
  -webkit-box-align: stretch; align-items: stretch;
}
body#index .ks-topshell .elementor-column { width: auto !important; min-width: 0; }

/* ---- rail = ps_categorytree jako karta Kategorie ---- */
body#index .ks-rail-w .block-categories {
  background: var(--ksh-surface);
  border: 1px solid var(--ksh-line);
  border-radius: var(--ksh-r);
  box-shadow: var(--ksh-shadow-sm);
  overflow: hidden;
  margin: 0;
  padding: 0;
}
body#index .ks-rail-w .block-title {
  background: -webkit-linear-gradient(top, var(--ksh-cream2), var(--ksh-surface));
  background: linear-gradient(180deg, var(--ksh-cream2), var(--ksh-surface));
  color: var(--ksh-ink);
  font-size: 18px;
  font-weight: 800;
  padding: 17px 18px 16px;
  margin: 0;
  border-bottom: 1px solid var(--ksh-line);
  letter-spacing: .2px;
  text-transform: none;
}
body#index .ks-rail-w .block-title span {
  background: -webkit-linear-gradient(top, transparent 58%, var(--ksh-hi) 58%, var(--ksh-hi) 95%, transparent 95%);
  background: linear-gradient(180deg, transparent 58%, var(--ksh-hi) 58%, var(--ksh-hi) 95%, transparent 95%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 4px;
  margin: 0 -2px;
  border-radius: 3px;
}
body#index .ks-rail-w .block-title a { color: var(--ksh-ink); text-decoration: none; }
body#index .ks-rail-w .category-top-menu { margin: 0; padding: 0; }
body#index .ks-rail-w .category-sub-menu { list-style: none; margin: 0; padding: 6px; }
body#index .ks-rail-w .category-sub-menu li { margin: 0; padding: 0; position: relative; }
body#index .ks-rail-w .category-sub-menu > li + li { border-top: 1px solid var(--ksh-line); }
body#index .ks-rail-w .category-sub-menu > li > a {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  /* stejna geometrie hover pilulky jako na kategorii (Filip 1.9.2026) */
  margin: 6px 0;
  border-radius: 9px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: var(--ksh-ink);
  text-decoration: none;
  width: auto;
  -webkit-transition: background .14s ease, color .14s ease;
  transition: background .14s ease, color .14s ease;
}
/* theme.css .block-links dává před odkaz FA šipku vlevo — pryč, šipku máme vpravo */
body#index .ks-rail-w .category-sub-menu > li > a::before { content: none !important; }
body#index .ks-rail-w .category-sub-menu > li > a::after {
  content: "\203A";
  display: inline-block;
  color: var(--ksh-faint);
  font-size: 15px;
  line-height: 1;
  -webkit-transition: -webkit-transform .15s ease, color .15s ease;
  transition: transform .15s ease, color .15s ease;
}
body#index .ks-rail-w .category-sub-menu > li > a:hover { background: var(--ksh-cream2); color: var(--ksh-ink); }
body#index .ks-rail-w .category-sub-menu > li > a:hover::after { -webkit-transform: translateX(3px); transform: translateX(3px); color: var(--ksh-coral); }
/* jen 1. úroveň: toggly a podstromy pryč (artefakt = prosté odkazy se šipkou) */
body#index .ks-rail-w .collapse-icons { display: none !important; }
body#index .ks-rail-w .category-sub-menu .collapse { display: none !important; }
/* zobrazit více: na homepage jen 6 položek (more-cat-hp od 7. dál, Filip
   1.9.2026), tlačítko rozbalí (třídu open přidá inline handler) */
body#index .ks-rail-w li.more-cat-hp { display: none; }
body#index .ks-rail-w .block-categories.open li.more-cat-hp { display: block; }
body#index .ks-rail-w .rail-more {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 13px;
  border: 0;
  border-top: 1px solid var(--ksh-line);
  background: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 12.5px;
  color: var(--ksh-coral-deep);
  text-transform: uppercase;
  letter-spacing: .4px;
  cursor: pointer;
}
body#index .ks-rail-w .rail-more:hover { background: var(--ksh-cream2); }
body#index .ks-rail-w .rail-more .ar { -webkit-transition: -webkit-transform .15s ease; transition: transform .15s ease; }
body#index .ks-rail-w .block-categories.open .rail-more .ar { -webkit-transform: rotate(180deg); transform: rotate(180deg); }

/* ---- hero (html widget) ---- */
body#index .ks-hero {
  display: -ms-grid; display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 100%;
}
body#index .ks-banner {
  border-radius: var(--ksh-r);
  box-shadow: var(--ksh-shadow-sm);
  overflow: hidden;
  position: relative;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  -webkit-transition: .15s ease; transition: .15s ease;
  text-decoration: none;
}
body#index .ks-banner:hover { -webkit-transform: translateY(-2px); transform: translateY(-2px); box-shadow: var(--ksh-shadow); }
body#index .ks-banner-main {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 392px;
  padding: 40px;
  color: #FFF7E4;
  background: -webkit-linear-gradient(348deg, rgba(30,24,14,.32) 0%, rgba(30,24,14,.7) 42%, #241d10 66%, #1c160c 100%), url('/img/cms/ks_hero.jpg');
  background: linear-gradient(102deg, #1c160c 0%, #241d10 34%, rgba(30,24,14,.7) 58%, rgba(30,24,14,.32) 100%), url('/img/cms/ks_hero.jpg');
  background-size: cover;
  background-position: right center;
}
body#index .ks-banner-main .kicker {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ksh-yellow);
  margin-bottom: 14px;
}
body#index .ks-banner-main h2 {
  font-size: 42px;
  font-weight: 800;
  color: #FFF7E4;
  line-height: 1.04;
  max-width: 15ch;
  margin: 0;
}
body#index .ks-banner-main p {
  font-size: 16.5px;
  font-weight: 500;
  color: #EBDFC5;
  margin: 14px 0 24px;
  max-width: 34ch;
}
body#index .ks-banner-main .ks-btn-buy {
  -webkit-align-self: flex-start; -ms-flex-item-align: start; align-self: flex-start;
  padding: 13px 28px;
  font-size: 15.5px;
}
body#index .ks-banner-sm {
  min-height: 188px;
  padding: 22px;
  color: #3A2E00;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: start; -webkit-justify-content: flex-start; -ms-flex-pack: start; justify-content: flex-start;
  position: relative;
  overflow: hidden;
}
body#index .ks-banner-sm::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.26);
  right: -44px;
  top: -52px;
}
body#index .ks-banner-sm .eyb {
  position: relative;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: 5px;
}
body#index .ks-banner-sm h3 {
  position: relative;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.05;
  color: inherit;
  margin: 0;
}
body#index .ks-banner-sm p {
  position: relative;
  margin: 6px 0 0;
  font-weight: 600;
  font-size: 13.5px;
  opacity: .82;
  max-width: 58%;
  color: inherit;
}
body#index .ks-banner-sm .go {
  position: relative;
  margin-top: auto;
  font-weight: 800;
  font-size: 14px;
  display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
body#index .ks-banner-sm.b1 {
  background: -webkit-linear-gradient(300deg, #FFE79A, #FFC22C);
  background: linear-gradient(150deg, #FFE79A, #FFC22C);
  grid-column: 2;
  grid-row: 1;
}
body#index .ks-banner-sm.b2 {
  background: -webkit-linear-gradient(300deg, #FBD3D1, #F09694);
  background: linear-gradient(150deg, #FBD3D1, #F09694);
  grid-column: 2;
  grid-row: 2;
  color: #5A1E1E;
}
body#index .ks-banner-sm.b2 h3 { color: #5A1E1E; }

/* ============================================================
   2. USP PRUH
   ============================================================ */
:is(body#index, body#pagenotfound) .ks-usp-sekce { margin-top: 30px; }
:is(body#index, body#pagenotfound) .ks-usp {
  display: -ms-grid; display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 22px 24px;
  background: var(--ksh-surface);
  border: 1px solid var(--ksh-line);
  border-radius: var(--ksh-r);
  box-shadow: var(--ksh-shadow-sm);
}
:is(body#index, body#pagenotfound) .ks-usp .item {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  gap: 14px;
}
:is(body#index, body#pagenotfound) .ks-usp .item + .item { border-left: 1px solid var(--ksh-line); padding-left: 20px; }
:is(body#index, body#pagenotfound) .ks-usp .ill { width: 52px; height: 52px; -webkit-box-flex: 0; -webkit-flex: 0 0 auto; -ms-flex: 0 0 auto; flex: 0 0 auto; }
:is(body#index, body#pagenotfound) .ks-usp .item b { font-weight: 700; font-size: 14px; color: var(--ksh-ink); line-height: 1.28; }

/* ============================================================
   3. DLAŽDICE (Učebnice / Knihy / Chytré hry)
   ============================================================ */
:is(body#index, body#pagenotfound) .ks-tiles-sekce { padding-top: 26px; }
:is(body#index, body#pagenotfound) .ks-tiles {
  display: -ms-grid; display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
/* pozor: custom.css má legacy .ks-tile (jiná struktura) — tady kompletní přepis */
:is(body#index, body#pagenotfound) .ks-tiles .ks-tile {
  position: relative;
  min-height: 0;
  background: var(--ksh-surface);
  background-image: none;
  border: 1px solid var(--ksh-line);
  border-radius: var(--ksh-r);
  overflow: hidden;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-pack: start; -webkit-justify-content: flex-start; -ms-flex-pack: start; justify-content: flex-start;
  box-shadow: var(--ksh-shadow-sm);
  -webkit-transition: .15s ease; transition: .15s ease;
  text-decoration: none;
}
:is(body#index, body#pagenotfound) .ks-tiles .ks-tile::after { content: none; }
:is(body#index, body#pagenotfound) .ks-tiles .ks-tile:hover {
  -webkit-transform: translateY(-4px); transform: translateY(-4px);
  box-shadow: var(--ksh-shadow-lift);
  border-color: var(--ksh-line-strong);
}
:is(body#index, body#pagenotfound) .ks-tile .tile-art {
  height: 186px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
:is(body#index, body#pagenotfound) .ks-tile .tile-art::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: -webkit-linear-gradient(top, rgba(20,15,10,.16) 0%, rgba(20,15,10,.10) 45%, rgba(20,15,10,.32) 100%);
  background: linear-gradient(180deg, rgba(20,15,10,.16) 0%, rgba(20,15,10,.10) 45%, rgba(20,15,10,.32) 100%);
}
:is(body#index, body#pagenotfound) .ks-tile.tu .tile-art { background-image: url('/img/cms/ks_tile_ucebnice.jpg'); }
:is(body#index, body#pagenotfound) .ks-tile.tk .tile-art { background-image: url('/img/cms/ks_tile_knihy.jpg'); }
:is(body#index, body#pagenotfound) .ks-tile.th .tile-art { background-image: url('/img/cms/ks_tile_hry.jpg'); }
:is(body#index, body#pagenotfound) .ks-tile .bar { height: 5px; }
:is(body#index, body#pagenotfound) .ks-tile.tu .bar { background: var(--ksh-yellow); }
:is(body#index, body#pagenotfound) .ks-tile.tk .bar { background: var(--ksh-coral); }
:is(body#index, body#pagenotfound) .ks-tile.th .bar { background: #B77DE6; }
:is(body#index, body#pagenotfound) .ks-tile .tcap {
  padding: 14px 18px 16px;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  gap: 14px;
}
/* chip s ikonou vytažený přes fotku (artefakt .tcap .chip) */
:is(body#index, body#pagenotfound) .ks-tile .tcap .chip {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: #fff;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  -webkit-box-flex: 0; -webkit-flex: 0 0 auto; -ms-flex: 0 0 auto; flex: 0 0 auto;
  box-shadow: var(--ksh-shadow);
  border: 1px solid var(--ksh-line);
  margin-top: -54px;
  position: relative;
  z-index: 2;
}
:is(body#index, body#pagenotfound) .ks-tile .tcap .chip img {
  width: 40px;
  height: 40px;
  -o-object-fit: contain; object-fit: contain;
}
:is(body#index, body#pagenotfound) .ks-tile .tcap b {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--ksh-ink);
  line-height: 1.1;
  text-shadow: none;
}
:is(body#index, body#pagenotfound) .ks-tile .tcap .arw {
  margin-left: auto;
  color: var(--ksh-muted);
  font-size: 20px;
  opacity: 1;
  -webkit-transition: .15s ease; transition: .15s ease;
}
:is(body#index, body#pagenotfound) .ks-tiles .ks-tile:hover .tcap .arw { -webkit-transform: translateX(5px); transform: translateX(5px); color: var(--ksh-coral); }

/* ============================================================
   4. SEZÓNNÍ NABÍDKA (gradient box + 4 karty)
   ============================================================ */
body#index .ks-sezona { margin-top: 50px; }
body#index .ks-sezona > .elementor-container {
  background: -webkit-linear-gradient(330deg, #FFF4DA, #FCE6F0);
  background: linear-gradient(120deg, #FFF4DA, #FCE6F0);
  border: 1px solid var(--ksh-line);
  border-radius: var(--ksh-r);
  padding: 30px;
  box-shadow: var(--ksh-shadow-sm);
}
body#index .ks-sezona-head {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between;
  -webkit-box-align: end; -webkit-align-items: flex-end; -ms-flex-align: end; align-items: flex-end;
  -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}
body#index .ks-sezona-head .eyebrow {
  display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #C24A4A;
  margin-bottom: 6px;
}
body#index .ks-sezona-head h2 { font-size: 28px; font-weight: 800; color: #2B2620; margin: 0; line-height: 1.1; }
body#index .ks-sezona-head .subt { font-size: 14px; color: #6E5A52; font-weight: 600; margin-top: 4px; }
body#index .ks-sezona-head .ks-btn-outline { background: #fff; }
body#index .ks-sezona-grid .products {
  display: -ms-grid; display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
}

/* ============================================================
   5. PRODUKTOVÉ SEKCE (Zábava / Balíčky / Blešák)
   ============================================================ */
body#index .ks-prodsec { padding-top: 48px; }
body#index .ks-prodsec > .elementor-container > .elementor-row {
  display: -ms-grid; display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  -webkit-box-align: start; align-items: start;
}
body#index .ks-prodsec .elementor-column { width: auto !important; min-width: 0; }
/* výškový řetěz pro sticky hlavičku (widget je zanořený, grid item je sloupec) */
body#index .ks-prodsec .elementor-column { -webkit-align-self: stretch; -ms-flex-item-align: stretch; align-self: stretch; }
body#index .ks-prodsec .elementor-column:first-child > .elementor-column-wrap,
body#index .ks-prodsec .elementor-column:first-child > .elementor-column-wrap > .elementor-widget-wrap { height: 100%; }
body#index .ks-prodsec .elementor-widget.ks-prodsec-head-w { position: -webkit-sticky; position: sticky; top: 100px; }
body#index .ks-prodsec-head { padding-top: 6px; }
body#index .ks-prodsec-head .sec-ill { width: 50px; height: 50px; display: block; margin-bottom: 12px; }
body#index .ks-prodsec-head h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--ksh-ink);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 14px;
}
body#index .ks-prodsec-head p { font-size: 14px; color: var(--ksh-text); margin: 0 0 20px; line-height: 1.6; }
body#index .ks-prodgrid .products {
  display: -ms-grid; display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0;
}

/* ============================================================
   6. PRODUKTOVÉ KARTY (Warehouse miniatura → artefakt .card)
   Platí pro .ks-sezona-grid i .ks-prodgrid.
   ============================================================ */
body#index .elementor-products .js-product-miniature-wrapper {
  width: auto;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  -webkit-box-flex: 0; -webkit-flex: none; -ms-flex: none; flex: none;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
}
body#index .elementor-products .product-miniature {
  width: 100%;
  padding: 0; /* custom_s_1.css: .product-miniature-grid padding .71rem */
  background: var(--ksh-surface);
  border: 1px solid var(--ksh-line);
  border-radius: var(--ksh-r) !important; /* legacy custom.css: 10px !important */
  overflow: hidden;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
  box-shadow: var(--ksh-shadow-sm);
  -webkit-transition: .15s ease; transition: .15s ease;
  outline: none;
}
body#index .elementor-products .product-miniature:hover {
  -webkit-transform: translateY(-4px); transform: translateY(-4px);
  box-shadow: var(--ksh-shadow-lift);
  border-color: var(--ksh-line-strong);
  background: var(--ksh-surface);
}
/* média */
body#index .elementor-products .thumbnail-container {
  aspect-ratio: 1 / .92;
  min-height: 180px;
  background: #fff;
  position: relative;
  padding: 14px;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
}
body#index .elementor-products .product-thumbnail {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  width: 100%;
  height: 100%;
}
body#index .elementor-products .thumbnail-container img.product-thumbnail-first,
body#index .elementor-products .thumbnail-container img.product-thumbnail-second {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  -o-object-fit: contain; object-fit: contain;
}
/* rollover druhý obrázek (absolutní z custom_s_1.css) srovnat do paddingu karty */
body#index .elementor-products .thumbnail-container img.product-thumbnail-second {
  top: 14px;
  left: 14px;
  right: 14px;
  height: calc(100% - 28px);
  max-width: calc(100% - 28px);
  margin: 0 auto;
}
/* štítky (product flags) */
body#index .elementor-products .product-flags {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: start; -webkit-align-items: flex-start; -ms-flex-align: start; align-items: flex-start;
  gap: 6px;
  z-index: 2;
  pointer-events: none;
}
body#index .elementor-products li.product-flag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--ksh-coral);
  color: #fff;
  margin: 0;
  line-height: 1.3;
  text-align: left;
}
body#index .elementor-products li.product-flag.new { background: var(--ksh-green); color: #fff; }
body#index .elementor-products li.product-flag.on-sale,
body#index .elementor-products li.product-flag.sale { background: var(--ksh-coral); color: #fff; }
body#index .elementor-products li.product-flag.discount,
body#index .elementor-products li.product-flag.discount-percentage,
body#index .elementor-products li.product-flag.reduction {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  background: var(--ksh-ink);
  color: var(--ksh-yellow);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
}
/* funkční tlačítka (wishlist / porovnat / náhled) = artefakt .card-fav vpravo dole */
body#index .elementor-products .product-miniature-grid .product-functional-buttons-bottom {
  left: auto;
  right: 10px;
  bottom: 10px;
  top: auto;
  -webkit-transform: none; -ms-transform: none; transform: none;
  opacity: 1;
  padding: 0;
  min-width: 0;
  text-align: right;
}
body#index .elementor-products .product-miniature-grid:hover .product-functional-buttons-bottom {
  -webkit-transform: none; -ms-transform: none; transform: none;
  opacity: 1;
}
body#index .elementor-products .product-functional-buttons-links {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: end; -webkit-align-items: flex-end; -ms-flex-align: end; align-items: flex-end;
  gap: 6px;
}
body#index .elementor-products .product-functional-buttons-links > a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--ksh-line);
  color: var(--ksh-muted);
  font-size: 16px;
  line-height: 1;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  box-shadow: var(--ksh-shadow-sm);
  margin: 0;
  padding: 0;
}
body#index .elementor-products .product-functional-buttons-links > a:hover { color: var(--ksh-coral); border-color: var(--ksh-coral); }
/* srdíčko stále viditelné, porovnat + rychlý náhled až na hover karty */
body#index .elementor-products .product-functional-buttons-links > a.js-iqitcompare-add,
body#index .elementor-products .product-functional-buttons-links > a.js-quick-view-iqit {
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity .15s ease, visibility .15s ease; transition: opacity .15s ease, visibility .15s ease;
}
body#index .elementor-products .product-miniature:hover .product-functional-buttons-links > a.js-iqitcompare-add,
body#index .elementor-products .product-miniature:hover .product-functional-buttons-links > a.js-quick-view-iqit {
  opacity: 1;
  visibility: visible;
}
/* tělo karty */
body#index .elementor-products .product-description {
  padding: 14px 15px 15px;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1;
  text-align: left;
  border-top: 1px solid var(--ksh-line);
  background: none;
}
body#index .elementor-products .product-category-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--ksh-coral-deep) !important; /* legacy custom.css: #888 !important */
  border-bottom: 0;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body#index .elementor-products .product-category-name::before {
  content: "\f02b";
  font-family: FontAwesome;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ksh-coral);
  -webkit-box-flex: 0; -webkit-flex: 0 0 auto; -ms-flex: 0 0 auto; flex: 0 0 auto;
}
body#index .elementor-products .product-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  padding: 0;
  height: auto; /* legacy custom.css: height 2.7rem */
  min-height: 2.5em;
  text-align: left;
  overflow: visible;
}
body#index .elementor-products .product-title a {
  color: var(--ksh-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
body#index .elementor-products .product-brand,
body#index .elementor-products .product-reference,
body#index .elementor-products .product-description-short,
body#index .elementor-products .price-countdown-wrapper { display: none; } /* countdown v kartě artefakt nemá (přetékal) */
body#index .elementor-products .product-price-and-shipping {
  margin-top: auto;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: baseline; -webkit-align-items: baseline; -ms-flex-align: baseline; align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0;
}
body#index .elementor-products .product-price { font-size: 22px; font-weight: 800 !important; color: var(--ksh-ink); } /* legacy: 600 !important */
body#index .elementor-products .regular-price { font-size: 14px; color: var(--ksh-faint) !important; font-weight: 600; line-height: normal; text-decoration: line-through; } /* legacy: #C4C4C4 !important */
/* dostupnost (child tpl ji tiskne v těle karty) = artefakt .card-stock */
body#index .elementor-products .product-miniature-grid .product-availability {
  position: static;
  left: auto;
  bottom: auto;
  -webkit-transform: none; -ms-transform: none; transform: none;
  opacity: 1;
  margin: 0 0 14px;
  text-align: left;
}
body#index .elementor-products .product-miniature-grid:hover .product-availability {
  -webkit-transform: none; -ms-transform: none; transform: none;
  opacity: 1;
}
body#index .elementor-products .product-availability .badge {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ksh-green);
  /* legacy custom.css: .product-available{display:block!important} */
  display: -webkit-inline-box !important; display: -webkit-inline-flex !important; display: -ms-inline-flexbox !important; display: inline-flex !important;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  gap: 6px;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}
body#index .elementor-products .product-availability .badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  -webkit-box-flex: 0; -webkit-flex: 0 0 auto; -ms-flex: 0 0 auto; flex: 0 0 auto;
}
body#index .elementor-products .product-availability .badge .fa { display: none; }
body#index .elementor-products .product-availability .badge.product-unavailable { color: var(--ksh-coral-deep); }
body#index .elementor-products .product-availability .badge.product-unavailable-allow-oosp { color: var(--ksh-green); }
/* akce: qty stepper + Koupit = artefakt .card-actions */
body#index .elementor-products .product-add-cart { margin: 0; padding: 0; }
body#index .elementor-products .input-group-add-cart {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-flex-wrap: nowrap; -ms-flex-wrap: nowrap; flex-wrap: nowrap;
  -webkit-box-align: stretch; -webkit-align-items: stretch; -ms-flex-align: stretch; align-items: stretch;
  gap: 8px;
}
body#index .elementor-products .ks-qty {
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  border: 1.5px solid var(--ksh-line-strong);
  border-radius: 100px;
  -webkit-box-flex: 0; -webkit-flex: 0 0 auto; -ms-flex: 0 0 auto; flex: 0 0 auto;
  background: var(--ksh-surface);
  overflow: hidden;
}
body#index .elementor-products .ks-qty-btn {
  width: 32px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ksh-ink);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  padding: 0;
  cursor: pointer;
}
body#index .elementor-products .ks-qty-btn:hover { background: var(--ksh-cream2); }
body#index .elementor-products .ks-qty .input-qty {
  display: inline-block !important; /* custom_s_1.css (pl_grid_qty=0): display:none!important */
  width: 26px;
  min-width: 26px;
  max-width: 26px;
  height: 40px;
  border: 0;
  border-radius: 0;
  text-align: center;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  color: var(--ksh-ink);
  background: transparent;
  padding: 0;
  -moz-appearance: textfield;
  box-shadow: none;
}
body#index .elementor-products .ks-qty .input-qty::-webkit-outer-spin-button,
body#index .elementor-products .ks-qty .input-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
body#index .elementor-products .ks-qty .input-qty:focus { outline: none; background: var(--ksh-cream2); }
body#index .elementor-products .btn-product-list {
  -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 0;
  margin: 0; /* legacy custom.css: margin 10px */
  display: -webkit-inline-box; display: -webkit-inline-flex; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center;
  gap: .5em;
  border: 0;
  border-radius: 100px;
  background: var(--ksh-yellow-btn);
  color: #3A2E00;
  font-weight: 700;
  font-size: 14.5px;
  text-transform: none;
  letter-spacing: 0;
  min-height: 40px;
  padding: 9px 10px;
  box-shadow: var(--ksh-shadow-sm);
  -webkit-transition: -webkit-transform .12s ease, box-shadow .12s ease, background .12s ease;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
body#index .elementor-products .btn-product-list:hover,
body#index .elementor-products .btn-product-list:focus {
  background: var(--ksh-yellow);
  color: #3A2E00;
  box-shadow: var(--ksh-shadow);
  -webkit-transform: translateY(-1px); transform: translateY(-1px);
}
body#index .elementor-products .btn-product-list .bag-icon { font-size: 15px; }

/* ============================================================
   7. OBSAHOVÉ SEKCE (.ks-hp2) — styl drží custom.css, tady jen jistota,
   že Elementor obal nic nezužuje.
   ============================================================ */
body#index .ks-hp2-sekce .elementor-widget-container,
body#index .ks-hp2-sekce .ks-hp2 { width: 100%; }

/* ============================================================
   8. RESPONSIVITA (artefakt @container → @media)
   ============================================================ */
@media (max-width: 991px) {
  body#index .ks-topshell > .elementor-container > .elementor-row { grid-template-columns: 1fr; }
  body#index .ks-hero { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  body#index .ks-banner-main { grid-column: 1 / span 2; grid-row: 1; min-height: 300px; }
  body#index .ks-banner-sm.b1 { grid-column: 1; grid-row: 2; }
  body#index .ks-banner-sm.b2 { grid-column: 2; grid-row: 2; }
  body#index .ks-prodsec > .elementor-container > .elementor-row { grid-template-columns: 1fr; }
  body#index .ks-prodsec .elementor-widget.ks-prodsec-head-w { position: static; }
}

@media (max-width: 640px) {
  body#index .ks-topshell .elementor-column:first-child { display: none; }
  body#index .ks-banner-main { padding: 26px; }
  body#index .ks-banner-main h2 { font-size: 30px; }
  :is(body#index, body#pagenotfound) .ks-usp { grid-template-columns: 1fr 1fr; gap: 14px; }
  :is(body#index, body#pagenotfound) .ks-usp .item + .item { border-left: 0; padding-left: 0; }
  :is(body#index, body#pagenotfound) .ks-tiles { grid-template-columns: 1fr; gap: 12px; }
  :is(body#index, body#pagenotfound) .ks-tile .tcap b { font-size: 22px; }
  body#index .ks-sezona > .elementor-container { padding: 22px 16px; }
  body#index .ks-sezona-grid .products { grid-template-columns: 1fr 1fr; }
  body#index .ks-prodgrid .products { grid-template-columns: 1fr 1fr; gap: 12px; }
  body#index .ks-prodsec-head h2 { font-size: 23px; }
  /* iOS: input ≥16 px, jinak zoom při fokusu */
  body#index .elementor-products .ks-qty .input-qty { font-size: 16px; width: 30px; min-width: 30px; max-width: 30px; }
}

@media (max-width: 430px) {
  body#index .ks-hero { grid-template-columns: 1fr; }
  body#index .ks-banner-main { grid-column: 1; grid-row: 1; }
  body#index .ks-banner-sm.b1 { grid-column: 1; grid-row: 2; }
  body#index .ks-banner-sm.b2 { grid-column: 1; grid-row: 3; }
  /* mobil: USP jako horizontalni slider (scroll-snap), ne pod sebou - Filip 1.9.2026 */
  :is(body#index, body#pagenotfound) .ks-usp{ display:-webkit-box; display:-ms-flexbox; display:flex;
    -ms-flex-wrap:nowrap; flex-wrap:nowrap; overflow-x:auto;
    -webkit-overflow-scrolling:touch; scroll-snap-type:x mandatory;
    scrollbar-width:none; gap:12px; }
  :is(body#index, body#pagenotfound) .ks-usp::-webkit-scrollbar{ display:none; }
  :is(body#index, body#pagenotfound) .ks-usp .item{ -ms-flex:0 0 78%; flex:0 0 78%; scroll-snap-align:center; }
  body#index .ks-sezona-grid .products { grid-template-columns: 1fr 1fr; gap: 12px; }
  body#index .ks-prodgrid .products { grid-template-columns: 1fr 1fr; gap: 12px; }
  body#index .elementor-products .product-title { font-size: 14px; }
  body#index .elementor-products .product-price { font-size: 19px; }
  body#index .elementor-products .input-group-add-cart {
    -webkit-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column;
    gap: 8px;
  }
  body#index .elementor-products .ks-qty {
    width: 100%;
    -webkit-box-pack: justify; -webkit-justify-content: space-between; -ms-flex-pack: justify; justify-content: space-between;
  }
}

/* ============================================================
   9. PŘÍSTUPNOST A POHYB
   ============================================================ */
body#index .ks-btn:focus-visible,
body#index .ks-banner:focus-visible,
:is(body#index, body#pagenotfound) .ks-tile:focus-visible,
body#index .ks-rail-w a:focus-visible,
body#index .ks-rail-w .rail-more:focus-visible,
body#index .elementor-products .btn-product-list:focus-visible,
body#index .elementor-products .ks-qty-btn:focus-visible {
  outline: 3px solid var(--ksh-yellow-deep);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body#index .ks-btn,
  body#index .ks-banner,
  :is(body#index, body#pagenotfound) .ks-tile,
  :is(body#index, body#pagenotfound) .ks-tiles .ks-tile,
  body#index .ks-rail-w .category-sub-menu > li > a::after,
  body#index .ks-rail-w .rail-more .ar,
  :is(body#index, body#pagenotfound) .ks-tile .tcap .arw,
  body#index .elementor-products .product-miniature,
  body#index .elementor-products .btn-product-list {
    -webkit-transition: none !important;
    transition: none !important;
  }
  body#index .ks-banner:hover,
  :is(body#index, body#pagenotfound) .ks-tiles .ks-tile:hover,
  body#index .elementor-products .product-miniature:hover,
  body#index .elementor-products .btn-product-list:hover {
    -webkit-transform: none !important;
    transform: none !important;
  }
}

/* O nás: fotka z artefaktu je na šířku (900x632) — dle artefaktu height:auto bez stropu. */
body#index .about .about-img{
  width:100%; height:auto;
  -o-object-fit:cover; object-fit:cover;
}

/* Hero má být stejně vysoké jako rail: výškový řetěz Elementor obalů
   ve sloupci s hero (grid stretch končí na .elementor-column). */
body#index .ks-topshell .ks-hero-w,
body#index .ks-topshell .ks-hero-w .elementor-widget-container,
body#index .ks-topshell .elementor-column:last-child .elementor-column-wrap,
body#index .ks-topshell .elementor-column:last-child .elementor-widget-wrap{
  height:100%;
}
body#index .ks-topshell .elementor-column:last-child .elementor-widget-wrap > .elementor-widget:only-child{ height:100%; }

/* Knížky vpravo dole v malých bannerech (artefakt .banner-thumb) */
body#index .ks-banner-sm .banner-thumb{
  position:absolute; right:-10px; bottom:-14px; width:116px; height:auto;
  border-radius:12px; border:4px solid #fff; background:#fff;
  box-shadow:0 12px 26px rgba(0,0,0,.28);
  -webkit-transform:rotate(-6deg); transform:rotate(-6deg);
}
@media (max-width:991.98px){
  body#index .ks-banner-sm .banner-thumb{ width:92px; }
}

/* Hover stin karet v karuselech: prostor pres padding + zaporny margin */
/* klipujici wrapper karuselu - prostor pro hover stin, geometrie zachovana */
body#index .swiper-container-wrapper{
  padding:22px 15px !important;
  margin:-37px -30px !important;
}
