/* ===================================
   SHOPTET SIDEBAR - MINIMÁLNÍ ÚPRAVY
   Pouze: odstranění tetris efektu + podbarvení při hoveru
   =================================== */

/* ===================================
   ODSTRANĚNÍ TETRIS EFEKTU
   =================================== */

/* Pozadí a border vždy od levého okraje */
.categories a,
.box-categories a {
  margin-left: 0 !important;
  background-clip: padding-box !important;
}

/* Hlavní kategorie - přidáme padding vlevo a bold */
.categories .topic a,
.box-categories .topic a {
  padding-left: 15px !important;
  font-weight: 700 !important;
}

/* VŠECHNY hlavní kategorie (první úroveň) - vždy tučné */
.categories > div > .topic > a,
.categories > .expandable > .topic > a,
.box-categories > div > .topic > a {
  font-weight: 700 !important;
}

/* A také přímé potomky categories */
.categories > .categories > .topic > a,
#categories > .categories > .topic > a {
  font-weight: 700 !important;
}

/* Všechny odkazy - více místa vpravo kvůli scrollbaru */
.categories a,
.box-categories a {
  padding-right: 45px !important;
}

/* Šipky (zobáčky) - posuneme víc doleva od scrollbaru */
.cat-trigger {
  right: 18px !important; /* Bylo right: ~10-15px, teď 18px */
  position: absolute !important;
}

/* ===================================
   HOVER EFEKT - ŠEDÉ PODBARVENÍ
   =================================== */

.categories a:hover,
.box-categories a:hover {
  background-color: #f5f5f5 !important;
  transition: background-color 0.2s ease !important;
}

/* ===================================
   AKTIVNÍ POLOŽKA - TMAVŠÍ ŠEDÁ + BOLD
   Aplikuje se i na hlavní kategorie!
   =================================== */

.categories li.active > a,
.categories li.child-active > a,
.box-categories li.active > a,
.box-categories li.child-active > a,
.categories.active > .topic > a,
.categories.child-active > .topic > a {
  background-color: #e8e8e8 !important;
  font-weight: 700 !important; /* Bold pro aktivní */
}

/* Aktivní + hover */
.categories li.active > a:hover,
.categories li.child-active > a:hover,
.categories.active > .topic > a:hover,
.categories.child-active > .topic > a:hover {
  background-color: #ddd !important;
}

/* ===================================
   FIX SCROLLBARU - aby nepřekrýval šipky
   =================================== */

/* Zmenšíme scrollbar a odsadíme ho */
.sidebar-left::-webkit-scrollbar {
  width: 6px !important;
}

.sidebar-left::-webkit-scrollbar-track {
  background: transparent !important;
  margin-right: 2px !important;
}

.sidebar-left::-webkit-scrollbar-thumb {
  background: #ccc !important;
  border-radius: 3px !important;
}

.sidebar-left::-webkit-scrollbar-thumb:hover {
  background: #999 !important;
}

/* Pro Firefox */
.sidebar-left {
  scrollbar-width: thin !important;
  scrollbar-color: #ccc transparent !important;
}

/* ===================================
   FIX SCROLLBARU - SKRYTÍ
   =================================== */

/* ===================================
   FIX SCROLLBARU - SKRYTÍ (KOMPLETNÍ)
   =================================== */

/* 1. Skrytí pro Firefox a IE/Edge */
.sidebar-left,
.sidebar-left .sidebar-inner,
.sidebar-left .categories-wrap,
.sidebar-left .box-categories,
.sidebar-left * {
    scrollbar-width: none !important;  /* Firefox */
    -ms-overflow-style: none !important;  /* IE a starší Edge */
}

/* 2. Skrytí pro Chrome, Safari, Opera (Webkit) */
.sidebar-left::-webkit-scrollbar,
.sidebar-left .sidebar-inner::-webkit-scrollbar,
.sidebar-left .categories-wrap::-webkit-scrollbar,
.sidebar-left .box-categories::-webkit-scrollbar,
.sidebar-left *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ===================================
   ZRUŠENÍ SCROLLOVÁNÍ - OPRAVA ZAVÍRÁNÍ (ZOBÁČKU)
   =================================== */

@media (min-width: 992px) {

    /* 1. Hlavní kontejner sidebaru
       - Tenhle musí přestat "lepit" (sticky) a musí se natáhnout.
       - Zde 'height: auto' nevadí, protože sidebar jako celek nemizí. */
    .sidebar-left,
    .sidebar-left .sidebar-inner,
    .sidebar-left .categories-wrap {
        position: static !important;
        height: auto !important;
        min-height: 0 !important;
        transform: none !important; /* Prevence JS transformací */
    }

    /* 2. Samotný seznam kategorií (#categories) a jeho obal
       - Zde je ta změna. Odstranili jsme příkazy, které vynucovaly
         viditelnost za každou cenu. */
    .sidebar-left .box-categories,
    .sidebar-left #categories {
        /* Klíčové pro odstranění scrollbaru:
           Říkáme "neměj maximální výšku", takže obsah přeteče do stránky
           místo do scrollbaru. */
        max-height: none !important;
        overflow: visible !important;
        
        /* ZDE BYLA CHYBA: Odstraněno 'display: block !important'
           a 'height: auto !important'. Díky tomu teď bude fungovat
           JS script Shoptetu, který při kliknutí na zobáček
           nastavuje display: none nebo height: 0. */
    }

    /* 3. Pojistka pro filtry
       - Aby zůstaly hezky pod kategoriemi, ať už jsou otevřené nebo zavřené. */
    .sidebar-left .box-filters {
        position: relative !important;
        clear: both !important;
        margin-top: 20px !important;
        width: 100% !important;
    }
}