/*
 * Сделано в Башкирии — общие блоки поверх main.css / project-css.css
 * Палитра и шрифт те же, что в project-css.css
 */
:root {
    --ink: #171513;
    --muted: #6F6A64;
    --line: #E7E2DA;
    --soft: #F6F4F1;
    --accent: #E24A2A;
    --ok: #1F6B45;
    --ok-bg: #E8F5EC;
    --warn: #9A4A12;
    --warn-bg: #F8E8D8;
    --book: #2F4F8A;
    --book-bg: #E7EEF9;
    --radius: 16px;
}

body {
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
}

.site-main {
    min-height: 50vh;
    padding-bottom: 64px;
}

.site-main .section {
    padding: 8px 0 0;
}

a {
    color: inherit;
}

.page-title {
    margin: 8px 0 20px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

/* ---------- кнопки ---------- */
.btn-main,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease-out, color 160ms ease-out;
}

.btn-main {
    border: 0;
    background: var(--ink);
    color: #fff;
}

.btn-main:hover {
    background: var(--accent);
    color: #fff;
}

.btn-main:disabled {
    opacity: .6;
    cursor: wait;
}

.btn-ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* ---------- хлебные крошки ---------- */
.breadcrumbs {
    padding: 18px 0 4px;
    background: none;
    border: 0;
}

.breadcrumbs .breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--muted);
}

.breadcrumbs .breadcrumb-nav li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--muted);
}

.breadcrumbs .breadcrumb-nav li + li::before {
    content: "/";
    margin: 0 8px;
    color: var(--line);
}

.breadcrumbs .breadcrumb-nav li::after {
    display: none;
}

.breadcrumbs .breadcrumb-nav a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs .breadcrumb-nav a:hover {
    color: var(--accent);
}

.breadcrumbs .breadcrumb-nav li[aria-current] span {
    color: var(--ink);
}

/* ---------- главная ---------- */
.home-hero {
    padding: 24px 0 8px;
}

.home-promise {
    margin: 0;
}

.home-search {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 520px;
    min-width: 0;
    margin-top: 22px;
}

.home-search input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 17px;
}

.home-search input:focus {
    border-color: var(--ink);
    outline: 0;
}

.home-search button {
    flex: none;
    height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.home-search button:hover {
    background: var(--accent);
}

@media (max-width: 400px) {
    .home-search {
        gap: 6px;
    }

    .home-search input {
        padding: 0 12px;
        font-size: 16px;
    }

    .home-search button {
        padding: 0 12px;
        font-size: 16px;
    }
}

.home-facts a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.home-facts a i {
    flex: none;
    margin-top: 2px;
    color: var(--accent);
    font-size: 22px;
}

.home-facts a span {
    display: block;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.4;
}

.home-facts a strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
}

.home-section {
    padding: 36px 0 0;
}

.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.home-section-head h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.home-section-head a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.home-section-head a:hover {
    color: var(--accent);
}

.home-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.home-step {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}

.home-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}

.home-step h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
}

.home-step p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.home-step a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 767px) {
    .home-steps {
        grid-template-columns: 1fr;
    }
}

/* слайдер хитов */
.hero-slider-wrap {
    position: relative;
}

.hero-slider-wrap .tns-outer {
    position: relative;
}

.hero-slider-wrap .tns-controls {
    position: absolute;
    top: -58px;
    right: 150px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.hero-slider-wrap .tns-controls button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
}

.hero-slider-wrap .tns-controls button:hover {
    border-color: var(--ink);
}

.hero-slider-wrap .tns-controls button[disabled] {
    opacity: .35;
}

.hero-slider-wrap .tns-item {
    padding-bottom: 2px;
}

@media (max-width: 575px) {
    .hero-slider-wrap .tns-controls {
        display: none;
    }
}

/* ---------- каталог ---------- */
.catalog-page {
    padding-top: 0;
}

.ccard-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.cat-bar {
    margin-top: 16px;
}

.cat-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.cat-chip span {
    color: var(--muted);
    font-weight: 600;
}

.cat-chip:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.cat-chip.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.cat-chip.is-active span {
    color: rgba(255, 255, 255, .7);
}

.product-sorting {
    margin-left: auto;
}

