@media (max-width: 768px) {

    #contentsite {
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }

    #news {
        padding: 10px;
    }

    .news-card {
        padding: 12px;
    }

    .news-title {
        font-size: 18px;
    }

    .news-container h1 {
        font-size: 22px;
    }

    #papers {
        padding: 10px;
    }

    .papers-card {
        padding: 12px;
    }

    .papers-title {
        font-size: 18px;
    }

    .papers-container h1 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {

    #footer .content {
        width: 100%;
        max-width: 100%;
        padding: 10px;
    }

    #footer p {
        width: 100%;
        padding: 10px;
    }

    #footer .content .p1,
    #footer .content .p2,
    #footer .content .p3,
    #footer .content .p4,
    #footer .content .p5 {
        float: none;
        width: 100%;
        margin-bottom: 15px;
    }

    #footer .content h2 {
        font-size: 16px;
    }

    #footer .content ul li {
        padding-left: 0;
    }
}

@media (max-width: 768px) {

    /* ?? Жёстко фиксируем контейнер */
    .l-toolbar {
        position: fixed;
        bottom: -5px;
        left: 0;
        right: 0;

        width: 100vw;      /* ?? фикс ширины от viewport */
        max-width: 100vw;
        min-width: 0;

        z-index: 950;
        /* overflow-x: hidden; */
    }

    .l-toolbar-h {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .b-toolbar-head {
        height: auto !important;   /* ?? убираем фиксированную высоту */
        min-height: 36px;
        display: block;
    }

    /* ?? Убираем раздвигающие отступы */
    .b-toolbar-center {
        margin: 0 !important;
        width: 100% !important;
    }

    /* ?? Делаем вертикальную раскладку */
    .b-toolbar-center-text {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    /* ?? Каждый пункт на всю ширину */
    .b-toolbar-item {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin: 0 !important;
        padding: 12px !important;
    }

    /* убираем разделители */
    .b-toolbar-item:before {
        display: none !important;
    }

    /* текст не ломает ширину */
    .a-item {
        display: block;
        white-space: normal;
    }

}

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

}

@media (max-width: 768px) {

    #top .mainmenu {
        display: flex;
        flex-direction: column;
    }

    #top .mainmenu span {
        padding: 12px;
        border-top: 1px solid rgba(255,255,255,0.2);
        text-align: center;
        position: relative;
        cursor: pointer;
    }

    #top .mainmenu a {
        display: block;
        font-size: 16px;
    }

    .dropmenu {
        position: static; /* ?? убираем absolute */
        width: 100%;
        border: none;
        box-shadow: none;
        display: none;
        padding: 0;
    }

    .dropmenu .dayproduct {
        display: none; /* ? убираем товар */
    }

    .dropmenu .desc {
        display: block;
    }

    .submenu {
        display: none !important; /* ? убираем вложенные */
    }

}

@media (max-width: 768px) {

    /* общий контейнер */
    #top .topin {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    /* убираем float/фикс ширины */
    #top .logo,
    #top .search,
    #top .callbackmain,
    #top .mainbasket {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px 0;
        box-sizing: border-box;
    }

    /* LOGO */
    #top .logo {
        text-align: center;
    }

    #top .logo img {
        max-width: 180px;
        height: auto;
    }

    /* SEARCH */
    #top .search div {
        display: flex;
        align-items: center;
        padding: 6px;
        margin-top: 10px;
    }

    #top .search form {
        display: flex;
        width: 100%;
    }

    #top .search div input {
        width: 100%;
        font-size: 14px;
        height: 36px;
        padding: 0 10px;
        position: static;
    }

    #top .search div .btnsearch {
        position: static;
        margin-left: -30px;
        margin-top: 6px;
        width: 24px;
        height: 24px;
    }

    /* SELECT MENU */
    #top .selectmenu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding-left: 0;
    }

    #top .selectmenu span {
        padding: 0;
    }

    #top .selectmenu a {
        font-size: 11px;
        white-space: nowrap;
    }

    /* CALLBACK */
    #top .callbackmain {
        text-align: center;
    }

    #top .callbackmain .t2 {
        font-size: 16px;
    }

    /* BASKET */
    #top .mainbasket {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #top .basket img {
        width: 90px;
    }

    #top .basket p {
        margin-top: 5px;
    }

    #top .basket #ngood {
        top: -55px;
        left: 11px;
    }

}

