/* Хаб /All_for_Yours_Car/ — redesign_v2 (только эта страница) */
:root {
    --afyc-red: #e23737;
    --afyc-red2: #f93c3c;
    --afyc-ink: #1a1a1a;
    --afyc-mut: #6b6562;
    --afyc-bg: #f6f5f4;
    --afyc-line: #e9e3e3;
}

body.afyc-hub-page {
    background: var(--afyc-bg);
}

.afyc-hub .afyc-hub__wrap {
    max-width: 1200px;
    margin: 0 auto 48px;
    padding: 8px 0 40px;
}

@media (max-width: 900px) {
    .afyc-hub .afyc-hub__wrap {
        margin-top: 64px;
        padding-left: 0;
        padding-right: 0;
    }
    body.afyc-hub-page .ks-mp-mobile-chips {
        display: none !important;
    }
    /* только AFYC: меньше отступ под плавающие иконки */
    body.afyc-hub-page.td-parts-page .wrap,
    body.afyc-hub-page.td-parts-page .td-wizard-wrap {
        margin-top: 15px;
        margin-left: auto;
        margin-right: auto;
    }
    .afyc-hub__intro .afyc-gs {
        margin-top: 0;
        margin-bottom: 18px;
    }
}

.afyc-hub__intro {
    text-align: center;
    margin: 0 0 32px;
    padding: 48px 0 32px;
}

.afyc-hub__intro .afyc-gs {
    text-align: left;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.afyc-hub__h1 {
    margin: 0 0 10px;
    font-size: 37px !important;
    line-height: 1.45 !important;
    letter-spacing: -0.02em;
    font-family: Inter-SemiBold, Inter, system-ui, sans-serif;
    font-weight: 700;
    color: var(--afyc-ink);
}

.afyc-hub__lead {
    margin: 0 0 24px;
    font-size: 17px !important;
    line-height: 1.45;
    color: var(--afyc-mut);
}

.afyc-hub__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--afyc-red);
    text-decoration: none;
}
.afyc-hub__back:hover {
    text-decoration: underline;
}
.afyc-hub__intro--pick {
    margin-bottom: 24px;
    text-align: center;
}

@media (max-width: 640px) {
    .afyc-hub__intro {
        text-align: left;
        padding: 24px 0 8px;
        margin-bottom: 16px;
    }
    .afyc-hub__h1 {
        margin: 0 0 10px;
        font-size: 26px !important;
        line-height: 1.45 !important;
        letter-spacing: -0.02em;
        font-family: Inter-SemiBold, Inter, system-ui, sans-serif;
        font-weight: 700;
        color: var(--afyc-ink);
    }
    .afyc-hub__lead {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .afyc-hub__intro .afyc-gs {
        max-width: none;
        margin-top: 0;
        margin-bottom: 18px;
    }
}

/* ——— 3 главных раздела ——— */
.afyc-main-tiles {
    margin: 0 0 8px;
}
.afyc-main-tiles__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.afyc-main-tile {
    position: relative;
    display: block;
    border-radius: 18px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease;
    background: var(--afyc-line);
}
.afyc-main-tile:hover {
    transform: translateY(-3px);
}
.afyc-main-tile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.afyc-main-tile__bar {
    position: absolute;
    inset: auto 0 0;
    padding: 48px 20px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}
.afyc-main-tile__label {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    /* style.css: `p, span { color:#353433 }` иначе съедает наследование с плитки */
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.afyc-main-tile__go {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--afyc-red);
    display: grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
    color: #fff !important;
}

@media (max-width: 640px) {
    .afyc-main-tiles__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .afyc-main-tile {
        margin: 10px 0;
        aspect-ratio: 16 / 7;
    }
    .afyc-main-tile__bar {
        padding: 30px 16px 14px;
    }
    .afyc-main-tile__label {
        font-size: 19px;
    }
}

/* ——— Прочее ——— */
.afyc-boards {
    margin: 40px 0 8px;
}
.afyc-boards__title {
    margin: 40px 0 16px;
    font-size: 24px !important;
    font-family: Inter-SemiBold, Inter, system-ui, sans-serif;
    font-weight: 700;
    color: var(--afyc-ink);
    text-align: left;
}
.afyc-boards__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}
.afyc-board-tile {
    position: relative;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease;
    background: var(--afyc-line);
}
.afyc-board-tile:hover {
    transform: translateY(-3px);
}
.afyc-board-tile__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.afyc-board-tile__bar {
    position: absolute;
    inset: auto 0 0;
    padding: 40px 14px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}
