/* Главная страница — редизайн по Claude Design «Главная.dc.html».
   Палитра (--hm-*) и стили шапки — в общем design/chrome.css. */

html, body {
    margin: 0;
    padding: 0;
    background: var(--hm-bg);
    color: var(--hm-ink);
    font-family: 'Gilroy', 'Inter Tight', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.hm * { box-sizing: border-box; }
.hm a { color: inherit; text-decoration: none; }
.hm ::placeholder { color: var(--hm-mute-2); }
.hm .mono { font-family: 'JetBrains Mono', monospace; }

@keyframes hm-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes hm-pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.hm { min-height: 100vh; display: flex; flex-direction: column; background: var(--hm-bg); }

/* ---------- Hero ---------- */
.hm-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--hm-line); background: var(--hm-ink); }
.hm-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hm-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 14, 20, .62), rgba(11, 14, 20, .55) 55%, rgba(11, 14, 20, .72)); pointer-events: none; }
/* Отступ сверху учитывает фиксированную шапку (new-header), лежащую поверх hero. */
.hm-hero-inner { position: relative; padding-top: 170px; padding-bottom: 72px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hm-hero h1 {
    margin: 0;
    font-family: 'Xolonium', 'Gilroy', 'Inter Tight', sans-serif;
    font-size: clamp(30px, 4.2vw, 50px);
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: .01em;
    max-width: 900px;
    color: #FFFFFF;
    text-shadow: 0 2px 24px rgba(11, 14, 20, .4);
}
.hm-hero h1 .accent { color: var(--hm-yellow); white-space: nowrap; }
.hm-hero-lead {
    margin: 20px 0 0;
    max-width: 620px;
    font-size: 17px;
    line-height: 1.6;
    color: #E3E3DE;
    animation: hm-fade-up .5s ease .08s both;
    text-shadow: 0 1px 12px rgba(11, 14, 20, .5);
}
.hm-search-block { margin-top: 36px; width: 100%; max-width: 720px; animation: hm-fade-up .5s ease .16s both; }
.hm-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    margin-bottom: 20px;
}
.hm-tabs button {
    padding: 8px 18px;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    font-family: 'Gilroy', 'Inter Tight', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    transition: all .15s;
    background: transparent;
    color: rgba(255, 255, 255, .85);
}
.hm-tabs button.active { background: #FFFFFF; color: var(--hm-ink); box-shadow: 0 1px 3px rgba(17, 17, 17, .1); }
.hm-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    border: 1px solid #E3E3DE;
    border-radius: 16px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 24px 48px -24px rgba(17, 17, 17, .18);
    transition: border-color .2s, box-shadow .2s;
}
.hm-search:focus-within { border-color: var(--hm-yellow); }
.hm-search svg { flex: none; }
.hm-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Gilroy', 'Inter Tight', sans-serif;
    font-size: 16px;
    color: var(--hm-ink);
    min-width: 60px;
    height: 44px;
}
.hm-search button {
    flex: none;
    height: 44px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
    background: var(--hm-ink);
    color: #FFFFFF;
    font-family: 'Gilroy', 'Inter Tight', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 11px;
    transition: transform .15s, background .15s, color .15s;
}
.hm-search button:hover { background: #000000; color: var(--hm-yellow); transform: translateY(-1px); }
.hm-chips { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hm-chips a {
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: #FFFFFF;
    transition: all .15s;
}
.hm-chips a:hover { border-color: var(--hm-yellow); color: var(--hm-yellow); background: rgba(17, 17, 17, .4); }
.hm-stats {
    margin-top: 52px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(17, 17, 17, .45);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    animation: hm-fade-up .5s ease .24s both;
}
.hm-stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 36px; }
.hm-stat + .hm-stat { border-left: 1px solid rgba(255, 255, 255, .14); }
.hm-stat b { font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 600; color: var(--hm-yellow); }
.hm-stat span { font-size: 12.5px; color: #E3E3DE; }

/* ---------- CTA-баннер «закупки» ---------- */
.hm-band { margin-top: 72px; }
.hm-band-card { position: relative; overflow: hidden; border-radius: 24px; background: var(--hm-ink); }
.hm-band-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hm-band-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 14, 20, .55), rgba(11, 14, 20, .72)); pointer-events: none; }
.hm-band-content {
    position: relative;
    padding: 64px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.hm-band-content h2 {
    margin: 0;
    font-family: 'Xolonium', 'Gilroy', 'Inter Tight', sans-serif;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
    max-width: 780px;
    color: #FFFFFF;
    text-shadow: 0 2px 20px rgba(11, 14, 20, .5);
}
.hm-band-content p {
    margin: 16px 0 0;
    max-width: 660px;
    font-size: 15.5px;
    line-height: 1.6;
    color: #E3E3DE;
    text-shadow: 0 1px 12px rgba(11, 14, 20, .5);
}
.hm-band-actions { margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hm-band-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: 12px;
    border: none;
    background: #FFFFFF;
    color: var(--hm-ink);
    font-size: 15px;
    font-weight: 700;
    transition: all .15s;
}
.hm-band-btn:hover { background: var(--hm-yellow); color: var(--hm-ink); transform: translateY(-1px); }
.hm-band-btn.main {
    padding: 16px 36px;
    background: var(--hm-yellow);
    color: var(--hm-ink);
    font-size: 16.5px;
    font-weight: 800;
    box-shadow: 0 18px 40px -14px rgba(248, 199, 0, .45);
}
.hm-band-btn.main:hover { background: #FFDE55; transform: translateY(-2px); }
@media (max-width: 700px) {
    .hm-band-content { padding: 40px 20px; }
    .hm-band-actions { flex-direction: column; width: 100%; }
    .hm-band-btn { width: 100%; max-width: 360px; }
    .hm-band-btn.main { order: -1; }
}

/* ---------- Секции ---------- */
.hm-section { padding-top: 72px; }
.hm-section:last-of-type { padding-bottom: 88px; }
.hm-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.hm-section-head h2 { margin: 0; font-family: 'Xolonium', 'Gilroy', 'Inter Tight', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.hm-section-head p { margin: 6px 0 0; font-size: 14.5px; color: var(--hm-mute); }
.hm-section-head .more {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--hm-fill);
    border: 1px solid var(--hm-line);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--hm-ink);
    transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.hm-section-head .more:hover {
    background: var(--hm-yellow);
    border-color: var(--hm-yellow);
    color: var(--hm-ink);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -12px rgba(17, 17, 17, .35);
}

.hm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; }
.hm-grid-products { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hm-grid-suppliers { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.hm-empty { background: #FFFFFF; border: 1px solid var(--hm-line); border-radius: 16px; padding: 28px; color: var(--hm-mute); font-size: 14px; }
.hm-empty a { color: var(--hm-soft); text-decoration: underline; text-underline-offset: 2px; }
.hm-empty a:hover { color: var(--hm-gold); }

/* Плашки */
.hm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--hm-fill); color: var(--hm-soft); font-size: 12px; font-weight: 600; white-space: nowrap; }
.hm-pill.st-open { background: var(--hm-green-bg); color: var(--hm-green); }
.hm-pill.st-open .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hm-green); animation: hm-pulse-dot 2s ease-in-out infinite; }
.hm-pill.st-review { background: var(--hm-blue-bg); color: var(--hm-blue); }
.hm-pill.st-fail { background: #FDF0EF; color: #C0392B; }

/* Карточка закупки */
.hm-trade-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--hm-line);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.hm-trade-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(17, 17, 17, .18); border-color: var(--hm-line-dark); }
.hm-trade-card .pills { padding: 20px 22px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-trade-card .body { padding: 14px 22px 16px; }
.hm-trade-card .num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--hm-mute); }
.hm-trade-card h3 { margin: 6px 0 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.hm-trade-card .org { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--hm-soft); }
.hm-trade-card .foot {
    margin-top: auto;
    padding: 14px 22px;
    border-top: 1px solid var(--hm-line-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.hm-trade-card .when { display: flex; flex-direction: column; gap: 2px; }
.hm-trade-card .when small { font-size: 11.5px; color: var(--hm-mute); font-weight: 500; }
.hm-trade-card .when b { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; color: var(--hm-soft); }
.hm-trade-card .when b.live { color: var(--hm-green); }
.hm-btn-mini { flex: none; padding: 8px 16px; background: var(--hm-fill); color: var(--hm-soft); font-size: 13px; font-weight: 700; border-radius: 9px; }
.hm-btn-mini.accent { background: var(--hm-yellow); color: var(--hm-ink); }

/* CTA-карточка «Запрос оферт» */
.hm-cta-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--hm-ink);
    border-radius: 16px;
    overflow: hidden;
    padding: 22px;
    color: #FFFFFF;
}
.hm-cta-card .dots { position: absolute; inset: 0; background-image: radial-gradient(#FFFFFF 0.8px, transparent 0.8px); background-size: 22px 22px; opacity: .07; }
.hm-cta-card .tag {
    position: relative;
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(248, 199, 0, .15);
    color: var(--hm-yellow);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}
.hm-cta-card h3 { position: relative; margin: 14px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: #FFFFFF; }
.hm-cta-card p { position: relative; margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--hm-mute-2); }
.hm-cta-card .act { position: relative; margin-top: 20px; }
.hm-cta-card .act a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--hm-yellow);
    color: var(--hm-ink);
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 10px;
    transition: transform .15s;
}
.hm-cta-card .act a:hover { transform: translateY(-1px); }

