:root {
    --td-blue: #315f86;
    --td-sky: #5f8fb7;
    --td-ink: #0d1f30;
    --td-muted: #6d7f8f;
    --td-line: #dbe5ec;
    --td-soft: #f3f7fa;
    --td-card: #f1f4f7;
    --td-glass: #dce8ef;
    --td-shadow: rgba(28, 62, 91, .16);
}

html {
    scroll-behavior: smooth;
}

body.td-page-body {
    margin: 0;
    background: #fff;
    color: var(--td-ink);
    font-family: Montserrat, Arial, sans-serif;
}

.td-site,
.td-site * {
    box-sizing: border-box;
}

.td-shell {
    width: min(1260px, calc(100% - 40px));
    margin: 0 auto;
}

.td-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(219, 229, 236, .92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.admin-bar .td-header {
    top: 32px;
}

.td-header__inner {
    min-height: 82px;
    display: grid;
    grid-template-columns: auto 56px minmax(280px, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.td-header__inner > .td-catalog-button,
.td-header__inner > .td-search,
.td-header__inner > .td-location {
    align-self: center;
}

.td-brand {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #050608 !important;
    text-decoration: none !important;
}

.td-brand__mark {
    width: 58px;
    height: 42px;
    display: block;
    overflow: hidden;
    border-radius: 10px;
}

.td-brand__mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.td-brand__text {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.td-catalog-button {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, #6f9cc0, #315f86);
    color: #fff;
    cursor: pointer;
    transition: transform .18s, background-color .18s;
}

.td-catalog-button:hover {
    background: linear-gradient(180deg, #5f8fb7, #274e70);
    transform: translateY(-1px);
}

.td-catalog-button[aria-expanded="true"] {
    background: var(--td-blue);
}

.td-catalog-button svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.td-search {
    height: 54px;
    min-height: 54px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 116px;
    align-items: center;
    border: 3px solid var(--td-sky);
    border-radius: 17px;
    overflow: hidden;
    background: #fff;
}

.td-search svg {
    width: 21px;
    height: 21px;
    margin-left: 15px;
    fill: none;
    stroke: #7d8d99;
    stroke-width: 2;
    stroke-linecap: round;
}

.td-search input {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 0;
    outline: none;
    color: var(--td-ink);
    font: inherit;
    font-size: 16px;
}

.td-search input::placeholder {
    color: #7d8d99;
}

.td-search button {
    height: 54px;
    align-self: center;
    margin: -3px -3px -3px 0;
    border: 0;
    background: linear-gradient(180deg, #6f9cc0, #315f86);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.td-location {
    height: 54px;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 14px;
    background: #eef3f7;
    color: var(--td-ink) !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 0;
    white-space: nowrap;
}

.td-location select {
    height: 54px;
    line-height: 54px;
    max-width: 170px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--td-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
}

.td-menu-backdrop {
    position: fixed;
    inset: 82px 0 0;
    z-index: 998;
    display: none;
    background: rgba(20, 23, 31, .12);
}

.td-menu-open .td-menu-backdrop {
    display: block;
}

.td-category-menu {
    position: fixed;
    top: 82px;
    left: 0;
    right: 0;
    z-index: 999;
    max-height: calc(100vh - 92px);
    overflow: auto;
    padding: 34px 0 42px;
    background: #fff;
    border-bottom: 1px solid var(--td-line);
    box-shadow: 0 26px 70px var(--td-shadow);
}

.admin-bar .td-category-menu {
    top: 114px;
    max-height: calc(100vh - 124px);
}

.admin-bar .td-menu-backdrop {
    inset: 114px 0 0;
}

.td-category-menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.td-category-menu__top strong {
    color: var(--td-ink);
    font-size: 26px;
    line-height: 1.15;
}

.td-category-menu__top button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: #eef3f7;
    color: var(--td-ink);
    cursor: pointer;
}

.td-category-menu__top svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.td-category-menu__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    column-gap: 64px;
    row-gap: 44px;
}

.td-category-menu__group {
    min-width: 0;
    overflow: hidden;
}

.td-category-menu__title {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
    max-width: 100%;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--td-ink);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.td-category-menu__title span {
    min-width: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 820;
    white-space: normal;
    overflow-wrap: anywhere;
}

.td-category-menu__links {
    display: grid;
    gap: 18px;
}

.td-category-menu__links a,
.td-category-menu__links button {
    width: 100%;
    min-width: 0;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: #242833;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
    cursor: pointer;
}

.td-category-menu__title:hover span,
.td-category-menu__links a:hover,
.td-category-menu__links button:hover {
    color: var(--td-blue);
}

.td-location svg {
    width: 18px;
    height: 18px;
    fill: #050608;
}

.td-main {
    padding: 18px 0 70px;
}

.td-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin: 34px 0 18px;
}

.td-section-head h2 {
    margin: 0;
    color: var(--td-ink);
    font-size: 28px;
    line-height: 1.2;
}

.td-section-head span,
.td-section-head a {
    color: var(--td-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.td-section-head > div {
    min-width: 0;
}

.td-reset-button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #edf6ff;
    color: var(--td-blue);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.td-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.td-category-card {
    position: relative;
    min-height: 118px;
    display: block;
    overflow: hidden;
    padding: 20px 18px;
    border: 0;
    border-radius: 22px;
    background: var(--td-card);
    color: var(--td-ink) !important;
    text-decoration: none !important;
    text-align: left;
    font: inherit;
    isolation: isolate;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background-color .18s;
}

.td-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px var(--td-shadow);
    background: #e8f0f6;
}

.td-category-card.is-active,
.td-reset-button.is-active {
    background: #e4edf4;
    box-shadow: inset 0 0 0 2px var(--td-sky);
}

.td-category-card__title {
    position: relative;
    z-index: 2;
    display: block;
    max-width: 72%;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 760;
}

.td-category-card__count {
    display: none !important;
}

.td-category-card__image {
    position: absolute;
    right: -10px;
    bottom: -13px;
    z-index: 1;
    width: 52%;
    max-width: 160px;
    pointer-events: none;
}

.td-category-card__image svg,
.td-category-card__image img {
    display: block;
    width: 100%;
    height: auto;
}

.td-category-card__image img {
    aspect-ratio: 3 / 2;
    object-fit: contain;
    filter: saturate(.45) sepia(.08) hue-rotate(165deg);
}

.td-subcategory-panel {
    position: fixed;
    inset: 0;
    z-index: 1200;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    margin: 0;
    padding: 0 max(28px, calc((100vw - 1260px) / 2 + 20px)) 64px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

body.td-subcategory-open {
    overflow: hidden;
}

.td-subcategory-panel__top {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 32px;
    padding: 34px 0 20px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--td-line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.td-subcategory-panel__top span {
    display: block;
    color: var(--td-muted);
    font-size: 13px;
    font-weight: 750;
}

.td-subcategory-panel__top strong {
    display: block;
    margin-top: 4px;
    color: var(--td-ink);
    font-size: 34px;
    line-height: 1.18;
}

.td-subcategory-panel__top button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    background: #eef3f7;
    color: var(--td-ink);
    cursor: pointer;
}

.td-subcategory-panel__top svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.td-subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 76px;
    row-gap: 2px;
}

.td-subcategory-grid a {
    display: block;
    min-width: 0;
    padding: 13px 10px;
    border-radius: 8px;
    color: #242833;
    text-decoration: none;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 500;
}

.td-subcategory-grid a:hover {
    background: #f2f3f6;
    color: var(--td-blue);
}

.td-listing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.td-main.is-loading .td-listing-grid {
    opacity: .58;
}

.td-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.td-load-more {
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: var(--td-blue);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.td-listing-card {
    min-width: 0;
}

.td-listing-card__media {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    background: #edf3f7;
    text-decoration: none !important;
}

.td-listing-card__media img,
.td-listing-card__media span,
.td-listing-card__media svg {
    width: 100%;
    height: 100%;
}

.td-listing-card__media img {
    object-fit: cover;
}

.td-listing-card__media span {
    display: grid;
    place-items: center;
    padding: 18px;
}

.td-listing-card__body {
    padding-top: 10px;
}

.td-listing-card__title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--td-blue) !important;
    text-decoration: none !important;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.td-empty {
    grid-column: 1 / -1;
    padding: 30px;
    border-radius: 18px;
    background: var(--td-soft);
    color: var(--td-muted);
}

.td-ad-page {
    min-height: calc(100vh - 203px);
    padding: 42px 0 80px;
}

.td-ad-single__back {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--td-blue) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 750;
}

.td-ad-single__back::before {
    content: "\2190";
    margin-right: 8px;
}

.td-ad-single__header {
    max-width: 920px;
    margin-bottom: 30px;
}

.td-ad-single__category {
    margin-bottom: 8px;
    color: var(--td-muted);
    font-size: 14px;
    font-weight: 700;
}

.td-ad-single__header h1 {
    margin: 0;
    color: var(--td-ink);
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.12;
    letter-spacing: 0;
}

.td-ad-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    align-items: start;
    gap: 46px;
}

.td-ad-single__layout--text {
    grid-template-columns: minmax(0, 820px);
}

.td-ad-single__media {
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: var(--td-soft);
}

.td-ad-single__media img {
    width: 100%;
    height: auto;
    max-height: 680px;
    display: block;
    object-fit: contain;
}

.td-ad-single__content {
    min-width: 0;
    color: #263746;
    font-size: 17px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.td-ad-single__content > :first-child {
    margin-top: 0;
}

.td-ad-single__content a {
    color: var(--td-blue);
}

.td-footer {
    border-top: 1px solid var(--td-line);
    background: #f4f7fa;
}

.td-footer__inner {
    min-height: 120px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.td-footer__brand {
    color: var(--td-ink) !important;
    text-decoration: none !important;
    font-size: 24px;
    font-weight: 850;
}

.td-footer__nav {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.td-footer__nav a,
.td-footer p {
    color: var(--td-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
}

.td-footer p {
    margin: 0;
}

body.home .site-content,
body.home .content-area,
body.home .site-main,
body.home .entry-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 1100px) {
    .td-header__inner {
        grid-template-columns: auto 52px minmax(0, 1fr);
        row-gap: 12px;
        padding: 14px 0;
    }

    .td-post-button {
        display: none;
    }

    .td-location {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .td-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .td-category-menu {
        top: 142px;
        max-height: calc(100vh - 152px);
    }

    .td-menu-backdrop {
        inset: 142px 0 0;
    }

    .td-category-menu__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 44px;
    }

    .td-listing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {
    .td-shell {
        width: min(100% - 24px, 1260px);
    }

    .td-header__inner {
        grid-template-columns: 1fr 48px;
    }

    .td-brand__text {
        font-size: 27px;
    }

    .td-search {
        grid-column: 1 / -1;
        grid-template-columns: 38px minmax(0, 1fr) 86px;
        min-height: 50px;
        border-width: 2px;
    }

    .td-search input,
    .td-search button {
        height: 46px;
        font-size: 14px;
    }

    .td-search button {
        height: 50px;
        margin: -2px -2px -2px 0;
    }

    .td-catalog-button {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .td-category-menu {
        top: 156px;
        max-height: calc(100vh - 166px);
        padding: 24px 0 34px;
    }

    .td-menu-backdrop {
        inset: 156px 0 0;
    }

    .td-category-menu__top strong {
        font-size: 23px;
    }

    .td-category-menu__grid {
        grid-template-columns: 1fr;
        row-gap: 30px;
    }

    .td-category-menu__title {
        margin-bottom: 15px;
    }

    .td-category-menu__title span {
        font-size: 20px;
    }

    .td-category-menu__links {
        gap: 12px;
    }

    .td-category-menu__links a,
    .td-category-menu__links button {
        font-size: 17px;
    }

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

    .td-category-card {
        min-height: 120px;
        padding: 16px;
        border-radius: 18px;
    }

    .td-category-card__title {
        max-width: 88%;
        font-size: 15px;
    }

    .td-category-card__image {
        width: 62%;
    }

    .td-subcategory-panel {
        padding: 0 16px 44px;
    }

    .td-subcategory-panel__top {
        margin: 0 0 24px;
        padding: 22px 0 16px;
    }

    .td-subcategory-panel__top strong {
        font-size: 22px;
    }

    .td-subcategory-grid {
        grid-template-columns: 1fr;
    }

    .td-subcategory-grid a {
        padding: 11px 8px;
        font-size: 17px;
    }

    .td-listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .td-section-head {
        margin-top: 28px;
    }

    .td-section-head h2 {
        font-size: 24px;
    }

    .td-ad-page {
        padding: 28px 0 56px;
    }

    .td-ad-single__back {
        margin-bottom: 22px;
    }

    .td-ad-single__header {
        margin-bottom: 22px;
    }

    .td-ad-single__header h1 {
        font-size: 30px;
    }

    .td-ad-single__layout {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .td-ad-single__content {
        font-size: 16px;
    }

    .td-footer__inner {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 28px 0;
    }

    .td-footer__nav {
        justify-content: start;
        flex-wrap: wrap;
    }
}

@media (max-width: 430px) {
    .td-category-grid,
    .td-listing-grid {
        grid-template-columns: 1fr;
    }
}