@media (max-width: 768px) {
    /* заголовок */
    #recomend {
        background-color: white;
        text-align: center; /* ?? центрируем */
    }
    #recomendnew {
        background-color: white;
        text-align: center; /* ?? центрируем */
    }

    /* контейнер */
    .jcarousel {
        width: 100% !important;
        height: auto !important;
        overflow-x: auto;              /* ?? включаем горизонтальный скролл */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch; /* плавный свайп */
    }

    /* убираем огромную ширину */
    .jcarousel1 {
        width: auto !important;
        display: flex;                 /* ?? в линию */
    }

    /* карточки */
    .jcarousel2 {
        float: none;
        flex: 0 0 70%;                 /* ?? ширина карточки */
        max-width: 70%;
        box-sizing: border-box;
        padding: 10px;
    }

    /* сам товар */
    .recomndlist .catitem {
        width: 100%;
        height: auto;
    }

    /* картинка */
    .recomndlist .catitem img {
        width: 100px;
        height: 100px;
    }

    /* убираем стрелки */
    .jcarousel-control-prev,
    .jcarousel-control-next {
        display: none;
    }

    .jcarousel {
        scroll-snap-type: x mandatory;
    }

    .jcarousel2 {
        scroll-snap-align: start;
    }

}

@media (max-width: 768px) {

    .recomndlist .catitem {
        background: #fff;
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* мягкая тень */
        border: 1px solid #eee; /* лёгкая граница */
    }

}

@media (max-width: 768px) {

    #block2 {
        padding-top: 10px;
        overflow: visible;
    }

    /* убираем float и делаем колонку */
    #block2 .blockin {
        float: none;
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        margin: 10px 0;
        box-sizing: border-box;
    }

    /* большой баннер */
    #block2 .jcarousel {
        width: 100% !important;
        height: 180px; /* ?? уменьшаем */
    }

    #block2 .jcarousel2 {
        width: 100% !important;
    }

    #block2 .bigitem {
        width: 100%;
        height: 180px;
        background-size: cover;
    }

    /* заголовок на баннере */
    #block2 .bigitem .title {
        width: 90%;
        left: 5%;
        bottom: 5px;
        font-size: 12px;
        line-height: 18px;
        padding: 4px;
    }

    /* правый блок (товар) */
    #block2 .blockin.in2 {
        display: flex;
        justify-content: center; /* ?? центрируем */
        align-items: center;
    }

    #block2 .blockin.in2 .catitem {
        width: 100%;
        margin: 0 auto;
    }

    /* карусель — свайп */
    #block2 .jcarousel-wrapper {
        overflow: hidden;
    }

    #block2 .jcarousel1 {
        display: flex;
        width: auto !important;
    }

    #block2 .jcarousel2 {
        flex: 0 0 100%;
    }

    /* стрелки убираем */
    #block2 .jcarousel-control-prev,
    #block2 .jcarousel-control-next {
        display: none;
    }

}

