/* Banner / ad network styles (shared by site and admin preview).
   RULE: every banner has the same box — 1280×200 (aspect 6.4:1) — in every slot and variant.
   No container-query units: works on old iOS Safari too. */
.hb-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 32px; }
.hb-slot { position: relative; width: 100%; max-width: 630px; margin: 0 auto 32px; }
.hb-pair .hb-slot { max-width: none; margin: 0; min-width: 0; }
.hb-slide { display: none; }
.hb-slide.anim { }
.hb-slide.is-active { display: block; }
@-webkit-keyframes adFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes adFade { from { opacity: 0; } to { opacity: 1; } }
.hb-dots { display: flex; justify-content: center; align-items: center; gap: 6px; height: 14px; margin-top: 8px; }
.hb-dots button { -webkit-appearance: none; appearance: none; display: block; flex: 0 0 auto; width: 7px; height: 7px; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 4px; font-size: 0; line-height: 0; background: #cbd5e1; cursor: pointer; transition: width .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.hb-dots button.is-active { width: 18px; background: var(--primary-color, #3b66f5); }
.hb-dots button:focus { outline: none; }
.hb-dots button:focus-visible { outline: 2px solid var(--primary-color, #3b66f5); outline-offset: 2px; }

/* The box: fixed 6.4:1. padding-top fallback for Safari < 15 (no aspect-ratio). */
.hb { position: relative; display: block; width: 100%; border-radius: 16px; overflow: hidden; text-decoration: none !important; color: inherit; transition: transform .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.hb::before { content: ''; display: block; padding-top: 15.625%; } /* 200 / 1280 */
.hb-inner { position: absolute; inset: 0; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 0 22px; }
a.hb:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,23,42,.14); }
.hb-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.hb-title { font-weight: 800; font-size: 1.1rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-sub { font-size: .84rem; opacity: .85; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-btn { flex: 0 0 auto; padding: 9px 16px; border-radius: 11px; font-weight: 800; font-size: .86rem; line-height: 1.1; white-space: nowrap; }
.hb-img { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 14px; object-fit: cover; }
.hb-label { position: absolute; top: 5px; right: 10px; font-size: 9px; line-height: 1; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; opacity: .5; z-index: 2; }
.hb-empty { width: 100%; text-align: center; font-weight: 700; color: #94a3b8; font-size: .85rem; }

/* Variants */
.hb-image { background: #0f172a; }
.hb-image .hb-inner { padding: 0; }
.hb-image img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; }
/* any aspect ratio fits whole: the gaps are filled with a blurred copy of the same image */
.hb-blur { position: absolute; inset: -20px; z-index: 0; background-size: cover; background-position: center; filter: blur(18px) saturate(1.15) brightness(.8); transform: scale(1.1); }
.hb-image .hb-label { z-index: 2; }
.hb-image .hb-label { color: #fff; opacity: .8; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.hb-image.is-empty { background: #f1f3f8; border: 2px dashed #cbd5e1; }

.hb-gradient { background: linear-gradient(120deg, var(--primary-color, #3b66f5), #1e3bb3 60%, #7c3aed); color: #fff; }
.hb-gradient .hb-btn { background: #fff; color: var(--primary-color, #3b66f5); }

.hb-dark { background: radial-gradient(circle at 85% 50%, rgba(217,70,239,.45), transparent 45%), linear-gradient(110deg, #1a1033, #2a0f45 55%, #3b0d4f); color: #fff; box-shadow: inset 0 0 0 1px rgba(217,70,239,.25); }
.hb-dark .hb-title { color: #fff; }
@supports (-webkit-background-clip: text) {
  .hb-dark .hb-title { background: linear-gradient(90deg, #fff, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.hb-dark .hb-btn { background: linear-gradient(135deg, #ec4899, #a855f7); color: #fff; box-shadow: 0 6px 18px rgba(236,72,153,.35); }

.hb-light { background: #fff; color: #1a1d23; box-shadow: inset 0 0 0 2px var(--primary-color, #3b66f5); }
.hb-light .hb-title { color: var(--primary-color, #3b66f5); }
.hb-light .hb-btn { background: var(--primary-color, #3b66f5); color: #fff; }

.hb-gold { background: linear-gradient(120deg, #fff7d6, #ffe08a 50%, #ffc53d); color: #3d2b00; box-shadow: inset 0 0 0 1px #f5c542; }
.hb-gold .hb-btn { background: #1a1d23; color: #ffd84d; }

/* Two banners side by side get narrower — compact the text */
@media (max-width: 1240px) {
  .hb-pair .hb-inner { gap: 10px; padding: 0 16px; }
  .hb-pair .hb-title { font-size: .98rem; }
  .hb-pair .hb-sub { font-size: .78rem; }
  .hb-pair .hb-img { width: 46px; height: 46px; border-radius: 12px; }
  .hb-pair .hb-btn { padding: 7px 12px; font-size: .78rem; }
}
@media (max-width: 1000px) {
  .hb-pair .hb-sub { display: none; }
}
@media (max-width: 860px) {
  .hb-pair { grid-template-columns: 1fr; gap: 12px; }
  .hb-slot { max-width: none; }
  .hb-pair .hb-sub { display: block; }
}
/* Phones: the SAME banner (same image, same 6.4:1 shape), aligned with the page content, nothing cropped */
@media (max-width: 600px) {
  .hb-pair, .hb-slot { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
  .hb-pair { gap: 10px; grid-template-columns: 1fr; }
  .hb { border-radius: 12px; }
  .hb-dots { margin-top: 6px; }
  .hb-inner, .hb-pair .hb-inner { gap: 10px; padding: 0 16px; }
  .hb-title, .hb-pair .hb-title { font-size: 14px; }
  .hb-sub, .hb-pair .hb-sub { display: none; }
  .hb-img, .hb-pair .hb-img { width: 38px; height: 38px; border-radius: 10px; }
  .hb-btn, .hb-pair .hb-btn { padding: 7px 11px; font-size: 12px; border-radius: 9px; }
  .hb-label { top: 4px; right: 8px; font-size: 7px; }
}
@media (max-width: 360px) {
  .hb-title, .hb-pair .hb-title { font-size: 13px; }
  .hb-img, .hb-pair .hb-img { display: none; }
}

/* v11: ad places */
.hb-pair-single { grid-template-columns: minmax(0, 630px); justify-content: center; }
.grid-hb { grid-column: 1 / -1; margin: 6px 0 4px; }
.grid-hb .hb-slot, .page-hb .hb-slot { margin-bottom: 0; }
.products-section > .grid-hb { margin-top: 22px; }
.page-hb { max-width: 900px; margin: 0 auto 30px; }
.page-hb:empty { display: none; }
.garant + .page-hb { max-width: 1040px; }

/* image banners never get inner padding (it shrank the picture on phones / narrow screens) */
.hb.hb-image .hb-inner, .hb-pair .hb.hb-image .hb-inner { padding: 0 !important; gap: 0; }
