#products .products,
.featured-products .products,
.product-accessories .products {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start
}

#products .products-section-title,
.featured-products .products-section-title,
.product-accessories .products-section-title {
    margin: 2.5rem 0;
    font-weight: 500;
    text-align: center
}

#products .all-product-link,
.featured-products .all-product-link,
.product-accessories .all-product-link {
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    clear: both;
    font-weight: 500;
    color: var(--muted);
    text-align: center;
    float: none !important
}

.product-miniature,
.product-miniature .product {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center
}

.product-miniature .product {
    padding: 0;
    margin: 0 .8125rem
}

.page-index .product-miniature .product,
.page-search .product-miniature .product {
    width: 25%;
    min-width: 250px
}

.product-miniature .product-thumbnail {
    display: block
}

.product-miniature .product-title a {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    text-decoration: none
}

.product-miniature .thumbnail-container {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    cursor: pointer
}

/* Overlay — cała karta jako link */
.product-miniature .card-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 0
}

.product-miniature .thumbnail-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,.4);
    border-color: rgba(91,227,160,.25)
}

.product-miniature .thumbnail-container:focus .highlighted-informations,
.product-miniature .thumbnail-container:hover .highlighted-informations {
    top: calc(100% - 4.4rem)
}

.product-miniature .thumbnail-container:focus .highlighted-informations::after,
.product-miniature .thumbnail-container:hover .highlighted-informations::after {
    opacity: 1
}

.product-miniature .thumbnail-container:focus .highlighted-informations.no-variants,
.product-miniature .thumbnail-container:hover .highlighted-informations.no-variants {
    top: calc(100% - 2.5rem)
}

.product-miniature .thumbnail-container:focus .product-description::after,
.product-miniature .thumbnail-container:hover .product-description::after {
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    content: "";
    border-top: var(--muted) 1px solid;
    opacity: .25
}

.product-miniature .thumbnail-container .product-thumbnail {
    display: block;
    width: 100%;
    height: 100%
}

.product-miniature .thumbnail-container .product-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center
}

.product-miniature .product-title {
    margin-top: .7rem;
    text-align: center;
    text-transform: capitalize
}

.product-miniature .product-price-and-shipping {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-align: center
}

.product-miniature .product-price-and-shipping .discount-product {
    display: none
}

.product-miniature .variant-links {
    position: relative;
    top: -.25em;
    width: 100%;
    min-height: 2.5rem;
    padding-top: .1875rem;
    text-align: center;
    background: var(--surface)
}

.product-miniature .thumbnail-top {
    position: relative;
    overflow: hidden;
    -ms-flex-negative: 0;
    flex-shrink: 0
}

.product-miniature .thumbnail-top::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, var(--surface));
    pointer-events: none;
    z-index: 1
}

.product-miniature .highlighted-informations {
    position: absolute;
    top: 100%;
    z-index: 2;
    width: 100%;
    height: auto;
    padding: .625rem 0;
    text-align: center;
    background: var(--surface);
    -webkit-transition: .3s;
    transition: .3s
}

.product-miniature .highlighted-informations .quick-view {
    font-size: 1rem;
    color: var(--muted)
}

.product-miniature .highlighted-informations .quick-view:hover {
    color: var(--accent)
}

.product-miniature .product-description {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    padding: 1.25rem;
    background: var(--surface)
}

/* Elementy interaktywne nad overlay linkiem */
.product-miniature .product-description > *,
.product-miniature .btn-buy {
    position: relative;
    z-index: 1
}

.product-miniature .product-flags li.product-flag {
    min-width: 3.125rem;
    min-height: 1.875rem;
    font-weight: 600
}

.product-miniature .product-flags li.product-flag.online-only {
    top: 13.1rem
}

.product-miniature .comments_note {
    color: var(--muted);
    text-align: center
}

.product-miniature .regular-price {
    display: inline-block;
    font-size: .8rem;
    color: var(--muted);
    text-decoration: line-through
}

.product-miniature .count {
    position: relative;
    bottom: .5rem;
    font-weight: 700;
    color: var(--muted)
}

#custom-text {
    padding: 3.125rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px
}

#custom-text h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    text-transform: uppercase
}

#custom-text .page-content.page-cms ul,
#custom-text p,
.page-content.page-cms #custom-text ul {
    font-size: .875rem;
    font-weight: 400;
    color: var(--text)
}

#custom-text .page-content.page-cms ul .dark,
#custom-text p .dark,
.page-content.page-cms #custom-text ul .dark {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text)
}

#custom-text img {
    max-width: 100%;
    height: 100%
}

