/* ============================================================
   BASTLIK.CZ — Dlaždice kategorií na HOMEPAGE (za bannery a
   výhodami, před nejprodávanějšími)
   Vložit do: Shoptet -> Vzhled a obsah -> Editor -> HTML kód ->
   Záhlaví, do <style>...</style>. K tomu patří JS (do Zápatí).

   Blok vytváří JS ze živého stromu kategorií (#categories), takže
   se sám aktualizuje podle administrace. Sidebar vlevo zůstává.
   Prefix: .bstl-hp-cats*  (nic jiného se neovlivní)
   ============================================================ */

.bstl-hp-cats-section {
  --bstlhc-navy:#16233a;
  --bstlhc-blue:#007bff;
  --bstlhc-border:#e5e7eb;
  --bstlhc-muted:#6b7280;
  --bstlhc-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  font-family:var(--bstlhc-font);
  margin:28px 0 36px;
}

.bstl-hp-cats-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  margin-bottom:18px;
}
.bstl-hp-cats-head h2{
  font-family:var(--bstlhc-font);
  font-size:24px;font-weight:800;color:var(--bstlhc-navy);letter-spacing:-.01em;margin:0;
}
.bstl-hp-cats-head .bstl-hp-cats-eyebrow{
  display:block;font-size:12.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--bstlhc-blue);margin-bottom:6px;
}

/* mřížka — sama se přizpůsobí počtu kategorií (řádky se dolévají) */
.bstl-hp-cats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.bstl-cat-tile{
  position:relative;
  display:flex;align-items:center;gap:14px;
  padding:16px 18px;
  background:#fff;
  border:1px solid var(--bstlhc-border);
  border-radius:14px;
  text-decoration:none;
  min-height:84px;
  transition:border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.bstl-cat-tile:hover{
  border-color:var(--bstlhc-blue);
  box-shadow:0 10px 26px rgba(22,34,56,.10);
  transform:translateY(-2px);
  text-decoration:none;
}

.bstl-cat-ic{
  flex-shrink:0;
  width:50px;height:50px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:var(--b,#eef1f6);
  color:var(--c,#2563eb);
}
.bstl-cat-ic svg{width:24px;height:24px;display:block}

.bstl-cat-name{
  font-size:15.5px;font-weight:700;color:var(--bstlhc-navy);line-height:1.3;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}

.bstl-cat-arrow{
  position:absolute;top:14px;right:16px;
  color:#c3ccd8;font-size:15px;line-height:1;
  transition:color .15s ease, transform .15s ease;
}
.bstl-cat-tile:hover .bstl-cat-arrow{color:var(--bstlhc-blue);transform:translate(2px,-2px)}

/* ---------- Responzivita ---------- */
@media (max-width:991px){
  .bstl-hp-cats{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:640px){
  .bstl-hp-cats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
  .bstl-hp-cats-head h2{font-size:20px;}
  .bstl-cat-tile{padding:14px;gap:12px;min-height:74px;}
  .bstl-cat-ic{width:44px;height:44px;border-radius:10px;}
  .bstl-cat-ic svg{width:22px;height:22px;}
  .bstl-cat-name{font-size:14px;}
  .bstl-cat-arrow{display:none;}
}
@media (max-width:360px){
  .bstl-hp-cats{grid-template-columns:1fr;}
}
