/* ==========================================================
   JOSPORT REDESIGN 2026
   CATEGORY V7
   ========================================================== */

/* 1. Skrytí H1 v kategoriích (SEO zachováno) */
.type-category .category-title,
.type-category h1.category-title,
.type-category .content-wrapper h1:first-of-type{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    margin:-1px!important;
    padding:0!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
    border:0!important;
}

/* 2. Odstranění mezery po H1 */
.type-category .category-top,
.type-category .category-header,
.type-category .content-wrapper{
    margin-top:0!important;
    padding-top:0!important;
}


/* ==========================================================
   3. POPIS KATEGORIE – BANNER VŽDY CELÝ, TEXT ROZBALOVACÍ
   Celý obsah zůstává v HTML kvůli SEO.
   PC: přibližně 10 řádků textu
   Mobil: přibližně 6 řádků textu
   ========================================================== */

/* Samotný obal kategorie už se nikdy neořezává – banner zůstane celý. */
.type-category .category-perex{
    position:relative!important;
    max-height:none!important;
    overflow:visible!important;
}

/* Skript do tohoto obalu přesune pouze obsah ZA bannerem. */
.type-category .jo-category-description-content-v6{
    position:relative!important;
    overflow:hidden!important;
    max-height:17em!important; /* cca 10 řádků na PC */
    line-height:1.7!important;
    transition:max-height .35s ease!important;
}

/* Jemné vyblednutí pouze na konci zkráceného textu. */
.type-category
.jo-category-description-content-v6:not(.jo-expanded)::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:80px;
    background:linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        #fff 86%
    );
    pointer-events:none;
}

/* Rozbalený text. */
.type-category
.jo-category-description-content-v6.jo-expanded{
    max-height:none!important;
    overflow:visible!important;
}

/* Tlačítko rozbalení. */
.type-category .jo-category-toggle-v6{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:max-content!important;
    min-height:44px!important;
    margin:14px auto 26px!important;
    padding:0 18px!important;
    border:1px solid #cbdbea!important;
    border-radius:12px!important;
    background:#fff!important;
    color:#075b9f!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:1!important;
    text-decoration:none!important;
    box-shadow:0 6px 16px rgba(17,52,89,.06)!important;
    cursor:pointer!important;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease!important;
}

.type-category .jo-category-toggle-v6:hover,
.type-category .jo-category-toggle-v6:focus-visible{
    border-color:#9fc4df!important;
    background:#f4f9fd!important;
    color:#075b9f!important;
    box-shadow:0 8px 20px rgba(17,52,89,.10)!important;
    outline:none!important;
}

@media (max-width:767px){
    .type-category .jo-category-description-content-v6{
        max-height:10.2em!important; /* cca 6 řádků */
    }

    .type-category
    .jo-category-description-content-v6:not(.jo-expanded)::after{
        height:64px;
    }

    .type-category .jo-category-toggle-v6{
        width:100%!important;
        margin:12px 0 22px!important;
        box-sizing:border-box!important;
    }
}

/* ==========================================================
   JOSPORT CATEGORY V15 — CLEAN PREMIUM SIDEBAR
   ČISTÁ VERZE POSTAVENÁ PŘÍMO Z CATEGORY V7.
   ŽÁDNÉ STARÉ V8–V14 PATCHY.
   ========================================================== */

