/* Catalog listing and product detail are BEM/rem. */
/* Source: catalog.section.list/production, catalog.section.list/productSubsection,
   news.list/productsList, news.detail/productDetail. */

/* --- Category tiles on /produkcija/ and the home page --- */

.catalog-tiles {
    /* The legacy markup ended with a clearfix line:
       31.2px = 13px list margin + 18.2px clearfix line. */
    padding-bottom: 1.95rem;
}

.catalog-tiles__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem; /* 20px */
    margin: 0.8125rem 0 0; /* 13px, the old list top margin */
    padding: 0;
    list-style: none;
}

.catalog-tiles__item {
    flex: 1 1 13.75rem; /* 220px min, grows up to 320px */
    max-width: 20rem; /* 320px, the old 300px + 2 x 10px */
    min-width: 0;
    padding: 0;
    text-align: center;
    list-style: none;
}

.catalog-tiles__image {
    display: block;
    overflow: hidden;
    width: 11.25rem; /* 180px */
    height: 11.25rem;
    margin: 0 auto 1.875rem; /* 30px */
    border-radius: 100%;
    background-color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.catalog-tiles__title {
    margin: 0 0 0.625rem; /* 10px */
    padding: 0;
    font-size: 1rem; /* 16px */
    line-height: 1.25rem; /* 20px */
}

.catalog-tiles__title a {
    color: #004f9f;
    font-size: 1rem;
    line-height: 1.25rem;
    font-weight: normal;
}

.catalog-tiles__title a:hover {
    text-decoration: none;
}

.catalog-tiles__description {
    margin-bottom: 0;
    color: #7f7f7f;
    font-size: 0.8125rem; /* 13px */
    font-style: italic;
    line-height: 1.125rem; /* 18px */
}

.catalog-tiles__image,
.catalog-tiles__title,
.catalog-tiles__title a,
.catalog-tiles__description {
    transition: all 0.3s ease;
}

@media (max-width: 25rem) { /* 400px */
    .catalog-tiles__item {
        max-width: none;
    }
}

.catalog-index-page {
    /* The old index ended with a clearfix line before the content article. */
    padding-bottom: 1.1375rem; /* ~18px */
}

/* --- Subcategory links --- */

.catalog-subsections {
    /* 30px is the old container margin; 18.2px replaces the removed clearfix line. */
    margin-bottom: 1.875rem;
    padding-bottom: 1.1375rem;
}

.catalog-subsections__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog-subsections__item {
    margin: 0 0.625rem 0.625rem; /* 10px */
    list-style: none;
}

.catalog-subsections__title {
    margin: 0;
    padding: 0.5rem 0.6875rem; /* 8px 11px */
}

.catalog-subsections__title:hover {
    background: #004f9f;
}

.catalog-subsections__title a {
    color: #004f9f;
    font-size: 1rem; /* 16px */
    font-weight: normal;
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 1px dashed #004f9f;
}

.catalog-subsections__title:hover a {
    cursor: pointer;
    border-bottom-color: #fff;
    color: #fff;
}

@media (max-width: 28.6875rem) { /* 459px */
    .catalog-subsections {
        padding-bottom: 0;
    }

    .catalog-subsections__item {
        flex: 0 0 50%;
        box-sizing: border-box;
        margin: 0 0 0.5rem; /* 8px */
        text-align: center;
    }

    .catalog-subsections__title {
        padding: 0.5rem; /* 8px */
    }
}

@media (max-width: 23.75rem) { /* 380px */
    .catalog-subsections__title {
        padding: 0.5rem 0; /* 8px 0 */
    }
}

@media (max-width: 22.4375rem) { /* 359px */
    .catalog-subsections__title a {
        font-size: 0.875rem; /* 14px */
    }
}

/* --- Catalog category page --- */

.catalog-category {
    /* The old category page ended with a clearfix line before the footer. */
    padding-bottom: 1.1375rem; /* ~18px */
}

/* --- Product cards --- */

.catalog-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, 13.75rem); /* 220px */
    justify-content: center;
    gap: 1.25rem; /* 20px */
    margin-bottom: 3.125rem; /* 50px */
}

.catalog-product {
    display: flex;
    flex-direction: column;
    width: 13.75rem; /* 220px */
}

.catalog-product__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 10.9375rem; /* 175px */
    margin-bottom: 1.25rem; /* 20px */
    text-align: center;
}

.catalog-product__image {
    max-width: 100%;
    max-height: 10.9375rem; /* 175px */
    width: auto;
    height: auto;
}

.catalog-product__title {
    margin: 0 0 0.75rem; /* 12px */
    font-size: 1rem; /* 16px */
    line-height: 1.375rem; /* 22px */
    text-align: center;
}

.catalog-product__title-link {
    color: #0c54a0;
    font-size: 1rem;
    line-height: 1.375rem;
}

/* --- Catalog intro and aside content blocks --- */

.catalog-content {
    display: flex;
    gap: 3.75rem; /* 60px */
    margin-bottom: 6.25rem; /* 100px */
    padding-bottom: 1.1375rem; /* ~18px, replaces the final clearfix line */
}

.catalog-content__intro {
    width: 40rem; /* 640px */
    padding-left: 0.625rem; /* 10px */
    font-size: 0.875rem; /* 14px */
    line-height: 1.5rem; /* 24px */
}

