.mg-service-page {
    --mg-blue: #174f8a;
    --mg-blue-strong: #103f73;
    --mg-blue-soft: #edf5fb;
    --mg-green: #2c963b;
    --mg-green-strong: #237a30;
    --mg-ink: #172334;
    --mg-muted: #5f6f80;
    --mg-line: #dbe4ec;
    --mg-surface: #f6f9fc;
    --mg-warning-soft: #fff7e3;
    color: var(--mg-ink);
}

body:has(.mg-service-page) > .preloader {
    display: none !important;
}

.mg-service-page .container-product-title {
    margin-top: 22px !important;
}

.mg-service-page .container-product-title h1 {
    max-width: 1050px;
    margin: 0 0 14px;
    color: var(--mg-ink);
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.mg-service-page .product-short-info {
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
}

.mg-service-page .product-short-status .instock,
.mg-service-page .product-short-status .outofstock {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
}

.mg-service-page .product-short-reviews {
    justify-self: end;
}

.mg-service-page .container-product-service {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    grid-template-areas:
        'media summary'
        'content content';
    gap: 0 32px;
    align-items: start;
    margin-top: 28px !important;
}

@media (min-width: 1200px) {
    .mg-service-page .container-product-service {
        grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    }
}

.mg-service-page .product-view-column,
.mg-service-page .product-view-block,
.mg-service-page .product-details-column {
    display: contents !important;
}

.mg-service-page .product-view-column > .product-short-description {
    display: none !important;
}

.mg-service-page .product-view-block {
    min-width: 0;
}

.mg-service-page .product-preview-images {
    grid-area: media;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    overflow: hidden;
    padding: 14px;
    border: 1px solid var(--mg-line);
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, var(--mg-surface) 100%);
    box-shadow: 0 14px 40px rgba(28, 63, 93, .09);
}

.mg-service-page .product-preview-images.product-preview-oneimage {
    display: block !important;
}

.mg-service-page .product-image-column-left {
    height: auto;
}

.mg-service-page .product-image-thumb {
    height: 76px;
    margin-bottom: 10px;
}

.mg-service-page .product-image-column-right,
.mg-service-page .product-preview-oneimage .product-image-column-right {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 430px;
    padding: 0;
}

.mg-service-page .product-image-column-right > a {
    display: flex;
    width: 100%;
    min-height: 430px;
    align-items: center;
    justify-content: center;
}

.mg-service-page .product-image-column-right img {
    width: 100%;
    max-height: 520px;
    border-radius: 12px;
    object-fit: contain;
}

@media (min-width: 992px) {
    .mg-service-page .product-preview-oneimage .product-image-column-right,
    .mg-service-page .product-preview-oneimage .product-image-column-right > a {
        min-height: 0;
    }

    .mg-service-page .product-preview-oneimage .product-image-column-right > a > img {
        display: block;
        height: auto;
        max-height: none;
    }
}

.mg-service-page .product-details-column {
    margin: 0;
}

.mg-service-page .mg-service-summary-stack {
    grid-area: summary;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-self: start;
    border: 1px solid var(--mg-line);
    border-radius: 18px;
    background: linear-gradient(160deg, #f8fbfe 0%, #eef5fa 100%);
    box-shadow: 0 14px 40px rgba(28, 63, 93, .08);
}

.mg-service-page .mg-service-summary-stack > .product-short-description {
    display: block !important;
    margin: 0 !important;
    padding: 28px 28px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--mg-ink);
    font-size: 19px;
    line-height: 1.55;
}

.mg-service-page .product-order-block {
    grid-area: order;
    margin: 0;
    padding: 0 28px 28px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--mg-ink);
}

.mg-service-page .mg-service-summary-stack--standalone .product-order-block {
    padding-top: 28px;
}

.mg-service-page .product-order-block-sticky-placeholder {
    grid-area: order;
}

.mg-service-page .product-order-row {
    justify-content: stretch;
}

.mg-service-page .product-order-row:first-child {
    margin-top: 0;
}

.mg-service-page .product-price-block {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 1.15fr);
    gap: 16px;
    align-items: stretch;
}

.mg-service-page .product-price {
    align-items: flex-start;
    justify-content: center;
}