/* Карточка товара */
.hm-product-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--hm-line);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
}
.hm-product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(17, 17, 17, .16); }
.hm-product-card .body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.hm-product-card .price { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.hm-product-card .price small { font-size: 12.5px; font-weight: 500; color: var(--hm-mute); }
.hm-product-card .name { font-size: 13.5px; font-weight: 500; line-height: 1.4; color: var(--hm-ink); }
.hm-product-card .firm { font-size: 12px; color: var(--hm-mute); }

/* Карточка поставщика */
.hm-supplier-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    background: #FFFFFF;
    border: 1px solid var(--hm-line);
    border-radius: 16px;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.hm-supplier-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(17, 17, 17, .16); border-color: var(--hm-line-dark); }
.hm-supplier-card .top { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hm-supplier-card .top b { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--hm-ink); }
.hm-supplier-card .top small { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--hm-mute); }
.hm-supplier-card .badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-supplier-card .badges .hm-pill { font-size: 11.5px; }
.hm-badge-ok { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--hm-green-bg); color: var(--hm-green); font-size: 11.5px; font-weight: 600; }
.hm-badge-cta { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: #FFFDF2; border: 1px solid #F0E4AE; color: var(--hm-gold); font-size: 11.5px; font-weight: 600; }
.hm-supplier-card .foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--hm-line-2); padding-top: 12px; margin-top: auto; }
.hm-supplier-card .foot .city { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--hm-soft); }
.hm-supplier-card .foot .cnt { font-size: 12.5px; font-weight: 600; color: var(--hm-soft); }

