/* === /extenders catalog page === */
:root {
  --ext-primary: #177ec9;
  --ext-navy: #0c1f4a;
  --ext-yellow: #f9c42e;
  --ext-orange: #e85d2f;
  --ext-bar-on: #20c77a;
  --ext-bar-off: #e1e3e8;
}
.ext-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.ext-page__header {
  text-align: center;
  margin-bottom: 36px;
}
.ext-page__title {
  font-family: Inter, sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--ext-navy);
  text-transform: uppercase;
  letter-spacing: -1px;
  margin: 0 0 8px;
}
.ext-page__subtitle {
  font-family: Inter, sans-serif;
  font-size: 17px;
  color: #555;
  max-width: 1000px;        /* wider so the subtitle fits in one line on desktop */
  margin: 0 auto;
}

/* Grid: cards are 360 px wide. auto-fit (not auto-fill!) collapses empty
   tracks so the row stays centered regardless of how many products are
   in the category. */
.ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 360px);
  justify-content: center;
  gap: 26px;
  margin-bottom: 56px;
}
@media (max-width: 1100px) {
  .ext-grid { grid-template-columns: repeat(auto-fit, 320px); }
}
@media (max-width: 700px) {
  .ext-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Card */
.ext-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 16px;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ext-card:hover {
  box-shadow: 0 8px 24px rgba(12, 31, 74, 0.08);
  transform: translateY(-2px);
}
.ext-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  min-height: 22px;
}
.ext-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ext-navy);
}
/* Partial-filled stars: bg layer renders 5 empty stars in light grey,
   fg layer renders 5 filled stars in gold and is clipped to --rate width. */
.ext-stars-rate {
  position: relative;
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}
.ext-stars-rate__bg {
  color: #e2e6ee;
}
.ext-stars-rate__fg {
  color: var(--ext-yellow);
  position: absolute;
  inset: 0;
  width: var(--rate, 0%);
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}
.ext-rating-meta {
  color: var(--ext-navy);
  font-size: 13px;
  font-weight: 600;
}
/* Legacy classes kept in case other pages still use them */
.ext-stars {
  color: var(--ext-yellow);
  letter-spacing: -1px;
  font-size: 13px;
}
.ext-rating-count {
  color: #888;
  font-weight: 500;
  margin-left: 4px;
}
.ext-card__save {
  background: var(--ext-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}
.ext-card__image {
  position: relative;
  background: linear-gradient(135deg, #f6f7fa 0%, #eef1f6 100%);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 16px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Red discount badge — top-right corner of the product image */
.ext-card__discount {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e8242c;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 8px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(232, 36, 44, 0.35);
}
.ext-card__image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.ext-card__name {
  font-family: Inter, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ext-navy);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin: 0 0 8px;
  text-align: center;
  /* no min-height — name shrinks to its text so the subtitle sits right
     under the title. CTA stays bottom-aligned via margin-top:auto. */
}
/* Card subtitle — short tagline under the product name, on a soft backdrop */
.ext-card__subtitle {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: #4b5563;
  text-align: center;
  background: #f3f5f8;
  border-radius: 10px;
  padding: 9px 14px;
  margin: 0 0 14px;
}
.ext-card__bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.ext-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.ext-bar__bars {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
}
.ext-bar__bars i {
  display: inline-block;
  width: 6px;
  background: var(--ext-bar-off);
  border-radius: 2px;
  height: 8px;
  position: relative;
}
.ext-bar__bars i:nth-child(1) { height: 6px; }
.ext-bar__bars i:nth-child(2) { height: 9px; }
.ext-bar__bars i:nth-child(3) { height: 12px; }
.ext-bar__bars i:nth-child(4) { height: 15px; }
.ext-bar__bars i:nth-child(5) { height: 18px; }
.ext-bar__bars i.filled {
  background: var(--ext-bar-on);
}
.ext-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(23, 126, 201, 0.08);
  color: var(--ext-primary);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 0 auto 14px;
  white-space: nowrap;
  position: relative;
  overflow: visible;
}
.ext-card__tag--top {
  background: var(--ext-yellow);
  color: var(--ext-navy);
}
.ext-card__tag-icon,
.ext-card__tag-info-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.ext-card__tag-info-icon {
  opacity: 0.6;
  transition: opacity .15s ease;
}
.ext-card__tag--top:hover .ext-card__tag-info-icon,
.ext-card__tag--top:focus .ext-card__tag-info-icon {
  opacity: 1;
}
/* Dark single-line tooltip, centered above the whole badge,
   shown on hover/focus of the badge itself (not just the "i"). */
.ext-card__tag--top {
  cursor: help;
  outline: none;
}
.ext-card__tag:has(.ext-card__tag-tooltip) {
  cursor: help;
  outline: none;
}
.ext-card__tag-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0c1f4a;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
  padding: 8px 14px;
  border-radius: 8px;
  width: max-content;
  max-width: 280px;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 10;
  box-shadow: 0 6px 16px rgba(12, 31, 74, 0.25);
}
.ext-card__tag-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0c1f4a;
}
.ext-card__tag:hover .ext-card__tag-tooltip,
.ext-card__tag:focus .ext-card__tag-tooltip,
.ext-card__tag:focus-within .ext-card__tag-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.ext-card__cta {
  display: block;
  background: var(--ext-primary);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  padding: 14px;
  border-radius: 999px;
  border: none;
  margin-top: auto;
  box-shadow: 0 6px 16px rgba(23, 126, 201, 0.35);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.ext-card__cta:hover {
  background: #1265a1;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(23, 126, 201, 0.5);
}

/* Deals header */
.ext-deals__header {
  text-align: center;
  margin: 24px 0 28px;
}
.ext-deals__title {
  font-family: Inter, sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ext-navy);
  text-transform: uppercase;
  letter-spacing: -1px;
  margin: 0 0 16px;
  white-space: nowrap;   /* keep the longer title on a single line (desktop) */
}
/* On narrow screens the long title no longer fits one line — let it wrap. */
@media (max-width: 780px) {
  .ext-deals__title {
    white-space: normal;
    font-size: 24px;
  }
}
.ext-deals__banner {
  background: var(--ext-navy);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  padding: 16px 22px;
  border-radius: 12px;
  max-width: 760px;
  margin: 0 auto;
}
.ext-deals__banner b { color: var(--ext-yellow); }

