/* ============================================================
   CUSTOM.CSS — дополнительные стили (мерч/полиграфия)
   Не редактирует style.css. Подключается после него.
   ============================================================ */

/* ---------- Шапка: минимальный заказ ---------- */
.header__minorder {
    font-size: 14px;
    font-weight: 600;
    color: #17a2b8;
    margin: 6px 0 0;
}

/* ---------- Блок «Как оформить заказ» ---------- */
.workflow-order {
    background: #f7fafb;
    border-radius: 24px;
    padding: 48px 56px;
}

.workflow-order__row {
    display: flex;
    align-items: center;
}

/* Первая строка: шаг 01 + текст + телефон + кнопка */
.workflow-order__row_first {
    gap: 48px;
    padding-bottom: 40px;
}

.workflow-order__row_first .workflow-order__step {
    flex: 0 0 auto;
}

.workflow-order__row_first .workflow-order__text {
    flex: 1 1 auto;
    max-width: 340px;
    font-size: 16px;
    line-height: 1.55;
    color: #3d4451;
    border-left: 1px solid #e3e9ec;
    padding-left: 48px;
}

.workflow-order__contacts {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.workflow-order__phone {
    font-size: 22px;
    font-weight: 700;
    color: #21242b;
    text-decoration: none;
    white-space: nowrap;
}

.workflow-order__phone:hover {
    color: #17a2b8;
}

.workflow-order__btn {
    display: inline-block;
    background: #28c76f;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    padding: 18px 38px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s ease, transform .2s ease;
}

.workflow-order__btn:hover {
    background: #22b362;
    transform: translateY(-1px);
}

/* Вторая строка: шаги 02–04 с пунктирной линией */
.workflow-order__row_steps {
    position: relative;
    justify-content: space-between;
    gap: 40px;
    padding-top: 40px;
}

/* Пунктирная линия за плашками */
.workflow-order__row_steps::before {
    content: "";
    position: absolute;
    top: 73px; /* паддинг строки (40px) + половина высоты плашки (33px) */
    left: 60px;
    right: 60px;
    border-top: 2px dashed #c9d4d9;
}

.workflow-order__row_steps .workflow-order__step {
    position: relative;
    flex: 1 1 0;
}

/* Плашка с номером и иконкой */
.workflow-order__badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 66px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1ba8bd 0%, #17a2b8 100%);
    box-shadow: 0 8px 20px rgba(23, 162, 184, .28);
    margin-bottom: 18px;
    z-index: 1;
}

.workflow-order__num {
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #128293;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(18, 130, 147, .35);
}

.workflow-order__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 14px;
}

.workflow-order__step_title {
    font-size: 19px;
    font-weight: 700;
    color: #21242b;
    margin: 0 0 10px;
}

.workflow-order__step_text {
    font-size: 15px;
    line-height: 1.55;
    color: #5a6270;
    max-width: 320px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1199px) {
    .workflow-order {
        padding: 40px 32px;
    }

    .workflow-order__row_first {
        gap: 28px;
    }

    .workflow-order__row_first .workflow-order__text {
        padding-left: 28px;
    }
}