@media (max-width: 768px) {

    #npcblock {
        flex-direction: column; /* ?? в столбик */
        gap: 15px;
    }

    .npc-section {
        width: 100%;
        padding: 12px;
    }

    .npc-section h2 {
        font-size: 16px;
    }

    .npc-item {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .npc-text {
        font-size: 14px;
    }

}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
@media (max-width: 768px) {

    .mobile-header {
        display: block !important; /* показываем только тут */
    }

    /* бургер */
    .burger-btn {
        display: block;
        font-size: 28px;
        padding: 10px;
        cursor: pointer;
        color: #fff;
        background: #3D84BA;
    }

    /* меню скрыто */
    #top .mainmenu {
        display: none;
        flex-direction: column;
        background: #3D84BA;
    }

    /* открыто */
    #top .mainmenu.open {
        display: flex;
    }

    /* пункты */
    #top .mainmenu span {
        display: block;
        padding: 12px;
        border-top: 1px solid rgba(255,255,255,0.2);
        text-align: left;
    }

    #top .mainmenu a {
        display: block;
        font-size: 16px;
    }

    /* ? ВОТ ГЛАВНОЕ ИСПРАВЛЕНИЕ */
    .dropmenu {
        position: static !important;   /* убираем absolute */
        width: 100%;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .dropmenu .list {
        float: none;
    }

    /* элементы списка */
    .dropmenu ul li {
        max-width: 100%;
        padding: 10px;
    }

    /* убираем "коридор" hover */
    .dropmenu ul li::after {
        display: none;
    }

    /* скрываем тяжёлый контент */
    .dropmenu .dayproduct {
        display: none;
    }

    .dropmenu .desc {
        display: block !important;
    }

    .submenu {
        display: none !important;
    }

    .dropmenu {
        display: none !important;
    }
}

/* Каталог с категориями */
@media (max-width: 768px) {
    
    #catalog:not(.withfilter) {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 10px;
    }

    #catalog:not(.withfilter) .catitem {
        display: block;
        text-align: center;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 10px;
        text-decoration: none;
        color: #333;
        transition: 0.2s;
    }

    #catalog:not(.withfilter) .catitem:hover {
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }

    #catalog:not(.withfilter) .catitem img {
        max-width: 100%;
        height: 120px;
        object-fit: contain;
        margin-bottom: 10px;
    }

    #catalog:not(.withfilter) .catitem h2 {
        font-size: 14px;
        margin: 0;
    }
}

@media (max-width: 768px) {
    
    .forpaper {
        display: none !important;
    }
}

@media (max-width: 768px) {

    .filters {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .filters-mobile-toggle {
        display: block;
        background: #3D84BA;
        color: #fff;
        padding: 10px;
        text-align: center;
        border-radius: 6px;
        cursor: pointer;
        margin: 10px;
    }

    .filters-collapsed {
        display: none;
        padding: 10px;
        background: #f5f5f5;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    .filters-collapsed.open {
        display: block;
    }
}

@media (max-width: 768px) {

    .sort {
        width: 100% !important;
    }

    .sort .pdn {
        width: 100%;
        display: flex;
        overflow-x: auto;
        gap: 10px;
        white-space: nowrap;
        padding: 5px 0;
    }

    .sort a.ff {
        flex: 0 0 auto;
        padding: 6px 10px;
        background: #eee;
        border-radius: 6px;
        font-size: 13px;
        text-decoration: none;
    }

}

/* Каталог с товарами */
@media (max-width: 768px) {

    /* скрываем табличный список */
    .catitemlist {
        display: none !important;
    }

}

@media (max-width: 768px) {

    #catalog.withfilter { 
        margin-left: 0px; 
    }

    #catalog.withfilter {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    #catalog .catitem {
        background: #fff;
        border-radius: 10px;
        padding: 10px;
        border: 1px solid #eee;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        height: 295px;
    }

    #catalog .catitem h2 {
        font-size: 14px;
        text-align: center;
        margin: 0;
        height: 75px;
    }

    /* ?? ВАЖНО — clamp на ссылку */
    #catalog .catitem h2 a {
        line-clamp: 4;
        display: -webkit-box;           /* вместо inline */
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;

        line-height: 1.2;
        max-height: 4.8em;              /* 2 строки */
        
        color: black;
        text-decoration: none;
    }

    #catalog .catitem img {
        width: 100%;
        height: 100px;
        object-fit: contain;
    }

    #catalog .catitem .icons {
        text-align: right;
        margin-top: 5px;
    }

    #catalog .catitem .goodrate {
        text-align: center;
        margin-top: 5px;
    }

}

@media (max-width: 768px) {
    .page {
        display: none !important;
    }
}