.product-sorting .form-select {
    min-height: 40px;
    border-color: var(--line);
    border-radius: 999px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .product-sorting {
        width: 100%;
        margin-left: 0;
    }
}

.catalog-grid {
    scroll-margin-top: calc(var(--mp-header-h, 80px) + 16px);
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 32px 0 0;
}

.pager-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pager-btn:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.pager-btn.is-active {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.pager-btn:disabled {
    opacity: .35;
}

.empty-state {
    max-width: 560px;
    margin: 40px auto;
    padding: 36px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    text-align: center;
}

.empty-state > i {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 40px;
}

.empty-state h1,
.empty-state h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
}

.empty-state p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.empty-state a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* карточка: метка «под бронь», статус брони */
.pcard-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--book-bg);
    color: var(--book);
    font-size: 13px;
    font-weight: 800;
}

.pcard-qty.is-book {
    background: var(--book-bg);
    color: var(--book);
}

.pcard-qty.is-out {
    background: var(--soft);
    color: var(--muted);
}

.pcard-price small {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}

.pcard-add:disabled {
    background: var(--muted);
    cursor: not-allowed;
}

/* страница «Бронирование» */
.bron-find {
    max-width: 420px;
    margin: 0 0 8px;
}

.bron-find .form-control {
    height: 48px;
    border-color: var(--line);
    border-radius: 12px;
}

.bron-group {
    margin-top: 28px;
}

.bron-group-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 800;
}

.bron-group-title span {
    color: var(--muted);
    font-weight: 600;
}

/* ---------- товар ---------- */
.pdp {
    padding-top: 8px;
}

.pdp-gallery .pdp-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
    overflow: hidden;
}

.pdp-photo-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.pdp-photo-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pdp-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.pdp-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.pdp-thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--soft);
    overflow: hidden;
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-thumb.is-active {
    border-color: var(--ink);
}

.pdp-title {
    margin: 0 0 16px;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.pdp-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    vertical-align: middle;
}

.pdp-variants {
    margin-bottom: 16px;
}

