@import url("promo.css");

.components-sale {
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px clamp(16px, 3vw, 40px) 56px;
}

.components-sale__trail,
.components-sale a.components-sale-card {
    color: var(--sale-muted);
    font-size: 14px;
}

.components-sale__trail span[aria-hidden] { margin: 0 6px; }
.components-sale__trail a { color: var(--sale-blue); }

.components-sale h1 {
    margin: 20px 0 16px;
    color: var(--sale-ink);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 600;
    line-height: 1.12;
}

.components-sale__sections {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.components-sale__sections a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--sale-border);
    border-radius: 4px;
    color: var(--sale-blue);
    font-size: 14px;
    line-height: 1.3;
}

.components-sale__sections a span {
    color: var(--sale-muted);
    font-variant-numeric: tabular-nums;
}

.components-sale__sections a:hover,
.components-sale__sections a:focus-visible {
    border-color: var(--sale-blue);
    background: #f3f7fa;
}

.components-sale__group { margin: 28px 0 0; }
.components-sale__group-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 16px;
    margin-bottom: 8px;
}

.components-sale__group-heading h2 {
    scroll-margin-top: 65px;
    margin: 0;
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 600;
    line-height: 1.2;
}

.components-sale__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 275px), 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.components-sale__grid > li { display: flex; min-width: 0; }
.components-sale a.components-sale-card {
    display: grid;
    grid-template: "photo details" 1fr "offer offer" auto / 70px minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid var(--sale-border);
    border-radius: 5px;
    background: #fff;
    text-decoration: none;
}

.components-sale a.components-sale-card:hover,
.components-sale a.components-sale-card:focus-visible { border-color: var(--sale-blue); }
.components-sale-card:hover .components-sale-card__name { text-decoration: underline; }
.components-sale-card__photo { grid-area: photo; }
.components-sale-card__photo img {
    display: block;
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.components-sale-card__details { grid-area: details; overflow-wrap: anywhere; }
.components-sale-card__article { display: block; margin-bottom: 3px; font-size: 13px; }
.components-sale-card__name {
    display: block;
    color: var(--sale-blue);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.components-sale-card__offer,
.components-sale-card__prices { display: flex; align-items: baseline; flex-wrap: wrap; }
.components-sale-card__offer {
    grid-area: offer;
    justify-content: space-between;
    gap: 6px 12px;
    padding-top: 10px;
    border-top: 1px solid #edf0f2;
}

.components-sale-card__prices { gap: 2px 8px; }
.components-sale-card__prices strong {
    color: var(--sale-ink);
    font-size: 18px;
    line-height: 1.25;
}

.components-sale-card__prices del,
.components-sale-card__stock { font-size: 13px; }
.components-sale-card__prices > *,
.components-sale-card__stock { white-space: nowrap; }
.components-sale-card__stock.is-available { color: #1b5a44; }
.components-sale-card__stock.is-available::before { content: "●"; margin-right: 5px; color: #268063; }

main.s-product-list > .right { min-width: 0; }

@media (min-width: 768px) and (max-width: 979px) {
    html body,
    body > header,
    body > nav.s-catalog-menu,
    body > .route,
    main.s-product-list,
    .s-catalog-menu .menu .b-page_main,
    body > footer .footer-body,
    body > .s-shopping-cart-panel .container-fluid { min-width: 0; }
    .s-catalog-menu .menu .b-page_main { box-sizing: border-box; max-width: 96vw; }
    .s-product-list .right .list section .product { flex-wrap: wrap; gap: 8px; }
    .s-product-list .right .list section .product .options { flex: 1; }
    .s-product-list .right .list section .product .options .title { white-space: normal; }
    .s-product-list .right .list section .product .info { flex-basis: 100%; justify-content: flex-end; }
}

@media (max-width: 767px) {
    main.s-product-list > .right { box-sizing: border-box; min-width: 0; max-width: none; width: 100%; }
    .components-sale { padding: 4px 12px 36px; }
    .components-sale__group { margin-top: 20px; }
    .components-sale__grid { gap: 8px; }
    .components-sale__sections a { box-sizing: border-box; min-height: 44px; }
}

@media (max-width: 560px) {
    .components-sale__group-heading { align-items: center; }
    .components-sale__group-heading a { min-height: 44px; }
}
