/* =========================================================
 * apple-master: единый стиль для модельных страниц ремонта
 * Подключается ПОСЛЕ style.css, поэтому переопределяет где нужно.
 * Цвета базируются на фирменном бирюзовом #2bb3b8.
 * ========================================================= */

/* ----- Левая колонка: фото + карточка CTA ----- */
.am-content-device {
    /* Тема задаёт grid с auto-fit (~50/50). Переопределяем на 30% / остальное. */
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 28px;
    align-items: start;
}
.am-content-device .am-device-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
.am-content-device .device-info {
    min-width: 0;
    padding: 0;
}
.am-content-device .device-image {
    margin: 0;
}
.am-content-device .device-image img {
    max-width: 100%;
    height: auto;
    display: block;
}
.am-device-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    width: 100%;
    box-sizing: border-box;
}
.am-device-card__btn {
    background: #2bb3b8;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    text-align: center;
}
.am-device-card__btn:hover { background: #259ba0; }
.am-device-card__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    padding: 8px 0;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #f1f1f1;
}
.am-device-card__phone i { color: #2bb3b8; font-size: 19px; }
.am-device-card__phone:hover { color: #2bb3b8; }

.am-device-card__msg-label {
    font-size: 14px;
    color: #8a8a8a;
    text-align: center;
}
.am-device-card__msg-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.am-device-card__msg {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f8f8;
    border: 1px solid #e0e8e8;
    color: #4a5757;
    font-size: 18px;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.am-device-card__msg:hover {
    transform: translateY(-1px);
    background: #2bb3b8;
    border-color: #2bb3b8;
    color: #fff;
}
/* MAX-иконка через CSS background (как в шапке), белая подложка для контраста */
.am-device-card__msg .max-ico {
    margin: 0;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}
.am-device-card__msg--max .max-ico {
    background-color: #fff;
    border-radius: 4px;
}

/* Перки в строку */
.am-device-card__perks {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #f1f1f1;
}
.am-device-card__perk {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    font-size: 13px;
    color: #6b7878;
    line-height: 1.3;
    cursor: default;
}
.am-device-card__perk svg {
    width: 25px;
    height: 25px;
    color: #2bb3b8;
    fill: currentColor;
}
.am-device-card__perk b { color: #1a1a1a; font-weight: 600; }

/* SVG-плейсхолдер изображения устройства */
.am-device-svg {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    text-align: center;
}
.am-device-svg svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}
.am-device-svg__label {
    margin-top: 10px;
    font-size: 14px;
    color: #4a5757;
    font-weight: 500;
}
.am-device-thumb { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 14px; }

@media (max-width: 760px) {
    .am-content-device .am-device-col { width: 100%; max-width: 360px; margin: 0 auto; }
    .am-device-card { padding: 16px; }
}

.am-section { margin: 36px 0; }
.am-block-title {
    font-size: 22px;
    line-height: 1.25;
    color: #1a1a1a;
    font-weight: 600;
    margin: 0 0 16px;
}
.am-block-title--center { text-align: center; }

/* ----- USP плитки (hero) ----- */
.am-usp {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 24px 0 36px;
}
.am-usp__item {
    background: #f7fafa;
    border: 1px solid #e6efef;
    border-radius: 12px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transition: border-color .15s, transform .15s;
}
.am-usp__item:hover { border-color: #2bb3b8; }
.am-usp__icon {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: #2bb3b8;
    color: #fff;
}
.am-usp__icon svg { width: 20px; height: 20px; fill: #fff; }
.am-usp__title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}
.am-usp__sub {
    font-size: 13px;
    color: #6b7878;
    line-height: 1.35;
}
@media (max-width: 980px) { .am-usp { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
    .am-usp { grid-template-columns: 1fr 1fr; gap: 10px; }
    .am-usp__item { padding: 14px 12px; }
    .am-usp__title { font-size: 14px; }
    .am-usp__sub { font-size: 12px; }
}

/* ----- Прайс-таблица ----- */
.am-pricetable-wrap { margin: 36px 0; }
.am-pricetable {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    overflow: hidden;
    font-size: 15px;
}
.am-pricetable thead th {
    background: #f5f8f8;
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: #4a5757;
    font-size: 14px;
    border-bottom: 1px solid #ececec;
    white-space: nowrap;
}
.am-pricetable tbody tr { border-bottom: 1px solid #f1f1f1; transition: background .12s; }
.am-pricetable tbody tr:last-child { border-bottom: none; }
.am-pricetable tbody tr:hover { background: #fafdfd; }
.am-pricetable td { padding: 12px 16px; vertical-align: middle; }
.am-pricetable__service { color: #1a1a1a; }
.am-pricetable__service-link {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color .15s, border-color .15s;
}
.am-pricetable__service-link:hover {
    color: #2bb3b8;
    border-bottom-color: #2bb3b8;
}
/* Ссылка-цена в сегментной таблице экрана (на спец-страницу варианта модели) */
.am-pricetable__seg-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(43,179,184,.45);
    transition: color .15s, border-color .15s;
}
.am-pricetable__seg-link:hover { color: #2bb3b8; border-bottom-color: #2bb3b8; }
/* Ссылка-модель в простой таблице услуг (на модельную спец-страницу услуги) */
.price-table .service-type .title a {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color .15s, border-color .15s;
}
.price-table .service-type .title a:hover { color: #2bb3b8; border-bottom-color: #2bb3b8; }
.am-pricetable__note-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef7f8;
    color: #2bb3b8;
    font-size: 12px;
    font-weight: 500;
    vertical-align: middle;
    white-space: nowrap;
}
.am-pricetable__price {
    color: #1a1a1a;
    font-weight: 600;
    white-space: nowrap;
    width: 1%;
    text-align: right;
}
.am-pricetable__action { width: 1%; text-align: right; }
.am-pricetable__action a {
    color: #2bb3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.am-pricetable__action a:hover { text-decoration: underline; }
.am-pricetable__note {
    margin: 10px 0 0;
    font-size: 13px;
    color: #8a8a8a;
}

/* --- Сегментированная таблица (Аналог / In-Cell / Оригинал) --- */
.am-pricetable--seg {
    font-size: 14px;
}
.am-pricetable--seg .am-pricetable__model-h { width: auto; text-align: left; }
.am-pricetable--seg .am-pricetable__seg-h {
    text-align: center;
    width: 1%;
    white-space: nowrap;
    color: #4a5757;
    font-weight: 600;
    background: #eef7f8;
}
.am-pricetable--seg .am-pricetable__model {
    color: #1a1a1a;
    font-weight: 500;
    padding: 10px 16px;
}
.am-pricetable--seg .am-pricetable__seg {
    text-align: center;
    white-space: nowrap;
    padding: 10px 16px;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
    border-left: 1px solid #f1f1f1;
}
.am-pricetable--seg .am-pricetable__seg--num { font-weight: 600; }
.am-pricetable--seg .am-pricetable__seg--empty { color: #c8c8c8; }
.am-pricetable--seg .am-pricetable__seg--text { font-size: 13px; color: #6b7878; }
@media (max-width: 640px) {
    .am-pricetable--seg { font-size: 13px; }
    .am-pricetable--seg .am-pricetable__model { padding: 8px 10px; }
    .am-pricetable--seg .am-pricetable__seg   { padding: 8px 8px; }
    .am-pricetable--seg .am-pricetable__seg-h { padding: 8px 8px; font-size: 12px; }
}
@media (max-width: 640px) {
    .am-pricetable { font-size: 14px; }
    .am-pricetable thead th, .am-pricetable td { padding: 10px 12px; }
    .am-pricetable__action a { font-size: 13px; }
}

/* ----- Шаги «Как мы работаем» ----- */
.am-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    counter-reset: am-step;
}
.am-steps__item {
    position: relative;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 22px 18px 18px;
    counter-increment: am-step;
}
.am-steps__item::before {
    content: counter(am-step);
    position: absolute;
    top: -14px;
    left: 18px;
    width: 28px; height: 28px;
    background: #2bb3b8;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
}
.am-steps__title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 6px;
    line-height: 1.25;
}
.am-steps__desc {
    font-size: 13px;
    color: #6b7878;
    line-height: 1.4;
    margin: 0;
}
@media (max-width: 980px) { .am-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .am-steps { grid-template-columns: 1fr; } }

/* ----- Блок гарантии и комплектующих ----- */
.am-guarantee {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    background: #f7fafa;
    border: 1px solid #e6efef;
    border-radius: 12px;
    padding: 24px;
}
.am-guarantee__item h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
}
.am-guarantee__item p {
    font-size: 14px;
    color: #4a5757;
    line-height: 1.5;
    margin: 0 0 8px;
}
.am-guarantee__item ul {
    padding: 0;
    margin: 8px 0 0;
    list-style: none;
}
.am-guarantee__item li {
    font-size: 14px;
    color: #4a5757;
    line-height: 1.5;
    padding-left: 22px;
    position: relative;
    margin: 4px 0;
}
.am-guarantee__item li::before {
    content: '';
    position: absolute; left: 0; top: 7px;
    width: 14px; height: 8px;
    border-left: 2px solid #2bb3b8;
    border-bottom: 2px solid #2bb3b8;
    transform: rotate(-45deg);
}
@media (max-width: 760px) {
    .am-guarantee { grid-template-columns: 1fr; padding: 18px; }
}

/* ----- FAQ ----- */
.am-faq { border-top: 1px solid #ececec; }
.am-faq__item {
    border-bottom: 1px solid #ececec;
}
.am-faq__item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 36px 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    position: relative;
    line-height: 1.35;
}
.am-faq__item summary::-webkit-details-marker { display: none; }
.am-faq__item summary::after {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid #2bb3b8;
    border-bottom: 2px solid #2bb3b8;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s;
}
.am-faq__item[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
}
.am-faq__item-body {
    padding: 0 0 18px;
    font-size: 14px;
    color: #4a5757;
    line-height: 1.55;
}
.am-faq__item-body p { margin: 0 0 8px; }
.am-faq__item-body p:last-child { margin: 0; }

/* ----- Отзывы ----- */
.am-reviews {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 22px 24px;
    flex-wrap: wrap;
}
.am-reviews__rating {
    display: flex;
    align-items: center;
    gap: 14px;
}
.am-reviews__score {
    font-size: 42px;
    line-height: 1;
    font-weight: 700;
    color: #1a1a1a;
}
.am-reviews__stars {
    color: #ffb800;
    font-size: 18px;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 4px;
}
.am-reviews__count {
    font-size: 13px;
    color: #8a8a8a;
}
.am-reviews__body { flex: 1; min-width: 200px; }
.am-reviews__source {
    font-size: 14px;
    color: #4a5757;
    margin: 0 0 6px;
}
.am-reviews__source a { color: #2bb3b8; text-decoration: none; }
.am-reviews__source a:hover { text-decoration: underline; }
.am-reviews__cta {
    margin: 0;
    font-size: 13px;
    color: #8a8a8a;
}
@media (max-width: 540px) {
    .am-reviews { padding: 18px; }
    .am-reviews__score { font-size: 36px; }
}

/* ----- Контакты + карта ----- */
.am-contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    background: #f7fafa;
    border: 1px solid #e6efef;
    border-radius: 12px;
    padding: 24px;
}
.am-contacts__info p {
    margin: 0 0 8px;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.4;
}
.am-contacts__info p i {
    color: #2bb3b8;
    width: 18px;
    margin-right: 6px;
}
.am-contacts__info a { color: #1a1a1a; text-decoration: none; }
.am-contacts__info a:hover { color: #2bb3b8; }
.am-contacts__map {
    aspect-ratio: 16 / 10;
    background: #e3eded;
    border-radius: 8px;
    overflow: hidden;
}
.am-contacts__map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 760px) {
    .am-contacts { grid-template-columns: 1fr; padding: 18px; }
    .am-contacts__map { aspect-ratio: 4 / 3; }
}

.am-contacts__hint {
    margin: 14px 0 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px dashed #c8dada;
    border-radius: 8px;
    font-size: 13px;
    color: #5a6b6b;
    line-height: 1.45;
}

/* Объединённый блок: контакты+форма слева, карта справа (sticky) */
.am-contacts--with-form { align-items: flex-start; }
.am-contacts--with-form .am-contacts__left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.am-contacts--with-form .am-contacts__map {
    aspect-ratio: 4 / 5;
    position: sticky;
    top: 16px;
}
@media (max-width: 980px) {
    .am-contacts--with-form .am-contacts__map { position: static; aspect-ratio: 4 / 3; }
}
@media (max-width: 760px) {
    .am-contacts--with-form { grid-template-columns: 1fr; }
}

/* Компактная версия формы внутри блока контактов */
.am-request--compact {
    padding: 18px;
    box-shadow: none;
    border-radius: 12px;
}
.am-request__title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 6px;
    line-height: 1.25;
}

/* ----- Почему выбирают (заменяет старый <table.preim_table>) ----- */
.am-why { margin: 36px 0; }
.am-why__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    align-items: flex-start;
}
.am-why__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 8px;
}
.am-why__icon {
    width: 64px; height: 64px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #2bb3b8;
    margin-bottom: 12px;
}
.am-why__icon svg { width: 100%; height: 100%; }
.am-why__title {
    font-size: 14px;
    line-height: 1.35;
    color: #1a1a1a;
    font-weight: 500;
}
@media (max-width: 980px) {
    .am-why__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
    .am-why__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .am-why__icon { width: 54px; height: 54px; }
}

/* ----- Форма заявки на ремонт ----- */
.am-request {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.am-request__head { margin-bottom: 18px; }
.am-request__sub {
    margin: 0;
    font-size: 14px;
    color: #6b7878;
    line-height: 1.45;
}
.am-request__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.am-field { display: flex; flex-direction: column; margin-bottom: 14px; }
.am-field:last-child { margin-bottom: 0; }
.am-field label {
    font-size: 13px;
    color: #4a5757;
    margin-bottom: 6px;
    font-weight: 500;
}
.am-field__req { color: #d44; }
.am-field input,
.am-field textarea {
    border: 1px solid #d8e0e0;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    background: #fafdfd;
    color: #1a1a1a;
    transition: border-color .15s, background .15s;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.45;
}
.am-field textarea { min-height: 160px; }
.am-field input:focus,
.am-field textarea:focus {
    outline: none;
    border-color: #2bb3b8;
    background: #fff;
}
.am-request__foot {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.am-request__submit {
    background: #2bb3b8;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
}
.am-request__submit:hover { background: #259ba0; }
.am-request__submit:active { transform: translateY(1px); }
.am-request__submit:disabled { background: #9ed2d4; cursor: wait; }
.am-request__legal {
    font-size: 12px;
    color: #8a8a8a;
    line-height: 1.35;
    flex: 1;
    min-width: 200px;
}
.am-request__legal a { color: #2bb3b8; text-decoration: none; }
.am-request__legal a:hover { text-decoration: underline; }

.am-request__status {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}
.am-request__status--ok  { background: #e8f7ee; color: #1f7a3a; border: 1px solid #c2e6ce; }
.am-request__status--err { background: #fbeaea; color: #a13030; border: 1px solid #f0c8c8; }

.am-request__alt {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: #6b7878;
}
.am-request__msg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #d8e0e0;
    background: #fff;
    color: #1a1a1a;
    transition: background .15s, border-color .15s, color .15s;
}
.am-request__msg:hover {
    background: #2bb3b8;
    border-color: #2bb3b8;
    color: #fff;
}
.am-request__msg i { font-size: 16px; }
.am-request__msg img { display: inline-block; vertical-align: middle; border-radius: 3px; }
.am-request__msg--max img { background: #fff; padding: 1px; }

@media (max-width: 640px) {
    .am-request { padding: 20px; }
    .am-request__row { grid-template-columns: 1fr; }
    .am-request__submit { width: 100%; }
    .am-request__legal { min-width: 0; }
}

/* =========================================================
 * Мобильные правки: theme container даёт всего ~1% padding,
 * поэтому наши секции и таблицы приклеиваются к краям.
 * Этот блок добавляет нормальные отступы и адаптирует
 * раскладки под узкие экраны.
 * ========================================================= */
@media (max-width: 980px) {
    /* Theme outer container — нормальный отступ от краёв */
    .single-page .tg-container,
    .page-template-page-repair .tg-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        width: auto !important;
        box-sizing: border-box;
    }
}

@media (max-width: 760px) {
    .am-section { margin: 28px 0; }
    .am-block-title { font-size: 19px; line-height: 1.3; }

    /* Левая колонка: фото + карточка — занимают всю ширину, центруются */
    .am-content-device { grid-template-columns: 1fr; }
    .am-content-device .am-device-col {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 18px;
    }
    .am-device-svg { max-width: 220px; }
    .device-image img,
    .am-device-thumb { max-width: 260px; margin: 0 auto; }
    .am-device-card { padding: 16px; }
    .am-device-card__phone { font-size: 18px; }
    .am-device-card__perk { font-size: 12px; }
    .am-device-card__perk svg { width: 22px; height: 22px; }

    /* USP-плитки: 2×2 на мобиле, компактнее */
    .am-usp { grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 24px; }
    .am-usp__item { padding: 12px 12px; gap: 6px; }
    .am-usp__icon { width: 30px; height: 30px; }
    .am-usp__icon svg { width: 16px; height: 16px; }
    .am-usp__title { font-size: 13px; }
    .am-usp__sub { font-size: 12px; line-height: 1.3; }

    /* Шаги — в столбец */
    .am-steps { grid-template-columns: 1fr; gap: 14px; }
    .am-steps__item { padding: 18px 16px 14px; }

    /* Гарантия — в столбец */
    .am-guarantee { grid-template-columns: 1fr; padding: 18px; gap: 14px; }
    .am-guarantee__item h3 { font-size: 15px; }
    .am-guarantee__item p,
    .am-guarantee__item li { font-size: 13.5px; }

    /* Прайс-таблица: горизонтальный скролл если не помещается */
    .am-pricetable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
    .am-pricetable { font-size: 13.5px; min-width: 100%; }
    .am-pricetable thead th,
    .am-pricetable td { padding: 9px 10px; }
    .am-pricetable__action a { font-size: 12.5px; }
    .am-pricetable__note-tag { font-size: 11px; margin-left: 4px; padding: 1px 6px; }
    .am-pricetable__note { padding: 0 4px; }

    /* Сегментированная (4 колонки) — скроллится горизонтально */
    .am-pricetable--seg { font-size: 13px; min-width: 480px; }
    .am-pricetable--seg .am-pricetable__model,
    .am-pricetable--seg .am-pricetable__seg { padding: 8px 10px; }
    .am-pricetable--seg .am-pricetable__seg-h { font-size: 11.5px; padding: 8px 8px; }

    /* FAQ компактнее */
    .am-faq__item summary { padding: 14px 30px 14px 0; font-size: 14.5px; }
    .am-faq__item-body { font-size: 13.5px; padding-bottom: 14px; }

    /* Отзывы */
    .am-reviews { padding: 18px; gap: 16px; }
    .am-reviews__score { font-size: 34px; }
    .am-reviews__source { font-size: 13.5px; }

    /* «Почему выбирают» — 2×2 (последняя плитка центрируется отдельно) */
    .am-why__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .am-why__icon { width: 48px; height: 48px; margin-bottom: 8px; }
    .am-why__title { font-size: 13px; }

    /* Контакты + форма + карта — в один поток */
    .am-contacts,
    .am-contacts--with-form {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 14px;
    }
    .am-contacts--with-form .am-contacts__left { gap: 12px; }
    .am-contacts--with-form .am-contacts__map {
        position: static;
        aspect-ratio: 4 / 3;
        order: 2;
    }
    .am-contacts__info p { font-size: 14px; }
    .am-contacts__hint { font-size: 12.5px; padding: 10px 12px; }

    /* Форма заявки */
    .am-request,
    .am-request--compact { padding: 16px; }
    .am-request__title { font-size: 16px; }
    .am-request__sub { font-size: 13px; }
    .am-request__row { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
    .am-field { margin-bottom: 12px; }
    .am-field input,
    .am-field textarea { font-size: 16px; /* предотвращает iOS zoom on focus */ padding: 10px 12px; }
    .am-field textarea { min-height: 130px; }
    .am-field label { font-size: 12.5px; }
    .am-request__foot { gap: 12px; }
    .am-request__submit { width: 100%; padding: 13px 20px; font-size: 15px; }
    .am-request__legal { min-width: 0; font-size: 11.5px; }
    .am-request__alt { gap: 8px; font-size: 13px; }
    .am-request__msg { padding: 7px 12px; font-size: 13px; }

    /* CTA-блок в .device-info остался — на мобиле также подкорректируем */
    .repair-cta__alt-links { flex-wrap: wrap; }
}

@media (max-width: 380px) {
    /* Очень узкие экраны (iPhone SE etc.) */
    .single-page .tg-container,
    .page-template-page-repair .tg-container { padding-left: 12px !important; padding-right: 12px !important; }
    .am-usp { grid-template-columns: 1fr; }
    .am-device-card__perks { flex-wrap: wrap; }
    .am-device-card__perk { flex-basis: 30%; }
}

/* =========================================================
 * Мобильный футер (≤760px)
 * Проблемы: контент прилипает к краям, иконки наезжают на
 * текст, тёмная сплошная плита текста о товарных знаках.
 * ========================================================= */
@media (max-width: 760px) {
    /* Все боксы — в один поток сверху вниз, без flex-row, без order-кашей */
    footer > .content_wrapper.flex {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    footer .mob_footer_boxes {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        order: initial !important;
        margin-top: 0 !important;
        gap: 0;
    }
    footer .footer__box {
        order: initial !important;
        flex: 0 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-left: 0 !important;
    }
    /* Убираем <br><br> в HTML перед VK/MAX — лишний воздух */
    footer .footer__box br { display: none; }

    /* Базовый отступ от краёв */
    footer .content_wrapper {
        padding-left: 22px !important;
        padding-right: 22px !important;
        width: auto !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Боксы — нормальный gap, центрирование текста */
    footer .footer__box {
        margin-bottom: 22px;
    }
    footer .footer__box:last-child {
        margin-bottom: 0;
    }
    footer .mob_footer_boxes {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
    }

    /* Логотип */
    footer .footer__box_1st > div:first-child img {
        max-width: 200px;
        height: auto;
    }
    footer .footer__box_1st p {
        font-size: 15px;
        line-height: 1.45;
        margin: 8px 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    footer .footer__box_1st p i {
        color: #fff;
        font-size: 15px;
        width: 18px;
        text-align: center;
        flex-shrink: 0;
    }

    /* Дисклеймер «не является публичной офертой» */
    footer .footer__box_1st > div[style*="margin"] {
        margin: 18px 0 !important;
        padding: 12px 14px;
        background: rgba(255,255,255,0.08);
        border-radius: 8px;
    }
    footer .footer__box_1st > div[style*="margin"] > div {
        font-size: 12px !important;
        line-height: 1.5 !important;
    }

    /* Заголовки колонок */
    footer .footer__box .title {
        font-size: 19px !important;
        font-weight: 600;
        margin: 0 0 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    /* Списки */
    footer .footer__box ul {
        padding: 0;
        margin: 0;
        list-style: none;
    }
    footer .footer__box ul li {
        padding: 9px 0;
        font-size: 16px;
        line-height: 1.45;
    }
    footer .footer__box ul li a {
        text-decoration: none;
        color: inherit;
    }
    footer .footer__box ul li a:hover { text-decoration: underline; }

    /* Соцссылки: VK + MAX — нормальное выравнивание, gap, цвет */
    footer .footer__box a[href*="vk.com"],
    footer .footer__box a.footer-max {
        display: inline-flex !important;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        font-size: 16px;
        text-decoration: none;
        color: inherit;
    }
    footer .footer__box a[href*="vk.com"] i {
        font-size: 18px;
        width: 22px;
        text-align: center;
        color: #fff;
    }
    footer .footer__box a.footer-max .max-ico {
        margin: 0;
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
        background-color: #fff;
        border-radius: 4px;
    }

    /* «Простыня» товарных знаков — больше воздуха, удобнее читать */
    footer > .content_wrapper:last-of-type {
        margin-top: 20px !important;
        margin-bottom: 28px !important;
        padding-top: 16px !important;
        border-top: 1px solid rgba(255,255,255,0.12);
    }
    footer > .content_wrapper:last-of-type {
        font-size: 11.5px !important;
        line-height: 1.6 !important;
        color: rgba(255,255,255,0.6) !important;
        text-align: left;
    }

    /* Floating-виджет мессенджеров: не наезжает на футер */
    #messengers {
        bottom: 12px !important;
        right: 12px !important;
    }
}

@media (max-width: 380px) {
    footer .content_wrapper {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
    footer .footer__box_1st > div:first-child img {
        max-width: 180px;
    }
    footer .footer__box .title { font-size: 16px !important; }
    footer .footer__box ul li { font-size: 15px; }
}

/* Убираем точки-маркеры у тематических списков с собственными иконками */
ul.edge,
.am-guarantee__item ul,
.am-section ul {
    list-style: none !important;
    padding-left: 0 !important;
}
ul.edge li,
.am-guarantee__item ul li {
    list-style: none !important;
}
ul.edge li::marker,
.am-guarantee__item ul li::marker {
    content: '' !important;
    display: none;
}

/* =========================================================
 * Страница товара-услуги ремонта (/product/zamena-…/)
 * Всё скоупится под .am-repair-product (класс на div.product) — магазин не затрагивается.
 * ========================================================= */
div.product.am-repair-product {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    /* 30% фото+CTA / 70% текст (как на модельных страницах) */
    display: grid;
    grid-template-columns: 30% 1fr;
    column-gap: 32px;
    align-items: start;
}
/* Левая колонка: галерея + CTA-карточка под фото */
.am-repair-product .am-media-col {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}
.am-repair-product .woocommerce-product-gallery,
.am-repair-product div.images {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}
/* Технический clear от WooCommerce — в grid не нужен */
.am-repair-product > .clear { display: none; }
/* Заголовок — во всю ширину над колонками */
.am-repair-product > .product_title.entry-title { grid-column: 1 / -1; }
.am-repair-product .product_title.entry-title {
    font-size: 28px;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 14px;
}
/* Картинка товара — мягкая рамка как у карточек */
.am-repair-product .woocommerce-product-gallery img {
    border-radius: 14px;
}
/* Правая колонка (текст) */
.am-repair-product .summary.entry-summary {
    grid-column: 2;
    width: auto !important;
    float: none !important;
    padding-left: 0;
    margin: 0;
    min-width: 0;
}
/* Пустую цену WooCommerce у услуг прячем (цена указана в описании) */
.am-repair-product .summary.entry-summary > .price { display: none; }

/* Краткое описание: цены и подзаголовки — аккуратно */
.am-repair-product .woocommerce-product-details__short-description {
    color: #3a4a4a;
    line-height: 1.6;
    font-size: 15px;
}
.am-repair-product .woocommerce-product-details__short-description h2 {
    font-size: 20px;
    color: #1a1a1a;
    margin: 18px 0 10px;
}
.am-repair-product .woocommerce-product-details__short-description h4 {
    display: inline-block;
    margin: 4px 8px 4px 0;
    padding: 7px 14px;
    background: #eef7f8;
    color: #1a7e83;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

/* CTA-карточка (переиспользует am-device-card) — теперь в левой колонке под фото */
.am-repair-product .am-product-card {
    margin-top: 0;
    max-width: none;
}
/* Кнопка «Оставить заявку» — бирюзовая, поверх базовых стилей темы */
.am-repair-product .am-product-card .product_detail-recall,
.am-repair-product .am-product-card .am-device-card__btn {
    width: 100%;
    background: #2bb3b8;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    text-align: center;
}
.am-repair-product .am-product-card .product_detail-recall:hover { background: #259ba0; }

/* Мета (SKU/категория) — приглушаем */
.am-repair-product .product_meta {
    margin-top: 16px;
    font-size: 13px;
    color: #8a8a8a;
}
.am-repair-product .product_meta a { color: #2bb3b8; text-decoration: none; }
.am-repair-product .product_meta .sku_wrapper { display: none; }

/* Хлебные крошки — мягче */
.am-repair-product .woocommerce-breadcrumb {
    font-size: 13px;
    color: #9aa6a6;
    margin-bottom: 16px;
}

@media (max-width: 760px) {
    /* На мобиле — обычный блок (grid-привязки колонок отключаются), всё в столбик */
    div.product.am-repair-product { display: block; }
    .am-repair-product .am-media-col {
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
    }
    .am-repair-product .summary.entry-summary {
        width: 100% !important;
        max-width: 100%;
        padding-left: 0;
        margin-top: 22px;
    }
    .am-repair-product .product_title.entry-title { font-size: 22px; text-align: left; }
    .am-repair-product .am-product-card { max-width: 100%; }
}