/* ---------- Футер ---------- */
.hm-footer { margin-top: auto; background: var(--hm-ink); color: var(--hm-mute-2); }
.hm-footer-grid { padding-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px; }
.hm-footer .brand-row { display: flex; align-items: center; gap: 10px; }
.hm-footer .brand-row img { height: 30px; filter: grayscale(1) brightness(1.6); }
.hm-footer .brand-row b { font-weight: 800; font-size: 15px; letter-spacing: .02em; color: #FFFFFF; }
.hm-footer .about { margin: 14px 0 0; font-size: 13px; line-height: 1.6; max-width: 280px; color: var(--hm-mute); }
.hm-footer-col { display: flex; flex-direction: column; gap: 10px; }
.hm-footer-col span { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--hm-soft); }
.hm-footer-col a { font-size: 13.5px; color: var(--hm-mute-2); transition: color .15s; }
.hm-footer-col a:hover { color: var(--hm-yellow); }
.hm-footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid #2A2A2A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.hm-footer-bottom .copy { font-size: 12.5px; color: var(--hm-soft); }
.hm-footer-bottom .mono { font-size: 11.5px; color: var(--hm-soft); }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
    .hm-hero-inner { padding-top: 110px; padding-bottom: 48px; }
    .hm-stat { padding: 14px 20px; }
    .hm-section { padding-top: 48px; }
    .hm-section:last-of-type { padding-bottom: 56px; }
    .hm-section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .hm-grid, .hm-grid-products, .hm-grid-suppliers { grid-template-columns: 1fr; }
    .hm-footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
