/* Header */
.shop-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: var(--color-surface);
    box-shadow: 0 1px 0 var(--color-border);
}

.shop-header__top {
    background: #1f2937;
    color: #d1d5db;
    font-size: 12px;
}

.shop-header__top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    gap: 16px;
}

.shop-header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-header__nav a {
    color: #d1d5db;
    text-decoration: none;
}

.shop-header__nav a:hover {
    color: #fff;
}

.shop-header__phone {
    color: #fff !important;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
}

.shop-header__main {
    padding: 12px 0;
}

.shop-header__main-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-header__logo img {
    height: 44px;
    width: auto;
}

.shop-header__catalog {
    flex-shrink: 0;
}

.shop-header__catalog .main-button-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--color-text);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.shop-header__catalog .main-button-category:hover {
    background: #374151;
}

.shop-header__search {
    flex: 1;
    min-width: 0;
}

.shop-header__search .margintop20 {
    margin: 0 !important;
}

.shop-header__search form {
    display: flex;
    gap: 0;
}

.shop-header__search .form-group {
    flex: 1;
    margin: 0;
}

.shop-header__search input[type="text"] {
    width: 100%;
    height: 42px;
    padding: 0 16px;
    border: 2px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 14px;
    box-shadow: none !important;
}

.shop-header__search input[type="text"]:focus {
    border-color: var(--color-primary);
    outline: none;
}

.shop-header__search .top-btn-poisk {
    height: 42px;
    width: 48px;
    border: 2px solid var(--color-border);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--color-bg);
}

.shop-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.shop-header__cart {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    color: var(--color-text) !important;
    transition: border-color 0.15s;
}

.shop-header__cart:hover {
    border-color: var(--color-primary);
}

.shop-header__cart img {
    height: 24px;
}

.shop-header__cart-label {
    font-size: 13px;
    font-weight: 600;
}

.shop-header__cart-sum {
    font-size: 12px;
    color: var(--color-text-muted);
}

.shop-header__login {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent) !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.shop-header__mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
    color: #374151;
    flex-shrink: 0;
    cursor: pointer;
}

.shop-header__mobile-toggle .icon {
    width: 22px;
    height: 22px;
}

.shop-header__mobile-toggle .icon-bar {
    display: none;
}

.shop-header__mobile-only {
    display: none !important;
}

.shop-header__mobile-nav {
    display: none;
    border-top: 1px solid var(--color-border);
    padding: 12px 0;
}

.shop-header__mobile-nav.is-open {
    display: block;
}

.shop-header__mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-header__mobile-nav li a {
    display: block;
    padding: 10px 0;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--color-border);
}

.shop-header__mobile-search {
    padding: 12px 0;
    display: none;
}

.shop-header__mobile-search.is-open {
    display: block;
}

/* Catalog */
.shop-catalog {
    padding: 24px 0 40px;
}

