/* Шапка AB (объединённое превью) — sticky, в потоке, не нужен padding-top у body */
body { padding-top: 0 !important; }
:root {
  --ab-blue: #009FED;
  --ab-blue-h: #0077c8;
  --ab-dark: #050E2C;
  --ab-text: #4B5563;
  --ab-gray: #F3F4F6;
}
.ab-header-wrapper {
  font-family: 'Manrope', sans-serif;
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(5, 14, 44, 0.04);
  transition: background 0.3s ease;
  /* Не прятать шапку при скролле — всегда видна */
  transform: none !important;
}
.ab-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}
.ab-header-main-wrap { position: relative; }
.ab-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.85rem;
  font-weight: 600;
}
.ab-top-nav { display: flex; gap: 24px; }
.ab-top-nav a { color: var(--ab-text); text-decoration: none; transition: color 0.2s; }
.ab-top-nav a:hover { color: var(--ab-blue); }

/* Блог — индикатор медиаплатформы */
.ab-top-nav__blog { position: relative; }
.ab-top-nav__blog::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ab-blue, #009FED);
  opacity: 0.85;
}
.ab-top-contacts { display: flex; gap: 20px; align-items: center; }
.ab-top-email { color: var(--ab-text); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.ab-top-email:hover { color: var(--ab-blue); }
.ab-top-phone { color: var(--ab-dark); font-weight: 800; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.ab-top-phone svg { width: 16px; height: 16px; fill: var(--ab-blue); }
.ab-main-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  transition: height 0.3s ease;
}
.ab-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 0;
  height: 44px;
  align-self: center;
}
.ab-logo__text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ab-blue);
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.2s;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
}
.ab-logo:hover .ab-logo__text { opacity: 0.85; }
.ab-catalog-trigger {
  display: inline-flex;
  flex-shrink: 0;
}
.ab-cat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  background: var(--ab-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}
.ab-cat-btn:hover { background: var(--ab-blue-h); box-shadow: 0 4px 12px rgba(0, 159, 237, 0.3); color: #fff; }
.ab-cat-burger { width: 16px; height: 12px; display: flex; flex-direction: column; justify-content: space-between; }
.ab-cat-burger span { display: block; width: 100%; height: 2px; background: #fff; border-radius: 2px; }
.ab-search {
  flex: 1;
  min-width: 0;
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
}
.ab-search input {
  width: 100%;
  height: 100%;
  border: 2px solid var(--ab-blue);
  border-radius: 10px;
  padding: 0 44px 0 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  transition: box-shadow 0.3s;
}
.ab-search input:focus { box-shadow: 0 0 0 3px rgba(0, 159, 237, 0.15); }
.ab-search button {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 30px;
  height: 30px;
  background: var(--ab-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@keyframes abShineRun { 0% { left: -120%; } 100% { left: 160%; } }
.ab-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ab-tool-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--ab-blue);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.42s cubic-bezier(0.65, 0, 0.076, 1), background 0.42s, box-shadow 0.42s, border-radius 0.3s;
}
.ab-tool-icon:hover {
  width: 120px;
  background: var(--ab-blue);
  box-shadow: 0 8px 28px rgba(0, 159, 237, 0.45);
  border-radius: 16px;
}
.ab-tool-aura {
  position: absolute;
  inset: -5px;
  border-radius: 20px;
  background: linear-gradient(135deg, #009FED, #00d4ff, #0077c8);
  opacity: 0;
  filter: blur(12px);
  z-index: -1;
  transition: opacity 0.42s;
  pointer-events: none;
}
.ab-tool-icon:hover .ab-tool-aura { opacity: 0.38; }
.ab-tool-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}
.ab-tool-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-15deg);
}
.ab-tool-icon:hover .ab-tool-shine::after {
  animation: abShineRun 0.55s ease-in-out forwards;
  animation-delay: 0.15s;
}
.ab-tool-label {
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: font-size 0.35s cubic-bezier(0.65, 0, 0.076, 1), top 0.42s cubic-bezier(0.65, 0, 0.076, 1), opacity 0.35s;
}
.ab-tool-icon:hover .ab-tool-label {
  font-size: 11px;
  top: 10px;
  opacity: 1;
}
.ab-tool-svg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.42s cubic-bezier(0.65, 0, 0.076, 1), width 0.42s, height 0.42s;
}
.ab-tool-icon:hover .ab-tool-svg {
  width: 36px;
  height: 36px;
  transform: translateX(-50%) translateY(55%);
}
.ab-tool-icon .ab-i {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: filter 0.3s;
}
.ab-tool-icon .ab-i--group { background-image: url("../icons/Group.png"); }
.ab-tool-icon .ab-i--heart { background-image: url("../icons/heart.png"); }
.ab-tool-icon .ab-i--cart { background-image: url("../icons/cart.png"); }
.ab-tool-icon:hover .ab-i { filter: brightness(0) invert(1); }
.ab-tool-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ab-blue);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  z-index: 6;
  border: 2px solid #fff;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.35s, border-color 0.35s, right 0.42s;
  pointer-events: none;
}
.ab-tool-icon:hover .ab-tool-badge {
  transform: scale(1.2) translateY(-2px);
  background: #fff;
  color: var(--ab-blue);
  border-color: var(--ab-blue);
  right: 10px;
}
.ab-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ab-cta-btn {
  height: 44px;
  padding: 0 20px;
  background: var(--ab-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.ab-cta-btn:hover { background: var(--ab-blue-h); transform: translateY(-1px); color: #fff; }
.ab-mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--ab-dark);
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.ab-mobile-menu-btn.is-open svg { transform: rotate(90deg); }
.ab-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  z-index: 1001;
  padding: 24px;
  padding-top: 80px;
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.ab-mobile-drawer.is-open { transform: translateX(0); }
.ab-mobile-drawer__nav { display: flex; flex-direction: column; gap: 4px; }
.ab-mobile-drawer__link {
  display: block;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ab-dark);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.ab-mobile-drawer__link:hover { background: var(--ab-gray); color: var(--ab-blue); }
.ab-mobile-drawer__contacts { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.08); }
.ab-mobile-drawer__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ab-dark);
  text-decoration: none;
}
.ab-mobile-drawer__phone svg { width: 20px; height: 20px; fill: var(--ab-blue); flex-shrink: 0; }
.ab-mobile-drawer__email { display: block; padding: 10px 0; font-size: 0.95rem; font-weight: 600; color: var(--ab-text); text-decoration: none; transition: color 0.2s; }
.ab-mobile-drawer__email:hover { color: var(--ab-blue); }
.ab-mobile-drawer__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.ab-mobile-drawer__overlay.is-open {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 1024px) {
  .ab-top-bar { display: none; }
  .ab-search { display: none; }
  .ab-main-bar { gap: 16px; justify-content: space-between; height: 56px; }
  .ab-cat-btn { display: none; }
  .ab-catalog-dropdown { display: none !important; }
  .ab-cta { display: none; }
  .ab-mobile-menu-btn { display: block; }
  .ab-logo img { height: 32px; max-width: 110px; }
  .ab-mobile-search-row {
    padding: 10px 20px;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: block !important;
  }
  .ab-mobile-search-row .ab-search { display: flex !important; height: 40px; }
  .ab-mobile-search-row .ab-search input { padding: 0 40px 0 14px; font-size: 0.9rem; }
}
@media (min-width: 1025px) {
  .ab-mobile-search-row { display: none !important; }
}
.ab-bottom-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid #eee;
  height: 60px;
  justify-content: space-around;
  align-items: center;
}
.ab-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ab-text);
  text-decoration: none;
  transition: color 0.2s;
}
.ab-tab-item.is-active { color: var(--ab-blue); }
@media (max-width: 768px) {
  .ab-tools { display: none; }
  .ab-bottom-tabs { display: flex; }
  body { padding-bottom: 80px; }
}

