/* ==========================================================================
   CUSTOM-B.CSS — Shoptet Klasik: Custom úpravy v3
   ========================================================================== */

/* ------------------------------------------------------------------
   1) TABULKA VLASTNOSTÍ PRODUKTU
   ------------------------------------------------------------------ */

.type-product .cb-properties {
  margin: 20px 0 10px;
}

.type-product .cb-properties__title {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 12px;
}

.type-product .cb-properties__table-wrap {
  position: relative;
  overflow: hidden;
}

.type-product .cb-properties__table {
  width: 100%;
  border-collapse: collapse !important;
}

.type-product .cb-properties__table th,
.type-product .cb-properties__table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.10);
  vertical-align: top;
  text-align: left;
}

.type-product .cb-properties__table th {
  width: 38%;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.03);
}

/* ------------------------------------------------------------------
   2) ZOBRAZIT VÍCE / MÉNĚ — fade efekt + template color
   ------------------------------------------------------------------ */

.type-product .cb-properties--collapsed .cb-properties__table tbody tr:nth-child(n+7) {
  display: none;
}

.type-product .cb-properties--collapsed .cb-properties__table-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
  z-index: 1;
}

.type-product .cb-show-more-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 12px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
  letter-spacing: 0.02em;
}

.type-product .cb-show-more-btn:hover {
  opacity: 0.75;
}

.type-product .cb-show-more-btn .cb-chevron {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  transition: transform 0.25s ease;
}

.type-product .cb-properties--collapsed .cb-show-more-btn .cb-chevron {
  transform: rotate(0deg);
}

.type-product .cb-properties:not(.cb-properties--collapsed) .cb-show-more-btn .cb-chevron {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------------
   3) HERO OBRÁZEK Z POPISU
   ------------------------------------------------------------------ */

.type-product .cb-desc-hero {
  margin: 0 0 16px;
  line-height: 0;
}

.type-product .cb-desc-hero__img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ------------------------------------------------------------------
   4) JEDNOSLOUPCOVÝ LAYOUT + SKRYTÍ ORIGINÁLNÍCH PARAMETRŮ
   ------------------------------------------------------------------ */

.type-product .cb-singlecol {
  display: flex !important;
  flex-direction: column !important;
}

.type-product .cb-singlecol > * {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  flex: 0 0 100% !important;
}

.type-product .cb-hide-original {
  display: none !important;
}

/* ------------------------------------------------------------------
   5) SBALOVACÍ KATEGORIE V SIDEBARU — REDESIGN
   ------------------------------------------------------------------ */

@media (min-width: 992px) {

  /* -------------------------------------------------------
     5a) Box: reset padding, zaoblení, overflow clip
     ------------------------------------------------------- */

  .box-categories.cb-cats-collapsible {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 4px;
    transition: margin-bottom 0.3s ease;
  }

  /* Spacing pod boxem — vzdálenost od dalšího elementu (separator / box) */
  .box-categories.cb-cats-collapsible:not(.cb-cats-expanded) {
    margin-bottom: 18px !important;
  }

  .box-categories.cb-cats-collapsible.cb-cats-expanded {
    margin-bottom: 14px !important;
  }

  /* -------------------------------------------------------
     5b) Heading h4 = červený button/bar
     ------------------------------------------------------- */

  .box-categories.cb-cats-collapsible > h4 {
    display: block;
    background: #c0392b;
    color: #fff !important;
    padding: 14px 44px 14px 16px !important;
    margin: 0 !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 0.2s ease;
    line-height: 1.3;
    border: none;
  }

  .box-categories.cb-cats-collapsible > h4:hover {
    background-color: #e74c3c;
  }

  .box-categories.cb-cats-collapsible > h4:active {
    background-color: #a93226;
  }

  /* Chevron: bílý trojúhelník vpravo */
  .box-categories.cb-cats-collapsible > h4::after {
    content: '';
    display: block;
    position: absolute;
    right: 16px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #fff;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
  }

  .box-categories.cb-cats-collapsible.cb-cats-expanded > h4::after {
    transform: translateY(-50%) rotate(180deg);
  }

  /* Rozbalený stav: spodní okraj headeru */
  .box-categories.cb-cats-collapsible.cb-cats-expanded > h4 {
    margin-bottom: 0 !important;
  }

  /* -------------------------------------------------------
     5c) #categories kontejner: collapse/expand animace
     ------------------------------------------------------- */

  .box-categories.cb-cats-collapsible > #categories {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.25s ease;
  }

  .box-categories.cb-cats-collapsible.cb-cats-expanded > #categories {
    max-height: 3000px;
    opacity: 1;
    padding: 10px 14px 14px;
    transition: max-height 0.5s ease, opacity 0.3s ease 0.05s;
  }

  /* -------------------------------------------------------
     5d) Skip-link wrappery: schovat vizuálně
     ------------------------------------------------------- */

  .box-categories.cb-cats-collapsible > .skip-link_wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 !important;
    margin: 0 !important;
  }

  .box-categories.cb-cats-collapsible.cb-cats-expanded > .skip-link_wrapper {
    /* Zůstávají schované — jsou to sr-only prvky */
    max-height: 0;
    overflow: hidden;
  }

}

/* Mobil: žádný collapse */
@media (max-width: 991px) {
  .box-categories.cb-cats-collapsible > #categories {
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
  }
  .box-categories.cb-cats-collapsible > h4 {
    background: transparent !important;
    color: inherit !important;
    padding: initial !important;
    cursor: default !important;
    text-transform: none !important;
    letter-spacing: normal !important;
  }
  .box-categories.cb-cats-collapsible > h4::after {
    display: none !important;
  }
}