.mg-service-page .product-price-current {
    color: var(--mg-blue);
    font-size: clamp(30px, 2.5vw, 36px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.mg-service-page .mg-service-diagnostics-label {
    display: block;
    margin-bottom: 6px;
    color: var(--mg-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.mg-service-page .product-price-old {
    font-size: 15px;
}

.mg-service-page .product-order-row .btn-buy {
    min-height: 58px;
    margin: 0;
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--mg-green);
    box-shadow: 0 8px 20px rgba(44, 150, 59, .22);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: none;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.mg-service-page .product-order-row .btn-buy:hover,
.mg-service-page .product-order-row .btn-buy:focus {
    background: var(--mg-green-strong);
    box-shadow: 0 10px 24px rgba(35, 122, 48, .3);
    transform: translateY(-1px);
}

.mg-service-page .product-order-actions {
    display: none;
}

.mg-service-page .mg-service-assurance {
    display: grid;
    gap: 9px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--mg-line);
}

.mg-service-page .mg-service-assurance-item {
    position: relative;
    display: block;
    padding-left: 28px;
    color: #33475b;
    font-size: 14px;
    line-height: 1.45;
}

.mg-service-page .mg-service-assurance-item::before {
    position: absolute;
    top: 1px;
    left: 0;
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dff2e3;
    color: var(--mg-green-strong);
    content: '✓';
    font-size: 12px;
    font-weight: 700;
}

.mg-service-page .mg-service-assurance-price::before {
    background: #dfeefa;
    color: var(--mg-blue);
    content: '₴';
}

.mg-service-page .mg-service-secondary-actions {
    margin-top: 18px;
}

.mg-service-page .mg-service-call {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border: 1px solid var(--mg-blue);
    border-radius: 10px;
    color: var(--mg-blue);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.mg-service-page .mg-service-call::before {
    margin-right: 9px;
    content: '☎';
    font-size: 17px;
}

.mg-service-page .mg-service-call:hover,
.mg-service-page .mg-service-call:focus {
    background: var(--mg-blue);
    color: #fff;
    text-decoration: none;
}

.mg-service-page .product-order-actual {
    justify-content: flex-start;
    margin-top: 14px !important;
    color: var(--mg-muted);
    font-size: 12px;
    line-height: 1.4;
}

.mg-service-page .mg-service-content {
    grid-area: content;
    width: 100%;
    min-width: 0;
    margin-top: 44px;
}

.mg-service-page .mg-service-content .nav-tabs {
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--mg-line);
    border-radius: 12px;
    background: var(--mg-surface);
}

.mg-service-page .mg-service-content .nav-tabs .nav-link {
    margin: 0;
    padding: 11px 17px;
    border: 0;
    border-radius: 8px;
    color: var(--mg-muted);
    font-weight: 500;
}

.mg-service-page .mg-service-content .nav-tabs .nav-link.active {
    background: #fff;
    color: var(--mg-blue-strong);
    box-shadow: 0 3px 10px rgba(31, 69, 100, .11);
}

.mg-service-page .mg-service-content .tab-content {
    margin-top: 16px;
    padding: clamp(20px, 2.5vw, 32px);
    border: 1px solid var(--mg-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(28, 63, 93, .06);
}

.mg-service-page #nav-description {
    width: 100%;
    max-width: 1100px;
    margin: 0;
    color: #263748;
    font-size: 17px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mg-service-page #nav-description > p {
    margin: 0 0 15px !important;
    line-height: 1.7 !important;
}

.mg-service-page #nav-description .mg-content-heading {
    margin: 38px 0 14px !important;
    color: var(--mg-ink);
    font-size: clamp(22px, 2.2vw, 29px);
    font-weight: 700;
    line-height: 1.25 !important;
    letter-spacing: -0.015em;
}

.mg-service-page #nav-description > p[style*='mso-outline-level'] {
    margin: 38px 0 14px !important;
    color: var(--mg-ink);
    font-size: clamp(22px, 2.2vw, 29px);
    font-weight: 700;
    line-height: 1.25 !important;
    letter-spacing: -0.015em;
}

.mg-service-page #nav-description .mg-content-heading:first-child {
    margin-top: 0 !important;
}

