/* Catalog only. Does not change homepage portfolio styles. */

:root {
    --catalog-panel: var(--color-portfolio-bg, #292929);
    --catalog-card: var(--color-portfolio-card, #343333);
    --catalog-button: var(--color-portfolio-card-btn, #343333);
    --catalog-accent: var(--color-accent, #c98d46);

}
.catalog-page {
    padding: var(--section-padding, 50px) 0 70px;
}
.catalog-page__panel {
    padding: 34px 30px 38px;
    border-radius: 24px;
    background: var(--catalog-panel);
}

.catalog-page__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.catalog-page__title {
    min-width: 0;
    margin: 0;
    color: var(--color-white, #fff);
    font-size: clamp(30px, 3.5vw, 46px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -.035em;
}

.catalog-page__badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 100px;
    background: var(--catalog-card);
    color: var(--catalog-accent);
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
}

.catalog-page__breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 20px;
}

.catalog-page__breadcrumbs a:hover { color: var(--catalog-accent); }
.catalog-page__breadcrumbs [aria-current="page"] { color: #fff; }

.catalog-page__intro {
    max-width: 850px;
    margin: -8px 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    line-height: 1.6;
}
.catalog-page__intro p { margin: 0 0 12px; }
.catalog-page__intro p:last-child { margin-bottom: 0; }

/* Narrow 1170px container: 214px sidebar + three compact cards. */
.catalog-page__layout {
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.catalog-page__content { min-width: 0; }
.catalog-page__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

/* Sidebar is navigation only; search and filtering can be added later. */
.catalog-sidebar {
    min-width: 0;
    padding: 18px 12px 14px;
    border-radius: 16px;
    background: var(--catalog-card);
}
.catalog-sidebar__title {
    margin: 0 10px 14px;
    color: #fff;
    font-size: 16px;
    line-height: 22px;
    font-weight: 700;
}
.catalog-sidebar__nav { display: grid; gap: 4px; }
.catalog-sidebar__link {
    display: block;
    min-width: 0;
    padding: 10px 11px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    overflow-wrap: anywhere;
    transition: background-color .2s ease, color .2s ease;
}
.catalog-sidebar__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}
.catalog-sidebar__link.is-active {
    color: var(--catalog-accent);
    background: var(--catalog-panel);
}

/* Independent catalog cards, visually matching homepage portfolio. */
.catalog-tile {
    position: relative;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: var(--catalog-card);
    transition: background-color .2s ease;
}
.catalog-tile__main {
    display: block;
    height: 100%;
    padding: 12px 12px 66px;
    color: inherit;
}
.catalog-tile__main:focus-visible {
    outline: 2px solid var(--catalog-accent);
    outline-offset: -3px;
    border-radius: 16px;
}
.catalog-tile__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 11px;
    background: #404040;
}
.catalog-tile__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.catalog-tile:hover .catalog-tile__image { transform: scale(1.025); }
.catalog-tile__placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    text-align: center;
}
.catalog-tile__title {
    margin: 0 0 8px;
    color: var(--color-white, #fff);
    font-size: 16px;
    line-height: 21px;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.catalog-tile__description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 19px;
}

.catalog-tile__price {
    position: absolute;
    left: 14px;
    bottom: 18px;
    margin: 0;
    color: var(--catalog-accent, #c98d46);
    font-size: 18px;
    line-height: 24px;
    font-weight: 700;
    white-space: nowrap;
}
.catalog-tile__price span { font-weight: 600; }

/* Concave cut-out for the arrow, like in the portfolio cards. */
.catalog-tile__notch {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    padding: 8px 0 0 8px;
    border-radius: 14px 0 0 0;
    background: var(--catalog-panel);
    pointer-events: none;
}
.catalog-tile__notch::before,
.catalog-tile__notch::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 0 0, transparent 13.5px, var(--catalog-panel) 14px);
}
.catalog-tile__notch::before { left: -14px; bottom: 0; }
.catalog-tile__notch::after { right: 0; top: -14px; }

.catalog-tile__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: var(--catalog-button);
    transition: background-color .2s ease;
}
.catalog-tile:hover .catalog-tile__arrow,
.catalog-tile:focus-within .catalog-tile__arrow {
    background: var(--catalog-accent);
}
.catalog-tile__arrow-icon {
    display: block;
    width: 22px;
    height: 22px;
    background-image: url('../img/icons/arrow.svg');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.catalog-page__empty { margin: 10px 0; color: rgba(255, 255, 255, 0.88); }

.catalog-page__pagination { margin-top: 28px; }
.catalog-page__pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.catalog-page__pagination .page-numbers {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    min-height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--catalog-card);
    color: #fff;
    font-size: 13px;
}
.catalog-page__pagination .page-numbers.current,
.catalog-page__pagination a.page-numbers:hover { background: var(--catalog-accent); }
.catalog-page__pagination .page-numbers.current { color: var(--color-on-accent, #1a1a1a); }

@media (max-width: 1199px) {
    .catalog-page__panel { padding: 26px 22px 30px; }
    .catalog-page__layout { grid-template-columns: 192px minmax(0, 1fr); gap: 18px; }
    .catalog-page__grid { gap: 12px; }
}

@media (max-width: 991px) {
    .catalog-page__layout { grid-template-columns: 1fr; gap: 18px; }
    .catalog-sidebar { padding: 12px; }
    .catalog-sidebar__title { margin-bottom: 8px; }
    .catalog-sidebar__nav { display: flex; flex-wrap: wrap; gap: 5px; }
    .catalog-sidebar__link { flex: 0 0 auto; padding: 8px 12px; white-space: nowrap; overflow-wrap: normal; background: rgba(255, 255, 255, .06); }
    .catalog-page__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .catalog-page__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .catalog-page { padding-bottom: 42px; }
    .catalog-page__panel { padding: 22px 16px 26px; border-radius: 18px; }
    .catalog-page__head { margin-bottom: 20px; gap: 10px; }
    .catalog-page__title { font-size: 29px; }
    .catalog-sidebar { position: relative; overflow: hidden; }
    .catalog-sidebar__nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -12px;
        padding: 0 32px 2px 12px;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 12px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .catalog-sidebar__nav::-webkit-scrollbar { display: none; }
    .catalog-sidebar__link { scroll-snap-align: start; }
    /* затухание справа — подсказка, что список прокручивается */
    .catalog-sidebar::after {
        content: "";
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 36px;
        pointer-events: none;
        background: linear-gradient(to right, rgba(52, 51, 51, 0), var(--catalog-card));
        border-radius: 0 16px 16px 0;
    }
    .catalog-page__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .catalog-tile__media { aspect-ratio: 1.3 / 1; }
    .catalog-tile__description { -webkit-line-clamp: 3; }
}


/* Product detail page. Separate from homepage portfolio and catalog archives. */
.catalog-product-page {
    --product-panel: var(--color-portfolio-bg, #292929);
    --product-card: var(--color-portfolio-card, #343333);
    --product-accent: var(--color-accent, #c98d46);
    color: var(--color-white, #fff);
    padding: var(--section-padding, 50px) 0 70px;
}

.catalog-product-page__panel {
    background: var(--product-panel);
    border-radius: 24px;
    padding: 34px 30px 40px;
}

.catalog-product__breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 25px;
    font-size: 13px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.78);
}
.catalog-product__breadcrumbs a:hover { color: var(--product-accent); }
.catalog-product__breadcrumbs [aria-current="page"] { color: rgba(255, 255, 255, .9); }
.catalog-product__crumb-sep { opacity: .5; }

.catalog-product__upper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.catalog-product__gallery,
.catalog-product__summary { min-width: 0; }

.catalog-product__main-media {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--product-card);
    border-radius: 16px;
}
.catalog-product__main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.catalog-product__no-image {
    padding: 24px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
}
.catalog-product__thumbnails {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    margin-top: 12px;
    padding: 1px 1px 6px;
    scrollbar-width: thin;
}
.catalog-product__thumb {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    padding: 4px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--product-card);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}
.catalog-product__thumb:hover { border-color: rgba(201, 141, 70, .5); }
.catalog-product__thumb.is-active { border-color: var(--product-accent); }
.catalog-product__thumb:focus-visible,
.catalog-product__tab:focus-visible,
.catalog-product__more:focus-visible {
    outline: 2px solid var(--product-accent);
    outline-offset: 3px;
}
.catalog-product__thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.catalog-product__summary-card {
    padding: 30px;
    border-radius: 16px;
    background: var(--product-card);
}
.catalog-product__summary-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 12px;
    line-height: 18px;
}
.catalog-product__eyebrow {
    color: var(--product-accent);
    font-weight: 600;
}
.catalog-product__sku { color: rgba(255, 255, 255, 0.78); }
.catalog-product__title {
    margin: 0 0 20px;
    font-size: clamp(25px, 2.7vw, 34px);
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}
.catalog-product__price {
    margin: 0 0 26px;
    font-size: clamp(32px, 3.5vw, 42px);
    line-height: 1.2;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.catalog-product__price span { color: var(--product-accent); }
.catalog-product__price-note {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.catalog-product__facts {
    display: grid;
    gap: 14px;
    margin: 0 0 28px;
}
.catalog-product__fact {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
    font-size: 14px;
    line-height: 20px;
}
.catalog-product__fact dt {
    min-width: 0;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}
.catalog-product__fact dd {
    margin: 0 0 0 auto;
    color: #fff;
    text-align: right;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.catalog-product__more {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 15px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--product-accent);
    color: var(--color-on-accent, #1a1a1a);
    font-size: 15px;
    line-height: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.catalog-product__more:hover {
    background: var(--color-accent-dark, #b57a3a);
    transform: translateY(-1px);
}
.catalog-product__more-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background: url('../img/icons/arrow.svg') center / contain no-repeat;
}

.catalog-product__details {
    margin-top: 34px;
    scroll-margin-top: 95px;
}
.catalog-product__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    border-bottom: 1px solid var(--color-border, #4a4a4a);
}
.catalog-product__tab {
    position: relative;
    padding: 14px 18px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s ease;
}
.catalog-product__tab:hover,
.catalog-product__tab.is-active { color: #fff; }
.catalog-product__tab.is-active::after {
    position: absolute;
    content: '';
    height: 3px;
    background: var(--product-accent);
    left: 0;
    right: 0;
    bottom: -1px;
    border-radius: 3px 3px 0 0;
}
.catalog-product__tab-panel {
    padding: 28px 10px 0;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
    overflow-wrap: anywhere;
}
.catalog-product__tab-panel[hidden] { display: none !important; }
.catalog-product__tab-panel p { margin: 0 0 16px; }
.catalog-product__tab-panel p:last-child { margin-bottom: 0; }
.catalog-product__tab-panel ul,
.catalog-product__tab-panel ol { margin: 0 0 16px; padding-left: 22px; }
.catalog-product__tab-panel a { color: var(--product-accent); }
.catalog-product__tab-panel h3 { margin: 28px 0 12px; font-size: 19px; line-height: 1.35; font-weight: 600; color: #fff; }
.catalog-product__tab-panel h3:first-child { margin-top: 0; }
.catalog-product__tab-panel li { margin-bottom: 6px; }
@media (max-width: 575px) { .catalog-product__tab-panel h3 { font-size: 17px; } }
.catalog-product__tab-panel img { max-width: 100%; height: auto; border-radius: 10px; }
.catalog-product__empty { color: rgba(255, 255, 255, 0.78); }

.catalog-product__spec-list { margin: 0; }
.catalog-product__spec-row {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    align-items: baseline;
    gap: 22px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.catalog-product__spec-row:nth-child(odd) { background: var(--product-card); }
.catalog-product__spec-row:first-child { border-radius: 10px 10px 0 0; }
.catalog-product__spec-row:last-child { border-bottom: 0; border-radius: 0 0 10px 10px; }
.catalog-product__spec-row dt {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}
.catalog-product__spec-row dd {
    margin: 0;
    color: #fff;
}

@media (max-width: 1199px) {
    .catalog-product-page__panel { padding: 28px 24px 32px; }
    .catalog-product__upper { gap: 20px; }
    .catalog-product__summary-card { padding: 23px; }
}
@media (max-width: 767px) {
    .catalog-product__upper { grid-template-columns: 1fr; }
    .catalog-product__gallery { max-width: 620px; width: 100%; }
    .catalog-product__main-media { aspect-ratio: 5 / 4; }
    .catalog-product__details { margin-top: 26px; }
}
@media (max-width: 575px) {
    .catalog-product-page { padding-bottom: 40px; }
    .catalog-product-page__panel { padding: 23px 16px 26px; border-radius: 18px; }
    .catalog-product__breadcrumbs { margin-bottom: 18px; }
    .catalog-product__main-media { aspect-ratio: 1 / 1; border-radius: 12px; }
    .catalog-product__thumb { width: 64px; height: 64px; flex-basis: 64px; }
    .catalog-product__summary-card { padding: 21px 17px; }
    .catalog-product__title { font-size: 25px; }
    .catalog-product__price { font-size: 34px; }
    .catalog-product__tab { padding: 12px 13px; font-size: 14px; }
    .catalog-product__tab-panel { padding: 20px 0 0; font-size: 14px; }
    .catalog-product__spec-row { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
    .catalog-product__fact { font-size: 13px; }
}

.catalog-page__empty { grid-column: 1 / -1; max-width: 620px; padding: 24px; border-radius: 16px; background: var(--catalog-card); }
.catalog-page__empty p { margin: 0 0 16px; color: rgba(255, 255, 255, .88); font-size: 15px; line-height: 22px; }

/* Текст о разделе под моделями рубрики */
.catalog-page__about { margin-top: 36px; padding: 26px 28px; border-radius: 16px; background: var(--catalog-card); color: rgba(255, 255, 255, .88); font-size: 15px; line-height: 1.7; }
.catalog-page__about-title { margin: 0 0 14px; color: #fff; font-size: 20px; line-height: 26px; font-weight: 700; }
.catalog-page__about p { margin: 0 0 12px; }
.catalog-page__about p:last-child { margin-bottom: 0; }
.catalog-page__about ul { margin: 0 0 12px; padding-left: 20px; }
@media (max-width: 575px) { .catalog-page__about { padding: 20px 18px; } }