.page-content.page-cms {
    padding: 1.25rem;
    text-align: justify;
    background: var(--surface)
}

.page-content.page-cms .cms-box img {
    max-width: 100%
}

.page-content.page-cms ul {
    list-style: disc inside none
}

#products {
    color: var(--muted)
}

#products .products-select {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: baseline;
    -ms-flex-align: baseline;
    align-items: baseline;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between
}

#products .up {
    margin-bottom: 1rem
}

#products .up .btn-secondary,
#products .up .btn-tertiary {
    color: var(--muted);
    text-transform: inherit
}

#products .up .btn-secondary .material-icons,
#products .up .btn-tertiary .material-icons {
    margin-right: 0
}

.block-category {
    min-height: 13.75rem;
    margin-bottom: 1.563rem
}

.block-category h1 {
    margin-bottom: 1rem;
    font-size: 2rem
}

.block-category .block-category-inner {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between
}

.block-category .block-category-inner #category-description .page-content.page-cms ul,
.block-category .block-category-inner #category-description p,
.page-content.page-cms .block-category .block-category-inner #category-description ul {
    font-weight: 400;
    margin-bottom: 0;
    color: var(--text);
    word-break: break-word
}

.block-category .block-category-inner #category-description strong {
    font-weight: 400;
    color: var(--muted)
}

.block-category .block-category-inner #category-description .page-content.page-cms ul:first-child,
.block-category .block-category-inner #category-description p:first-child,
.page-content.page-cms .block-category .block-category-inner #category-description ul:first-child {
    margin-bottom: 1.25rem
}

.block-category .block-category-inner .category-cover img {
    width: 141px;
    height: 180px
}

.products-selection .sort-by-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center
}

.products-selection .sort-by {
    margin-right: -.9375rem;
    margin-left: .9375rem;
    text-align: right;
    word-break: break-word;
    white-space: normal
}

.products-selection .total-products,
.products-selection h1 {
    padding-top: .625rem
}

.page-content.page-cms .products-selection ul,
.page-content.page-cms .products-selection ul .select-title,
.page-content.page-cms .products-selection ul .sort-by,
.products-selection .page-content.page-cms ul,
.products-selection .page-content.page-cms ul .select-title,
.products-selection .page-content.page-cms ul .sort-by,
.products-selection .sort-by-row,
.products-selection .sort-by-row .select-title,
.products-selection .sort-by-row .sort-by,
.products-selection p,
.products-selection p .select-title,
.products-selection p .sort-by {
    font-size: .875rem
}

.page-content.page-cms .products-selection ul i,
.products-selection .page-content.page-cms ul i,
.products-selection .sort-by-row .select-title i,
.products-selection .sort-by-row .sort-by i,
.products-selection .sort-by-row i,
.products-selection p .select-title i,
.products-selection p .sort-by i,
.products-selection p i {
    height: inherit;
    line-height: inherit
}

.products-selection .filter-button .btn-secondary,
.products-selection .filter-button .btn-tertiary {
    padding: .75rem .5rem .6875rem
}

.brands-sort,
.products-sort-order,
.suppliers-sort {
    color: var(--muted)
}

.brands-sort .select-title,
.products-sort-order .select-title,
.suppliers-sort .select-title {
    display: inline-block;
    width: 100%;
    padding: .625rem;
    color: var(--text);
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--border)
}

.brands-sort .select-list,
.products-sort-order .select-list,
.suppliers-sort .select-list {
    display: block;
    padding: .625rem 1.25rem;
    color: var(--text)
}

.brands-sort .select-list:hover,
.products-sort-order .select-list:hover,
.suppliers-sort .select-list:hover {
    color: #000;
    text-decoration: none;
    background: var(--accent)
}

.brands-sort .dropdown-menu,
.products-sort-order .dropdown-menu,
.suppliers-sort .dropdown-menu {
    left: auto;
    width: 16.88rem;
    margin: 0;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0,0,0,.3)
}

.facet-dropdown {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding-right: 0;
    padding-left: 0;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: none
}

.facet-dropdown.open {
    border: 0
}

.facet-dropdown.open>.select-title {
    background: var(--surface);
    border: 3px solid var(--accent)
}

.facet-dropdown .select-title {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
    padding: .625rem .625rem .625rem 1.25rem;
    margin-left: 0;
    color: var(--text);
    cursor: pointer;
    background: var(--surface)
}

.facet-dropdown .select-title>i {
    margin-left: auto
}

.facet-dropdown .select-list {
    display: block;
    padding: .625rem 1.25rem;
    color: var(--text);
    background: var(--surface)
}

