/* =========================================================
   Rinnai Showcase — style.css
   Брендбук: белый/светло-серый фон, Rinnai Red точечно.
   ========================================================= */

:root {
    --rinnai-red: #CF000E;
    --rinnai-red-hover: #A8000B;
    --bg-white: #FFFFFF;
    --bg-light-gray: #F7F7F8;
    --bar-gray-1: #C2C8CF;
    --bar-gray-2: #CECCBE;
    --text-dark: #1A1A1A;
    --text-muted: #5B5F66;
    --border-light: #E5E6E8;

    --font-heading: 'Neue Haas Grotesk', Arial, Helvetica, sans-serif;
    --font-body: Arial, Helvetica, sans-serif;

    --radius: 8px;
    --container-width: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0 0.5em;
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: 24px;
}

/* Скрытие для скринридеров (доступность) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 16px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 36px;
    letter-spacing: 0.5px;
    line-height: 1;
    color: var(--rinnai-red);
}

/* Универсальный класс для выделения слова "Rinnai" фирменным
   красным цветом в заголовках и текстах по всему сайту. */
.text-rinnai-red {
    color: var(--rinnai-red);
}

.main-nav {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background-color: var(--bg-light-gray);
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--rinnai-red);
    border-color: var(--rinnai-red);
    background-color: var(--bg-white);
}

.nav-toggle {
    display: none;
}

/* ---------------------------------------------------------
   Buttons — единственный носитель фирменного красного
   --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background-color: var(--rinnai-red);
    color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--rinnai-red-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--rinnai-red);
    border-color: var(--rinnai-red);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background-color: var(--rinnai-red);
    color: #FFFFFF;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
    background-color: var(--bg-light-gray);
    padding-block: 72px;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero__eyebrow {
    display: inline-block;
    color: var(--rinnai-red);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero__title {
    font-size: clamp(32px, 4vw, 48px);
}

.hero__text {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 480px;
    margin-bottom: 28px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__media {
    background-color: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* ---------------------------------------------------------
   Разделительная полоса (Bar) — вспомогательные серые тона
   --------------------------------------------------------- */
.divider-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--bar-gray-1) 0%, var(--bar-gray-2) 100%);
    border: none;
    margin: 0;
}

/* ---------------------------------------------------------
   Секции
   --------------------------------------------------------- */
.section {
    padding-block: 64px;
}

.section--muted {
    background-color: var(--bg-light-gray);
}

.section__header {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 40px;
}

.section__title {
    font-size: clamp(26px, 3vw, 34px);
}

.section__subtitle {
    color: var(--text-muted);
    font-size: 16px;
}

/* ---------------------------------------------------------
   Преимущества бренда
   --------------------------------------------------------- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.benefit-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
}

.benefit-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--rinnai-red);
}

.benefit-card__title {
    font-size: 18px;
    margin-bottom: 8px;
}

.benefit-card__text {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
}

/* ---------------------------------------------------------
   Категории (фильтр по товарам)
   --------------------------------------------------------- */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.category-tab {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background-color: var(--bg-white);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.2s ease;
    display: inline-block;
}

.category-tab:hover {
    border-color: var(--rinnai-red);
    color: var(--rinnai-red);
}

.category-tab.is-active {
    background-color: var(--rinnai-red);
    border-color: var(--rinnai-red);
    color: #FFFFFF;
}

/* ---------------------------------------------------------
   Блоки категорий в каталоге
   --------------------------------------------------------- */
.category-block {
    margin-top: 56px;
    scroll-margin-top: 90px; /* учитываем sticky-шапку при переходе по якорю */
}

.category-block:first-of-type {
    margin-top: 0;
}

.category-block__header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bar-gray-1);
}

.category-block__title {
    font-size: 22px;
    margin-bottom: 6px;
}

.category-block__desc {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
    max-width: 640px;
}

/* ---------------------------------------------------------
   Карточки товаров
   --------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
}

.product-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.product-card__media {
    aspect-ratio: 4 / 3;
    background-color: var(--bg-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.product-card__category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rinnai-red);
}

.product-card__name {
    font-size: 17px;
    margin: 0;
}

.product-card__desc {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    flex-grow: 1;
}

.product-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.product-card__features li {
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
}

.product-card__features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--rinnai-red);
}

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.product-card__price {
    font-weight: 700;
    font-size: 15px;
}

.product-card__link {
    font-size: 14px;
    font-weight: 700;
    color: var(--rinnai-red);
}

.product-card__link:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------
   CTA полоса
   --------------------------------------------------------- */
.cta-band {
    background-color: var(--bg-light-gray);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    margin-inline: 24px;
}

.cta-band__title {
    font-size: 26px;
}

.cta-band__text {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
    background-color: var(--bg-light-gray);
    border-top: 1px solid var(--border-light);
    padding-block: 48px 24px;
    margin-top: 64px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col__title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-col a:hover {
    color: var(--rinnai-red);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------------------------------------------------------
   Адаптив
   --------------------------------------------------------- */
@media (max-width: 900px) {
    .hero__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .main-nav {
        display: none;
    }

    .cta-band {
        margin-inline: 0;
        border-radius: 0;
    }
}

/* ---------------------------------------------------------
   Карточка: кликабельные фото и название
   --------------------------------------------------------- */
.product-card__media {
    text-decoration: none;
}

.product-card__name a {
    color: inherit;
}

.product-card__name a:hover {
    color: var(--rinnai-red);
}

/* ---------------------------------------------------------
   Страница товара
   --------------------------------------------------------- */
.breadcrumbs {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.breadcrumbs a:hover {
    color: var(--rinnai-red);
}

.product-page__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 56px;
}

.product-page__media {
    background-color: var(--bg-light-gray);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    overflow: hidden;
}

.product-page__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-page__title {
    font-size: clamp(28px, 3.5vw, 38px);
    margin: 8px 0 16px;
}

.product-page__desc {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 24px;
}

.product-page__price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-page__price {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 30px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge--stock {
    background-color: var(--bg-light-gray);
    color: var(--text-dark);
    border: 1px solid var(--bar-gray-1);
}

.product-page__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.product-page__specs-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bar-gray-1);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.specs-table th,
.specs-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-light);
}

.specs-table th {
    width: 32%;
    font-weight: 700;
    color: var(--text-dark);
    background-color: var(--bg-light-gray);
}

.specs-table tr:nth-child(even) td {
    background-color: #FBFBFC;
}

.specs-note {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 16px;
}

.product-page__back {
    display: inline-block;
    margin-top: 40px;
    font-weight: 700;
    color: var(--rinnai-red);
}

.product-notfound {
    text-align: center;
    padding-block: 40px;
}

@media (max-width: 800px) {
    .product-page__grid {
        grid-template-columns: 1fr;
    }
    .specs-table th {
        width: 40%;
    }
}

/* ---------------------------------------------------------
   Пустая категория (например, «Аксессуары» до наполнения)
   --------------------------------------------------------- */
.category-empty {
    background-color: var(--bg-white);
    border: 1px dashed var(--bar-gray-1);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
}

.category-empty p {
    color: var(--text-muted);
    margin: 0 0 16px;
}