@media (max-width: 768px) {

    #mainpart {
        display: flex;
        flex-direction: column;
    }

    .filters {
        order: 1;
    }

    .filters-mobile-toggle {
        order: 2;
    }

    #mainfilter {
        order: 3;
        width: 100%;
    }

    #catalog {
        order: 4;
        width: 100%;
    }

    #catdesc {
        order: 999;
        width: 100%;
        margin-top: 20px;
        margin-left: 0px;
    }

}

@media (max-width: 768px) {
    #cart input, #cart label, #cart textarea {
        width: 100%;
    }
}

@media (max-width: 768px) {

    /* ?? Убираем заголовки таблицы */
    .cart th {
        display: none;
    }

    /* Таблица ? блоки */
    .cart,
    .cart tbody,
    .cart tr,
    .cart td {
        display: block;
        width: 100%;
    }

    /* Каждый товар = карточка */
    .cart tr.goods {
        background: #fff;
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 10px;
        border: 1px solid #eee;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    /* Убираем вложенную таблицу */
    .cart .good {
        display: block;
    }

    .cart .good tr {
        display: flex;
        gap: 10px;
    }

    /* Картинка */
    .cart .img {
        width: 80px;
        flex-shrink: 0;
    }

    .cart .img img {
        width: 100%;
        height: 80px;
        object-fit: contain;
    }

    /* Заголовок */
    .cart .header {
        flex: 1;
    }

    .cart .header h2 {
        font-size: 14px;
        margin: 0 0 5px 0;

        line-clamp: 2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ?? Остальные поля (количество, цена и т.д.) */
    .cart td.amount,
    .cart td.price,
    .cart td.weight,
    .cart td.itogweight {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border: none;
        font-size: 16px;
    }

    .cart td.sum {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 5px 0;
        border: none;
        gap: 6px;
    }

    /* Подписи */
    .cart td.amount::before { content: "Количество"; }
    .cart td.price::before { content: "Цена"; }
    .cart td.weight::before { content: "Вес"; }
    .cart td.itogweight::before { content: "Вес"; }
    .cart td.sum::before { content: "Сумма"; }

    .cart td::before {
        font-weight: bold;
        font-size: 16px;
        color: #555;
    }

    /* Поле количества */
    .cart .amount input {
        width: 40px;
        font-size: 16px;
    }

    /* Итог */
    .cart tr.result {
        display: block;
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        margin-top: 10px;
    }

    .cart tr.result td {
        display: flex;
        justify-content: space-between;
    }

    .cart tr.result td.price::before {
        content: none; /* убираем только "Цена" у Итого */
    }

}

@media (max-width: 768px) {
    /* =========================
    ?? ДОСТАВКА + ОПЛАТА
    ========================= */

    .cart tr.deliverytype,
    .cart tr.paymenttype {
        display: block;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 10px;
        margin-bottom: 10px;
    }

    /* убираем "пустые" td */
    .cart tr.deliverytype td,
    .cart tr.paymenttype td {
        display: none;
    }

    /* делаем нормальную обёртку внутри td */
    .cart tr.deliverytype td:first-child,
    .cart tr.paymenttype td:first-child {
        display: block;
    }

    /* label + radio */
    .cart .delivradio,
    .cart .payradio {
        margin-right: 8px;
    }

    /* текст внутри */
    .cart tr.deliverytype td:first-child,
    .cart tr.paymenttype td:first-child {
        display: flex;
        flex-direction: column;
        font-size: 16px;
        gap: 6px;
    }

    /* верхняя строка (radio + название) */
    .cart tr.deliverytype td:first-child input,
    .cart tr.paymenttype td:first-child input {
        margin-right: 8px;
    }

    /* описание */
    .cart tr.deliverytype td div {
        margin-left: 0 !important;
        font-size: 13px;
        color: #666;
        margin-left: 24px;
    }

    /* правая часть (сумма) */
    .cart tr.deliverytype td.sum,
    .cart tr.paymenttype td.sum {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        font-weight: bold;
        margin-top: 6px;
    }

    /* СДЭК блок отдельно */
    #sdekRow td {
        display: block !important;
    }

    .cart tr.deliverytype td:first-child,
    .cart tr.paymenttype td:first-child {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {

    #cdekContainer {
        height: 450px !important;
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 10px;
    }

    #deliveryTable {
        background: #fff;
        border-radius: 10px;
        padding: 10px;
        border: 1px solid #eee;
    }

    #deliveryInfoTable,
    #deliveryInfoTable tbody,
    #deliveryInfoTable tr,
    #deliveryInfoTable td {
        display: block;
        width: 100%;
    }

    /* каждая строка = flex */
    #deliveryInfoTable tr {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #eee;
    }

    /* обычные ячейки */
    #deliveryInfoTable td {
        flex: 1;
    }

    /* первая колонка (название) */
    #deliveryInfoTable td:first-child {
        color: #666;
        font-size: 14px;
    }

    /* вторая колонка (значение) */
    #deliveryInfoTable td:last-child {
        text-align: left;
        font-weight: 500;
        max-width: 55%;
    }

    #deliveryInfoTable tr {
        gap: 10px;
    }

    /* строка-заголовок */
    #deliveryInfoTable td.header {
        display: block;
        width: 100% !important;
        text-align: center;
        font-weight: bold;
        font-size: 16px;
        padding: 10px 0;
        flex: 0 0 100%;
        max-width: 100%;
    }

}