.mg-service-page #nav-description .mg-content-list-item {
    position: relative;
    margin-bottom: 7px !important;
    padding: 11px 14px 11px 42px;
    border-radius: 8px;
    background: var(--mg-surface);
}

.mg-service-page #nav-description .mg-content-list-item::before {
    position: absolute;
    top: 13px;
    left: 15px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dff2e3;
    color: var(--mg-green-strong);
    content: '✓';
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.mg-service-page #nav-description .mg-content-step {
    position: relative;
    min-height: 50px;
    margin-bottom: 10px !important;
    padding: 13px 16px;
    border: 1px solid var(--mg-line);
    border-radius: 10px;
    background: #fff;
}

.mg-service-page #nav-description .mg-table-scroll {
    overflow-x: auto;
    margin: 18px 0 26px;
    border: 1px solid var(--mg-line);
    border-radius: 12px;
    background: #fff;
}

.mg-service-page #nav-description > div:has(> table) {
    overflow-x: auto;
    margin: 18px 0 26px;
    border: 1px solid var(--mg-line);
    border-radius: 12px;
    background: #fff;
}

.mg-service-page #nav-description .mg-table-scroll table,
.mg-service-page #nav-description > div:has(> table) table {
    width: 100% !important;
    min-width: 650px;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: collapse;
}

.mg-service-page #nav-description .mg-table-scroll td,
.mg-service-page #nav-description .mg-table-scroll th,
.mg-service-page #nav-description > div:has(> table) td,
.mg-service-page #nav-description > div:has(> table) th {
    padding: 13px 15px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--mg-line) !important;
    color: #263748;
    text-align: left !important;
    vertical-align: top;
}

.mg-service-page #nav-description .mg-table-scroll thead td,
.mg-service-page #nav-description .mg-table-scroll thead th,
.mg-service-page #nav-description > div:has(> table) thead td,
.mg-service-page #nav-description > div:has(> table) thead th {
    background: var(--mg-blue);
    color: #fff;
    font-weight: 600;
}

.mg-service-page #nav-description .mg-table-scroll tr:last-child td,
.mg-service-page #nav-description > div:has(> table) tr:last-child td {
    border-bottom: 0 !important;
}

.mg-service-page #nav-description .mg-table-scroll tbody tr:nth-child(even) td,
.mg-service-page #nav-description > div:has(> table) tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.mg-service-page #nav-description .mg-table-scroll p,
.mg-service-page #nav-description > div:has(> table) p {
    margin: 0 !important;
    line-height: 1.45 !important;
}

.mg-service-page #nav-description .mg-empty,
.mg-service-page #nav-description o\:p {
    display: none;
}

.mg-service-page + .container-seotext,
.mg-service-page ~ .container-seotext {
    overflow: hidden;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--mg-line);
    border-radius: 16px;
    background: var(--mg-surface);
}

@media (max-width: 991px) {
    .mg-service-page .container-product-service {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            'summary'
            'media'
            'content';
        gap: 0;
    }

    .mg-service-page .product-preview-oneimage {
        margin-top: 20px !important;
        order: initial !important;
    }

    .mg-service-page .product-preview-images:not(.product-preview-oneimage) {
        margin-top: 20px;
    }

    .mg-service-page .product-image-column-right,
    .mg-service-page .product-image-column-right > a {
        min-height: 340px;
    }
}

