/* ================================================================
   CATALOG COMPACT — Accordion + Lazy Category View
   GM Events Azerbaijan — equipment-rental.html
   ================================================================ */

/* ── Toolbar overrides for compact mode ── */
/* Accreditation banner — scrolls with page (NOT sticky) */
.accr-banner-wrap {
  background: #fff;
  border-bottom: 1px solid #e8edf3;
}
.accr-banner-wrap .container { padding-top: 16px; padding-bottom: 16px; }

/* Toolbar with search + filters — stays sticky on scroll */
.eq-toolbar {
  background: #fff;
  border-bottom: 1px solid #e8edf3;
  position: sticky;
  top: 56px; /* height of .site-header */
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  will-change: transform; /* GPU hint — eliminates sticky jank */
  backface-visibility: hidden; /* prevent sub-pixel repaint flicker */
}
.eq-toolbar .container { padding-top: 14px; padding-bottom: 0; }

/* ── Main category pill nav ── */
.eq-main-cats {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef1f5;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.eq-main-cats::-webkit-scrollbar { display:none; }

.eq-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  background: #fff;
  color: #475569;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.eq-main-btn:hover { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.eq-main-btn.active {
  background: linear-gradient(135deg, #0a1628, #1d4ed8);
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 4px 14px rgba(29,78,216,.28);
}
.eq-main-btn i { font-size: .8rem; }
.mcat-count {
  background: rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: .7rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}
.eq-main-btn:not(.active) .mcat-count { background: #f1f5f9; color: #64748b; }

/* ── Sub-filter row (hidden by default in compact, shown on demand) ── */
.eq-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  max-height: 0;
  overflow-y: hidden;
  opacity: 0;
  transition: max-height .35s ease, opacity .25s ease, padding .25s;
}
.eq-filter-row.visible {
  max-height: 80px;
  opacity: 1;
  padding-bottom: 12px;
}
.eq-filter-row::-webkit-scrollbar { display:none; }

/* ── Results info bar ── */
.eq-results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 12px;
  font-size: .8rem;
  color: #64748b;
}
.eq-results-info strong { color: #0f172a; }

/* ── Search bar ── */
.eq-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 480px;
}
.eq-search-wrap i { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:#94a3b8; font-size:.85rem; pointer-events:none; }
.eq-search-wrap input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: .88rem;
  outline: none;
  transition: border-color .2s;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}
