:root {
    --dark: #172536;
    --dark-light: #223348;
    --blue: #2463d4;
    --blue-hover: #174cae;
    --background: #f5f7fa;
    --white: #ffffff;
    --text: #253342;
    --muted: #75808d;
    --border: #e1e6ec;
    --shadow: 0 8px 24px rgba(23, 37, 54, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}
.centered-text {
  text-align: center;
}

body {
    min-width: 320px;
    color: var(--text);
    background: var(--background);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

/* Верхняя панель */

.topbar {
    color: #cad5e1;
    background: var(--dark);
    font-size: 13px;
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
}

/* Шапка */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    gap: 28px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    white-space: nowrap;
}

.logo__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    background: var(--blue);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 800;
}

.logo__text {
    font-size: 24px;
    font-weight: 800;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    color: #465362;
    font-size: 15px;
}

.navigation a {
    transition: color 0.2s;
}

.navigation a:hover {
    color: var(--blue);
}

.header__phone {
    color: var(--dark);
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.menu-button {
    display: none;
    padding: 6px 10px;
    color: var(--dark);
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 22px;
}

/* Основной блок */

.catalog-section {
    padding: 42px 0 70px;
}

.catalog-header {
    margin-bottom: 28px;
    padding: 55px 45px;
    color: var(--white);
    background:
        linear-gradient(
            rgba(23, 37, 54, 0.08),
            rgba(23, 37, 54, 0.08)
        ),
        url("../images/background/catalog-background.jpg")
        center / cover;
    border-radius: 10px;
}

.catalog-header__subtitle {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1 {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.catalog-header__description {
    max-width: 650px;
    color: var(--white);
    font-size: 17px;
}

/* Поиск */

.search {
    display: flex;
    gap: 12px;
    margin-bottom: 42px;
}

.search input {
    width: 100%;
    min-height: 50px;
    padding: 0 17px;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
}

.search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(36, 99, 212, 0.1);
}

.search button {
    min-width: 120px;
    padding: 0 22px;
    color: var(--white);
    background: var(--blue);
    border: 0;
    border-radius: 6px;
    font-weight: 700;
    transition: background 0.2s;
}

.search button:hover {
    background: var(--blue-hover);
}

/* Заголовки секций */

.section {
    margin-bottom: 46px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-heading h2 {
    color: var(--dark);
    font-size: 26px;
}

.section-heading span {
    color: var(--muted);
    font-size: 14px;
}

/* Категории */

.categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 42px;
}

@media (max-width: 1100px) {
    .categories {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 800px) {
    .categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .categories {
        grid-template-columns: 1fr;
    }
}


.category {
    min-height: 86px;
    padding: 15px;
    color: var(--text);
    text-align: left;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 7px;
    transition: 0.2s ease;
}

.category:hover {
    color: var(--blue);
    border-color: var(--blue);
    transform: translateY(-2px);
}

.category.active {
    color: var(--white);
    background: var(--blue);
    border-color: var(--blue);
}

.category__name {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

/* Карточки товаров */

.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.product {
    display: flex;
    flex-direction: column;
    min-height: 320px;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.product:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.product__image {
    display: grid;
    place-items: center;
    height: 245px;
    margin-bottom: 17px;
    overflow: hidden;
    color: #9aa5b1;
    background: #eef1f4;
    border-radius: 6px;
    font-size: 13px;
}

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

.product__category {
    margin-bottom: 5px;
    color: var(--blue);
    font-size: 13px;
}

.product__title {
    min-height: 48px;
    color: var(--dark);
    font-size: 17px;
    line-height: 1.35;
}

.product__code {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.product__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
}

.product__price {
    color: var(--dark);
    font-size: 16px;
    font-weight: 700;
}

.product__button {
    padding: 9px 13px;
    color: var(--blue);
    background: transparent;
    border: 1px solid var(--blue);
    border-radius: 5px;
    font-size: 14px;
}

.product__button:hover {
    color: var(--white);
    background: var(--blue);
}

.empty-message {
    display: none;
    padding: 35px;
    color: var(--muted);
    background: var(--white);
    border-radius: 8px;
    text-align: center;
}

/* Контакты */

.contacts {
    padding: 42px 0 22px;
    color: #cad5e1;
    background: var(--dark);
}

.contacts__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.logo--footer {
    margin-bottom: 14px;
    color: var(--white);
}

.contacts__about p {
    max-width: 340px;
    color: #aebdcb;
}

.contacts__column h3 {
    margin-bottom: 14px;
    color: var(--white);
    font-size: 18px;
}

.contacts__column a,
.contacts__column p {
    display: block;
    margin-bottom: 8px;
    color: #cad5e1;
}

.contacts__column a:hover {
    color: #8eb3ff;
}

.contacts__bottom {
    margin-top: 32px;
    padding-top: 18px;
    color: #8fa0b3;
    border-top: 1px solid #344457;
    font-size: 13px;
}

/* Адаптивность */

@media (max-width: 1050px) {
    .categories {
        grid-template-columns: repeat(4, 1fr);
    }

    .header__inner {
        gap: 16px;
    }

    .navigation {
        gap: 17px;
    }
}

@media (max-width: 800px) {
    .categories {
        grid-template-columns: repeat(3, 1fr);
    }

    .products {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacts__grid {
        grid-template-columns: 1fr 1fr;
    }

    .contacts__about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .topbar__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        padding: 9px 0;
    }

    .header__inner {
        position: relative;
        flex-wrap: wrap;
        padding: 15px 0;
    }

    .navigation {
        display: none;
        order: 5;
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding-top: 12px;
    }

    .navigation.active {
        display: flex;
    }

    .header__phone {
        margin-left: auto;
        font-size: 14px;
    }

    .menu-button {
        display: block;
    }

    .catalog-section {
        padding-top: 30px;
    }

    .search {
        flex-direction: column;
    }

    .search button {
        min-height: 48px;
    }

    .categories,
    .products,
    .contacts__grid {
        grid-template-columns: 1fr;
    }

    .contacts__about {
        grid-column: auto;
    }
}

@media (max-width: 400px) {
    .header__phone {
        width: 100%;
        margin-left: 0;
    }

    .product__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .product__button {
        width: 100%;
    }
}
/* Новости */
.news-card {
  max-width: 800px;
  margin: 0 auto 32px auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  background: #fff;
}

.news-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.news-content {
  padding: 20px;
}

.news-date {
  color: #888;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.news-title {
  margin: 10px 0 12px 0;
  font-size: 1.4rem;
}

.news-link {
  display: inline-block;
  margin-top: 12px;
  color: #0066cc;
}
/* Доставка */

.delivery-cards {
  background: #ffffff;
  padding: 40px 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.card {
  background: #fff;
  padding: 20px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  text-align: center;
}

.card strong {
  display: block;
  color: #333333;
  margin-bottom: 6px;
}

.card-term {
  display: block;
  color: #0056b3;               /* ярко‑синий акцент */
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

.card small {
  color: #666666;
  line-height: 1.4;
}

.delivery-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #cccccc;
  color: #777777;
  font-size: 14px;
}

