/* HAP-HAL homepage pixel-fix v20260604-fix
   Точечные исправления поверх pixel-match pack:
   — hero крупнее, правильные пропорции
   — категории 4×2 с полноэкранными фото
   — популярные товары <img>-карточки
   — CTA крупнее
   — trust в обёртке */

:root {
  --ref-green:    #073b26;
  --ref-green-2:  #0e4b32;
  --ref-cream:    #f4eee2;
  --ref-cream-2:  #fbf6ec;
  --ref-border:   #dfd3bf;
  --ref-brown:    #6f4b2e;
  --ref-text:     #133b2a;
  --ref-ink:      #243229;
  --ref-muted:    #6d7169;
  --ref-gold:     #b48a43;
  --ref-shadow:   0 8px 24px rgba(38,31,20,.09);
  --ref-container:1180px;
}

/* ── Header (только home) ── */
.hh-topbar {
  min-height: 64px !important;
  height:     64px !important;
  background: var(--ref-green) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  padding: 0 28px !important;
  color: #efe6cf !important;
}
.hh-brand { width: 215px !important; gap: 10px !important; color: #ecd9ae !important; }
.hh-brand img { width: 36px !important; height: 36px !important; }
.hh-brand-name { font-size: 26px !important; line-height: .9 !important; color: #ecd9ae !important; }
.hh-brand-sub  { font-size: 8px  !important; letter-spacing: 2.5px !important; color: #c9b483 !important; }
.hh-nav { gap: 28px !important; font-size: 13px !important; margin-left: 20px !important; }
.hh-nav a, .hh-act { color: #eee1c8 !important; }
.hh-nav a:hover, .hh-act:hover { color: #fff !important; }
.hh-header-actions { gap: 20px !important; }
.hh-cart-badge { background: #c8ad7b !important; color: var(--ref-green) !important; }

/* ── Page wrapper ── */
body { background: var(--ref-cream) !important; }
.hh-ref-page {
  max-width: var(--ref-container);
  margin: 0 auto;
  padding: 0 12px;
  color: var(--ref-ink);
  font-family: var(--font-sans, Inter, Arial, sans-serif);
}

/* ══ HERO ═══════════════════════════════════════════════════════ */
.hh-ref-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 460px;
  min-height: 300px;
  background: linear-gradient(90deg, var(--ref-cream-2) 0%, #f2eadb 55%, #efe2ce 100%);
  border: 1px solid var(--ref-border);
  border-top: 0;
  overflow: hidden;
}
.hh-ref-hero__text {
  z-index: 2;
  padding: 40px 0 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hh-ref-hero__text h1 {
  font-family: var(--font-serif, Georgia, serif);
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1.06;
  color: var(--ref-text);
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -.3px;
  white-space: pre-line;
}
.hh-ref-hero__text p {
  max-width: 440px;
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #4e5f53;
}
.hh-ref-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hh-ref-btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid rgba(14,75,50,.22);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.hh-ref-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.hh-ref-btn--green { background: var(--ref-green); color: #fff !important; border-color: var(--ref-green); }
.hh-ref-btn--light { background: rgba(255,255,255,.55); color: var(--ref-text) !important; }
.hh-ref-hero__image {
  background-image: linear-gradient(90deg, rgba(244,238,226,.28), rgba(244,238,226,0)),
                    url('/static/images/home/hero-reference.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center right;
  min-height: 300px;
}

/* ══ AUDIENCE ════════════════════════════════════════════════════ */
.hh-ref-audience {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0 16px;
}
.hh-ref-aud {
  min-height: 82px;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(217,205,184,.9);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ref-ink);
  box-shadow: 0 5px 16px rgba(41,31,18,.06);
  transition: transform .15s, box-shadow .15s;
}
.hh-ref-aud:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(41,31,18,.1); }
.hh-ref-aud__icon {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #f2e1b8;
  background: var(--ref-green);
}
.hh-ref-aud--business .hh-ref-aud__icon { background: #9b6a3d; }
.hh-ref-aud--supplier .hh-ref-aud__icon { background: #5a7282; }
.hh-ref-aud__body { display: block; min-width: 0; }
.hh-ref-aud__body b {
  display: block;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 15px; line-height: 1.2; color: #2b312b; margin-bottom: 4px;
}
.hh-ref-aud__body small {
  display: block; font-size: 11px; line-height: 1.4; color: #546057; margin-bottom: 5px;
}
.hh-ref-aud__body em {
  font-style: normal; font-size: 11px; font-weight: 700; color: var(--ref-green);
}

/* ══ MID (категории + популярные) ════════════════════════════════ */
.hh-ref-mid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 16px;
}

/* Каталог — 4 колонки, 2 ряда */
.hh-ref-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.hh-ref-cat {
  position: relative;
  height: 120px;
  background-color: #f1e8d8;
  border: 1px solid #dfd2be;
  border-radius: 12px;
  overflow: hidden;
  color: #1d2c22;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.hh-ref-cat:hover { transform: translateY(-2px); box-shadow: var(--ref-shadow); }
.hh-ref-cat__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #e8dcca;
  opacity: .95;
}
.hh-ref-cat__name {
  position: absolute;
  z-index: 2;
  bottom: 0; left: 0; right: 0;
  padding: 9px 12px;
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
}

/* Тематические товары — пролёт на всю ширину */
.hh-ref-themed {
  grid-column: 1 / -1;
  padding: 12px 16px;
  border: 1px solid #dfd2be;
  border-radius: 10px;
  background: #fbf5e8;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hh-ref-themed b {
  font-size: 12px; color: #213226; margin-right: 4px; white-space: nowrap;
}
.hh-ref-themed a {
  display: inline-flex; align-items: center; gap: 4px;
  color: #33463a; text-decoration: none;
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
  border: 1px solid #d6c8ae; background: rgba(255,255,255,.6);
}
.hh-ref-themed a:hover { color: var(--ref-green); border-color: var(--ref-green); }

/* ══ POPULAR ══════════════════════════════════════════════════════ */
.hh-ref-popular {
  background: rgba(255,255,255,.5);
  border: 1px solid #dfd2be;
  border-radius: 12px;
  padding: 14px 16px 16px;
}
.hh-ref-section-title {
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 700; font-size: 17px; color: #1e2d24;
  margin-bottom: 12px;
}
.hh-ref-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.hh-ref-product {
  position: relative;
  display: flex; flex-direction: column;
  background: #fffaf1;
  border: 1px solid #e1d5c1;
  border-radius: 12px;
  color: #1e2d24;
  text-decoration: none;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.hh-ref-product:hover { transform: translateY(-2px); box-shadow: var(--ref-shadow); }
.hh-ref-product__wish {
  position: absolute; top: 7px; right: 7px;
  width: 22px; height: 22px; z-index: 2;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.82); color: #8b7863;
  font-size: 13px; line-height: 22px; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
/* img-карточка */
.hh-ref-product__img {
  display: block; height: 110px;
  background-color: #e8dcca;
  overflow: hidden; flex-shrink: 0;
}
.hh-ref-product__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hh-ref-product__name {
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 10px 12px 4px;
  font-size: 12px; line-height: 1.3; font-weight: 700; color: #1e2d24;
  min-height: 32px;
}
.hh-ref-product__price {
  display: block;
  margin: 0 12px 12px;
  font-size: 14px; font-weight: 900; color: #0e3b26;
}

/* ══ CTA ROW ══════════════════════════════════════════════════════ */
.hh-ref-cta-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  margin: 0 0 16px;
}
.hh-ref-cta {
  min-height: 200px;
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-start;
  overflow: hidden;
  padding: 22px 24px 20px;
  border-radius: 16px;
  border: 1px solid rgba(210,196,170,.9);
  color: #203128;
  text-decoration: none;
  background: linear-gradient(120deg, rgba(251,247,239,.97), rgba(234,220,197,.9));
  transition: transform .15s, box-shadow .15s;
}
.hh-ref-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(38,31,20,.12); }
.hh-ref-cta b {
  display: block;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 20px; line-height: 1.15; margin-bottom: 8px;
}
.hh-ref-cta small {
  display: block; max-width: 360px;
  color: #536258; font-size: 12px; line-height: 1.45;
}
.hh-ref-cta strong {
  align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 14px;
  border-radius: 6px;
  background: var(--ref-green); color: #fff;
  font-size: 11px;
}
.hh-ref-cta--wholesale { background: #f6f0e0; }
.hh-ref-cta--custom    { background: linear-gradient(110deg, #f7eddc 0%, #f5ead6 55%, rgba(255,255,255,.15) 100%); }
.hh-ref-cta--supplier  { background: linear-gradient(110deg, #eef2f2 0%, #f4ede1 100%); }
.hh-ref-mini-icons {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 12px 0 10px;
}
.hh-ref-mini-icons i { font-style: normal; font-size: 18px; color: var(--ref-green); }
.hh-ref-mini-icons em { display: block; font-style: normal; color: #3b4d42; font-size: 9px; line-height: 1.2; }

/* ══ TRUST STRIP ══════════════════════════════════════════════════ */
.hh-ref-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 4px;
  background: rgba(255,255,255,.52);
  border: 1px solid #d7c8b2;
  border-radius: 14px;
  overflow: hidden;
}
.hh-ref-trust div {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px; align-items: center;
  padding: 16px 18px;
  border-right: 1px solid #e0d0ba;
}
.hh-ref-trust div:last-child { border-right: 0; }
.hh-ref-trust span { grid-row: 1 / span 2; font-size: 22px; color: #936b3e; }
.hh-ref-trust b     { font-size: 12px; color: #1f2d24; }
.hh-ref-trust small { font-size: 10px; color: #677065; }

/* ── Footer overrides ── */
.hh-footer {
  background: #0d3328 !important;
  color: #e9efe8 !important;
  margin-top: 16px !important;
}
.hh-footer a { color: rgba(255,255,255,.76) !important; }
.hh-footer a:hover { color: #d8b56d !important; }
.hh-foot-col h4 { color: #d8b56d !important; }
.hh-footer-bottom { border-top-color: rgba(255,255,255,.12) !important; color: #b5a882 !important; }
.hh-footer-inner { gap: 32px !important; }

/* ══ RESPONSIVE ═══════════════════════════════════════════════════ */
@media (max-width: 1180px) {
  .hh-ref-page { padding-inline: 10px; }
  .hh-ref-hero { grid-template-columns: 1fr 380px; }
  .hh-ref-products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .hh-ref-hero { grid-template-columns: 1fr; }
  .hh-ref-hero__text { padding: 28px 24px 24px; }
  .hh-ref-hero__image { min-height: 220px; }
  .hh-ref-audience { grid-template-columns: 1fr; gap: 10px; }
  .hh-ref-catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .hh-ref-themed { grid-column: 1 / -1; }
  .hh-ref-products { grid-template-columns: repeat(2, 1fr); }
  .hh-ref-cta-row { grid-template-columns: 1fr; }
  .hh-ref-trust { grid-template-columns: repeat(2, 1fr); border-radius: 0; }
  .hh-ref-trust div:nth-child(2) { border-right: 0; }
  .hh-ref-trust div:nth-child(3) { border-top: 1px solid #e0d0ba; }
}
@media (max-width: 560px) {
  .hh-ref-page { padding-inline: 0; }
  .hh-ref-hero { border-inline: 0; }
  .hh-ref-hero__text h1 { font-size: 28px; }
  .hh-ref-hero__actions { flex-direction: column; align-items: stretch; }
  .hh-ref-btn { width: 100%; }
  .hh-ref-hero__image { display: none; }
  .hh-ref-catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .hh-ref-cat { height: 100px; }
  .hh-ref-products { grid-template-columns: repeat(2, 1fr); }
  .hh-ref-product__img { height: 90px; }
  .hh-ref-trust { grid-template-columns: 1fr; }
  .hh-ref-trust div { border-right: 0; border-bottom: 1px solid #e0d0ba; }
  .hh-ref-trust div:last-child { border-bottom: 0; }
}