.facet-dropdown .select-list:hover {
    color: #000;
    text-decoration: none;
    background: var(--accent)
}

.facet-dropdown .dropdown-menu {
    left: auto;
    width: 100%;
    padding: 0;
    margin-top: 3px;
    background: var(--surface2);
    border: 1px solid var(--border);
    box-shadow: 0 16px 48px rgba(0,0,0,.3)
}

#search_filters,
#search_filters_brands,
#search_filters_suppliers {
    padding: 1.563rem 1.25rem;
    margin-bottom: 1.563rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px
}

#search_filters>.h6,
#search_filters_brands>.h6,
#search_filters_suppliers>.h6 {
    font-size: 1.5rem;
    font-weight: 500
}

#search_filters .facet,
#search_filters_brands .facet,
#search_filters_suppliers .facet {
    padding-top: .625rem
}

#search_filters .facet .collapse,
#search_filters_brands .facet .collapse,
#search_filters_suppliers .facet .collapse {
    display: block
}

#search_filters .facet .facet-title,
#search_filters_brands .facet .facet-title,
#search_filters_suppliers .facet .facet-title {
    font-size: 1rem;
    color: var(--text)
}

#product-modal .modal-content .modal-body .image-caption .page-content.page-cms ul,
#product-modal .modal-content .modal-body .image-caption p,
#search_filters .facet .facet-label,
#search_filters_brands .facet .facet-label,
#search_filters_suppliers .facet .facet-label,
.page-content.page-cms #product-modal .modal-content .modal-body .image-caption ul,
.social-sharing ul {
    margin-bottom: 0
}

#search_filters .facet .facet-label a,
#search_filters_brands .facet .facet-label a,
#search_filters_suppliers .facet .facet-label a {
    display: inline-block;
    margin-top: .4375rem;
    font-size: .9375rem;
    color: var(--text)
}

#search_filters_brands .facet,
#search_filters_suppliers .facet {
    padding-top: 0
}

#search_filters_brands .facet .facet-label,
#search_filters_suppliers .facet .facet-label {
    margin-bottom: .3125rem
}

.pagination {
    width: 100%;
    font-size: .875rem
}

.pagination>div:first-child {
    padding-left: 0;
    line-height: 2.5rem
}

.pagination .page-list {
    padding: .375rem;
    margin-bottom: 0;
    background: var(--surface)
}

.pagination a {
    font-weight: 600;
    color: var(--text)
}

.pagination a:not(.previous):not(.next) {
    letter-spacing: .125rem
}

.pagination .previous {
    float: left
}

.pagination .next {
    float: right
}

.pagination .disabled {
    color: var(--muted)
}

.pagination .current a {
    font-size: 1.25rem;
    color: var(--accent);
    text-decoration: none
}

.active_filters {
    padding: .625rem 1.875rem 0;
    margin-bottom: 1.25rem;
    background: var(--surface2)
}

.active_filters .active-filter-title {
    display: inline;
    margin-right: .625rem;
    font-weight: 600
}

.active_filters .filter-block {
    display: inline-block;
    padding: .625rem;
    margin-right: .625rem;
    margin-bottom: .625rem;
    font-size: .8125rem;
    color: var(--text);
    background: var(--surface)
}

.active_filters .filter-block .close {
    margin-top: .1875rem;
    margin-left: .3125rem;
    font-size: .9375rem;
    color: var(--text);
    opacity: 1
}

.block-categories {
    padding: 1.563rem 1.25rem;
    margin-bottom: 1.563rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px
}

.block-categories .h6 {
    font-size: 1.5rem;
    font-weight: 500
}

.block-categories .category-sub-menu {
    margin-top: 1rem
}

.block-categories .category-sub-menu .category-sub-link {
    font-size: .875rem
}

.block-categories .category-sub-menu li {
    position: relative
}

.block-categories .category-sub-menu li[data-depth="1"],
.product-prices div {
    margin-bottom: .625rem
}

.block-categories .category-sub-menu li[data-depth="0"]>a {
    display: inline-block;
    width: 100%;
    padding-bottom: .1875rem;
    margin: .3125rem 0 0;
    font-weight: 600
}

.block-categories .category-sub-menu li:not([data-depth="0"]):not([data-depth="1"]) {
    padding-left: .3125rem
}

.block-categories .category-sub-menu li:not([data-depth="0"]):not([data-depth="1"])::before {
    margin-right: .3125rem;
    content: "-"
}

.block-categories a,
.facets-title {
    color: var(--text)
}