.shop-catalog__layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.shop-catalog__sidebar {
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.shop-catalog__sidebar .sub-menu-category,
.shop-catalog__sidebar .SearchParameters {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.shop-catalog__banner {
    margin-bottom: 24px;
    min-height: 160px;
    padding: 32px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
}

.shop-catalog__banner h1 {
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.shop-catalog__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.shop-catalog__toolbar .nav-tabs {
    border: none;
}

.shop-catalog__toolbar .nav-tabs > li > a {
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--color-text-muted);
}

.shop-catalog__toolbar .nav-tabs > li.active > a {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}

.shop-catalog__grid {
    margin-bottom: 24px;
}

.shop-catalog__empty {
    padding: 48px;
    text-align: center;
    color: var(--color-text-muted);
}

/* Product page */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shop-product {
    padding: 8px 0 32px;
}

.shop-product__admin {
    margin-bottom: 12px;
}

.shop-product__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
    margin: 0 0 10px;
}

.shop-product__brand {
    color: var(--color-primary, #2563eb);
    text-decoration: none;
    font-weight: 600;
}

.shop-product__brand:hover {
    text-decoration: underline;
}

.shop-product__actions {
    margin-bottom: 20px;
}

.shop-product__buy-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
}

.shop-product__notice {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
}

.shop-product__notice--danger {
    color: #b91c1c;
    font-weight: 600;
}

.shop-product__notice--warn {
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.shop-product__tech {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 8px 0 0;
}

.shop-product__gallery .detail-image {
    background-color: #fff;
}

.shop-product__related {
    padding: 8px 0 48px;
}

.shop-product__related .home-section__title {
    margin-bottom: 20px;
}

/* Mobile sticky buy bar */
.shop-product-bar {
    display: none;
}

.shop-product__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.shop-product__gallery {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.shop-product__gallery .detail-image {
    min-height: 360px;
    border-radius: var(--radius-md);
}

.shop-product__buybox {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.shop-product__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.shop-product__badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.shop-product__badge--hit { background: #fef3c7; color: #92400e; }
.shop-product__badge--new { background: #dbeafe; color: #1e40af; }
.shop-product__badge--sale { background: #fee2e2; color: #991b1b; }

.shop-product__code {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.shop-product__price-block {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.shop-product__price {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.shop-product__old-price {
    font-size: 18px;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.shop-product__stock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--color-success);
    margin-bottom: 16px;
}

.shop-product__meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
}

.shop-product__meta-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.shop-product__description {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 40px;
}

.shop-product__description h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px;
}

.shop-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
}

@media (max-width: 767px) {
    .shop-breadcrumb {
        margin-bottom: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .shop-breadcrumb .breadcrumb {
        flex-wrap: nowrap;
        white-space: nowrap;
        margin-bottom: 4px;
    }

    .shop-breadcrumb .breadcrumb > li {
        display: inline-flex;
        float: none;
    }
}

/* Mini-landing (super-view, pto-view) */
.product-landing {
    --landing-bleed: max(0px, calc((100vw - 100%) / 2));
    margin-left: calc(-1 * var(--landing-bleed));
    margin-right: calc(-1 * var(--landing-bleed));
    padding-left: var(--landing-bleed);
    padding-right: var(--landing-bleed);
}

.product-landing__hero {
    padding: 28px var(--landing-bleed) 36px;
    margin-bottom: 8px;
    background: linear-gradient(165deg, #f8fafc 0%, #ffffff 55%, #eff6ff 100%);
    border-bottom: 1px solid var(--color-border);
}

.product-landing__eyebrow {
    max-width: 1140px;
    margin: 0 auto 20px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-landing__category {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
}

.product-landing__hero-grid {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    align-items: center;
}

.product-landing__lead {
    font-size: 16px;
    line-height: 1.55;
    color: #374151;
    margin: 0 0 18px;
}

.product-landing__scroll {
    margin: 4px 0 16px;
    padding-left: 0;
}

.product-landing__benefits {
    max-width: 1140px;
    margin: 0 auto 28px;
    padding: 0 16px;
}

.product-landing__benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.product-landing__benefit {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
}

.product-landing__benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--color-accent, #2563eb);
    flex-shrink: 0;
}

.product-landing__benefit-icon .icon {
    width: 20px;
    height: 20px;
}

.product-landing__benefit-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.product-landing__benefit-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-muted);
}

.product-landing__details {
    max-width: 920px;
    margin: 0 auto 28px;
    padding: 0 16px;
}

.product-landing__details .shop-product__description {
    margin-bottom: 24px;
}

.product-landing__cta {
    max-width: 1140px;
    margin: 0 auto 36px;
    padding: 24px 20px;
    text-align: center;
    background: #111827;
    color: #fff;
    border-radius: 16px;
}

.product-landing__cta-text {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.45;
}

.product-landing__cta-btn {
    min-width: 200px;
}

.product-landing--pto .product-landing__hero {
    background: linear-gradient(165deg, #eff6ff 0%, #ffffff 50%, #f0fdf4 100%);
}

/* Premium product (super-view, pto-view) — shared buybox */
.shop-product--premium {
    padding-top: 0;
}

.shop-product__layout--premium {
    gap: 28px;
    margin-bottom: 28px;
}

.shop-product__gallery--premium {
    padding: 28px;
}

.shop-product__gallery--premium .detail-image {
    min-height: 400px;
}

.shop-product__buybox--premium {
    padding: 32px;
}

.shop-product__title--split {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 30px;
    margin-bottom: 14px;
}

.shop-product__title-line--accent {
    color: var(--color-accent, #2563eb);
}

.shop-product__intro {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 0 14px;
}

.shop-product__description--wide {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.shop-product__actions--dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.shop-product__actions--dual .shop-product__buy-btn,
.shop-product__actions--dual .shop-product__demo-btn {
    width: 100%;
    min-width: 0;
}

.shop-product__share {
    max-width: 920px;
    margin: 0 auto 32px;
}

.shop-product__nav-hint {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 16px;
}

.shop-product__nav-hint a {
    font-weight: 600;
}

.shop-product__related .home-section__title {
    font-size: 22px;
}

/* Mobile */
@media (max-width: 991px) {
    :root {
        --header-height: 72px;
    }

    .shop-header__top {
        display: none;
    }

    .shop-header__catalog,
    .shop-header__search,
    .shop-header__login {
        display: none !important;
    }

    .shop-header__mobile-toggle,
    .shop-header__icon-btn.shop-header__mobile-only {
        display: inline-flex !important;
    }

    .shop-header__main {
        padding: 10px 0;
    }

    .shop-header__main-inner {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .shop-header__logo {
        flex: 1;
        min-width: 0;
    }

    .shop-header__logo .brand__tagline {
        display: none;
    }

    .shop-header__logo .brand__name {
        font-size: 17px;
    }

    .shop-header__logo .brand__mark {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .shop-header__actions {
        gap: 6px;
        flex-shrink: 0;
    }

    .shop-header__icon-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .shop-header__cart {
        padding: 8px 10px;
        gap: 0;
        flex-shrink: 0;
    }

    .shop-header__cart > div {
        display: none;
    }

    .shop-header__cart-label {
        display: none;
    }

    .shop-header__mobile-search.is-open {
        display: block;
        border-top: 1px solid var(--color-border);
        background: #f9fafb;
    }

    .shop-header__mobile-search .shop-search {
        width: 100%;
    }

    .shop-header__mobile-search .shop-search__input {
        height: 44px;
    }

    .shop-header__mobile-search .shop-search__btn {
        height: 44px;
        width: 48px;
    }

    .shop-catalog__layout {
        grid-template-columns: 1fr;
    }

    .shop-catalog__sidebar {
        position: static;
    }

    .shop-product__layout {
        grid-template-columns: 1fr;
    }

    .shop-product__buybox {
        position: static;
    }

    body.shop-body--product-page {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .shop-product__actions {
        display: none;
    }

    .shop-product__actions--dual {
        display: grid;
    }

    .shop-product-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: #fff;
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    /* поднять виджет Jivo над панелью «В корзину» */
    body.shop-body--product-page jdiv#jivo_custom_widget,
    body.shop-body--product-page jdiv.__jivoMobileButton,
    body.shop-body--product-page jdiv[id*="jvLabel"],
    body.shop-body--product-page jdiv[class*="jvLabel"],
    body.shop-body--product-page #jivo-iframe-container {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .shop-product-bar__inner {
        display: flex;
        align-items: center;
        gap: 12px;
        max-width: 100%;
    }

    .shop-product-bar__price {
        flex: 1;
        min-width: 0;
        font-size: 22px;
        font-weight: 700;
        color: var(--color-text);
        line-height: 1.1;
    }

    .shop-product-bar__btn,
    .shop-product-bar__demo {
        flex-shrink: 0;
    }

    .shop-product-bar__btn {
        min-width: 120px;
    }

    .shop-product-bar__demo {
        min-width: 72px;
    }

    .shop-product-bar__unavailable {
        font-size: 14px;
        font-weight: 600;
        color: #b91c1c;
    }
}

@media (max-width: 767px) {
    .home-product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .shop-page-title {
        font-size: 22px;
    }

    .shop-product__price {
        font-size: 28px;
    }

    .shop-product__title {
        font-size: 20px;
    }

    .shop-product__title--split {
        font-size: 22px;
    }

    .shop-product__gallery--premium .detail-image {
        min-height: 260px;
    }

    .shop-product__gallery .detail-image {
        min-height: 240px;
    }

    .product-landing__hero-grid {
        grid-template-columns: 1fr;
    }

    .product-landing__benefits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-landing__hero {
        padding-top: 16px;
        padding-bottom: 24px;
    }

    .product-landing__lead {
        font-size: 15px;
    }
}