@media (max-width: 768px) {

    /* общий контейнер */
    #searchresult {
        padding: 0 12px;
    }

    /* заголовки */
    #searchresult h1,
    #searchresult h2,
    #searchresult h3 {
        margin: 10px 0;
        padding: 0 4px;
    }

    /* список товаров */
    .goods-list {
        padding: 0;
        margin: 0;
    }

    /* карточка товара */
    .goods-list .good-item {
        display: flex;              /* вместо grid */
        flex-direction: column;     /* вертикально */
        align-items: stretch;
    }

    .good-img-block {
        align-self: flex-start;
    }

    .good-price-block {
        width: 100%;
        text-align: left;           /* логичнее для мобилки */
        margin-top: 8px;
    }

}

@media (max-width: 768px) {

    #mainpart h1 {
        margin-left: 10px;
    }

    /* общий контейнер */
    #maingood {
        width: 100%;
        margin: 10px 0;
        padding: 0 12px;
        box-sizing: border-box;
    }

    /* убираем float и делаем колонку */
    #maingood #goodphoto,
    #maingood #goodbay {
        float: none;
        width: 100%;
    }

    /* ===== ФОТО ===== */
    #maingood #goodphoto {
        margin-bottom: 15px;
    }

    #maingood #goodphoto img {
        max-width: 100%;
        margin: 0;
    }

    /* слайдер */
    .slider {
        gap: 6px;
    }

    .slider button {
        font-size: 20px;
        padding: 2px 8px;
    }

    /* превью */
    .goodimgprv img {
        width: 50px;
    }

    /* ===== БЛОК ПОКУПКИ ===== */
    #maingood #goodbay {
        padding: 12px;
        border-radius: 10px;
        background: #fff;
        border: 1px solid #eee;
    }

    /* цена + кнопки — в колонку */
    #maingood #goodbay .pricegood.main {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #maingood #goodbay .pricegood.left,
    #maingood #goodbay .pricegood.right {
        float: none;
        width: 100%;
        text-align: left;
    }

    /* цена */
    #maingood #goodbay .pricegood {
        font-size: 24px;
        margin: 0;
    }

    /* кнопки */
    #maingood #goodbay .pricegood .add2cart,
    #maingood #goodbay .pricegood .oneclick {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 16px;
        padding: 10px;
        border-radius: 6px;
        margin: 0;
    }

    #maingood #goodbay .pricegood .oneclick {
        margin-top: 6px;
    }

    /* статус */
    #maingood #goodbay .status,
    #maingood #goodbay .actstatus,
    #maingood #goodbay .actstatustext,
    #maingood #goodbay .predopl {
        padding-left: 0;
        margin-top: 6px;
        font-size: 14px;
    }

    /* отложить / сравнить */
    #maingood #goodbay .posted,
    #maingood #goodbay .compare {
        float: none;
        margin-top: 8px;
        display: block;
    }

    /* ===== ТАБЛИЦА ХАРАКТЕРИСТИК ===== */
    #goodparam {
        padding: 0 12px;
        box-sizing: border-box;
    }

    #goodparam table {
        width: 100%;
        margin: 10px 0;
    }

    #goodparam table tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #eee;
        padding: 6px 0;
    }

    #goodparam table td {
        width: 100%;
        padding: 2px 0;
    }

    #goodparam table td:first-child {
        font-size: 13px;
        color: #777;
    }

    #goodparam table td:last-child {
        font-weight: 500;
    }

    /* ===== ДОП БЛОКИ ===== */
    #dop,
    #coment {
        padding: 0 12px;
    }

    #dop .header,
    #coment .header,
    #goodparam .header {
        width: 100%;
        box-sizing: border-box;
        border-radius: 6px;
    }

    /* ===== КОММЕНТЫ ===== */
    #coment input.textfield,
    #coment textarea {
        width: 100%;
        box-sizing: border-box;
    }

    #coment .comentitem {
        margin: 15px 0;
    }

    #coment .comentitem .leftc,
    #coment .comentitem .rightc {
        float: none;
        width: 100%;
    }

    #coment .comentitem .rightc {
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
    }

    #similarcatalog h2 {
        margin-left: 10px;
    }

    /* ===== СЛАЙДЕР ОВЕРЛЕЙ ===== */
    #maingood #imgOverlay img {
        max-width: 95vw;
        max-height: 80vh;
    }

    /* скрываем стрелки в обычном слайдере */
    #prevBtn,
    #nextBtn {
        display: none;
    }

    /* скрываем стрелки в fullscreen */
    .overlayPrev,
    .overlayNext {
        display: none;
    }

    #mainImage {
        touch-action: pan-y;
    }

}