.afyc-board-tile__label {
    display: block;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

@media (max-width: 1000px) {
    .afyc-boards__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .afyc-boards {
        margin-top: 28px;
    }
    .afyc-boards__title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    .afyc-boards__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .afyc-board-tile {
        aspect-ratio: 1 / 1;
    }
    .afyc-board-tile__bar {
        padding: 32px 10px 10px;
    }
    .afyc-board-tile__label {
        font-size: 18px;
    }
}

/* ——— CTA ——— */
.afyc-cta {
    margin: 48px 0 8px;
    background: #fff;
    color: #000;
    border: 1px solid #e23737;
    border-radius: 18px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.afyc-cta--stat {
    margin: 48px 0 16px;
    justify-content: center;
    text-align: center;
}
.afyc-cta--stat + .afyc-cta {
    margin-top: 0;
}
.afyc-cta__text {
    margin: 0;
    flex: 1 1 220px;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    color: #000 !important;
}
.afyc-cta--stat .afyc-cta__text {
    flex: 0 1 auto;
    text-align: center;
}
.afyc-cta__num {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--afyc-red, #e23737);
}
.afyc-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--afyc-red);
    color: #fff !important;
    font-weight: 400;
    font-size: 18px;
    border-radius: 10px;
    padding: 10px 18px;
    text-decoration: none !important;
    white-space: nowrap;
}
.afyc-cta__btn:hover {
    background: var(--afyc-red2);
}
@media (max-width: 640px) {
    .afyc-cta {
        margin: 32px 0;
        padding: 22px;
    }
    .afyc-cta--stat {
        margin: 32px 0 12px;
    }
    .afyc-cta--stat + .afyc-cta {
        margin-top: 0;
    }
    .afyc-cta__btn {
        width: 100%;
    }
}

/* ——— Pick: типы ТС (без изменений логики) ——— */
.afyc-vehicle-types {
    margin: 0 0 18px;
    padding: 4px 0 8px;
}
.afyc-vehicle-types__title {
    margin: 10px 0 30px;
    font-size: clamp(1.65rem, 3vw, 1.75rem);
    font-family: Inter-SemiBold, sans-serif;
    font-weight: 700;
    color: var(--afyc-mut);
    text-align: center;
}
.afyc-vehicle-types__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    width: 100%;
}
.afyc-vehicle-types__grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.afyc-vehicle-types__grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.afyc-vehicle-types__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
    .afyc-vehicle-types__grid--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    /* 3 карточки по центру, ширина ячейки как у сетки 4 */
    .afyc-vehicle-types__grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: calc((100% - 36px) / 4 * 3 + 24px);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .afyc-vehicle-types__grid--2 {
        width: calc((100% - 36px) / 4 * 2 + 12px);
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}
.afyc-vtype-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    text-decoration: none;
    color: #1a1a1a;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    transition: transform 0.15s ease;
}
.afyc-vtype-card:hover {
    transform: translateY(-1px);
}
.afyc-vtype-card:hover .afyc-vtype-card__media {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
    border-color: #cbd5e1;
}
.afyc-vtype-card__media {
    display: block;
    min-height: 132px;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 85% auto;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.afyc-vtype-card__label {
    display: block;
    padding: 2px 6px 0;
    font-weight: 400;
    font-size: clamp(1.15rem, 1.9vw, 1.35rem);
    line-height: 1.25;
    text-align: center;
    color: #1a1a1a;
    white-space: normal;
}
@media (max-width: 768px) {
    .afyc-vtype-card {
        gap: 6px;
    }
    .afyc-vtype-card__media {
        min-height: 110px;
        aspect-ratio: 3 / 2;
    }
    .afyc-vtype-card__label {
        font-size: 1.1rem;
    }
}

/* Desktop AFYC footer (мобильный — скрыт вместе с .big_wrapper-footer) */
.afyc-footer-desk {
    display: none;
}
@media (min-width: 901px) {
    /* полная ширина белого подвала (края страницы тоже белые) */
    body.afyc-hub-page .big_wrapper-footer {
        background: #fff;
        border-top: 1px solid var(--afyc-line);
    }
    /* afyc-footer-desk лежит внутри .new-container — прячем siblings, не сам container */
    body.afyc-hub-page .big_wrapper-footer .new-container > *:not(.afyc-footer-desk) {
        display: none !important;
    }
    /* шире контейнер только у AFYC-футера, не трогаем хеадер/страницу */
    body.afyc-hub-page .big_wrapper-footer > .new-container {
        max-width: 1220px;
        width: 100%;
        margin: 0 auto;
        padding: 0;
    }
    body.afyc-hub-page .afyc-footer-desk {
        display: block;
        background: #fff;
        padding: 40px 0 24px;
        font-size: 14px;
        color: #6b6562;
        font-family: Inter-Medium, Inter, sans-serif;
    }
    .afyc-footer-desk__grid {
        max-width: 1220px;
        margin: 0 auto;
        padding: 0 24px;
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        gap: 24px;
    }
    /* типографика только внутри desk-футера */
    body.afyc-hub-page .afyc-footer-desk a {
        display: block;
        margin: 6px 0;
        text-decoration: none;
        font-family: Inter-Medium, sans-serif;
        font-size: 12px;
        color: #353433;
        cursor: pointer;
    }
    body.afyc-hub-page .afyc-footer-desk a:hover {
        color: var(--afyc-red);
    }
    body.afyc-hub-page .afyc-footer-desk p,
    body.afyc-hub-page .afyc-footer-desk span {
        font-family: Inter-Medium, sans-serif;
        font-size: 12px;
        color: #353433;
    }
    .afyc-footer-desk__logo {
        height: 22px;
        display: block;
        margin-bottom: 10px;
    }
    body.afyc-hub-page .afyc-footer-desk__tel {
        font-size: 22px;
        font-weight: 400;
        color: #e23737 !important;
    }
    .afyc-footer-desk__pay {
        max-width: 1220px;
        margin: 24px auto 0;
        padding: 0 24px;
        display: flex;
        gap: 10px;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
        color: #6b6562;
        font-size: 12px;
    }
    .afyc-footer-desk__pay img {
        height: 18px;
    }
}
