
body.type-category {
  --vp-green: #116835;
  --vp-green-deep: #0b3f21;
  --vp-orange: #f89834;
  --vp-orange-hover: #db8021;
  --vp-ink: #17251c;
  --vp-muted: #5c6b61;
  --vp-line: #e3e8e4;
  --vp-surface: #ffffff;
  --vp-surface-alt: #f4f6f4;
  --vp-radius: 14px;
  --vp-gap: 20px;
  --vp-shadow: 0 1px 2px rgba(17, 40, 25, .05);
  --vp-shadow-hover: 0 6px 16px rgba(17, 40, 25, .12);
}

/* ================================================================== nadpisy */
body.type-category .category-title {
  margin: 0 0 14px;
  color: var(--vp-ink);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-transform: none;
}

body.type-category .vp-kicker {
  display: block;
  margin: 0 0 6px;
  color: var(--vp-orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.type-category .products-top-header {
  margin: 0 0 18px;
  color: var(--vp-ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  text-transform: none;
}

/* ================================================================== tlačítka */

/* hlavní akce — oranžová jako "Do košíku" na úvodu */
body.type-category .btn-cart,
body.type-category .btn-conversion {
  border: 0;
  border-radius: 8px;
  background-color: var(--vp-orange);
  color: #fff;
  font-weight: 700;
  text-transform: none;
  white-space: nowrap;
  transition: background-color .15s ease;
}

body.type-category .btn-cart:hover,
body.type-category .btn-conversion:hover {
  background-color: var(--vp-orange-hover);
  color: #fff;
}

/* vedlejší akce — bílé tlačítko se zeleným textem (načíst další, stránkování,
 * nahoru, otevřít filtr, rozbalit popis kategorie) */
body.type-category .loadMore__button,
body.type-category .goToTop__button,
body.type-category .pagination__link.btn,
body.type-category .toggle-top-products,
body.type-category .filters-unveil-button-wrapper .unveil-button,
body.type-category .show-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--vp-line);
  border-radius: 10px;
  background: var(--vp-surface);
  color: var(--vp-green);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

body.type-category .loadMore__button:hover,
body.type-category .goToTop__button:hover,
body.type-category .pagination__link.btn:hover,
body.type-category .toggle-top-products:hover,
body.type-category .filters-unveil-button-wrapper .unveil-button:hover,
body.type-category .show-more:hover {
  border-color: rgba(17, 104, 53, .35);
  background: var(--vp-surface-alt);
  color: var(--vp-green-deep);
  text-decoration: none;
}

/* "Načíst další" je hlavní akce výpisu — dostane plnou zelenou */
body.type-category .loadMore__button {
  border-color: var(--vp-green);
  background: var(--vp-green);
  color: #fff;
}

body.type-category .loadMore__button:hover {
  border-color: var(--vp-green-deep);
  background: var(--vp-green-deep);
  color: #fff;
}

/* ------------------------------------------------------------ řazení výpisu */
body.type-category .listSorting__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.type-category .listSorting__control {
  padding: 8px 16px;
  border: 1px solid var(--vp-line);
  border-radius: 999px;
  background: var(--vp-surface);
  color: var(--vp-muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

body.type-category .listSorting__control:hover {
  border-color: rgba(17, 104, 53, .35);
  color: var(--vp-ink);
}

body.type-category .listSorting__control--current {
  border-color: var(--vp-green);
  background: var(--vp-green);
  color: #fff;
}

body.type-category .listItemsTotal,
body.type-category .itemsTotal {
  color: var(--vp-muted);
  font-size: 14px;
}

/* --------------------------------------------------------------- stránkování */
body.type-category .pagination__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.type-category .pagination__link:not(.btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--vp-line);
  border-radius: 10px;
  background: var(--vp-surface);
  color: var(--vp-ink);
  font-weight: 600;
  text-decoration: none;
}

body.type-category .pagination__link:not(.btn):hover {
  border-color: rgba(17, 104, 53, .35);
  background: var(--vp-surface-alt);
  text-decoration: none;
}

body.type-category .pagination__item--current .pagination__link,
body.type-category .pagination__link--current {
  border-color: var(--vp-green);
  background: var(--vp-green);
  color: #fff;
}

/* ======================================================= dlaždice podkategorií */
body.type-category .vp-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vp-gap);
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

body.type-category .vp-subcats > li {
  width: calc((100% - 3 * var(--vp-gap)) / 4);
  margin: 0;
  padding: 0;
  float: none;
}

body.type-category .vp-subcats > li > a {
  height: 100%;
  padding: 10px 12px;
  background: var(--vp-surface);
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  color: var(--vp-ink);
  text-decoration: none;
  box-shadow: var(--vp-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.type-category .vp-subcats > li > a:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 104, 53, .35);
  box-shadow: var(--vp-shadow-hover);
  color: var(--vp-ink);
  text-decoration: none;
}

body.type-category .vp-subcats .text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

/* ========================================================= karty produktů */

/* pryč s rámečky původní mřížky — kartu kreslí až .p uvnitř */
body.type-category .vp-cards,
body.type-category .vp-cards .product {
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

body.type-category .vp-cards .product {
  display: flex;
  padding: 0 !important;
}

body.type-category .vp-cards .product > .p {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: auto;
  margin: 5px 8px 12px;
  padding: 16px;
  background: var(--vp-surface);
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  box-shadow: var(--vp-shadow);
  transition: border-color .18s ease, box-shadow .18s ease;
}

body.type-category .vp-cards .product > .p:hover {
  border-color: rgba(17, 104, 53, .35);
  box-shadow: var(--vp-shadow-hover);
}

/* obrázek roste do volného místa, ať karta nemá prázdné okno */
body.type-category .vp-cards .p > .image {
  display: block;
  position: relative;
  flex: 1 1 auto;
  min-height: 175px;
  margin-bottom: 14px;
  overflow: hidden;
}

body.type-category .vp-cards .p > .image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

/* šablona dává .p-in výšku 100 %, což kartu přetahuje */
body.type-category .vp-cards .p .p-in {
  display: block;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
}

/* název na dva řádky s tečkami — šablona ho ořezává pevnou výškou a u delších
 * názvů to řeže text v půlce písmen */
body.type-category .vp-cards .p .name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: auto;
  min-height: 2.7em;
  max-height: none;
  margin: 0 0 10px;
  color: var(--vp-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}

body.type-category .vp-cards .p .name:hover {
  color: var(--vp-green);
}

/* hvězdičky vlevo, dostupnost vpravo — na jednom řádku */
body.type-category .vp-cards .p .ratings-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 22px;
  margin-bottom: 10px;
  padding: 0;
}

body.type-category .vp-cards .p .ratings-wrapper > * {
  flex: 0 1 auto;
  width: auto;
  margin: 0;
}

body.type-category .vp-cards .p .availability {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

body.type-category .vp-cards .p .p-bottom {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--vp-line);
}

/* cena vlevo, tlačítko vpravo na jednom řádku */
body.type-category .vp-cards .p .p-bottom > div {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 12px;
}

body.type-category .vp-cards .p .prices {
  flex: 1 1 auto;
  margin: 0;
  text-align: left;
}

body.type-category .vp-cards .p .price-additional {
  color: var(--vp-muted);
  font-size: 12px;
  line-height: 1.3;
}

body.type-category .vp-cards .p .price-final {
  color: var(--vp-ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

body.type-category .vp-cards .p .price-measure,
body.type-category .vp-cards .p .p-code {
  display: none;
}

body.type-category .vp-cards .p .p-tools {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  margin: 0 0 0 auto;
}

/* produkty s variantami mají místo košíku odkaz "Detail" — stejný tvar,
 * jen v zelené, ať je jasné, že to není přidání do košíku */
body.type-category .vp-cards .p .p-tools .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background-color: var(--vp-green);
  color: #fff;
  font-weight: 700;
  text-transform: none;
  white-space: nowrap;
  transition: background-color .15s ease;
}

body.type-category .vp-cards .p .p-tools .btn-primary:hover {
  background-color: var(--vp-green-deep);
  color: #fff;
}

/* Blok doporučených produktů nahoře je jiný typ výpisu (products-inline) —
 * kartu tam nekreslíme, jen sjednotíme typografii. */
body.type-category .products-inline .p .name {
  min-height: 0;
  color: var(--vp-ink);
  font-weight: 700;
}

body.type-category .products-inline .p .price-final {
  color: var(--vp-ink);
  font-weight: 800;
}

/* ============================================================ postranní panel */
body.type-category .sidebar .box {
  margin-bottom: 20px;
  background: var(--vp-surface);
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  box-shadow: var(--vp-shadow);
}

body.type-category .sidebar .box .pageElement__heading,
body.type-category .sidebar .box h3,
body.type-category .sidebar .box h4 {
  margin: 0 0 12px;
  color: var(--vp-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: none;
}

body.type-category .sidebar .categories .topic > a {
  color: var(--vp-ink);
  font-weight: 700;
}

body.type-category .sidebar .categories .topic.active > a,
body.type-category .sidebar .categories a:hover {
  color: var(--vp-green);
}

body.type-category .sidebar .categories ul a {
  color: var(--vp-muted);
}

body.type-category .sidebar .filter-label {
  color: var(--vp-ink);
  font-size: 14px;
}

body.type-category .sidebar .filter-count {
  color: var(--vp-muted);
  font-size: 12px;
}

body.type-category .sidebar .top-products-name {
  color: var(--vp-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

body.type-category .sidebar .top-products strong {
  color: var(--vp-ink);
  font-weight: 800;
}

/* -------------------------------------------------------------- responzivita */
@media (max-width: 1199px) {
  body.type-category .vp-subcats > li {
    width: calc((100% - 2 * var(--vp-gap)) / 3);
  }
}

@media (max-width: 991px) {
  body.type-category .category-title {
    font-size: 25px;
  }

  body.type-category .vp-subcats > li {
    width: calc((100% - var(--vp-gap)) / 2);
  }
}

@media (max-width: 767px) {
  body.type-category {
    --vp-gap: 14px;
  }

  body.type-category .vp-cards .p > .image {
    min-height: 130px;
  }

  body.type-category .listSorting__controls {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.type-category .listSorting__controls::-webkit-scrollbar {
    display: none;
  }

  body.type-category .listSorting__control {
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.type-category .vp-cards .product > .p,
  body.type-category .vp-subcats > li > a {
    transition: none;
  }
}
