/* Shared RD Site catalog cards: catalog, home, search, brands and related products. */

/* BM-like desktop content width. Loaded after style.min.css, so this widens the RD Site theme without touching core CSS. */
:root {
    --bg: #fff;
}

.site-container {
    max-width: 1280px;
}
.catalog-product-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #d9dee2;
    border-radius: 24px;
    background: #fff;
    box-shadow: none;
}

.catalog-product-card__image-link {
    display: block;
    min-width: 0;
}

.catalog-product-card .catalog-product-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid #e2e5e7;
    border-radius: 0;
    background: #f1f2f2;
}

.catalog-product-card .catalog-product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
    transition: none;
}

.catalog-product-card:hover .catalog-product-card__image {
    transform: none;
}

.catalog-product-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    max-width: calc(100% - 32px);
    padding: 7px 11px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(56, 58, 60, .62);
    color: #fff;
    font-family: Manrope, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.catalog-product-card__body {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 20px 22px 22px;
}

.catalog-product-card__title {
    margin: 0;
    font-family: Manrope, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.025em;
    color: #080808;
}

.catalog-product-card__title a {
    color: inherit;
    text-decoration: none;
}

.catalog-product-card__title a:hover,
.catalog-product-card__title a:focus-visible {
    color: var(--accent);
}

.catalog-product-card__description {
    display: -webkit-box;
    margin: 10px 0 0;
    overflow: hidden;
    color: #777;
    font-size: 15px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.catalog-product-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 20px;
}

.catalog-product-card__price {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin: 0;
    font-family: Manrope, sans-serif;
}

.catalog-product-card__price-current {
    color: #b6334f;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.catalog-product-card__price-old {
    color: #707070;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}

.catalog-product-card__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.catalog-product-card__action {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    border: 1.5px solid #777;
    border-radius: 50%;
    background: #fff;
    color: #777;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.catalog-product-card__action svg {
    width: 20px;
    height: 20px;
}

.catalog-product-card__action:hover,
.catalog-product-card__action:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: 0;
}

.catalog-product-card__action--details {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.catalog-product-card__action--details:hover,
.catalog-product-card__action--details:focus-visible {
    border-color: #358fbd;
    background: #358fbd;
    color: #fff;
}

.catalog-product-card__action--cart {
    font: inherit;
}

.catalog-product-card__cart-feedback {
    margin-top: 8px;
    color: #b42318;
    font-size: 12px;
    line-height: 1.35;
}

.catalog-product-card__cart-feedback:empty {
    display: none;
}

/* List view: one product per row with image on the left and content on the right. */
.catalog-products[data-view="list"] .catalog-product-card {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    column-gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d9dee2;
}

.catalog-products[data-view="list"] .catalog-product-card > .catalog-product-card__image-link {
    display: block;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    height: 100%;
}

.catalog-products[data-view="list"] .catalog-product-card > .catalog-product-card__image-link .frame {
    height: 100%;
    min-height: 230px;
    aspect-ratio: auto;
    border-right: 1px solid #e2e5e7;
    border-bottom: 0;
    border-radius: 0;
}

.catalog-products[data-view="list"] .catalog-product-card > .catalog-product-card__image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.catalog-products[data-view="list"] .catalog-product-card > .catalog-product-card__body {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 230px;
    padding: 24px 26px;
}

.catalog-products[data-view="list"] .catalog-product-card__description {
    max-width: 720px;
    -webkit-line-clamp: 4;
}

@media (max-width: 767.98px) {
    .catalog-products[data-view="list"] .catalog-product-card {
        display: flex;
        flex-direction: column;
    }

    .catalog-products[data-view="list"] .catalog-product-card > .catalog-product-card__image-link {
        width: 100%;
        height: auto;
    }

    .catalog-products[data-view="list"] .catalog-product-card > .catalog-product-card__image-link .frame {
        height: auto;
        min-height: 0;
        aspect-ratio: 5 / 4;
        border-right: 0;
        border-bottom: 1px solid #e2e5e7;
    }

    .catalog-products[data-view="list"] .catalog-product-card > .catalog-product-card__body {
        min-height: 0;
        padding: 18px;
    }
}

/* The legacy mobile rule hid the third card; all products must remain visible. */
.catalog-grid .catalog-product-card:last-child {
    display: flex;
}

@media (max-width: 900px) {
    .catalog-product-card__body {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .catalog-grid,
    .catalog-products[data-view="grid"] {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .catalog-product-card {
        border-radius: 24px;
    }

    .catalog-product-card__badge {
        top: 14px;
        left: 14px;
        padding: 7px 11px;
        border-radius: 12px;
        font-size: 13px;
    }

    .catalog-product-card__body {
        padding: 18px;
    }

    .catalog-product-card__title {
        font-size: 17px;
    }

    .catalog-product-card__description {
        margin-top: 9px;
        font-size: 14px;
        -webkit-line-clamp: 3;
    }

    .catalog-product-card__footer {
        gap: 10px;
        padding-top: 18px;
    }

    .catalog-product-card__price-current {
        font-size: 18px;
    }

    .catalog-product-card__price-old {
        font-size: 13px;
    }

    .catalog-product-card__actions {
        gap: 8px;
    }

    .catalog-product-card__action {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .catalog-product-card__action svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 390px) {
    .catalog-product-card__footer {
        align-items: flex-start;
    }

    .catalog-product-card__actions {
        align-self: flex-end;
    }
}

.catalog-search {
    display: flex;
    max-width: 760px;
    gap: 10px;
    margin-top: 28px;
}

.catalog-search input[type="search"] {
    min-width: 0;
    flex: 1 1 auto;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: 0;
}

.catalog-search input[type="search"]:focus {
    border-color: var(--ink);
}

.catalog-search__result-head {
    align-items: center;
}

.catalog-search__result-head .lead {
    margin: 0;
}

@media (max-width: 560px) {
    .catalog-search {
        flex-direction: column;
    }

    .catalog-search .button {
        width: 100%;
    }
}