.catalog-content__intro p {
    margin: 0 0 1.5em;
}

.catalog-content__intro p:first-of-type {
    margin-top: 0;
}

.catalog-content__intro ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem 1.75rem; /* 14px 28px */
    margin: 0 0 1.5em;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem; /* 13px */
    font-style: italic;
    line-height: 1.125rem; /* 18px */
}

.catalog-content__intro li {
    position: relative;
    padding-left: 0.875rem; /* 14px */
}

.catalog-content__intro li::before {
    content: '';
    position: absolute;
    top: 0.4375rem; /* 7px */
    left: 0;
    width: 0.3125rem; /* 5px */
    height: 0.3125rem;
    border-radius: 50%;
    background: #0c55a0;
}

.catalog-content__aside {
    width: 15rem; /* 240px */
    padding-right: 0.625rem; /* 10px */
    font-style: italic;
    line-height: 1.25rem; /* 20px */
}

.catalog-content__aside p:first-child {
    margin-top: 0;
    color: #0c55a0;
}

.catalog-content__aside ul {
    margin: 0.75rem 0 0; /* 12px 0 0 */
    padding: 0;
    list-style: none;
}

.catalog-content__aside li {
    padding-bottom: 0.75rem; /* 12px */
    font-size: 0.8125rem; /* 13px */
    line-height: 1.25rem; /* 20px */
}

.catalog-content__aside li::after {
    content: '';
    display: block;
    width: 3.75rem; /* 60px */
    height: 1px;
    margin-top: 0.75rem; /* 12px */
    background: #9cbbda;
}

.catalog-content__aside li:last-child::after {
    display: none;
}

@media (max-width: 60rem) { /* 960px */
    .catalog-content {
        flex-direction: column;
        gap: 0;
    }

    .catalog-content__intro,
    .catalog-content__aside {
        box-sizing: border-box;
        width: 100%;
        padding: 1.25rem; /* 20px */
        margin: 0;
    }

    .catalog-content__intro ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 42.5rem) { /* 680px */
    .catalog-content {
        margin-bottom: 3.125rem; /* 50px */
    }

    .catalog-content__intro ul {
        grid-template-columns: 1fr;
    }
}

/* --- Empty category --- */

.catalog-empty {
    margin: 0 0 3rem; /* 48px */
    padding: 0 1rem; /* 16px */
    color: #7f7f7f;
    font-size: 0.875rem; /* 14px */
    font-style: italic;
}

/* --- Product detail --- */

.product-detail {
    margin-bottom: 3.125rem; /* 50px */
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}

.product-detail__data {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3.125rem; /* 50px */
}

.product-detail__image {
    flex: 0 0 33.75rem; /* 540px; 560px with padding */
    padding: 0 0.625rem; /* 10px */
    overflow: hidden;
    text-align: center;
}

.product-detail__image-img {
    max-width: 100%;
    height: auto;
}

.product-detail__info {
    flex: 0 0 23.75rem; /* 380px; 400px with padding */
    min-width: 0;
    /* The old clearfix line sat under the info column: the old data height
       was max(image, info + 20px), and +20px after info when stacked. */
    margin-bottom: 1.25rem; /* 20px */
    padding: 0 0.625rem; /* 10px */
    overflow: hidden;
}

.product-detail__text {
    margin-bottom: 2em;
}

.product-detail__seo {
    margin-top: 0;
}

.product-detail__properties {
    margin-bottom: 1.875rem; /* 30px */
}

.product-detail__property-table {
    width: 100%;
}

.product-detail__property-table td {
    height: 1.7em;
    padding: 0;
    white-space: nowrap;
    vertical-align: baseline;
}

td.product-detail__property-name {
    padding-right: 0.3125rem; /* 5px */
}

.product-detail__property-space {
    width: 99%;
}

td.product-detail__property-space {
    padding: 0 0.25rem; /* 4px */
    vertical-align: baseline;
}

.product-detail__property-space div {
    height: 0.8em;
    border-bottom: 1px dotted #b9c2cc;
}

td.product-detail__property-value {
    padding-left: 0.3125rem; /* 5px */
    color: #26272a;
}

.product-detail__price {
    margin: 0 0 1.5rem; /* 24px */
}

.product-detail__price-link {
    display: inline-block;
    padding: 0.5rem 1.125rem; /* 8px 18px */
    border: 2px solid #004f9f;
    border-radius: 1.25rem; /* 20px */
    color: #004f9f;
    background: #fff;
    font-size: 0.875rem; /* 14px */
    line-height: 1.4;
    text-decoration: none;
}

.product-detail__price-link:hover {
    color: #fff;
    background: #004f9f;
}

.product-detail__back {
    margin: 1.5rem 0 0; /* 24px */
}

.product-detail__back-link {
    color: #004f9f;
    font-size: 0.875rem; /* 14px */
}

@media (max-width: 60rem) { /* 960px */
    .product-detail__image,
    .product-detail__info {
        box-sizing: border-box;
        padding: 1.25rem; /* 20px */
    }

    .product-detail__image {
        flex: 0 0 40%;
    }

    .product-detail__info {
        flex: 0 0 60%;
    }
}

@media (max-width: 42.5rem) { /* 680px */
    .product-detail__data {
        flex-direction: column;
    }

    .product-detail__image,
    .product-detail__info {
        flex: 0 0 auto;
        width: 100%;
    }
}