@media (max-width: 768px) {

    /* ===== ОБЩИЕ СТИЛИ ДЛЯ МОДАЛОК ===== */
    #callback,
    #callinfo,
    #oneclick {
        width: calc(100% - 24px);
        max-width: 500px;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        padding: 16px;
        border-radius: 10px;
        box-sizing: border-box;

        /* чтобы не вылазило вниз */
        max-height: 90vh;
        overflow-y: auto;
    }

    /* ===== ПОЛЯ ===== */
    #callback input,
    #callback textarea,
    #oneclick input,
    #oneclick textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* важно: убирает zoom на iOS */
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 6px;
        border: 1px solid #ccc;
    }

    /* textarea отдельно */
    #callback textarea,
    #oneclick textarea {
        min-height: 80px;
        resize: vertical;
    }

    /* кнопки */
    #callback input.submit,
    #oneclick input.submit {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        border-radius: 6px;
    }

    /* inline элементы (если есть чекбоксы и т.п.) */
    #callback input.inline {
        width: auto;
    }

    /* заголовки */
    #callback p strong,
    #oneclick p strong {
        font-size: 18px;
        display: block;
        margin-bottom: 10px;
    }

}

@media (max-width: 768px) {

    #profile {
        padding: 10px;
        margin-top: 10px;
    }

    #profile .bootstrap {
        padding: 0;
    }

    /* ===== ТАБЫ ===== */
    #profile .nav-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        border-bottom: 1px solid #ddd;
    }

    #profile .nav-tabs li {
        float: none;
        display: inline-block;
    }

    #profile .nav-tabs li a {
        padding: 10px 12px;
        font-size: 14px;
    }

    .profiletabs #catalog * {
        box-sizing: border-box !important;
    }

    /* ===== ФОРМЫ ===== */
    #profile .form-inline {
        display: block;
    }

    #profile .form-inline .form-group {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    #profile input,
    #profile select,
    #profile textarea {
        width: 100% !important;
        font-size: 16px;
    }

    #profile button.btn {
        width: 100%;
        font-size: 16px;
    }

    /* ===== ДАТА РОЖДЕНИЯ ===== */
    #profile .row {
        margin: 0;
    }

    #profile .row .col-xs-2,
    #profile .row .col-xs-4 {
        width: 33.33%;
        padding: 2px;
    }

    /* ===== АДРЕСА ===== */
    #profile ul.addr li {
        font-size: 14px;
        padding: 10px;
    }

    /* ===== ТОВАРЫ ===== */
    #profile #catalog {
        padding: 0px;
    }

    /* ===== КНОПКИ ===== */
    #profile .btn {
        width: 100%;
        margin-bottom: 10px;
    }

}