@media (max-width: 767px) {
    /* Scope clearance to pilot pages; the measured height includes menu padding. */
    body.mg-service-layout {
        padding-bottom: calc(var(--mg-bottom-nav-height, 100px) + 12px) !important;
    }

    body.mg-service-layout .menu-bottom-navbar {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    body:has(.mg-service-page) .floating-buttons-container {
        display: none !important;
    }

    .mg-service-breadcrumb {
        display: none;
    }

    .mg-service-page .container-product-title {
        margin-top: 10px !important;
    }

    .mg-service-page .container-product-title h1 {
        margin-bottom: 10px;
        font-size: 26px;
        line-height: 1.08;
    }

    .mg-service-page .product-short-info {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
    }

    .mg-service-page .product-short-reviews {
        justify-self: end;
    }

    .mg-service-page .product-short-reviews .card-testimonials {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .mg-service-page .product-short-reviews .card-reviews {
        margin-top: 0;
    }

    .mg-service-page .product-short-status .instock,
    .mg-service-page .product-short-status .outofstock {
        min-height: 30px;
        padding: 5px 10px;
        font-size: 13px;
    }

    .mg-service-page .container-product-service {
        margin-top: 12px !important;
    }

    .mg-service-page .product-details-column {
        margin: 0;
    }

    .mg-service-page .mg-service-summary-stack {
        border-radius: 14px;
    }

    .mg-service-page .mg-service-summary-stack > .product-short-description {
        padding: 16px 16px 12px;
        border-radius: 0;
        font-size: 16px;
        line-height: 1.4;
    }

    .mg-service-page .product-order-block {
        padding: 0 16px 16px;
        border-radius: 0;
    }

    .mg-service-page .mg-service-summary-stack--standalone .product-order-block {
        padding-top: 16px;
    }

    .mg-service-page .product-price-block {
        grid-template-columns: 1fr;
    }

    .mg-service-page .product-price-current {
        font-size: 34px;
    }

    .mg-service-page .product-order-row .btn-buy {
        width: 100%;
    }

    .mg-service-page .mg-service-assurance {
        gap: 7px;
        margin-top: 14px;
        padding-top: 14px;
    }

    .mg-service-page .mg-service-secondary-actions {
        margin-top: 14px;
    }

    .mg-service-page .mg-service-call {
        min-height: 44px;
        padding: 9px 14px;
    }

    .mg-service-page .product-order-actual {
        margin-top: 10px !important;
    }

    .mg-service-page .product-image-column-right,
    .mg-service-page .product-image-column-right > a {
        min-height: 260px;
    }

    .mg-service-page .product-preview-images.product-preview-oneimage {
        margin-top: 12px !important;
        padding: 12px;
    }

    .mg-service-page .product-preview-oneimage .product-image-column-right,
    .mg-service-page .product-preview-oneimage .product-image-column-right > a {
        min-height: 0;
        align-items: flex-start;
    }

    .mg-service-page .product-preview-oneimage .product-image-column-right img {
        display: block;
        height: auto;
    }

    .mg-service-page .mg-service-content {
        margin-top: 28px;
    }

    .mg-service-page .mg-service-content .nav-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
    }

    .mg-service-page .mg-service-content .nav-tabs .nav-link {
        width: 100%;
        min-width: 0;
        padding: 9px 8px;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }

    .mg-service-page .mg-service-content .nav-tabs .nav-link:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .mg-service-page .mg-service-content .tab-content {
        padding: 20px;
    }

    .mg-service-page #nav-description {
        font-size: 16px;
    }

    .mg-service-page #nav-description .mg-content-heading {
        margin-top: 30px !important;
        font-size: 23px;
    }

    .mg-service-page .product-order-block.is-sticky-fixed {
        top: 70px;
        padding: 10px 14px;
        border: 0;
        border-bottom: 1px solid var(--mg-line);
        border-radius: 0;
        background: #fff;
        box-shadow: 0 8px 22px rgba(28, 63, 93, .16);
    }

    .mg-service-page .product-order-block.is-sticky-fixed .mg-service-assurance,
    .mg-service-page .product-order-block.is-sticky-fixed .mg-service-secondary-actions,
    .mg-service-page .product-order-block.is-sticky-fixed .product-order-actions,
    .mg-service-page .product-order-block.is-sticky-fixed .product-order-actual {
        display: none !important;
    }

    .mg-service-page .product-order-block.is-sticky-fixed .product-price-block {
        display: grid !important;
        grid-template-columns: minmax(0, .85fr) minmax(150px, 1.15fr);
        gap: 10px;
        margin: 0 !important;
    }

    .mg-service-page .product-order-block.is-sticky-fixed .product-price-current {
        font-size: 23px;
    }

    .mg-service-page .product-order-block.is-sticky-fixed .btn-buy {
        min-height: 44px;
        padding: 9px 11px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mg-service-page .btn-buy,
    .mg-service-page .mg-service-call {
        transition: none;
    }
}