.pdp-buy {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.pdp-price-label {
    display: block;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.pdp-price-value {
    color: #3B56AC;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.pdp-price-value small {
    color: var(--muted);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0;
}

.pdp-stock {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 18px;
}

.pdp-order {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.pdp-count label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.pdp-add,
.pdp-hold {
    flex: 1 1 160px;
    height: 52px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.pdp-add {
    border: 0;
    background: var(--ink);
    color: #fff;
}

.pdp-add:hover {
    background: var(--accent);
}

.pdp-add:disabled {
    background: var(--muted);
    cursor: not-allowed;
}

.pdp-hold {
    border: 2px solid var(--ink);
    background: #fff;
    color: var(--ink);
}

.pdp-hold:hover {
    border-color: var(--book);
    color: var(--book);
}

.pdp-incart {
    margin: 14px 0 0;
    font-size: 15px;
}

.pdp-incart a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
}

.pdp-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.pdp-info {
    margin-top: 40px;
}

.pdp-h {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 800;
}

.pdp-text {
    font-size: 16px;
    line-height: 1.65;
}

.pdp-specs {
    display: grid;
    grid-template-columns: minmax(120px, 40%) 1fr;
    gap: 0;
    margin: 0;
}

.pdp-specs dt,
.pdp-specs dd {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.pdp-specs dt {
    color: var(--muted);
    font-weight: 600;
}

.pdp-specs dd {
    font-weight: 600;
    word-break: break-word;
}

/* количество −/+ */
.qty {
    display: inline-flex;
    align-items: stretch;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    border: 0;
    background: var(--soft);
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
}

.qty-btn:hover {
    background: var(--line);
}

.qty input {
    width: 64px;
    border: 0;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    -moz-appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty input:focus {
    outline: 0;
    background: var(--soft);
}

/* ---------- корзина ---------- */
.cart-page .page-title {
    margin-bottom: 8px;
}

.cart-empty {
    max-width: 560px;
    margin: 32px auto;
    text-align: center;
}

.cart-empty > i {
    color: var(--muted);
    font-size: 48px;
}

.cart-empty h1 {
    margin: 12px 0 8px;
    font-size: 30px;
    font-weight: 800;
}

.cart-empty p {
    color: var(--muted);
    font-size: 17px;
}

.order-next {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.cart-lead {
    max-width: 760px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.cart-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--book-bg);
    color: var(--book);
    font-weight: 700;
}

.cart-mode.is-warn {
    background: var(--warn-bg);
    color: var(--warn);
}

.cart-block {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    scroll-margin-top: calc(var(--mp-header-h, 80px) + 16px);
}

.cart-block:target {
    border-color: var(--ink);
}

.cart-block-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.cart-block-count {
    color: var(--muted);
    font-size: 17px;
    font-weight: 600;
}

.cart-block-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.cart-block-empty {
    margin: 14px 0 0;
    color: var(--muted);
}

.cart-lines {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.cart-line {
    display: grid;
    grid-template-columns: 64px 1fr auto auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.cart-line.is-warn {
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 12px;
    background: var(--warn-bg);
}

.cart-line-photo {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: var(--soft);
    overflow: hidden;
}

.cart-line-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-line-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cart-line-title {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.cart-line-title:hover {
    color: var(--accent);
}

.cart-line-price,
.cart-line-stock {
    color: var(--muted);
    font-size: 14px;
}

.cart-line .qty {
    height: 44px;
}

.cart-line .qty-btn {
    width: 38px;
}

.cart-line .qty input {
    width: 54px;
}

.cart-line-sum {
    min-width: 96px;
    font-size: 17px;
    text-align: right;
    white-space: nowrap;
}

.cart-line-remove {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--muted);
    font-size: 18px;
}

.cart-line-remove:hover {
    background: var(--soft);
    color: var(--accent);
}

.cart-block-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 18px;
    text-align: right;
}

@media (max-width: 767px) {
    .cart-block {
        padding: 16px;
    }

    .cart-line {
        grid-template-columns: 56px 1fr auto;
        grid-template-areas: "photo info remove" "photo qty sum";
        gap: 8px 12px;
    }

    .cart-line-photo { grid-area: photo; width: 56px; height: 56px; align-self: start; }
    .cart-line-info { grid-area: info; }
    .cart-line .qty { grid-area: qty; justify-self: start; }
    .cart-line-sum { grid-area: sum; min-width: 0; align-self: center; }
    .cart-line-remove { grid-area: remove; align-self: start; }
}

.cart-sheet {
    margin-top: 28px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--soft);
}

.cart-sheet h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.cart-sheet .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 700;
}

.cart-sheet .form-control,
.panel .form-control {
    min-height: 48px;
    border-color: var(--line);
    border-radius: 12px;
    font-size: 16px;
}

.cart-sheet .form-control:focus,
.panel .form-control:focus {
    border-color: var(--ink);
    box-shadow: none;
}

.form-control[aria-invalid="true"],
.form-check-input[aria-invalid="true"] {
    border-color: var(--accent) !important;
}

.field-error {
    display: block;
    margin-top: 4px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.cart-must {
    color: var(--accent);
}

.seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.seg-item {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.seg-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seg-item span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
}

.seg-item input:checked + span {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.seg-item input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 0;
}

.form-check .form-check-input {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    float: none;
}

.form-check-label a {
    color: var(--ink);
    text-decoration: underline;
}

.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.cart-action {
    flex: 1 1 260px;
}

.cart-submit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 64px;
    padding: 10px 20px;
    border: 0;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.cart-submit:hover {
    background: var(--accent);
    color: #fff;
}

.cart-submit small {
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
    font-weight: 600;
}

.cart-submit-alt {
    background: var(--book);
}

.cart-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.cart-note-min {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.cart-note-min a {
    color: var(--ink);
    font-weight: 700;
}

/* уже оформлено */
.cart-placed {
    margin-top: 40px;
}

.cart-placed h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
}

.cart-doc {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.cart-doc-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    width: 100%;
    padding: 16px 18px;
    border: 0;
    background: var(--soft);
    text-align: left;
}

.cart-doc-name {
    font-size: 17px;
    font-weight: 800;
}

.cart-doc-sum {
    font-size: 17px;
    white-space: nowrap;
}

.cart-doc-meta {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 14px;
}

.doc-table {
    margin: 0;
    font-size: 15px;
}

.doc-table th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.cart-doc .doc-table th,
.cart-doc .doc-table td {
    padding: 10px 18px;
}

.cart-doc-remove {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
}

.cart-doc-remove:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cart-doc-close {
    display: block;
    width: calc(100% - 36px);
    margin: 4px 18px 18px;
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}

.cart-doc-close:hover {
    background: var(--accent);
}

/* ---------- страница заказа ---------- */
.order-hero {
    margin: 16px 0 28px;
    text-align: center;
}

.order-hero > i {
    color: var(--ok);
    font-size: 52px;
}

.order-hero h1 {
    margin: 10px 0 6px;
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 800;
}

.order-hero p {
    color: var(--muted);
    font-size: 17px;
}

.panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.panel-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
}

.order-page .doc-table td,
.order-page .doc-table th {
    padding: 10px 0;
}

.order-page .doc-table tfoot th {
    color: var(--ink);
    font-size: 17px;
    text-transform: none;
    letter-spacing: 0;
}

/* ---------- текстовые страницы и блог ---------- */
.page-narrow {
    max-width: 820px;
}

.page-text {
    font-size: 17px;
    line-height: 1.7;
}

.page-text p,
.page-text ul,
.page-text ol {
    margin: 0 0 16px;
    font-size: 17px;
    line-height: 1.7;
}

.page-text ul,
.page-text ol {
    padding-left: 22px;
}

.page-text ul {
    list-style: disc;
}

.page-text ol {
    list-style: decimal;
}

.page-text li {
    margin-bottom: 6px;
}

.page-text h2 {
    margin: 32px 0 12px;
    font-size: 24px;
    font-weight: 800;
}

.page-text h3 {
    margin: 20px 0 8px;
    font-size: 19px;
    font-weight: 800;
}

.page-text a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-text a:hover {
    color: var(--accent);
}

.page-lead {
    max-width: 720px;
    margin-bottom: 24px;
    color: var(--muted);
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    transition: border-color 160ms ease-out;
}

.post-card:hover {
    border-color: var(--ink);
}

.post-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--soft);
}

.post-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--line);
    font-size: 40px;
}