/* Переносы слов */
@media (max-width: 768px) {
    #catalog .catitem h2 {
        overflow-wrap: anywhere;
        word-break: break-word;

        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
}

@media (max-width: 768px) {

    .profservice {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .profservice tbody,
    .profservice tr {
        width: 100%;
    }

}

@media (max-width: 768px) {

    #ui-timepicker-div {
        width: 100% !important;
        left: 0 !important;
        right: 0;
        margin: 0 auto;
        padding: 10px;
        box-sizing: border-box;
    }

    #ui-timepicker-div table {
        width: 100%;
        table-layout: fixed;
    }

    #ui-timepicker-div td,
    #ui-timepicker-div th {
        padding: 2px;
    }

    /* ЧИСЛА (главное) */
    #ui-timepicker-div a {
        display: block;
        font-size: 12px;
        padding: 6px 0;
        text-align: center;
    }

    /* Уменьшаем заголовки */
    #ui-timepicker-div .ui-timepicker-title {
        font-size: 13px;
        padding: 4px;
    }

    /* Колонки часы/минуты в столбик */
    #ui-timepicker-div > table > tbody > tr {
        display: flex;
        flex-direction: column;
    }

    #ui-timepicker-div .ui-timepicker-hours,
    #ui-timepicker-div .ui-timepicker-minutes {
        width: 100%;
    }

    /* Немного отступа между блоками */
    #ui-timepicker-div .ui-timepicker-minutes {
        margin-top: 10px;
    }

    a.ui-state-default {
        min-width: stretch;
    }
}

@media (max-width: 768px) {

    /* Контейнер текста */
    #text {
        padding: 0 10px;
    }

    /* Таблица */
    #text .tableborder {
        width: 100% !important;
        margin: 10px 0 !important;
        height: auto !important;
    }

    /* Делаем карточки */
    #text .tableborder,
    #text .tableborder tbody,
    #text .tableborder tr,
    #text .tableborder td {
        display: block;
        width: 100%;
    }

    /* САМА КАРТОЧКА */
    #text .tableborder tr {
        background: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
        margin: 0 0 12px 0; /* важно: убираем авто-центрирование */
        padding: 12px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }

    /* ЯЧЕЙКИ */
    #text .tableborder td {
        border: none;
        padding: 6px 0;
        margin: 0;
    }

    /* Заголовок (город) */
    #text .tableborder td:nth-child(1) {
        font-weight: bold;
        font-size: 15px;
        margin-bottom: 6px;
    }

    /* Стоимость */
    #text .tableborder td:nth-child(2)::before {
        content: "Стоимость:";
        display: block;
        font-weight: bold;
        margin-bottom: 2px;
    }

    /* Срок */
    #text .tableborder td:nth-child(3)::before {
        content: "Срок:";
        display: block;
        font-weight: bold;
        margin-bottom: 2px;
    }

    /* Фикс для вложенных p и ul внутри td */
    #text .tableborder td p,
    #text .tableborder td ul {
        margin: 5px 0;
    }

    /* Убираем странные огромные отступы */
    #text .tableborder td ul li {
        margin: 3px 0;
    }
}

@media (max-width: 768px) {
    
    .map-wrapper {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    
    .auth-container {
        margin: 15px;
        padding: 15px;
    }

    .auth-container h1 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    
    #text {
        padding: 10px;
    }

    #text h1 {
        font-size: 20px;
    }

    #text ul {
        margin-left: 15px !important;
    }
}

@media (max-width: 768px) {
    
    .calc .first-table{
        max-height: max-content !important;
    }

    .service .calc {
        float: none !important;
        position: relative !important;
        text-align: center;
    }

    .service img {
        width: 100%;
    }
}