/* ===========================================================
   Тема "stroysis" — дизайн редизайна.
   Подключается ПОСЛЕ default-theme.css и styles.css.
   Часть 1 — дизайн-система макета.
   Часть 2 — правила, приводящие существующую разметку
             каталога и карточки товара к виду макета.
   =========================================================== */

/* ============ 1. ТОКЕНЫ И БАЗА ============ */
:root {
    --orange: #e8641e;
    --orange-dk: #c94f10;
    --ink: #2b2b2b;
    --ink-dk: #1c1c20;
    --gray: #f4f4f4;
    --line: #e6e6e6;
    --muted: #6b6b6b;
}

body {
    font-family: 'PT Sans', 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
    background: #fff;
}

body a { color: var(--orange); text-decoration: none; }
body a:hover { color: var(--orange-dk); text-decoration: underline; }

.st-wrap { max-width: 1400px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* ============ 2. ШАПКА ============ */
.hdr { border-bottom: 1px solid var(--line); background: #fff; }
.hdr__in { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 14px clamp(16px, 4vw, 48px); max-width: 1400px; margin: 0 auto; }
.hdr__brand { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.hdr__logo { height: 72px; width: auto; display: block; }
.hdr__addr { color: #444; font-size: 16px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.hdr__contact { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hdr__phones { font-size: 17px; font-weight: 700; text-align: right; white-space: nowrap; }
.hdr__phones a { font-size: 17px; font-weight: 700; color: var(--ink); text-decoration: none; }
.hdr__phones a:hover { color: var(--orange-dk); }
.hdr__recall { display: inline-block; margin-top: 2px; background: none; border: 0; padding: 0; cursor: pointer; font: 400 14px/1.4 'PT Sans', Arial, sans-serif; color: var(--orange); }
.hdr__recall:hover { color: var(--orange-dk); text-decoration: underline; }
.hdr__sika { height: 84px; width: auto; display: block; }
.burger { display: none; background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; font: 600 14px/1 Oswald, 'Arial Narrow', sans-serif; text-transform: uppercase; cursor: pointer; min-height: 44px; }

/* ============ 3. МЕНЮ ============ */
.nav { background: #e4e4e4; border-bottom: 3px solid var(--orange); }
.nav__list { display: flex; flex-wrap: wrap; list-style: none; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); max-width: 1400px; }
.nav__list li { margin: 0; padding: 0; }
.nav__link { display: block; padding: 17px 18px; font: 500 15px/1 Oswald, 'Arial Narrow', sans-serif; text-transform: uppercase; color: #3a3a3a; letter-spacing: .5px; text-decoration: none; }
.nav__link:hover { color: var(--orange-dk); text-decoration: none; background: #dcdcdc; }
.nav__link[aria-current=page] { color: var(--orange); font-weight: 600; }

/* ============ 4. ЗАГОЛОВКИ ============ */
.page-head { padding: 26px 0 6px; }
.page-head h1, .page-head h2 {
    font-family: Oswald, 'Arial Narrow', Impact, sans-serif;
    font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    margin: 0; color: var(--ink); font-size: clamp(26px, 3.4vw, 36px);
}
.page-head .sub { color: var(--muted); font-size: 15px; margin-top: 6px; }

.section-title, .block-title {
    font-family: Oswald, 'Arial Narrow', Impact, sans-serif;
    font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
    color: var(--ink); font-size: clamp(22px, 2.6vw, 30px);
    margin: 26px 0 6px;
}

/* ============ 5. ПЕРВЫЙ ЭКРАН ============ */
.hero { position: relative; overflow: hidden; background: var(--ink-dk); color: #fff; border-radius: 4px; padding: clamp(20px, 3vw, 44px); display: flex; gap: 32px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(232,100,30,0) 30%, rgba(232,100,30,.30) 48%, rgba(232,100,30,.05) 62%, rgba(232,100,30,0) 78%); background-size: 260% 100%; animation: heroSweep 7s ease-in-out infinite; }
.hero > * { position: relative; z-index: 1; }
@keyframes heroSweep { 0% { background-position: 130% 0 } 55% { background-position: -70% 0 } 100% { background-position: -70% 0 } }
.hero__media { flex: 1 1 300px; max-width: 420px; background: #fff; border-radius: 4px; overflow: hidden; }
.hero__media img { width: 100%; height: 300px; object-fit: cover; display: block; }
.hero__cap { padding: 12px 16px; font: 600 14px/1 Oswald, 'Arial Narrow', sans-serif; text-transform: uppercase; color: var(--orange); border-top: 3px solid var(--orange); }
.hero__txt { flex: 1 1 360px; min-width: 0; }
.hero__kicker { font: 600 13px/1.3 Oswald, 'Arial Narrow', sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--orange); }
.hero__txt h1 { font-family: Oswald, 'Arial Narrow', Impact, sans-serif; font-weight: 700; text-transform: uppercase; font-size: clamp(28px, 4vw, 48px); line-height: 1.05; margin: 14px 0 0; color: #fff; }
.hero__rule { width: 64px; height: 4px; background: var(--orange); margin: 18px 0; }
.hero__lead { font-size: 17px; color: #dcdcdc; max-width: 480px; }

/* ============ 6. КНОПКИ ============ */
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.st-btn { display: inline-block; background: var(--orange); color: #fff; font: 600 15px/1 Oswald, 'Arial Narrow', sans-serif; text-transform: uppercase; letter-spacing: .5px; padding: 16px 26px; border: 1px solid var(--orange); border-radius: 2px; cursor: pointer; min-height: 44px; text-decoration: none; }
.st-btn:hover { background: var(--orange-dk); border-color: var(--orange-dk); color: #fff; text-decoration: none; }
.st-btn--ghost { background: transparent; border-color: #6a6a6a; color: #fff; }
.st-btn--ghost:hover { background: #33333a; border-color: #8a8a8a; }

/* ============ 7. ЦИФРЫ ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--orange); color: #fff; border-radius: 4px; margin-top: 20px; overflow: hidden; }
.stats div { padding: 18px 20px; border-left: 1px solid rgba(255,255,255,.25); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font: 700 32px/1 Oswald, 'Arial Narrow', sans-serif; }
.stats span { font-size: 14px; opacity: .92; }

/* ============ 8. СЕТКА И КАРТОЧКИ ============ */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 22px 0 0; list-style: none; padding: 0; }
.grid > li { list-style: none; margin: 0; padding: 0; display: flex; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { display: flex; flex-direction: column; height: 100%; width: 100%; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; color: var(--ink); background: #fff; text-decoration: none; }
.card:hover { color: var(--ink); text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.card__media { position: relative; overflow: hidden; display: block; }
.card__media img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform .45s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.5)); }
.card__noimg { height: 180px; display: flex; align-items: center; justify-content: center; background: var(--gray); color: var(--muted); font: 600 14px/1.3 Oswald, 'Arial Narrow', sans-serif; text-transform: uppercase; text-align: center; padding: 12px; }
.card__body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; flex: 1; }
.card__title { display: block; overflow-wrap: anywhere; font-size: 15px; font-weight: 700; line-height: 1.3; }
.card__icon { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }

/* ============ 9. ХЛЕБНЫЕ КРОШКИ ============ */
.breadcrumbs {
    padding: 14px 0 0; font-size: 13px; color: var(--muted);
    text-transform: uppercase; letter-spacing: .4px;
}
.breadcrumbs .breadcrumb {
    background: none; border: 0; margin: 0; padding: 0; list-style: none;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--orange); }
.breadcrumbs .breadcrumb > li { display: inline-block; }
.breadcrumbs .breadcrumb > li + li:before { content: "/\00a0"; padding: 0 5px; color: #bbb; }
.breadcrumbs .breadcrumb > .active { color: var(--ink); }

/* ============ 10. КАТАЛОГ: СПИСОК КАТЕГОРИЙ ============ */
/* существующая разметка превращается в сетку макета */
.catalog-category-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}
.catalog-category-list .catalog-list-category {
    display: flex; width: auto; float: none; margin: 0; padding: 0; border: 0;
}
.catalog-category-list .catalog-list-category > * { width: 100%; }

/* ============ 11. КАТАЛОГ: СПИСОК ТОВАРОВ ============ */
.catalog-items-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}
.catalog-items-list .catalog-list-item {
    display: flex; width: auto; float: none; margin: 0; padding: 0; border: 0;
}
.catalog-items-list .catalog-list-item > * { width: 100%; }

/* карточка товара приводится к виду карточки макета */
.catalog-items-list .item-wrap {
    position: relative;
    display: flex; flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    padding: 0 0 14px;
}
.catalog-items-list .item-wrap:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); }

.catalog-items-list .item-wrap .image-wrap { order: 1; display: block; overflow: hidden; }
.catalog-items-list .item-wrap .image-wrap .image {
    height: 180px; width: 100%;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    transition: transform .45s ease;
}
.catalog-items-list .item-wrap:hover .image-wrap .image { transform: scale(1.06); }

.catalog-items-list .item-wrap .title-description-wrap-list { order: 2; padding: 14px 16px 0; }
.catalog-items-list .item-wrap .title-description-wrap-list hr { display: none; }
.catalog-items-list .item-wrap .vendor-code { font-size: 13px; color: var(--muted); }
.catalog-items-list .item-wrap .title-wrap h3 { margin: 4px 0 0; }
.catalog-items-list .item-wrap .title-wrap .title {
    font-family: 'PT Sans', Arial, sans-serif;
    font-size: 15px; font-weight: 700; line-height: 1.3;
    color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
}
.catalog-items-list .item-wrap .title-wrap .title:hover { color: var(--orange-dk); }

.catalog-items-list .item-wrap .text-block { order: 3; padding: 10px 16px 0; flex: 1; }
.catalog-items-list .item-wrap .description-label { font-size: 13px; color: var(--muted); }
.catalog-items-list .item-wrap .stock-value { font-size: 13px; color: var(--muted); margin-top: 6px; }
.catalog-items-list .item-wrap .price {
    font: 700 18px/1 Oswald, 'Arial Narrow', sans-serif;
    color: var(--ink); white-space: nowrap;
}
.catalog-items-list .item-wrap .old-price { font-size: 14px; color: var(--muted); text-decoration: line-through; margin-left: 8px; }
.catalog-items-list .item-wrap .price-wrap { margin-top: 10px; }
.catalog-items-list .item-wrap .products-price__request { font-size: 15px; color: var(--orange); }

.catalog-items-list .item-wrap .actions-wrap,
.catalog-items-list .item-wrap .actions-block { order: 4; padding: 12px 16px 0; }

.catalog-items-list .item-wrap .discount-wrap {
    position: absolute; top: 10px; left: 10px; z-index: 2;
}
.catalog-items-list .item-wrap .discount {
    background: var(--orange); color: #fff; border-radius: 2px;
    font: 700 13px/1 Oswald, 'Arial Narrow', sans-serif; padding: 6px 9px;
}

/* кнопки покупки */
button.buy-item, button.add-to-cart, .catalog-items-list .item-wrap button.instant-order {
    background: var(--orange); color: #fff; border: 1px solid var(--orange);
    border-radius: 2px; font: 600 14px/1 Oswald, 'Arial Narrow', sans-serif;
    text-transform: uppercase; letter-spacing: .4px; padding: 12px 18px;
    min-height: 44px; cursor: pointer;
}
button.buy-item:hover, button.add-to-cart:hover {
    background: var(--orange-dk); border-color: var(--orange-dk);
}

/* ============ 12. КАРТОЧКА ТОВАРА ============ */
.catalog-item-page h1 {
    font-family: Oswald, 'Arial Narrow', Impact, sans-serif;
    text-transform: uppercase; font-weight: 700;
    font-size: clamp(24px, 3vw, 34px); color: var(--ink);
}
.catalog-item-page .price { font: 700 26px/1 Oswald, 'Arial Narrow', sans-serif; color: var(--ink); }
.catalog-item-page table th { background: var(--gray); font-weight: 700; }
.catalog-item-page table th, .catalog-item-page table td { border: 1px solid var(--line); padding: 10px 12px; }

/* ============ 13. БЛОК "О КОМПАНИИ" ============ */
.index-about { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; padding: 26px 0; }
.index-about_img { flex: 0 0 auto; max-width: 260px; }
.index-about_img img { max-width: 100%; height: auto; }
.index-about_text { flex: 1 1 420px; min-width: 0; }
.index-about_text ul { list-style: none; padding: 0; margin: 10px 0; }
.index-about_text li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* ============ 14. ПОДВАЛ ============ */
.ftr { background: var(--ink-dk); color: #b3b3b3; font-size: 13px; margin-top: 36px; }
.ftr__in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px clamp(16px, 4vw, 48px); max-width: 1400px; margin: 0 auto; }
.ftr a { color: #ddd; text-decoration: none; }
.ftr a:hover { color: #fff; text-decoration: underline; }

/* ============ 15. АДАПТИВ ============ */
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .catalog-category-list, .catalog-items-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .burger { display: block; }
    .nav__list { display: none; }
    .nav.is-open .nav__list { display: block; padding-bottom: 8px; }
    .nav.is-open .nav__link { padding: 14px 18px; border-bottom: 1px solid #d3d3d3; font-size: 15px; }
    .hdr__in { padding: 12px clamp(16px, 4vw, 48px); gap: 10px; }
    .hdr__brand { flex: 1 1 100%; align-items: flex-start; flex-direction: column; gap: 8px; }
    .hdr__logo { height: 56px; }
    .hdr__addr { font-size: 15px; }
    .hdr__contact { flex: 1 1 100%; justify-content: space-between; }
    .hdr__phones { text-align: left; font-size: 16px; }
    .hdr__sika { height: 52px; }
    .grid, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .catalog-category-list, .catalog-items-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card__media img, .card__noimg { height: 140px; }
    .catalog-items-list .item-wrap .image-wrap .image { height: 140px; }
    .hero__media img { height: 220px; }
    .index-about_img { max-width: 180px; }
}
@media (max-width: 420px) {
    .hdr__addr { font-size: 14px; }
    .grid, .grid--3 { gap: 10px; }
    .catalog-category-list, .catalog-items-list { gap: 10px; }
    .card__title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; }
    .card__media img, .catalog-items-list .item-wrap .image-wrap .image { transition: none; }
}

body.is-locked { overflow: hidden; }