@media (max-width: 991px) {
    .workflow-order__row_first {
        flex-wrap: wrap;
    }

    .workflow-order__row_first .workflow-order__text {
        max-width: none;
        border-left: none;
        padding-left: 0;
    }

    .workflow-order__contacts {
        margin-left: 0;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .workflow-order__row_steps {
        flex-wrap: wrap;
    }

    .workflow-order__row_steps::before {
        display: none;
    }

    .workflow-order__row_steps .workflow-order__step {
        flex: 1 1 40%;
    }

    .workflow-order__step_text {
        max-width: none;
    }
}

@media (max-width: 575px) {
    .workflow-order {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .workflow-order__row_first {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-bottom: 28px;
    }

    .workflow-order__contacts {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .workflow-order__phone {
        font-size: 20px;
    }

    .workflow-order__row_steps {
        flex-direction: column;
        gap: 28px;
        padding-top: 28px;
    }

    .workflow-order__row_steps .workflow-order__step {
        flex: 1 1 100%;
    }

    .workflow-order__badge {
        min-width: 108px;
        height: 58px;
    }

    .workflow-order__num {
        width: 36px;
        height: 36px;
        font-size: 14px;
        left: -10px;
    }
}

/* ============================================================
   МЕГА-МЕНЮ «Каталог»
   ============================================================ */
.header__catalog_js {
    position: relative;
}

.header__catalog_btn_js {
    cursor: pointer;
    user-select: none;
}

.header__catalog_btn_js span:first-child {
    pointer-events: none;
}

.megamenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: min(1180px, calc(100vw - 40px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(16, 42, 67, 0.18);
    padding: 28px 28px 20px;
}

.header__catalog_js.-open .megamenu {
    display: block;
}

.megamenu__inner {
    columns: 4 240px;
    column-gap: 28px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 12px;

    /* Видимый скроллбар (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: #17a2b8 #eef4f6;
}

/* Видимый скроллбар (Chrome/Safari/Edge) */
.megamenu__inner::-webkit-scrollbar {
    width: 8px;
}

.megamenu__inner::-webkit-scrollbar-track {
    background: #eef4f6;
    border-radius: 8px;
}

.megamenu__inner::-webkit-scrollbar-thumb {
    background: #17a2b8;
    border-radius: 8px;
}

.megamenu__cat {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 18px;
}

.megamenu__cat_link {
    display: inline-block;
    font-weight: 700;
    font-size: 15px;
    color: #12263a;
    margin-bottom: 8px;
}

.megamenu__cat_link:hover {
    color: #17a2b8;
}

.megamenu__group {
    margin-bottom: 8px;
}

.megamenu__sub_link {
    display: inline-block;
    font-weight: 600;
    font-size: 13.5px;
    color: #17a2b8;
    margin-bottom: 2px;
}

.megamenu__sub_link:hover {
    text-decoration: underline;
}

.megamenu__subsub {
    font-size: 13px;
    line-height: 1.55;
    color: #5b6b7b;
}

.megamenu__subsub a {
    color: #5b6b7b;
}

.megamenu__subsub a:hover {
    color: #17a2b8;
}

/* Мобильная версия мега-меню */
@media (max-width: 991px) {
    .megamenu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 12px;
        padding: 16px;
        margin-top: 8px;
        background: #f7fafb;
    }

    .megamenu__inner {
        columns: 1;
        max-height: 60vh;
    }
}

/* ============================================================
   ПОРТФОЛИО «Наши работы» (карусель)
   ============================================================ */
.portfolio__subtitle {
    margin: -30px 0 30px;
    color: #5b6b7b;
    font-size: 16px;
}

.portfolio__slider {
    position: relative;
}

.portfolio__slider .carousel__slide {
    width: 33.333%;
    padding: 0 10px;
    opacity: 0.4;
    filter: brightness(0.75);
    transition: opacity 0.35s ease, filter 0.35s ease;
}

.portfolio__slider .carousel__slide.is-selected {
    opacity: 1;
    filter: none;
}

.portfolio__slide img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

/* Стрелки карусели */
.portfolio__slider .carousel__button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #17a2b8;
    color: #fff;
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.35);
}

.portfolio__slider .carousel__button svg {
    stroke: #fff;
}

.portfolio__slider .carousel__button.is-prev {
    left: -8px;
}

.portfolio__slider .carousel__button.is-next {
    right: -8px;
}

.portfolio__slider .carousel__button[disabled] {
    opacity: 0.4;
}

@media (max-width: 991px) {
    .portfolio__slider .carousel__slide {
        width: 60%;
    }
}

@media (max-width: 575px) {
    .portfolio__slider .carousel__slide {
        width: 85%;
    }
}

/* ============================================================
   ГАЛЕРЕЯ страницы каталога «Примеры работ»
   ============================================================ */
.page-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 16px;
}

.page-gallery__item {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.page-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.page-gallery__item:hover img {
    transform: scale(1.05);
}

.page-gallery__item--main {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 991px) {
    .page-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
    }
}

/* ============================================================
   СТРАНИЦА «Доставка»
   ============================================================ */
.delivery__top {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.delivery__features {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.delivery__feature {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.delivery__feature_icon {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #e6f6f9;
    color: #17a2b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delivery__feature_icon svg {
    width: 30px;
    height: 30px;
}

.delivery__feature p {
    margin: 0;
    line-height: 1.55;
    color: #37485a;
}

.delivery__photo img {
    width: 100%;
    border-radius: 20px;
}

.delivery__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.delivery__card {
    background: #f7fafb;
    border-radius: 20px;
    padding: 30px 28px;
}

.delivery__card_title {
    font-size: 20px;
    font-weight: 700;
    color: #12263a;
    margin: 0 0 4px;
}

.delivery__card_city {
    color: #9aa8b5;
    font-size: 13px;
    margin: 0 0 16px;
}

.delivery__card p {
    line-height: 1.55;
    color: #37485a;
}

.delivery__card_link {
    color: #17a2b8;
    font-weight: 600;
}

.delivery__card_link:hover {
    text-decoration: underline;
}

@media (max-width: 991px) {
    .delivery__top {
        grid-template-columns: 1fr;
    }

    .delivery__cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Прайс страницы: подзаголовки подкатегорий
   ============================================================ */
.price__subcat {
    font-size: 18px;
    font-weight: 700;
    color: #12263a;
    margin: 32px 0 12px;
}

.table__price_wrapper .table__price td {
    vertical-align: top;
}

/* ============================================================
   Таблицы внутри SEO-текстов (markdown из foto/seo_texts)
   ============================================================ */
.extratext__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.extratext__content th,
.extratext__content td {
    border: 1px solid #dde5ea;
    padding: 8px 12px;
    text-align: left;
}

.extratext__content th {
    background: #f0f7f9;
    font-weight: 600;
}

.extratext__content blockquote {
    border-left: 4px solid #17a2b8;
    margin: 16px 0;
    padding: 8px 16px;
    background: #f7fafb;
    border-radius: 0 10px 10px 0;
}