.eq-search-wrap input:focus { border-color: #2563eb; }
.eq-clear-btn { position:absolute; right:10px; top:50%; transform:translateY(-50%); background:none; border:none; color:#94a3b8; font-size:1.1rem; cursor:pointer; display:none; }
.eq-clear-btn.visible { display:block; }

/* ── ACCORDION CATALOG ── */
.eq-catalog { padding: 0 0 60px; background: #f8fafc; }

/* Category accordion block */
.eq-accordion {
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8edf3;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.eq-accordion:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.eq-accordion.open { box-shadow: 0 6px 28px rgba(29,78,216,.1); }

/* Accordion header */
.eq-acc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.eq-acc-header:hover { background: #f8fafc; }
.eq-accordion.open .eq-acc-header { background: linear-gradient(135deg, #f0f7ff, #e8f0ff); border-bottom: 1px solid #dbeafe; }

.eq-acc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0a1628, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.eq-acc-title {
  flex: 1;
  min-width: 0;
}
.eq-acc-title h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 2px;
}
.eq-acc-title .acc-sub {
  font-size: .77rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eq-acc-badge {
  background: #eff6ff;
  color: #2563eb;
  border-radius: 20px;
  padding: 1px 10px;
  font-size: .72rem;
  font-weight: 700;
}

.eq-acc-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: .75rem;
  transition: transform .3s, background .2s;
  flex-shrink: 0;
}
.eq-accordion.open .eq-acc-arrow { transform: rotate(180deg); background: #dbeafe; color: #2563eb; }

/* Accordion body */
.eq-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(0.4, 0, 0.2, 1);
}
.eq-accordion.open .eq-acc-body { max-height: 4000px; }

/* Quick items preview (shown in header when closed) */
.eq-acc-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.eq-acc-chip {
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: .7rem;
  font-weight: 500;
}
.eq-accordion.open .eq-acc-preview { display: none; }

/* Product grid inside accordion */
.eq-acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}

/* Product card — compact style */
.eq-card {
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 40, 71, 0.06);
  box-sizing: border-box;
  max-width: 100%;
}
.eq-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(15, 40, 71, 0.13);
  border-color: #d0dcea;
}

.eq-card-img {
  height: 195px;
  overflow: hidden;
  background: #f4f7fb;
  position: relative;
  display: block;          /* НЕ flex — иначе дочерние элементы растягиваются */
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
/* Slider inside card */
[id^="cslide_"], [id^="eqcs_"] {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
[id^="cslide_"] img, [id^="eqcs_"] img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}
[id^="cslide_"] img:first-child, [id^="eqcs_"] img:first-child {
  position: relative;
}
.eq-card-img > div {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  overflow: hidden;
}
.eq-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 0.4s ease, transform .3s ease;
  display: block;
  padding: 10px;
  box-sizing: border-box;
  z-index: 1;
}
.eq-card:hover .eq-card-img img { transform: scale(1.05); }

/* старый бейдж qty на фото — скрыт */
.eq-card-qty { display: none !important; }

.eq-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eq-card-name {
  font-weight: 700;
  font-size: .9rem;
  color: #0f172a;
  line-height: 1.3;
}
.eq-card-specs {
  font-size: .77rem;
  color: #64748b;
  line-height: 1.5;
  flex: 1;
}
.eq-card-price {
  font-size: .8rem;
  font-weight: 700;
  color: #059669;
  margin-top: 4px;
}

.eq-card-cta {
  display: flex;
  gap: 6px;
  padding: 0 14px 14px;
}
.eq-card-btn {
  flex: 1;
  padding: 8px;
  border-radius: 9px;
  font-size: .77rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background .2s;
}
.eq-card-btn-wa {
  background: #25d366;
  color: #fff;
}
.eq-card-btn-wa:hover { background: #128C7E; }
.eq-card-btn-info {
  background: #f1f5f9;
  color: #2563eb;
  border: 1.5px solid #dbeafe;
}
.eq-card-btn-info:hover { background: #eff6ff; }

/* "Show more" / lazy pagination per category */
.eq-load-more {
  text-align: center;
  padding: 16px 24px 24px;
  border-top: 1px solid #f1f5f9;
}
.eq-load-more-btn {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 28px;
  font-size: .85rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all .2s;
}
.eq-load-more-btn:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }

/* Category SEO link bar */
.eq-acc-seo-bar {
  padding: 12px 24px;
  background: #f8fafc;
  border-top: 1px solid #e8edf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.eq-acc-seo-bar span { font-size: .78rem; color: #64748b; }
.eq-acc-seo-link {
  font-size: .78rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.eq-acc-seo-link:hover { color: #1d4ed8; }

/* ── No results ── */
.eq-no-results {
  text-align: center;
  padding: 80px 20px;
  color: #64748b;
}
.eq-no-results i { font-size: 3rem; color: #cbd5e1; margin-bottom: 16px; display: block; }
.eq-no-results h3 { font-size: 1.3rem; font-weight: 700; color: #334155; margin-bottom: 8px; }

/* ── ACCREDITATION PACKAGE BANNER ── */
.accr-banner {
  background: linear-gradient(135deg, #0a1628 0%, #1e3a8a 60%, #7c3aed 100%);
  border-radius: 20px;
  padding: 32px 36px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 0;
  position: relative;
  overflow: visible; /* was hidden — caused clipping on some browsers */
  isolation: isolate; /* replace overflow:hidden for stacking context */
}
.accr-banner-text {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.accr-banner::before {
  content: '';
  position: absolute;
  right: 100px;
  top: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(124,58,237,.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  border-radius: inherit; /* stay within rounded corners */
  overflow: hidden;
}
.accr-banner-label {
  display: inline-block;
  background: rgba(245,158,11,.2);
  color: #fcd34d;
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.accr-banner h3 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
  line-height: 1.3;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.accr-banner p { color: rgba(255,255,255,.92); font-size: .88rem; margin: 0; max-width: 500px; position: relative; z-index: 2; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.accr-banner-btns { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; position: relative; z-index: 2; }
.btn-accr-primary {
  background: #f59e0b;
  color: #0f172a;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  font-size: .88rem;
  white-space: nowrap;
  transition: background .2s;
}
.btn-accr-primary:hover { background: #fbbf24; }
.btn-accr-secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: .88rem;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.25);
  transition: background .2s;
}
.btn-accr-secondary:hover { background: rgba(255,255,255,.2); }

/* ── Sub-filter toggle button ── */
.eq-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.eq-filter-toggle:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.eq-filter-toggle.active { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }

/* ── Compact sticky mode: main-cats collapse when scrolled ── */
/* JS adds .toolbar-compact to .eq-toolbar after scrolling past accr-banner */
.eq-toolbar.toolbar-compact .eq-main-cats {
  max-height: 0;
  overflow: hidden;
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
  transition: max-height .25s ease, padding .25s ease, margin .25s ease;
}
.eq-toolbar:not(.toolbar-compact) .eq-main-cats {
  max-height: 120px;
  transition: max-height .25s ease;
}
/* Compact toolbar also reduces inner padding */
.eq-toolbar.toolbar-compact .container {
  padding-top: 10px;
  padding-bottom: 4px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .eq-acc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap:12px; padding:14px; }
  .eq-acc-header { padding: 14px 16px; gap: 10px; }
  .eq-card-img { height: 170px; }
  .accr-banner { padding: 20px 18px; gap: 16px; }
  .accr-banner h3 { font-size: 1.05rem; }
  .accr-banner-btns { width: 100%; justify-content: flex-start; }
}
@media (max-width: 480px) {
  .eq-acc-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
  .eq-acc-icon { width: 36px; height: 36px; font-size: .85rem; }
  .eq-acc-title h3 { font-size: .9rem; }
}
