/* =========================================================
   Анкета (profile.php) — мобильная версия как в макете
   Десктоп НЕ меняется: всё ниже работает только до 768px,
   а мобильные элементы на десктопе скрыты.
   Подключать ПОСЛЕ css/style.css
   ========================================================= */

/* ===== Мобильные элементы скрыты на десктопе ===== */
.pm-gallery-ui,
.pm-quick,
.pm-bar,
.pm-check {
    display: none;
}

@media (max-width: 768px) {

    body {
        padding-bottom: 78px;
    }

    /* Без шапки сайта — как мобильное приложение (только на анкете) */
    .header {
        background: transparent;
        min-height: 0;
        height: 0;
        margin: 0;
        padding: 0;
    }

    .header__container,
    .header__search,
    .header__menu {
        display: none !important;
    }

    .page-wrap {
        padding-top: 0;
        overflow-x: clip;
    }

    .page-content {
        padding-top: 0;
    }

    /* Лишнее на мобиле */
    .breadcrumbs,
    .prod-card__thumb,
    .prod-card__slider .slider-arrow,
    .prod-card__work-info .prod-card__location,
    .prod-card__show-phone,
    .prod-card__services {
        display: none !important;
    }

    /* Порядок: галерея → имя → инфо */
    .prod-card__gallery { order: -2; }
    .prod-card__head    { order: -1; }

    /* ===== Галерея: на всю ширину экрана, без отступов и скруглений ===== */
    .prod-card__gallery {
        width: auto;
        max-width: none;
        margin: 0 calc(50% - 50vw);
    }

    .prod-card__slider {
        position: relative;
        width: 100%;
        height: min(125vw, 600px);
        min-height: 0;
        max-height: none;
        border-radius: 0;
        overflow: hidden;
    }

    .prod-card__slider .swiper-wrapper,
    .prod-card__slider .swiper-slide {
        height: 100%;
        max-height: none;
    }

    .prod-card__slider .swiper-slide picture {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .prod-card__slider .swiper-slide img,
    .prod-card__slider .swiper-slide video {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    /* ===== Белая панель снизу, наезжает на фото со скруглением ===== */
    .prod-card__head {
        position: relative;
        z-index: 30;
        margin: -26px calc(50% - 50vw) 0;
        padding: 18px calc(50vw - 50%) 0;
        background: #fff;
        border-radius: 24px 24px 0 0;
    }

    /* Бейдж «Фото проверено» — слева снизу, над панелью */
    .prod-card__slider .prod-card__photo-verified {
        position: absolute;
        top: auto;
        right: auto;
        left: 12px;
        bottom: 40px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 5px 10px;
        border-radius: 20px;
        background: #1aa37a;
        color: #fff;
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
        z-index: 5;
    }

    .prod-card__slider .prod-card__photo-verified svg {
        width: 13px;
        height: 13px;
        fill: #fff;
    }

    /* VIP/TOP/Diamond — под кнопкой «назад» */
    .prod-card__slider .item-card__badges {
        top: 60px !important;
        left: 12px !important;
    }

    /* Кнопки поверх фото */
    .pm-gallery-ui {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 25;
        pointer-events: none;
    }

    .pm-gbtn {
        pointer-events: auto;
        width: 40px;
        height: 40px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.92);
        color: #2a2a2a;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        text-decoration: none;
    }

    .pm-gbtn--back {
        position: absolute;
        top: 12px;
        left: 12px;
    }

    .pm-gbtn-group {
        position: absolute;
        top: 12px;
        right: 12px;
        display: flex;
        gap: 8px;
    }

    .pm-fav-on {
        display: none;
        color: #ff3d8b;
    }

    .pm-fav.active .pm-fav-off {
        display: none;
    }

    .pm-fav.active .pm-fav-on {
        display: block;
    }

    .pm-counter {
        position: absolute;
        right: 12px;
        bottom: 40px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 10px;
        border-radius: 20px;
        background: rgba(20, 20, 20, 0.55);
        color: #fff;
        font-size: 12px;
        line-height: 1;
    }

    /* ===== Имя + возраст ===== */
    .prod-card__name {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 6px;
        margin: 0;
        font-size: 22px;
        line-height: 1.2;
        color: #2a1020;
    }

    .pm-name {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 700;
    }

    .pm-check {
        display: block;
        flex-shrink: 0;
        color: #e0408a;
    }

    .pm-sep,
    .pm-city {
        display: none;
    }

    .pm-age {
        margin-left: auto;
        font-size: 17px;
        font-weight: 600;
        color: #444;
    }

    .prod-card__name .online-light {
        order: 2;
    }

    .prod-card__name .profile-rating {
        order: 10;
        width: 100%;
        margin-left: 0;
        font-size: 13px;
    }

    .prod-card__profile-number {
        margin-top: 2px;
        font-size: 12px;
        color: #9a9a9a;
    }

    /* ===== Быстрый блок: район, параметры, цены, теги ===== */
    .pm-quick {
        display: block;
        margin-bottom: 14px;
    }

    .pm-quick__location {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 14px;
        color: #8a8a8a;
    }

    .pm-quick__location svg {
        flex-shrink: 0;
        color: #e0408a;
    }

    .pm-quick__params {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 16px;
        margin-top: 8px;
        font-size: 14px;
        color: #555;
    }

    .pm-quick__prices {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 14px;
    }

    .pm-quick__price {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 9px 6px;
        border-radius: 12px;
        background: #fdeef5;
    }

    .pm-quick__price-type {
        font-size: 12px;
        color: #c23f7c;
    }

    .pm-quick__price-value {
        margin-top: 2px;
        font-size: 19px;
        font-weight: 700;
        color: #d6336c;
        white-space: nowrap;
    }

    .pm-quick__tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 14px 0 0;
        padding: 0;
        list-style: none;
    }

    .pm-quick__tag {
        padding: 5px 12px;
        border-radius: 20px;
        background: #f2f0f1;
        color: #5a5a5a;
        font-size: 12px;
        line-height: 1.2;
    }

    .pm-quick__tag--accent {
        background: #f37bb0;
        color: #fff;
    }

    /* ===== Нижняя закреплённая панель ===== */
    .pm-bar {
        display: flex;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
    }

    .pm-bar__btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 48px;
        border-radius: 14px;
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
    }

    .pm-bar__btn--write {
        border: 1.5px solid #e0408a;
        background: #fff;
        color: #c2185b;
    }

    .pm-bar__btn--call {
        border: 1.5px solid #e0408a;
        background: #e0408a;
        color: #fff;
    }

    .pm-bar__btn:hover,
    .pm-bar__btn:active {
        text-decoration: none;
    }

    .pm-bar__btn--write:hover {
        color: #c2185b;
    }

    .pm-bar__btn--call:hover {
        color: #fff;
    }
}