/* IF Boutique – nahradit predchozi CSS karet kategorii */
body.type-category #products.products-block {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px; margin: 0 !important;
}
body.type-category #products > .product {
    display: flex; width: auto !important; min-width: 0;
    margin: 0 !important; padding: 0 !important;
}
body.type-category #products .product .p {
    display: flex; flex: 1; flex-direction: column;
    width: 100%; min-width: 0; height: auto !important;
    padding: 0 !important; overflow: hidden;
    border: 1px solid #e9dfd3 !important;
    border-radius: 10px !important; background: #fffdf9 !important;
    box-shadow: none !important; transform: none !important;
}
body.type-category #products .p > a.image {
    position: relative; display: block; flex: none; width: 100%;
    height: auto !important; min-height: 0 !important; max-height: none !important;
    aspect-ratio: 2 / 3; margin: 0 !important; padding: 0 !important;
    overflow: hidden; border-radius: 0; background: #f5f0e9;
}
body.type-category #products .p > a.image img {
    position: absolute !important; inset: 0 !important; display: block;
    width: 100% !important; height: 100% !important;
    max-width: none !important; max-height: none !important;
    margin: 0 !important; padding: 0 !important;
    object-fit: contain; transform: none !important;
}
body.type-category #products .p-in {
    display: flex; flex: 1; flex-direction: column;
    padding: 18px 18px 0 !important; text-align: center;
}
body.type-category #products .p-in-in {
    height: auto !important; min-height: 0 !important;
}
body.type-category #products .name {
    display: block; height: auto !important; min-height: 2.8em;
    margin: 0 !important; overflow: visible; text-decoration: none; text-align: center !important;
    font: 500 16px/1.4 "DM Sans", Arial, sans-serif !important;
    color: #3e2e27 !important;
}
body.type-category #products .name:hover { color: #a66027 !important; }
body.type-category #products .ratings-wrapper:has(> .stars-placeholder:only-child) { display: none; }
body.type-category #products .p-bottom { margin-top: auto; padding-top: 14px; }
body.type-category #products .p-bottom > [data-micro="offer"] {
    display: flex; flex-direction: row !important; flex-wrap: wrap; gap: 8px;
    align-items: flex-end; justify-content: space-between;
}
body.type-category #products .prices,
body.type-category #products .p-tools {
    flex: 0 1 auto !important; width: auto !important; margin: 0 !important;
}
body.type-category #products .prices {
    min-width: 0; text-align: left !important;
    display: flex; flex-direction: column; align-items: flex-start;
}
body.type-category #products .prices .price-final {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 3px; margin: 0; white-space: nowrap;
}
body.type-category #products .prices .price-standard {
    margin: 0 !important; color: #8f7b6e;
    font: 400 14px/1.4 "DM Sans", Arial, sans-serif;
}
body.type-category #products .prices .price-standard > span {
    font: inherit !important; margin: 0 !important;
}
body.type-category #products .p-tools {
    margin-left: auto !important; text-align: right !important;
}
body.type-category #products .price-final strong {
    font: 600 21px/1.3 "DM Sans", Arial, sans-serif; color: #a66027;
}
body.type-category #products .availability {
    display: flex; flex-wrap: wrap; justify-content: flex-end;
    align-items: center; gap: 5px; text-align: right;
    font-size: 13px; line-height: 1.5; text-transform: none !important;
}
body.type-category #products [data-micro-availability$="/InStock"] .availability > span:first-child {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 0; background: none; color: #597044 !important; font-weight: 500;
}
body.type-category #products [data-micro-availability$="/InStock"] .availability > span:first-child::before {
    content: ""; width: 7px; height: 7px; flex: none;
    border-radius: 50%; background: currentColor;
}
body.type-category #products .availability-amount {
    font-size: 12px; font-weight: 400; color: #8f7b6e !important;
    text-transform: none !important;
}
body.type-category #products .product-btn {
    position: static !important; display: block; width: auto !important;
    margin: 16px 18px 18px !important; padding: 0 !important;
}
body.type-category #products .product-btn .btn {
    box-sizing: border-box; display: flex !important;
    align-items: center; justify-content: center;
    width: 100% !important; max-width: none !important; min-width: 0 !important;
    height: auto !important; min-height: 40px; margin: 0 !important;
    padding: 8px 18px !important; border: 1px solid #27952e !important;
    border-radius: 0 !important; background: #27952e !important;
    box-shadow: none !important; color: #fff !important;
    font: 600 13px/1.4 "DM Sans", Arial, sans-serif;
    text-decoration: none; text-transform: none; transform: none !important;
    transition: background-color .25s ease, border-color .25s ease;
}
body.type-category #products .product-btn .btn::after {
    content: none !important;
}
body.type-category #products .product-btn .btn:hover,
body.type-category #products .product-btn .btn:focus-visible {
    background: #228228 !important; border-color: #228228 !important;
}
body.type-category #products a:focus-visible {
    outline: 2px solid #8a6b3d; outline-offset: -3px;
}
@media (max-width: 991px) {
    body.type-category #products.products-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    body.type-category #products.products-block { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    body.type-category #products .p-in { padding: 14px 10px 0 !important; }
    body.type-category #products .name { font-size: 14px !important; }
    body.type-category #products .price-final strong { font-size: 18px; }
    body.type-category #products .p-tools { flex-basis: 100% !important; }
    body.type-category #products .availability {
        justify-content: flex-start; gap: 4px; font-size: 11px;
    }
    body.type-category #products .availability-amount { font-size: 10px; }
    body.type-category #products .product-btn { margin: 14px 10px 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
    body.type-category #products .product-btn .btn { transition: none; }
}

