/* ==========================================================================
   Contacts page v2 — paketoff.ru
   Подключается на /contacts (contacts.tpl) поверх common-v2.css.
   Старая привязка к main.min.css снята: общие стили теперь в common-v2.
   ========================================================================== */

/* Страница контактов */
.contacts-page { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.contacts-page * { box-sizing: border-box; }

/* ===== HERO =====
   Zero-блок с фото офиса — production-hero--split из common-v2.css.
   Здесь только отступ до карточек контактов. */
.contacts-page .production-hero--split { margin-bottom: 48px; }

/* ===== БЫСТРЫЕ КОНТАКТНЫЕ КАРТОЧКИ ===== */
/* 6 карточек (телефон, почта, Telegram, MAX, WhatsApp, ВК) — по 3 в ряд,
   чтобы вторая строка была полной, а не «4 + 2». */
.contacts-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.contacts-card {
    display: block;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 24px 22px;
    text-decoration: none;
    color: inherit;
    transition: all .25s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.contacts-card:hover {
    border-color: #ea5b71;
    box-shadow: 0 8px 24px rgba(234, 91, 113, .12);
    transform: translateY(-2px);
}
.contacts-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f7f7f9;
    color: #ea5b71;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    transition: all .25s ease;
}
.contacts-card:hover .contacts-card__icon {
    background: #ea5b71;
    color: #fff;
}
.contacts-card__icon--tg { color: #229ED9; }
.contacts-card:hover .contacts-card__icon--tg { background: #229ED9; }
.contacts-card__icon--max { color: #7A4DFF; }
.contacts-card:hover .contacts-card__icon--max { background: linear-gradient(135deg, #2B7FFF 0%, #7A4DFF 100%); }
.contacts-card__icon--wa { color: #25D366; }
.contacts-card:hover .contacts-card__icon--wa { background: #25D366; }
.contacts-card__icon--vk { color: #4680C2; }
.contacts-card:hover .contacts-card__icon--vk { background: #4680C2; }

.contacts-card--accent {
    background: linear-gradient(135deg, #ea5b71 0%, #d94862 100%);
    border-color: transparent;
    color: #fff;
}
.contacts-card--accent .contacts-card__icon {
    background: rgba(255,255,255,.18);
    color: #fff;
}
.contacts-card--accent:hover .contacts-card__icon {
    background: #fff;
    color: #ea5b71;
}
.contacts-card--accent:hover {
    box-shadow: 0 12px 32px rgba(234, 91, 113, .35);
}
.contacts-card__label {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.contacts-card--accent .contacts-card__label {
    color: rgba(255,255,255,.85);
}
.contacts-card__value {
    font-size: 19px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.3;
}
.contacts-card--accent .contacts-card__value { color: #fff; }
.contacts-card__hint {
    font-size: 13px;
    color: #999;
}
.contacts-card--accent .contacts-card__hint {
    color: rgba(255,255,255,.8);
}

/* ===== ОСНОВНОЙ БЛОК: ИНФОРМАЦИЯ + КАРТА ===== */
.contacts-main {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 32px;
    margin-bottom: 48px;
    align-items: stretch;
}
.contacts-main__info {
    background: #fafafa;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #f0f0f0;
}
.contacts-main__title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin: 0 0 24px;
}
.contacts-main__map {
    border-radius: 16px;
    overflow: hidden;
    min-height: 480px;
    background: #f0f0f0;
    border: 1px solid #f0f0f0;
}
.contacts-main__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 480px;
    border: 0;
}

.contacts-info-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #ebebeb;
}
.contacts-info-item:last-of-type { border-bottom: none; padding-bottom: 8px; }
.contacts-info-item__icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    color: #ea5b71;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ececec;
}
.contacts-info-item__label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.contacts-info-item__value {
    font-size: 16px;
    color: #222;
    line-height: 1.5;
}
.contacts-info-item__hint {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}
.contacts-info-item__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ea5b71;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    transition: gap .2s ease;
}
.contacts-info-item__link:hover { gap: 10px; color: #d94862; }
.contacts-info-item__link i { font-size: 11px; }

.contacts-hours {
    border-collapse: collapse;
    margin: 4px 0;
}
.contacts-hours td {
    padding: 4px 18px 4px 0;
    font-size: 15px;
}
.contacts-hours td:first-child { color: #888; }
.contacts-hours td:last-child { color: #222; font-weight: 500; }

.contacts-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 24px;
    margin-top: 8px;
    border-top: 1px solid #ebebeb;
}
.contacts-socials__label {
    font-size: 14px;
    color: #888;
    margin-right: 4px;
}
.contacts-socials__link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ececec;
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .2s ease;
}
.contacts-socials__link:hover {
    background: #ea5b71;
    border-color: #ea5b71;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== ФОРМА ОБРАТНОЙ СВЯЗИ ===== */
.contacts-form-section {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 32px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 40px;
}
.contacts-form-section__lead { padding-right: 8px; }
.contacts-form-section__title {
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin: 0 0 14px;
    line-height: 1.2;
}
.contacts-form-section__text {
    font-size: 16px;
    color: #555;
    line-height: 1.55;
    margin: 0 0 20px;
}
.contacts-form-section__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contacts-form-section__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 15px;
    color: #333;
}
.contacts-form-section__list li i {
    color: #4CAF50;
    font-size: 13px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e8f5e9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contacts-form { display: flex; flex-direction: column; gap: 14px; }
.contacts-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.contacts-form__field { display: block; }
.contacts-form__field > span {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}
.contacts-form__field > span em {
    color: #ea5b71;
    font-style: normal;
}
.contacts-form__field input,
.contacts-form__field textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    box-sizing: border-box;
    background: #fafafa;
    transition: all .2s ease;
    color: #222;
}
.contacts-form__field input:focus,
.contacts-form__field textarea:focus {
    outline: none;
    border-color: #ea5b71;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234, 91, 113, .12);
}
.contacts-form__field textarea {
    resize: vertical;
    min-height: 90px;
}

.contacts-form__footer {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.contacts-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ea5b71;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    font-family: inherit;
}
.contacts-form__submit:hover {
    background: #d94862;
    box-shadow: 0 6px 16px rgba(234, 91, 113, .3);
    transform: translateY(-1px);
}
.contacts-form__submit:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}
/* Чекбокс согласия на обработку ПДн (152-ФЗ ст.9) — пришёл на смену подписи
   .contacts-form__privacy: та не была однозначным действием субъекта и вдобавок
   вела на несуществующую /shop/privacy. */
.contacts-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
    cursor: pointer;
}
.contacts-form__consent input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #ea5b71;
    cursor: pointer;
}
.contacts-form__consent a {
    color: #888;
    text-decoration: underline;
}
.contacts-form__consent a:hover { color: #ea5b71; }
/* Подсветка непроставленного согласия — класс вешает submitContactsForm */
.contacts-form__consent.is-error { color: #ea5b71; }
.contacts-form__consent.is-error input {
    outline: 2px solid #ea5b71;
    outline-offset: 1px;
}

.contacts-form__status {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}
.contacts-form__status--ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.contacts-form__status--err {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
}

/* ===== КАК НАС НАЙТИ — ГАЛЕРЕЯ ===== */
.contacts-route {
    margin-bottom: 48px;
}
.contacts-route__head {
    margin-bottom: 28px;
    max-width: 820px;
}
.contacts-route__title {
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin: 0 0 12px;
    line-height: 1.2;
}
.contacts-route__lead {
    font-size: 16px;
    color: #555;
    line-height: 1.55;
    margin: 0;
}
.contacts-route__lead strong { color: #222; }

.contacts-route__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.contacts-route__step {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    overflow: hidden;
    transition: all .25s ease;
}
.contacts-route__step:hover {
    border-color: #ea5b71;
    box-shadow: 0 10px 28px rgba(234, 91, 113, .15);
    transform: translateY(-3px);
}
.contacts-route__step-img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f4f4;
}
.contacts-route__step-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.contacts-route__step:hover .contacts-route__step-img img {
    transform: scale(1.05);
}
.contacts-route__step-num {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ea5b71;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(234, 91, 113, .35);
}
.contacts-route__step-caption {
    padding: 16px 18px 18px;
    font-size: 14px;
    color: #444;
    line-height: 1.45;
}

.contacts-route__notes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.contacts-route__note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 12px;
    background: #f0f7ff;
    border: 1px solid #d8e8f8;
    font-size: 14px;
    color: #1f4c7a;
    line-height: 1.5;
}
.contacts-route__note i {
    font-size: 18px;
    color: #2980b9;
    flex-shrink: 0;
    margin-top: 1px;
}
.contacts-route__note strong { color: #1a3a5c; }
.contacts-route__note--warn {
    background: #fff8e6;
    border-color: #f5e2a3;
    color: #856404;
}
.contacts-route__note--warn i { color: #d39e00; }

/* Адаптив для галереи */
@media (max-width: 1100px) {
    .contacts-route__grid { grid-template-columns: repeat(2, 1fr); }
    .contacts-route__notes { grid-template-columns: 1fr; }
}
/* FIX: было "px) {" без префикса @media — на мобиле route-grid в 1 col,
   меньше шрифты. Восстановлен 600px. */
@media (max-width: 600px) {
    .contacts-route { margin-bottom: 32px; }
    .contacts-route__title { font-size: 22px; }
    .contacts-route__grid { grid-template-columns: 1fr; gap: 14px; }
    .contacts-route__step-num { width: 30px; height: 30px; font-size: 14px; top: 10px; left: 10px; }
    .contacts-route__step-caption { padding: 14px 16px 16px; font-size: 13px; }
}

/* ===== Доп. контент из БД ===== */
.contacts-extra {
    margin-top: 8px;
    /* Скрыт по умолчанию — старый контент из БД дублирует наши блоки.
       Чтобы показать — убрать display:none */
    display: none;
}
.contacts-extra h2 {
    font-size: 22px;
    color: #222;
    margin-top: 30px;
}
.contacts-extra p { color: #555; line-height: 1.6; }

/* ===== АДАПТИВ ===== */
@media (max-width: 1100px) {
    .contacts-cards { grid-template-columns: repeat(2, 1fr); }
    .contacts-main { grid-template-columns: 1fr; }
    .contacts-main__map { min-height: 360px; }
    .contacts-form-section { grid-template-columns: 1fr; padding: 28px; }
    .contacts-form-section__lead { padding-right: 0; }
}

/* FIX: было "px) {" без префикса @media — мобильный адаптив всей страницы
   контактов не применялся (контакт-карточки, hero, форма). Восстановлен 600px. */
@media (max-width: 600px) {
    .content--full { padding: 0 16px 40px; }
    .contacts-hero { padding: 24px 0 20px; margin-bottom: 24px; }
    .contacts-hero__title { font-size: 28px; }
    .contacts-hero__subtitle { font-size: 15px; }
    .contacts-cards { grid-template-columns: 1fr; gap: 12px; }
    .contacts-card { padding: 20px 18px; }
    .contacts-main__info { padding: 22px; }
    .contacts-form-section { padding: 22px; }
    .contacts-form-section__title { font-size: 22px; }
    .contacts-form__row { grid-template-columns: 1fr; }
    .contacts-form__submit { width: 100%; justify-content: center; }
    .contacts-info-item__icon { flex-basis: 36px; width: 36px; height: 36px; font-size: 16px; }
}

@media (max-width: 480px) {
    .contacts-hero__title { font-size: 24px; }
    .contacts-card__value { font-size: 17px; }
}