/* Deal cards: bigger, only 2 in row */
.ext-grid--deals {
  grid-template-columns: repeat(2, 1fr);
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 700px) {
  .ext-grid--deals { grid-template-columns: 1fr; }
}
.ext-card--deal {
  border: 2px solid var(--ext-primary);
}
.ext-card--deal .ext-card__image {
  aspect-ratio: 1 / 1;
}


/* Image and name as clickable links to product page */
a.ext-card__image, a.ext-card__name-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
a.ext-card__image:hover img {
  transform: scale(1.02);
}
a.ext-card__image img {
  transition: transform 0.2s ease;
}
a.ext-card__name-link:hover .ext-card__name {
  color: var(--ext-primary);
}
.ext-card__name {
  transition: color 0.15s;
}

/* === Слайдеры аксессуаров (длина/толщина) на /accessories === */
.acc-block {
  margin: 0 0 56px;
}
.acc-block + .acc-block {
  margin-top: 16px;
}

.acc-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.acc-block__title {
  margin: 0;
  font-family: Inter, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ext-navy);
  letter-spacing: -0.5px;
}

.acc-block__nav {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.acc-block__arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  background: #fff;
  border: 1px solid #e4e7ee;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(12, 31, 74, 0.10);
  color: var(--ext-navy);
  cursor: pointer;
  font-family: Inter, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
}
.acc-block__arrow:hover:not(:disabled) {
  background: var(--ext-navy);
  color: #fff;
}
.acc-block__arrow:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.acc-block__viewport {
  overflow: hidden;
  margin: 0 -8px;
  padding: 8px 8px 36px;
}

.acc-block__track {
  display: flex;
  gap: 16px;
  transition: transform 480ms cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
}

.acc-block__track > .ext-card {
  flex: 0 0 240px;
  width: 240px;
  margin: 0;
}

@media (max-width: 1100px) {
  .acc-block__track > .ext-card {
    flex-basis: 220px;
    width: 220px;
  }
}

@media (max-width: 800px) {
  .acc-block__title { font-size: 22px; }
  .acc-block__track > .ext-card {
    flex-basis: 200px;
    width: 200px;
  }
}

@media (max-width: 460px) {
  .acc-block__title { font-size: 20px; }
  .acc-block__arrow { width: 38px; height: 38px; font-size: 18px; }
  .acc-block__track > .ext-card {
    flex-basis: 78%;
    width: 78%;
  }
}

/* --- Верхний грид как слайдер с КРУПНЫМИ карточками (без уменьшения) --- */
.acc-block--full .acc-block__nav--top {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}
.acc-block--full .acc-block__viewport {
  padding-left: 0;
  padding-right: 0;
}
.acc-block--full .acc-block__track {
  gap: 26px;
}
.acc-block--full .acc-block__track > .ext-card {
  flex: 0 0 360px;
  width: 360px;
}
@media (max-width: 1100px) {
  .acc-block--full .acc-block__track > .ext-card {
    flex-basis: 320px;
    width: 320px;
  }
}
@media (max-width: 760px) {
  .acc-block--full .acc-block__track > .ext-card {
    flex-basis: 86%;
    width: 86%;
  }
}