.block-categories .collapse-icons {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0;
    cursor: pointer
}

.block-categories .collapse-icons .remove,
.block-categories .collapse-icons[aria-expanded=true] .add {
    display: none
}

.block-categories .collapse-icons[aria-expanded=true] .remove {
    display: block
}

#subcategories ul li .subcategory-name:hover,
.block-categories .arrows .arrow-down:hover,
.block-categories .arrows .arrow-right:hover,
.block-categories .collapse-icons .add:hover,
.block-categories .collapse-icons .remove:hover,
.cart-grid-body a.label:hover {
    color: var(--accent)
}

.block-categories .arrows .arrow-down,
.block-categories .arrows .arrow-right {
    margin-left: 2px;
    font-size: .875rem;
    cursor: pointer
}

.block-categories .arrows .arrow-down,
.block-categories .arrows[aria-expanded=true] .arrow-right {
    display: none
}

#manufacturer #main ul .brand-infos a,
#supplier #main ul .supplier-infos a,
.block-categories .arrows[aria-expanded=true] .arrow-down {
    display: inline-block
}

.advertising-block {
    margin-bottom: 1.563rem
}

#subcategories {
    margin-bottom: 20px;
    border-top: 1px solid var(--border)
}

#subcategories .subcategory-heading {
    margin-bottom: 20px;
    font-weight: 500
}

#subcategories ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: 0 0 0 -10px
}

#subcategories ul li {
    width: calc(25% - 20px);
    min-width: 200px;
    margin: 10px;
    text-align: center
}

#subcategories ul li .subcategory-image {
    padding: 0 0 8px
}

#subcategories ul li .subcategory-image a {
    display: block;
    padding: 9px;
    border: 1px solid var(--border)
}

#subcategories ul li .subcategory-image a img {
    max-width: 100%;
    vertical-align: top
}

#subcategories ul li .subcategory-name {
    text-transform: uppercase
}

#subcategories ul li .cat_desc {
    display: none
}

#subcategories ul li:hover .subcategory-image a {
    padding: 5px;
    border: 5px solid var(--accent)
}

#product #content:not(.pn-product-gallery) {
    position: relative;
    max-width: 452px;
    margin: 0 auto
}

/* ── CSS Grid dla siatki kart produktów ── */
.products.products-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: .625rem;
    margin-left: 10%;
    margin-right: 10%;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch
}

.products.products-card-grid > .js-product {
    width: auto;
    max-width: none;
    padding: 0;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column
}

.products.products-card-grid .product-miniature,
.products.products-card-grid .product-miniature .js-product-miniature {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1
}

/* max 3 wiersze (9 kart) — ukryj nadmiarowe */
.products.products-card-grid > .js-product:nth-child(n+10) {
    display: none
}

/* ── Tagi/flagi w treści karty ── */
.product-miniature .product-tags {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .65rem
}

.product-miniature .tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: .68rem;
    font-family: 'JetBrains Mono', monospace;
    padding: .18rem .5rem;
    border-radius: 4px;
    line-height: 1.4
}

.product-miniature .tag--new {
    background: rgba(91,227,160,.12);
    color: var(--accent)
}

.product-miniature .tag--on-sale {
    background: rgba(255,107,107,.1);
    color: var(--accent3)
}

.product-miniature .tag--pack {
    background: rgba(61,201,255,.1);
    color: var(--accent2)
}

.product-miniature .tag--variants {
    background: rgba(61,201,255,.08);
    color: var(--accent2)
}

/* ── Krótki opis ── */
.product-miniature .product-desc {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.5
}

/* ── Stopka karty: cena + przycisk ── */
.product-miniature .product-footer-mini {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .75rem
}

/* ── Przycisk "Dodaj do koszyka" ── */
.product-miniature .btn-buy {
    background: var(--accent);
    color: #000;
    border: none;
    padding: .45rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: .78rem;
    cursor: pointer;
    -webkit-transition: opacity .2s, background .2s;
    transition: opacity .2s, background .2s;
    font-family: inherit;
    white-space: nowrap;
    -ms-flex-negative: 0;
    flex-shrink: 0
}

.product-miniature .btn-buy:hover {
    opacity: .85
}

.product-miniature .btn-buy--variants {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent)
}

.product-miniature .btn-buy--variants:hover {
    background: rgba(91,227,160,.1);
    opacity: 1
}

.product-miniature .btn-buy--loading {
    opacity: .5;
    pointer-events: none
}

.product-miniature .btn-buy--added {
    background: var(--accent2);
    color: #000
}
