.catalog { padding-top: 24px; padding-bottom: 64px; }
.catalog-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; color: var(--shop-muted); font-size: 14px; }
.catalog-breadcrumb li + li::before { content: '/'; padding-right: 8px; color: #b1b5aa; }
.catalog-breadcrumb a { text-decoration: none; }
.catalog-breadcrumb a:hover { text-decoration: underline; }
.catalog-heading { background: var(--shop-paper); padding: 24px 28px; margin-bottom: 20px; text-align: center; }
/* Nadpis, počet produktov, popis aj „Více o kategorii“ sú vycentrované na celú šírku (požiadavka klienta 19. 10. 2026). */
.catalog-title-row { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.catalog-title-row h1 { margin: 0; font-size: 36px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.catalog-title-row > span { color: var(--shop-muted); font-size: 14px; white-space: nowrap; }
.catalog-lead { margin-top: 14px; font-size: 16px; line-height: 1.65; }
.catalog-lead > :last-child { margin-bottom: 0; }
.catalog-lead.is-collapsible:not(.is-expanded) { max-height: 3.3em; overflow: hidden; }
.catalog-lead img { max-width: 100%; height: auto; }
/* Viac/menej je zreteľné tlačidlo, nie odkaz v texte (poznámka klienta 3. 11. 2026). */
.catalog .catalog-intro-toggle { margin-top: 12px; border: 1px solid var(--second-color); text-decoration: none; }
.catalog .catalog-intro-toggle[hidden] { display: none; }
.catalog-subcategories { margin-bottom: 32px; }
.catalog-category-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
/* Dlaždica podkategórie .catalog-category je globálna v modern.css (používa ju aj mega menu). */
.catalog details > summary { list-style: none; cursor: pointer; }
.catalog details > summary::-webkit-details-marker { display: none; }
.catalog details[open] > summary > span[aria-hidden]:not(.icon) { transform: rotate(45deg); }
.catalog-more-categories > summary { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; font-size: 14px; font-weight: 600; }
.catalog-found { margin: 0 0 24px; }
.catalog-found h2 { font-size: 18px; margin: 0 0 12px; }
.catalog-found-links { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-found-links a { background: var(--shop-paper); border: 1px solid var(--shop-line); padding: 8px 14px; font-size: 14px; text-decoration: none; }
.catalog-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 32px; align-items: start; }
.catalog-with-categories { grid-template-columns: 224px minmax(0,1fr); }
.catalog-sidebar { min-width: 0; }
/* Category navigation and product filters are separate controls. */
.catalog-tree > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 16px; border-bottom: 1px solid var(--shop-line); font-size: 18px; font-weight: 600; }
.catalog-tree > summary > .icon { display: none; }
.catalog-tree-body { padding-top: 10px; }
.catalog-tree-list, .catalog-tree-list ul { list-style: none; padding: 0; margin: 0; }
.catalog-tree-list ul { margin: 2px 0 8px 13px; padding-left: 10px; border-left: 1px solid var(--shop-line); }
.catalog-tree-list li { margin: 2px 0; }
.catalog-tree-list summary { display: flex; align-items: center; gap: 4px; border-radius: 3px; }
.catalog-tree-list summary > .icon { width: 16px; height: 16px; margin-right: 8px; flex: 0 0 16px; color: var(--shop-muted); }
.catalog-tree-branch[open] > summary > .icon { transform: rotate(180deg); }
.catalog-tree-list a, .catalog-all { display: block; min-width: 0; padding: 10px 12px; border-radius: 3px; font-size: 15px; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.catalog-tree-list summary > a { flex: 1; }
.catalog-tree-list > li > a, .catalog-tree-list > li > details > summary > a, .catalog-all { font-weight: 600; }
.catalog-tree-list a:hover, .catalog-all:hover { background: var(--shop-paper); }
.catalog-tree-list a[aria-current="page"], .catalog-all[aria-current="page"] { background: var(--shop-paper); color: var(--main-color); font-weight: 600; box-shadow: inset 2px 0 var(--main-color); }
/* Filtre vľavo a radenie vpravo v jednom riadku (požiadavka klienta 19. 10. 2026). */
.catalog-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding: 0 0 18px; border-bottom: 1px solid var(--shop-line); }
.catalog-filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; min-width: 0; }
.catalog-filter-label, .catalog-sort-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--shop-muted); white-space: nowrap; }
.catalog-filter-label .icon, .catalog-sort-label .icon { width: 17px; height: 17px; }
.catalog-filter-options { position: relative; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.catalog-filter-group { position: relative; min-width: 0; }
.catalog-filter-group > summary { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 14px; border: 1px solid var(--shop-line); border-radius: 4px; font-size: 14px; }
.catalog-filter-group > summary > .icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--shop-muted); }
.catalog-filter-group[open] > summary > .icon { transform: rotate(180deg); }
.catalog-filter-group:is([open],.is-active) > summary { border-color: var(--main-color); background: var(--shop-paper); }
/* Zrušenie filtra: rovnaký tvar ako filtre, jemne červené (poznámka klienta 28. 10. 2026). */
.catalog-filter-reset { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 9px 14px; border: 1px solid color-mix(in srgb, var(--main-color) 35%, #fff); border-radius: 4px; background: color-mix(in srgb, var(--main-color) 7%, #fff); color: var(--main-color); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.catalog-filter-reset:hover { border-color: var(--main-color); background: color-mix(in srgb, var(--main-color) 12%, #fff); color: var(--main-color); }
.catalog-filter-reset .icon { width: 14px; height: 14px; flex: 0 0 14px; }
.catalog-filter-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; color: var(--shop-muted); }
.catalog-filter-links { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; display: grid; gap: 2px; width: 250px; padding: 8px; border: 1px solid var(--shop-line); border-radius: 5px; background: white; box-shadow: 0 8px 24px rgb(30 40 25 / 8%); }
.catalog-filter-group.align-right .catalog-filter-links { left: auto; right: 0; }
.catalog-filter-links a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; font-size: 14px; line-height: 1.4; text-decoration: none; }
.catalog-filter-links a::before { content: ''; width: 14px; height: 14px; flex: 0 0 14px; border: 1px solid #b5b9ae; border-radius: 50%; }
.catalog-filter-links a:hover { background: var(--shop-paper); }
.catalog-filter-links a.active { background: var(--shop-paper); font-weight: 600; }
.catalog-filter-links a.active::before { border: 4px solid var(--main-color); }
.catalog-results { min-width: 0; }
.catalog-toolbar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-left: auto; }
.catalog-sort { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-sort a { padding: 9px 14px; font-size: 14px; text-decoration: none; border: 1px solid transparent; }
.catalog-sort a:hover { border-color: var(--shop-line); }
.catalog-sort a.active { background: var(--main-color); color: white; }
.catalog-active-filter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; background: var(--shop-paper); padding: 12px 16px; margin-top: 16px; font-size: 14px; }
.catalog-active-filter a { font-weight: 600; text-decoration: none; }
.catalog .catalog-pagination-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 18px 0 22px; font-size: 14px; color: var(--shop-muted); }
.catalog .catalog-pagination-links { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.catalog .catalog-pagination-links > :is(a,span) { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; padding: 5px 9px; background: transparent; border: 1px solid transparent; color: var(--shop-ink); text-decoration: none; font-size: 14px; }
.catalog .catalog-pagination-links > a:hover { border-color: var(--shop-line); }
.catalog .catalog-pagination-links > .active { background: var(--shop-paper); border-color: var(--shop-line); font-weight: 700; }
.catalog-product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px 18px; }
/* S ľavým stromom kategórií sú od lg tri väčšie karty v riadku (požiadavka klienta 19. 10. 2026). */
.catalog-with-categories .catalog-product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.catalog-product-grid > .product-item { min-width: 0; }
.product-gallery, .product-gallery-dots { display: none; }
.catalog-results[aria-busy="true"] .catalog-product-grid { opacity: .5; transition: opacity .2s; }
.catalog .product-info h3 { font-size: 16px; line-height: 1.45; }
.catalog .product-meta { gap: 6px; flex-wrap: wrap; }
.catalog .product-meta strong { font-size: 18px; }
.catalog .product-meta > span { font-size: 11px; }
.catalog-empty { grid-column: 1/-1; padding: 48px 24px; text-align: center; background: var(--shop-paper); }
.catalog-empty p { font-size: 16px; }
.catalog-description { margin-top: 32px; border-top: 1px solid var(--shop-line); border-bottom: 1px solid var(--shop-line); }
.catalog-description > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 16px; font-weight: 600; }
.catalog-description > div { padding: 0 0 24px; font-size: 16px; }
.catalog :is(a,button,summary):focus-visible { outline: 2px solid var(--main-color); outline-offset: 3px; }
@media (max-width: 1199px) {
    .catalog-product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .catalog-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .catalog-subcategories > .catalog-category-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 30px)/4); overflow-x: auto; padding-bottom: 6px; }
    .catalog-with-categories { grid-template-columns: 200px minmax(0,1fr); gap: 24px; }
}
@media (max-width: 991px) {
    .catalog-with-categories { grid-template-columns: minmax(0,1fr); gap: 18px; }
    .catalog-category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .catalog-subcategories > .catalog-category-grid { grid-auto-columns: calc((100% - 20px)/3); }
    .catalog-tree { border-top: 1px solid var(--shop-line); border-bottom: 1px solid var(--shop-line); }
    .catalog-tree > summary { padding: 15px 0; border: 0; font-size: 16px; }
    .catalog-tree > summary > .icon { display: inline-flex; width: 18px; height: 18px; }
    .catalog-tree[open] > summary > .icon { transform: rotate(180deg); }
    .catalog-tree-body { padding: 0 0 12px; }
    .catalog-controls { padding-bottom: 14px; }
}
@media (max-width: 639px) {
    .catalog { padding-top: 18px; padding-bottom: 36px; }
    .catalog-breadcrumb { font-size: 13px; margin-bottom: 18px; }
    .catalog-heading { padding: 22px 18px; margin-bottom: 18px; }
    .catalog-title-row h1 { font-size: 28px; }
    .catalog-title-row > span { font-size: 13px; }
    .catalog-lead { font-size: 15px; }
    .catalog-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .catalog-subcategories > .catalog-category-grid { grid-auto-columns: 72%; }
    .catalog-category { font-size: 14px; gap: 8px; padding: 10px; min-height: 62px; }
    .catalog-category img { width: 28px; height: 28px; flex-basis: 28px; }
    .catalog-category > span:last-child { display: none; }
    .catalog-subcategories { margin-bottom: 22px; }
    .catalog-filter-bar { width: 100%; }
    .catalog-filter-label { width: 100%; }
    .catalog-filter-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; gap: 6px; }
    .catalog-filter-group { position: static; }
    .catalog-filter-group > summary { justify-content: space-between; gap: 4px; padding: 9px 8px; }
    .catalog-filter-group > summary > .icon { width: 12px; height: 12px; flex-basis: 12px; }
    .catalog-filter-value { display: none; }
    .catalog-filter-reset { grid-column: 1 / -1; justify-content: center; }
    .catalog-filter-links, .catalog-filter-group.align-right .catalog-filter-links { width: auto; left: 0; right: 0; }
    .catalog-toolbar { width: 100%; justify-content: space-between; gap: 8px; }
    .catalog-sort { gap: 2px; }
    .catalog-sort a { font-size: 13px; padding: 8px 9px; }
    /* Mobil: jeden veľký produkt na riadok s posuvnou galériou (pripomienka klienta 19. 10. 2026). */
    .catalog-product-grid, .catalog-with-categories .catalog-product-grid { grid-template-columns: minmax(0,1fr); gap: 22px 12px; }
    .catalog-product-grid .product-image.has-gallery > :is(.product-primary, .product-hover) { display: none; }
    .catalog-product-grid .product-gallery { position: absolute; inset: 0; z-index: 0; display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .catalog-product-grid .product-gallery::-webkit-scrollbar { display: none; }
    .catalog-product-grid .product-gallery > img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; scroll-snap-align: start; scroll-snap-stop: always; }
    .catalog-product-grid .product-gallery-dots { position: absolute; z-index: 2; bottom: 10px; left: 50%; display: flex; gap: 6px; padding: 5px 8px; transform: translateX(-50%); border-radius: 999px; background: color-mix(in srgb, var(--second-color) 45%, transparent); pointer-events: none; }
    .catalog-product-grid .product-gallery-dots > i { width: 7px; height: 7px; border-radius: 50%; background: var(--main-text-color); opacity: .55; }
    .catalog-product-grid .product-gallery-dots > i.is-active { opacity: 1; }
    .catalog-product-grid .product-image.has-gallery .product-note { bottom: 34px; }
    .catalog .product-info h3 { font-size: 15px; }
    .catalog .product-meta strong { font-size: 17px; }
    .catalog .catalog-pagination-row { font-size: 13px; }
    .catalog .catalog-pagination-links { gap: 3px; }
    .catalog .catalog-pagination-links > :is(a,span) { min-width: 30px; padding: 5px 7px; }
}