/* Štítky – kategórie aj homepage */
:is(body.type-category #products, body.type-index .products-block) .product .p,
:is(body.type-category #products, body.type-index .products-block) .product .p > a.image {
    position: relative;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flags-default,
:is(body.type-category #products, body.type-index .products-block) .product .p .flags-extra {
    position: absolute !important; top: 12px !important; bottom: auto !important;
    width: auto !important; max-width: calc(50% - 18px);
    margin: 0 !important; padding: 0 !important; transform: none !important;
    display: flex; flex-direction: column; gap: 6px; z-index: 3;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flags-default {
    left: 12px !important; right: auto !important; align-items: flex-start;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flags-extra {
    right: 12px !important; left: auto !important; align-items: flex-end;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flags-default .flag {
    box-sizing: border-box; max-width: 100%; margin: 0;
    border-radius: 3px; padding: 7px 8px;
    font: 500 11px/1.3 "DM Sans", Arial, sans-serif;
    overflow-wrap: anywhere;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flag.flag-discount {
    box-sizing: border-box; display: flex !important;
    flex-direction: column !important; align-items: center; justify-content: center;
    width: auto !important; height: auto !important; min-width: 0 !important;
    max-width: 100%; margin: 0 !important; padding: 8px 10px !important;
    background: #f6e9da !important; color: #3e2e27 !important;
    border: 1px solid #e9d8c4; border-radius: 3px !important;
    box-shadow: none !important; opacity: 1 !important;
    transform: none !important; white-space: nowrap;
    font: 600 16px/1.2 "DM Sans", Arial, sans-serif;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flag.flag-discount::before,
:is(body.type-category #products, body.type-index .products-block) .product .p .flag.flag-discount::after {
    content: none !important; display: none !important;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flag.flag-discount .price-save {
    margin: 0 !important; color: inherit !important;
    font: inherit !important; line-height: 1.2 !important;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flag.flag-discount .price-save sub {
    position: static; vertical-align: baseline; font-size: inherit;
}
:is(body.type-category #products, body.type-index .products-block) .product .p .flag.flag-discount .price-standard {
    margin: 0 0 3px !important; color: #705b4f !important;
    font: 400 11px/1.3 "DM Sans", Arial, sans-serif !important;
}
@media (max-width: 767px) {
    :is(body.type-category #products, body.type-index .products-block) .product .p .flags-default,
    :is(body.type-category #products, body.type-index .products-block) .product .p .flags-extra {
        top: 8px !important; max-width: calc(50% - 12px); gap: 4px;
    }
    :is(body.type-category #products, body.type-index .products-block) .product .p .flags-default { left: 8px !important; }
    :is(body.type-category #products, body.type-index .products-block) .product .p .flags-extra { right: 8px !important; }
    :is(body.type-category #products, body.type-index .products-block) .product .p .flags-default .flag { font-size: 10px; padding: 6px; }
    :is(body.type-category #products, body.type-index .products-block) .product .p .flag.flag-discount { padding: 6px !important; font-size: 13px; }
}