@media (min-width:768px){

  body.type-category aside.sidebar.sidebar-left{
    width:258px !important;
    min-width:258px !important;
    max-width:258px !important;
    margin-right:24px !important;
    padding:0 !important;
  }

  body.type-category .sidebar-inner.sidebar-filters-wrapper{
    display:flex !important;
    flex-direction:column !important;
    gap:18px !important;
    width:100% !important;
  }

  body.type-category .sidebar-left .box{
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid #dbe5ee !important;
    border-radius:18px !important;
    background:#fff !important;
    box-shadow:0 12px 34px rgba(20,52,82,.065) !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  body.type-category .sidebar-left .box-categories{
    padding:17px 14px 15px !important;
  }

  /* Nadpis KATEGORIE */
  body.type-category .sidebar-left .box-categories > h4,
  body.type-category .sidebar-left .box-categories .box-title,
  body.type-category .sidebar-left .box-categories .title,
  body.type-category .sidebar-left .box-categories .box-heading{
    margin:0 0 12px !important;
    padding:0 2px 12px !important;
    border-bottom:1px solid #edf2f6 !important;
    color:#173b5e !important;
    font-family:"Roboto",Arial,sans-serif !important;
    font-size:13px !important;
    line-height:1.2 !important;
    font-weight:800 !important;
    letter-spacing:.04em !important;
    text-transform:uppercase !important;
  }

  /*
   * DŮLEŽITÉ:
   * odstranění všech Shoptet pseudo znaků +/−.
   * Žádné vlastní pseudo ikony zde nevytváříme.
   */
  body.type-category .sidebar-left .box-categories .categories::before,
  body.type-category .sidebar-left .box-categories .categories::after,
  body.type-category .sidebar-left .box-categories .topic::before,
  body.type-category .sidebar-left .box-categories .topic::after,
  body.type-category .sidebar-left .box-categories .topic > a::before,
  body.type-category .sidebar-left .box-categories .topic > a::after,
  body.type-category .sidebar-left .box-categories ul::before,
  body.type-category .sidebar-left .box-categories ul::after,
  body.type-category .sidebar-left .box-categories li::before,
  body.type-category .sidebar-left .box-categories li::after,
  body.type-category .sidebar-left .box-categories li > a::before,
  body.type-category .sidebar-left .box-categories li > a::after{
    content:none !important;
    display:none !important;
  }

  /* Reset stromu */
  body.type-category .sidebar-left .box-categories .categories,
  body.type-category .sidebar-left .box-categories .topic{
    position:relative !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }

  /* Hlavní položky */
  body.type-category .sidebar-left .box-categories .categories > .topic > a{
    display:block !important;
    width:100% !important;
    min-height:36px !important;
    margin:0 !important;
    padding:9px 10px !important;
    border:1px solid transparent !important;
    border-radius:10px !important;
    background:transparent !important;
    color:#465f73 !important;
    font-family:"Roboto",Arial,sans-serif !important;
    font-size:12.5px !important;
    line-height:1.35 !important;
    font-weight:500 !important;
    letter-spacing:0 !important;
    text-decoration:none !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
    box-sizing:border-box !important;
  }

  body.type-category .sidebar-left .box-categories .categories > .topic > a:hover{
    color:#075b9f !important;
    background:#f5f9fc !important;
    border-color:#e5eef5 !important;
  }

  /* Aktivní hlavní kategorie podle skutečného Shoptet DOM */
  body.type-category .sidebar-left .box-categories
  .categories.active > .topic.active,
  body.type-category .sidebar-left .box-categories
  .categories.active.expanded > .topic.active{
    position:relative !important;
    margin:4px -7px 5px !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
  }

  body.type-category .sidebar-left .box-categories
  .categories.active > .topic.active > a,
  body.type-category .sidebar-left .box-categories
  .categories.active.expanded > .topic.active > a{
    min-height:40px !important;
    padding:10px 12px 10px 18px !important;
    border:1px solid #cfe3f2 !important;
    border-radius:11px !important;
    background:linear-gradient(90deg,#eaf5fc 0%,#f5fafe 100%) !important;
    color:#075889 !important;
    font-size:13px !important;
    line-height:1.3 !important;
    font-weight:800 !important;
    box-shadow:0 5px 14px rgba(7,91,159,.07) !important;
  }

  body.type-category .sidebar-left .box-categories
  .categories.active > .topic.active{
    border-left:4px solid #1594d2 !important;
    border-radius:4px 11px 11px 4px !important;
  }

  /* Rozbalené podkategorie */
  body.type-category .sidebar-left .box-categories
  .categories > ul{
    margin:4px 0 9px 12px !important;
    padding:2px 0 2px 12px !important;
    border:0 !important;
    border-left:1px solid #e2ebf2 !important;
    background:transparent !important;
    list-style:none !important;
  }

  body.type-category .sidebar-left .box-categories
  .categories > ul > li{
    position:relative !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    list-style:none !important;
  }

  body.type-category .sidebar-left .box-categories
  .categories > ul > li > a{
    display:block !important;
    width:100% !important;
    min-height:32px !important;
    margin:0 !important;
    padding:7px 8px !important;
    border:0 !important;
    border-radius:8px !important;
    background:transparent !important;
    color:#526c81 !important;
    font-family:"Roboto",Arial,sans-serif !important;
    font-size:12px !important;
    line-height:1.4 !important;
    font-weight:500 !important;
    letter-spacing:0 !important;
    text-decoration:none !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
    box-sizing:border-box !important;
  }

  body.type-category .sidebar-left .box-categories
  .categories > ul > li > a:hover{
    color:#075b9f !important;
    background:#f5f9fc !important;
  }

  body.type-category .sidebar-left .box-categories
  .categories > ul > li.active > a{
    color:#075b9f !important;
    background:#f1f8fc !important;
    font-weight:700 !important;
  }

  /* TOP 10 */
  body.type-category .sidebar-left .box-topProducts{
    padding:16px 14px !important;
  }

  body.type-category .sidebar-left .box-topProducts > h4,
  body.type-category .sidebar-left .box-topProducts .box-title,
  body.type-category .sidebar-left .box-topProducts .title,
  body.type-category .sidebar-left .box-topProducts .box-heading{
    margin:0 0 12px !important;
    padding:0 2px 11px !important;
    border-bottom:1px solid #edf2f6 !important;
    color:#173b5e !important;
    font-family:"Roboto",Arial,sans-serif !important;
    font-size:13px !important;
    font-weight:800 !important;
    letter-spacing:.03em !important;
    text-transform:uppercase !important;
  }

  body.type-category .sidebar-left .box-topProducts .product,
  body.type-category .sidebar-left .box-topProducts li{
    margin:0 !important;
    padding:9px 0 !important;
    border-bottom:1px solid #edf2f6 !important;
    background:transparent !important;
  }

  body.type-category .sidebar-left .box-topProducts .product:last-child,
  body.type-category .sidebar-left .box-topProducts li:last-child{
    border-bottom:0 !important;
  }

  body.type-category .sidebar-left .box-topProducts img{
    border-radius:9px !important;
    background:#f7fafc !important;
  }

  body.type-category .sidebar-left .box-topProducts a{
    color:#435e74 !important;
    font-family:"Roboto",Arial,sans-serif !important;
    font-size:10.5px !important;
    line-height:1.3 !important;
    font-weight:600 !important;
    text-decoration:none !important;
  }

  body.type-category .content-wrapper-in.sidebar-indented{
    align-items:flex-start !important;
  }

  body.type-category .category-content-wrapper{
    min-width:0 !important;
    flex:1 1 auto !important;
  }
}

@media (min-width:1200px){
  body.type-category .sidebar-inner.sidebar-filters-wrapper{
    position:sticky !important;
    top:108px !important;
    align-self:flex-start !important;
  }
}

@media (max-width:767px){
  body.type-category aside.sidebar.sidebar-left{
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    margin-right:0 !important;
  }
}

/* ==========================================================
   JOSPORT CATEGORY V16 — CAT-TRIGGER CLEAN FIX
   Odstranění Shoptet symbolů z .cat-trigger.
   ========================================================== */

@media (min-width:768px){

  /* Shoptet vkládá do rozbalitelných kategorií span.cat-trigger
     s vlastním ::before symbolem. Ten se nesmí vykreslovat přes text. */
  body.type-category .sidebar-left .box-categories .cat-trigger,
  body.type-category .sidebar-left .box-categories span.cat-trigger{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
    pointer-events:none !important;
  }

  body.type-category .sidebar-left .box-categories .cat-trigger::before,
  body.type-category .sidebar-left .box-categories .cat-trigger::after,
  body.type-category .sidebar-left .box-categories span.cat-trigger::before,
  body.type-category .sidebar-left .box-categories span.cat-trigger::after{
    content:none !important;
    display:none !important;
  }

  /* Odkazy nemají rezervu pro původní trigger */
  body.type-category .sidebar-left .box-categories .categories > .topic > a{
    padding-left:10px !important;
  }

  body.type-category .sidebar-left .box-categories
  .categories.active > .topic.active > a,
  body.type-category .sidebar-left .box-categories
  .categories.active.expanded > .topic.active > a{
    padding-left:18px !important;
  }
}