/* ===========================
   Трёхуровневый каталог AB
=========================== */
@media (min-width: 1025px) {
  .ab-catalog-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: var(--ab-cat-left, 20px);
    background: #ffffff;
    border: 2px solid var(--ab-blue);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 159, 237, 0.18);
    z-index: 1200;
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    transform-origin: top left;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.28s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
  }
  .ab-catalog-dropdown.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  .ab-catalog-inner {
    display: flex;
    flex-direction: row;
    min-width: 640px;
    max-width: 980px;
  }
  .ab-catalog-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 44px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 2px solid var(--ab-blue);
    border-top: 2px solid var(--ab-blue);
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
    z-index: 10;
  }

  /* L1 — слева */
  .panel-left {
    width: 260px;
    flex-shrink: 0;
    border-right: 1.5px solid rgba(0, 159, 237, 0.15);
    padding: 8px 0;
    overflow-y: auto;
    max-height: 72vh;
  }
  .panel-left::-webkit-scrollbar { width: 3px; }
  .panel-left::-webkit-scrollbar-thumb {
    background: rgba(0,159,237,0.25);
    border-radius: 99px;
  }
  .cat-l1 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
  }
  .cat-l1:hover,
  .cat-l1.active {
    background: rgba(0, 159, 237, 0.07);
  }
  .cat-l1.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    border-radius: 0 99px 99px 0;
    background: var(--ab-blue);
  }
  .cat-l1__icon {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ab-blue);
    flex-shrink: 0;
    opacity: 0.55;
    transition: opacity 0.2s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .cat-l1:hover .cat-l1__icon,
  .cat-l1.active .cat-l1__icon {
    opacity: 1;
    transform: scale(1.5);
  }
  .cat-l1__label {
    font-size: 0.98rem;
    font-weight: 600;
    color: #1e1e1e;
    line-height: 1.3;
    flex: 1;
  }
  .cat-l1:hover .cat-l1__label,
  .cat-l1.active .cat-l1__label {
    color: var(--ab-blue);
  }
  .cat-l1__arrow {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.18s ease;
  }
  .cat-l1__arrow svg {
    width: 12px;
    height: 12px;
    stroke: var(--ab-blue);
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .cat-l1:hover .cat-l1__arrow,
  .cat-l1.active .cat-l1__arrow {
    opacity: 1;
  }
  .cat-divider-left {
    height: 1px;
    background: rgba(0,159,237,0.08);
    margin: 3px 12px;
  }

  /* L2 — середина */
  .panel-mid {
    width: 280px;
    flex-shrink: 0;
    border-right: 1.5px solid rgba(0, 159, 237, 0.15);
    padding: 12px 0;
    overflow-y: auto;
    max-height: 72vh;
  }
  .panel-mid::-webkit-scrollbar { width: 3px; }
  .panel-mid::-webkit-scrollbar-thumb {
    background: rgba(0,159,237,0.25);
    border-radius: 99px;
  }
  .panel-mid-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ab-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 16px 10px;
    border-bottom: 1px solid rgba(0,159,237,0.12);
    margin-bottom: 6px;
  }
  .cat-panel {
    display: none;
    flex-direction: column;
  }
  .cat-panel.active {
    display: flex;
    animation: abCatalogPanelIn 0.2s ease forwards;
  }
  .panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    gap: 10px;
    color: #c0cdd8;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    padding: 0 16px;
  }
  .panel-empty svg {
    width: 32px;
    height: 32px;
    stroke: #d1dde6;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
  }
  .panel-empty--inside {
    min-height: 120px;
  }
  .cat-l2-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    cursor: pointer;
    position: relative;
    transition: background 0.16s ease, padding-left 0.16s ease;
  }
  .cat-l2-item:hover,
  .cat-l2-item.active {
    background: rgba(0,159,237,0.06);
    padding-left: 20px;
  }
  .cat-l2-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 2.5px;
    border-radius: 0 99px 99px 0;
    background: var(--ab-blue);
  }
  .cat-l2-item__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    border: 1.5px solid var(--ab-blue);
    background: transparent;
    flex-shrink: 0;
    transition: background 0.18s ease, transform 0.22s ease;
  }
  .cat-l2-item:hover .cat-l2-item__dot,
  .cat-l2-item.active .cat-l2-item__dot {
    background: var(--ab-blue);
    transform: scale(1.3);
  }
  .cat-l2-item__label {
    font-size: 0.98rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.35;
    flex: 1;
    text-decoration: none;
  }
  .cat-l2-item:hover .cat-l2-item__label,
  .cat-l2-item.active .cat-l2-item__label {
    color: var(--ab-blue);
  }
  .cat-l2-item__arrow {
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.18s ease;
  }
  .cat-l2-item__arrow svg {
    width: 10px;
    height: 10px;
    stroke: var(--ab-blue);
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .cat-l2-item:hover .cat-l2-item__arrow,
  .cat-l2-item.active .cat-l2-item__arrow {
    opacity: 1;
  }

  /* L3 — справа */
  .panel-right {
    width: 0;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
    max-height: 72vh;
    transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1),
                padding 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    overflow-y: auto;
  }
  .panel-right::-webkit-scrollbar { width: 3px; }
  .panel-right::-webkit-scrollbar-thumb {
    background: rgba(0,159,237,0.25);
    border-radius: 99px;
  }
  .panel-right.visible {
    width: 240px;
    padding: 12px 0;
  }
  .panel-right-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ab-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 16px 10px;
    border-bottom: 1px solid rgba(0,159,237,0.12);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .l3-panel {
    display: none;
    flex-direction: column;
    min-width: 200px;
  }
  .l3-panel.active {
    display: flex;
    animation: abCatalogPanelIn 0.2s ease forwards;
  }
  .cat-l3-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.16s ease, padding-left 0.16s ease;
    text-decoration: none;
  }
  .cat-l3-item:hover {
    background: rgba(0,159,237,0.05);
    padding-left: 20px;
  }
  .cat-l3-item__dash {
    font-size: 11px;
    color: var(--ab-blue);
    flex-shrink: 0;
    margin-top: 3px;
    opacity: 0.55;
  }
  .cat-l3-item__label {
    font-size: 0.95rem;
    font-weight: 400;
    color: #6b7280;
    transition: color 0.16s ease;
    line-height: 1.4;
  }
  .cat-l3-item:hover .cat-l3-item__label {
    color: var(--ab-blue);
  }

  @keyframes abCatalogPanelIn {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
  }
}
