.pm-product-detail__discount-percent { display: none; }
.pm-product-purchase { display: contents; }
.pm-product-tools[hidden], .pm-product-delivery-note { display: none; }

@media (max-width: 768px) {
    .pm-pdp-mobile body > #header,
    .pm-pdp-mobile:not(.pm-header-search-open) .pm-product-header,
    .pm-pdp-mobile .pm-product-detail__breadcrumbs,
    .pm-header-search-open .pm-product-tools,
    .pm-header-search-open .pm-product-purchase { display: none; }

    .pm-pdp-mobile .pm-city-selector__prompt,
    .pm-pdp-mobile .pm-city-selector__dialog {
        position: fixed;
        inset-block-start: calc(var(--pm-tools-top, 0px) + max(64px, env(safe-area-inset-top) + 54px));
        inset-inline-start: 12px;
        max-height: calc(100dvh - var(--pm-tools-top, 0px) - 82px);
    }
    .pm-pdp-mobile .pm-product-detail__main { padding-top: 0; }
    .pm-pdp-mobile { scroll-padding-block: 64px calc(var(--pm-product-menu-height, 60px) + 70px); }
    .pm-pdp-mobile body::after { content: ""; display: block; height: 68px; background: #00374a; }

    .pm-product-tools:not([hidden]) {
        position: fixed;
        z-index: 9900;
        inset: var(--pm-tools-top, 0px) 0 auto;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
        align-items: center;
        gap: 6px;
        padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
        pointer-events: none;
    }
    .pm-product-tools.is-scrolled {
        background: white;
        box-shadow: 0 1px 0 #d8e3e7;
        pointer-events: auto;
    }
    .pm-product-tools__icon {
        display: inline-grid;
        width: 44px;
        height: 44px;
        padding: 0;
        place-items: center;
        color: #00374a;
        background: rgba(255,255,255,.94);
        border: 0;
        border-radius: 12px;
        cursor: pointer;
        pointer-events: auto;
    }
    .pm-product-tools__icon svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .pm-product-tools__icon:focus-visible,
    .pm-product-share button:focus-visible { outline: 1px solid #005979; outline-offset: -1px; }
    .pm-product-tools__identity { min-width: 0; visibility: hidden; }
    .pm-product-tools__title, .pm-product-tools__taste {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font: 600 14px/1.35 Inter, Roboto, sans-serif;
    }
    .pm-product-tools__taste { color: #506874; font-size: 12px; font-weight: 400; }
    .pm-product-tools.is-scrolled .pm-product-tools__identity { visibility: visible; }

    .pm-pdp-mobile .pm-product-purchase {
        position: fixed;
        z-index: 9900;
        inset: auto 0 var(--pm-product-menu-height, 60px);
        display: block;
        padding: 8px max(12px, env(safe-area-inset-right)) 5px max(12px, env(safe-area-inset-left));
        background: #005979;
        border-radius: 16px 16px 0 0;
    }
    .pm-pdp-mobile #mobmenu {
        height: calc(60px + env(safe-area-inset-bottom));
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    .pm-pdp-mobile .pm-product-purchase form { margin: 0; }
    .pm-pdp-mobile .pm-product-purchase form button {
        width: 100%;
        min-height: 52px;
        padding: 5px 14px;
        border: 0;
        border-radius: 10px;
        background: #fff;
        color: #00374a;
        font: 700 16px/1.2 Inter, Roboto, sans-serif;
    }
    .pm-pdp-mobile .pm-product-purchase .pm-product-delivery-note {
        display: block;
        margin-top: 2px;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.25;
        color: #436570;
    }
    .pm-pdp-mobile .pm-product-purchase .pm-product-detail__quantity {
        min-height: 52px;
        border: 0;
        background: white;
    }
    .pm-pdp-mobile .pm-product-purchase .pm-product-detail__cart-status { min-height: 0; margin: 0; color: white; }
    .pm-pdp-mobile .pm-product-detail__anchor-nav { scroll-margin-top: 64px; }
    .pm-pdp-mobile.pm-header-search-open .pm-product-purchase,
    .pm-pdp-mobile.pm-header-search-open .pm-product-tools { display: none; }
    .pm-product-share {
        width: min(340px, calc(100% - 32px));
        margin: auto;
        padding: 16px;
        border: 0;
        border-radius: 16px;
        color: #00374a;
        background: white;
    }
    .pm-product-share::backdrop { background: rgba(0,38,51,.5); }
    .pm-product-share__heading { display: flex; align-items: center; justify-content: space-between; }
    .pm-product-share__heading h2 { margin: 0; font: 600 18px/1.3 Inter, sans-serif; outline: 0; }
    .pm-product-share input, .pm-product-share [data-pm-share-copy] {
        width: 100%;
        min-height: 44px;
        margin-top: 10px;
        padding: 8px 12px;
        border: 1px solid #a9bec6;
        border-radius: 8px;
        font: inherit;
    }
    .pm-product-share [data-pm-share-copy] { border: 0; background: #005979; color: white; cursor: pointer; }
    .pm-product-share [role="status"]:not(:empty) { display: block; margin-top: 8px; font-size: 13px; }
}
@media (max-width: 300px) {
    .pm-pdp-mobile #mobmenu { height: calc(96px + env(safe-area-inset-bottom)); }
}

@media (max-width: 768px) {
    .pm-pdp-mobile.pm-header-search-open #mobmenu,
    .pm-pdp-mobile.pm-header-search-open .pm-product-header .second-menu-wrapper > a,
    .pm-pdp-mobile.pm-header-search-open .pm-product-header .second-menu-buttons { display: none; }
    .pm-pdp-mobile.pm-header-search-open .pm-product-header .second-menu-wrapper {
        position: fixed;
        inset: var(--pm-tools-top, 0px) 0 auto !important;
        box-sizing: border-box;
        width: 100% !important;
        height: 60px;
        padding: 8px 10px;
        border-radius: 0;
        transform: none;
        background: #005979;
    }
    .pm-pdp-mobile.pm-header-search-open .second-menu-wrapper > form.pm-header-search__form {
        display: flex;
        align-items: center;
        gap: 4px;
        height: 44px;
        margin: 0;
        padding: 0;
    }
    .pm-pdp-mobile.pm-header-search-open .pm-header-search__form input.pm-header-search__input {
        flex: 1;
        width: 0;
        height: 44px;
        padding: 8px 12px;
        background-image: none;
        color: white;
    }
    .pm-pdp-mobile.pm-header-search-open .pm-header-search__clear {
        position: static;
        flex: none;
        width: auto;
        min-width: 44px;
        padding: 0 6px;
        background: transparent;
        font: 500 14px/1.2 Roboto, sans-serif;
    }
    .pm-pdp-mobile.pm-header-search-open .pm-header-search__clear span { display: none; }
    .pm-pdp-mobile.pm-header-search-open .pm-header-search__clear::after { content: "Закрыть"; }
    .pm-pdp-mobile.pm-header-search-open .pm-header-search__clear:focus-visible {
        outline: 1px solid white;
        outline-offset: -1px;
    }
    .pm-pdp-mobile.pm-header-search-open .pm-product-header .pm-header-search__panel {
        position: absolute;
        inset: 100% 0 auto;
        width: 100%;
        height: calc(100dvh - var(--pm-tools-top, 0px) - 60px);
        max-height: none;
        overscroll-behavior: contain;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .pm-pdp-mobile .pm-product-detail__gallery {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        max-width: none;
    }
    .pm-pdp-mobile .pm-product-detail__thumb-nav { display: none; }
    .pm-pdp-mobile .pm-product-detail__visual {
        width: var(--pm-product-page-width, 100vw);
        max-width: none;
        margin-inline-start: calc((100% - var(--pm-product-page-width, 100vw)) / 2);
        justify-self: start;
    }
    .pm-pdp-mobile .pm-product-detail__visual-link,
    .pm-pdp-mobile .pm-product-detail__visual-link:is(:hover, :active, :focus, :focus-visible) {
        border: 0;
        outline: none;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
    }
    .pm-pdp-mobile .pm-product-detail__visual-link:focus-visible::after {
        content: "";
        position: absolute;
        bottom: 10px;
        left: 50%;
        width: 36px;
        transform: translateX(-50%);
        border-bottom: 1px solid #005b71;
    }
    .pm-pdp-mobile .pm-product-detail__gallery > .pm-product-detail__price-row {
        align-items: baseline;
        gap: 6px 10px;
        padding-inline: 0;
    }
    .pm-pdp-mobile .pm-product-detail__price { font-size: 26px; }
    .pm-pdp-mobile .pm-product-detail__previous-price { font-size: 16px; }
    .pm-pdp-mobile .pm-product-detail__discount-percent {
        display: inline;
        color: #b51642;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
    }
}
