/* Centre the category heading, browsing tabs and introductory text. */
#main-content > .ty-page-title {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
#main-content > .ty-page-title h1 { margin: 0; }
#main-content > .ty-page-title .ty-cat-filters-main { justify-content: center; flex-wrap: wrap; }
#main-content > .ty-page-extra-content {
    width: 100%;
    max-width: 1356px;
    margin-inline: auto;
    box-sizing: border-box;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Match the product-page clearance below the fixed desktop header. */
@media (min-width: 960px) {
    body #main-content.ty-content { padding-top: 124px; }
}

/* Keep two columns on phones; fit comfortable card widths into larger screens. */
#main-content .ty-cat-page-products ul.ty-cat-page-products-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 8px;
}
#main-content .ty-cat-page-products ul.ty-cat-page-products-list > li.ty-product-block {
    width: auto;
    min-width: 0;
    padding: 0;
    border-width: 1px;
    border-radius: 14px;
}
#main-content .ty-cat-page-products ul.ty-cat-page-products-list > li.ty-product-block > a {
    padding: 14px 8px 0;
    border-radius: 12px;
    min-width: 0;
}
#main-content .ty-cat-page-products li.ty-product-block a > span {
    font-size: 11px;
    margin-bottom: 6px;
}
#main-content .ty-cat-page-products li.ty-product-block a h2 {
    font-size: 14px;
    line-height: 1.3;
    height: auto;
    min-height: 5.2em;
    padding: 0;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}
#main-content .ty-cat-page-products li.ty-product-block a .ty-img-holder {
    width: 100%;
    max-height: 140px;
    margin: 0 auto 8px;
}
#main-content .ty-cat-page-products li.ty-product-block a .ty-img-holder img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}
#main-content .ty-cat-page-products li.ty-product-block a .ty-price-holder { margin-bottom: 8px; }
#main-content .ty-cat-page-products li.ty-product-block a .ty-price-holder span { margin-bottom: 4px; }
#main-content .ty-cat-page-products li.ty-product-block a .ty-price-holder .ty-price-msg { font-size: 11px; }
#main-content .ty-cat-page-products li.ty-product-block a .ty-price-holder span.ty-price {
    font-size: 16px;
    line-height: 1.3;
}
#main-content .ty-cat-page-products li.ty-product-block a .ty-price-holder span.ty-old-price { font-size: 11px; }
#main-content .ty-cat-page-products li.ty-product-block a .ty-btn-holder {
    position: static;
    height: auto;
    padding: 0;
    margin-top: auto;
    gap: 8px;
}
#main-content .ty-cat-page-products li.ty-product-block a .ty-btn-holder button {
    min-height: 44px;
    font-size: 12px;
    padding: 6px 4px;
}
#main-content .ty-cat-page-products li.ty-product-block a .ty-msg {
    width: auto;
    max-width: 100%;
    align-self: center;
    padding: 6px 12px;
    border-radius: 10px 10px 0 0;
    overflow-wrap: anywhere;
}
#main-content .ty-cat-page-products li.ty-product-block a .ty-msg span { font-size: 11px; margin-bottom: 0; }
@media (max-width: 359px) {
    #main-content .ty-cat-page-products li.ty-product-block a h2 { font-size: 13px; }
    #main-content .ty-cat-page-products li.ty-product-block a .ty-price-holder span.ty-price { font-size: 14px; }
}
@media (min-width: 600px) {
    body:not(.cat-filter-open-mobile) #main-content .ty-cat-page-products { flex: 1; min-width: 0; }
    #main-content .ty-cat-page-products ul.ty-cat-page-products-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 12px; }
}
@media (min-width: 1140px) {
    #main-content .ty-cat-page-products ul.ty-cat-page-products-list {
        max-width: 1090px;
        margin-inline: auto;
    }
}

@media (max-width: 959px) {
    #main-content .ty-cat-page-products { display: block; }
    #main-content .ty-cat-filter-mobile-btn-holder { margin-bottom: 16px; }
}

/* Centre the filters and cards as one group, keeping their gap small. */
@media (min-width: 960px) {
    #main-content .ty-cat-page-content {
        max-width: 1356px;
        margin-inline: auto;
        align-items: flex-start;
    }
}

/* Expanded phone filters take their own row instead of covering shifted cards. */
@media (max-width: 959px) {
    body.cat-filter-open-mobile #main-content .ty-cat-page-content {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        overflow: visible;
    }
    body.cat-filter-open-mobile #main-content .ty-cat-filters-attr {
        position: relative;
        grid-area: auto;
        width: 100%;
        align-self: stretch;
        height: auto;
        max-height: none;
        transform: none;
        background-color: #252528;
    }
    body.cat-filter-open-mobile #main-content .ty-cat-page-products {
        grid-area: auto;
        width: 100%;
    }
    body.cat-filter-open-mobile #main-content .ty-cat-products {
        transform: none;
    }
    body.cat-filter-open-mobile #main-content .ty-cat-filter-mobile-btn-holder {
        display: none;
    }
    body.cat-filter-open-mobile #main-content .ty-cat-page-blurp {
        grid-area: auto;
        width: 100%;
    }
}

/* Keep desktop filters open without a surrounding panel border. */
@media (min-width: 960px) {
    #main-content .ty-cat-filters-attr { border-color: transparent; border-radius: 0; }
}