.post-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
}

.post-card-date {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.post-card-title {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
}

.post-card-title a {
    color: var(--ink);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--accent);
}

.post-card-text {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.post .post-cover {
    width: 100%;
    margin: 0 0 24px;
    border-radius: var(--radius);
}

.post-back {
    margin-top: 32px;
}

.post-back a {
    color: var(--ink);
    font-weight: 700;
}

/* контакты */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-item > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--soft);
    color: var(--accent);
    font-size: 20px;
}

.contact-item span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.contact-item a {
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--accent);
}

/* поиск */
.search-big {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 720px;
    margin-bottom: 20px;
}

.search-big input[type="search"] {
    flex: 1 1 300px;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 17px;
}

.search-big input[type="search"]:focus {
    border-color: var(--ink);
    outline: 0;
}

.search-big button {
    height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.search-big button:hover {
    background: var(--accent);
}

.search-scope {
    flex-basis: 100%;
}

.search-count {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 16px;
}

/* ---------- подвал ---------- */
.site-footer {
    margin-top: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    background: var(--soft);
}

.site-footer-row {
    padding: 40px 0 28px;
}

.site-footer .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.site-footer-lead {
    max-width: 320px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.site-footer-title {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.site-footer-links,
.site-footer-contacts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-links li,
.site-footer-contacts li {
    margin: 0 0 8px;
}

.site-footer-links a,
.site-footer-contacts a {
    color: var(--muted);
    font-size: 15px;
    text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-contacts a:hover {
    color: var(--accent);
}

.site-footer-contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-footer-contacts i {
    color: var(--ink);
}

.site-footer-contacts a {
    color: var(--ink);
    font-weight: 700;
}

.site-footer-bottom {
    padding: 16px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.site-footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.site-footer-bottom a {
    color: var(--muted);
}

/* ---------- тосты, наверх ---------- */
.toasts {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(380px, calc(100vw - 32px));
}

.toast-note {
    position: relative;
    padding: 14px 44px 14px 16px;
    border-left: 4px solid var(--ink);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(23, 21, 19, .18);
}

.toast-note.is-success { border-left-color: var(--ok); }
.toast-note.is-error { border-left-color: var(--accent); }

.toast-note-title {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 800;
}

.toast-note-text {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.toast-note-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: underline;
}

.toast-note-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
}

.toast-note-close:hover {
    background: var(--soft);
}

.scroll-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
}

.scroll-top:hover {
    background: var(--accent);
}

.mp-drawer {
    display: block;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Меню каталога в шапке ===== */
.mp-bar-row { position: relative; }
.cmenu { position: static; display: flex; align-items: center; flex: none; }
.cmenu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 48px; padding: 0 18px; border: 0; border-radius: 12px;
    background: var(--ink); color: #fff; font-weight: 650; white-space: nowrap;
    transition: background .15s;
}
.cmenu-btn:hover, .cmenu.is-open .cmenu-btn { background: #000; }
.cmenu-btn i { font-size: 18px; width: 18px; text-align: center; }

.cmenu-panel {
    position: absolute; z-index: 1050; left: 12px; right: 12px; top: calc(100% + 8px);
    max-height: min(72vh, 640px); overflow: auto; overscroll-behavior: contain;
    padding: 20px 24px 24px;
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(23, 21, 19, .14);
}
.cmenu-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding-bottom: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--line);
}
.cmenu-find {
    position: relative; flex: 1 1 260px; max-width: 360px; margin: 0;
}
.cmenu-find i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cmenu-find input {
    width: 100%; height: 42px; padding: 0 14px 0 38px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: 15px;
}
.cmenu-find input:focus { outline: 0; border-color: var(--ink); background: #fff; }
.cmenu-back {
    display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600;
}
.cmenu-quick { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.cmenu-quick a {
    display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px;
    border-radius: 10px; background: var(--soft); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap;
    text-decoration: none; transition: background .15s, color .15s;
}
.cmenu-quick a:hover { background: var(--line); }
.cmenu-quick a.is-book { color: var(--book, #2B5FD9); }

.cmenu-list { list-style: none; margin: 0; padding: 0; columns: 4 200px; column-gap: 24px; }
.cmenu-item { break-inside: avoid; margin: 0; padding: 0; }
.cmenu-item > a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 10px; margin: 0 -10px; border-radius: 8px;
    color: var(--ink); font-size: 15px; line-height: 1.3; text-decoration: none;
    transition: background .12s, color .12s;
}
.cmenu-item > a:hover { background: var(--soft); color: var(--accent); }
.cmenu-item > a i { font-size: 11px; color: var(--muted); }
.cmenu-item.is-hidden { display: none; }
.cmenu-sub { list-style: none; margin: 0 0 6px; padding: 0 0 0 12px; border-left: 2px solid var(--line); }
.cmenu-sub .cmenu-item > a { padding: 5px 10px; font-size: 14px; color: var(--muted); }
.cmenu-sub .cmenu-item > a:hover { color: var(--accent); }
.has-sub > a i { display: none; }
.cmenu-current { display: block; margin-bottom: 8px; font-weight: 650; color: var(--accent); }
.cmenu-empty { margin: 8px 0 0; color: var(--muted); }

@media (max-width: 991px) {
    .cmenu-btn { height: 48px; padding: 0 14px; }
}
@media (max-width: 767px) {
    .cmenu { order: 4; }
    .cmenu-panel {
        position: fixed; left: 0; right: 0; bottom: 0; top: var(--cmenu-top, 128px);
        max-height: none; border-radius: 0; border: 0; border-top: 1px solid var(--line);
        box-shadow: none; padding: 16px 16px 32px;
    }
    .cmenu-head { flex-direction: column; align-items: stretch; }
    .cmenu-find { max-width: none; flex-basis: auto; }
    .cmenu-quick { margin-left: 0; }
    .cmenu-quick a { flex: 1; justify-content: center; }
    .cmenu-list { columns: 1; }
    .cmenu-item > a { margin: 0; padding: 13px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; }
    .has-sub > a i { display: inline; }
    .cmenu-sub { display: none; }
    .cmenu.is-drilled .cmenu-list > .cmenu-item:not(.is-current) { display: none; }
    .cmenu.is-drilled .is-current > a { display: none; }
    .cmenu.is-drilled .is-current > .cmenu-sub { display: block; padding: 0; border: 0; }
    .cmenu.is-drilled .cmenu-sub .cmenu-item > a { color: var(--ink); font-size: 16px; padding: 13px 4px; }
    html.cmenu-lock { overflow: hidden; }
}