@media (max-width: 359px) {
    .catalog-filter-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Podkategórie: zavreté ukazujú päť (mobil dve), tlačidlo je vždy pod zoznamom (poznámky klienta 3. a 4. 11. 2026). */
.catalog-more-categories { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 14px; border: 0; background: none; color: inherit; font-size: 14px; font-weight: 600; }
.catalog-more-categories:hover { text-decoration: underline; }
.catalog-subcategories:not(.is-open) .catalog-category.is-extra { display: none; }
.catalog-subcategories.is-open > .catalog-category-grid { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; padding-bottom: 0; }
@media (max-width: 1199px) { .catalog-subcategories.is-open > .catalog-category-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
@media (min-width: 640px) { .catalog-more-categories.is-mobile-only { display: none; } }
@media (max-width: 639px) {
    .catalog-subcategories .catalog-category { height: 72px; min-height: 0; overflow: hidden; }
    .catalog-subcategories .catalog-category > span:not(.icon) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.3; }
    .catalog-subcategories.has-more > .catalog-category-grid, .catalog-subcategories.is-open > .catalog-category-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding-bottom: 0; }
    .catalog-subcategories.has-more:not(.is-open) > .catalog-category-grid > :nth-child(n + 3) { display: none; }
}

/* Stránkovanie: rovnaké zaoblené tlačidlá, aktívna strana tmavá, šípka s medzerou (pripomienka klienta 6. 11. 2026). */
body .catalog .catalog-pagination-links { gap: 6px; }
body .catalog .catalog-pagination-links > :is(a, span) { gap: 6px; min-width: 40px; height: 40px; min-height: 0; padding: 0 12px; border: 1px solid var(--shop-line); border-radius: 8px; background: #fff; color: var(--second-color); font-size: 14px; font-weight: 600; line-height: 1; transition: border-color .15s, color .15s, background-color .15s; }
body .catalog .catalog-pagination-links > a:hover { border-color: var(--main-color); color: var(--main-color); }
body .catalog .catalog-pagination-links > .active { border-color: var(--second-color); background: var(--second-color); color: #fff; }
body .catalog .catalog-pagination-links > span[aria-hidden] { min-width: 0; padding: 0 2px; border-color: transparent; background: transparent; color: var(--shop-muted); }
body .catalog .catalog-pagination-links > a[rel] strong, body .catalog .catalog-pagination-links > a[rel="prev"] { font-size: 20px; font-weight: 500; line-height: 1; }
body .catalog .catalog-pagination-links > a[rel] strong { margin-top: -2px; }
body .catalog .catalog-pagination-links > a[rel="prev"] { padding-bottom: 2px; }
@media (max-width: 639px) {
    body .catalog .catalog-pagination-links { gap: 4px; }
    body .catalog .catalog-pagination-links > :is(a, span) { min-width: 36px; height: 36px; padding: 0 10px; }
}
