/* =========================
   Page
========================= */
.fav-page{
  max-width: 100%;
  margin: 0 auto 100px;
}

.fav-title{
  margin: 10px 0;
  text-align: left;
  font-size: 26px;
  font-weight: 900;
  color: #181D3B;
}

.fav-count{
  font-size: 18px;
  font-weight: 400;
  opacity: 0.6;
  margin-left: 6px;
}

/* =========================
   Section
========================= */
.fav-section{
  display: block;
  border-radius: 14px;
  padding: 5px 0;
  margin: 0;
}

.fav-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.fav-h2{
  margin: 0 0 0 50px;
  font-size: 20px;
  font-weight: 400;
  color: #181D3B;
}

/* =========================
   Empty
========================= */
.fav-empty{
  padding: 3px 50px;
  color: rgba(0,0,0,.55);
  font-weight: 300;
}

/* =========================
   Slider wrapper
========================= */
.fav-slider{
  display: block;
  position: relative;
  padding: 0 50px;
  margin: 0;
  min-height: 0;
  height: auto;
  margin-left: 50px;
  margin-top: 30px;
}

/* =========================
   Arrows
========================= */
.fav-arrow{
  position: absolute;
  top: 125px;
  transform: translateY(100%);
  font-size: 40px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  cursor: pointer;
  transition: all .15s ease;
  z-index: 5;
  user-select: none;
}

.fav-arrow--left{
  left: 15px;
}

.fav-arrow--right{
  right: 15px;
}

.fav-arrow:hover{
  font-size: 50px;
  opacity: 1;
}

.fav-arrow:disabled{
  opacity: .35;
  cursor: default;
}

/* =========================
   Track
========================= */
.catalogFavorite{
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 15px;

  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;

  -ms-overflow-style: none;
  scrollbar-width: none;

  padding: 0;
  margin: 0;
  min-height: 0;
  height: auto;
}

.catalogFavorite::-webkit-scrollbar{
  display: none;
}

.catalogFavorite--center{
  overflow-x: hidden;
}

/* =========================
   Card link
========================= */
.card-link{
  display: block;
  flex: 0 0 226px;
  width: 226px;
  margin: 0;
  min-height: 0;
  height: auto;
  text-decoration: none;
  color: inherit;
  position: relative;
  align-self: flex-start;
}

/* =========================
   Card
========================= */
.pages{
  width: 226px;
  margin: 0;
  min-height: 0;
  height: auto;
  border-radius: 10px;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 4px;

  color: #181D3B;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.pages:hover{
  transform: translateY(-2px);
}

/* =========================
   Media
========================= */
.card-media{
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 10px;
  flex: 0 0 auto;
}

.card-media::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65),
    rgba(0, 0, 0, 0)
  );
  z-index: 1;
}

/* =========================
   Image
========================= */
.image{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(0,0,0,.03);
}

/* =========================
   Text blocks
========================= */
.price-wrap{
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

.price{
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 34px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title{
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 400;
  min-height: 38px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.title.True{
  font-weight: 500;
}

.info{
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  color: rgba(0,0,0,.65);
  min-height: 24px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info.True{
  font-weight: 500;
}

/* =========================
   Overlay
========================= */
.card-overlay{
  position: absolute;
  inset: 0;
  z-index: 10;
  display: block;
}


/* =========================
   Badges
========================= */
.badge-top-left{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}

.badge-bottom-left{
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;

  max-width: calc(100% - 24px);
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;

  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.badge-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #229ED9;
  flex: 0 0 auto;
}

.badge-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  min-width: 14px;
  font-size: 12px;
  line-height: 1;
}

.badge-telegram,
.badge-warning,
.badge-verified,
.badge-student,
.badge-employer{
  color: #dadada;
}

/* =========================
   Favorite button
========================= */
.favorite-btn{
  position: absolute;
  bottom: 125px;
  right: 12px;
  z-index: 11;

  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.favorite-btn:hover{
  transform: scale(1.06);
}

.favorite-icon{
  font-size: 20px;
  line-height: 1;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.favorite-btn.is-active .favorite-icon{
  color: #e53935;
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px){
  .card-link{
    flex: 0 0 200px;
    width: 200px;
  }

  .pages{
    width: 200px;
  }

  .card-media{
    height: 200px;
  }

  .fav-arrow{
    top: 100px;
  }

  .price{
    font-size: 20px;
    min-height: 30px;
  }

  .title{
    font-size: 14px;
    min-height: 36px;
  }

  .info{
    font-size: 12px;
    min-height: 22px;
  }
}

.favorite-btn {
  position: absolute;
  bottom: 125px;   /* ↓ вниз */
  right: 12px;    /* → вправо */
  z-index: 4;     /* выше градиента (.card-media::after = z-index:1) */

  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.25); /* полупрозрачный круг */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.favorite-btn:hover {
  transform: scale(1.06);
}

.favorite-icon {
  font-size: 20px;
  line-height: 1;
  color: white; /* белое по умолчанию */
  text-shadow: 0 1px 3px rgba(0,0,0,.4); /* читаемость */
}

.favorite-btn .favorite-icon {

  transition: .2s ease;
}

.favorite-btn.is-active .favorite-icon {
  color: red;
}

/* =========================
   Extra responsive
========================= */

@media (max-width: 1024px) {
  .fav-page {
    margin: 0 auto 80px;
  }

  .fav-title {
    font-size: 24px;
  }

  .fav-count {
    font-size: 16px;
  }

  .fav-h2 {
    margin-left: 24px;
    font-size: 18px;
  }

  .fav-empty {
    padding: 3px 24px;
  }

  .fav-slider {
    padding: 0 24px;
    margin-left: 0;
    margin-top: 24px;
  }

  .fav-arrow--left {
    left: 0;
  }

  .fav-arrow--right {
    right: 0;
  }

  .catalogFavorite {
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .fav-page {
    margin: 0 auto 64px;
  }

  .fav-title {
    font-size: 22px;
    line-height: 1.25;
    margin: 8px 0;
  }

  .fav-count {
    font-size: 15px;
    margin-left: 4px;
  }

  .fav-section {
    padding: 4px 0;
  }

  .fav-header {
    margin-bottom: 6px;
  }

  .fav-h2 {
    margin: 0 0 0 16px;
    font-size: 17px;
  }

  .fav-empty {
    padding: 3px 16px;
    font-size: 14px;
    line-height: 1.45;
  }

  .fav-slider {
    padding: 0 16px;
    margin-top: 18px;
  }

  .fav-arrow {
    display: none;
  }

  .catalogFavorite {
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }

  .card-link {
    flex: 0 0 190px;
    width: 190px;
    scroll-snap-align: start;
  }

  .pages {
    width: 190px;
  }

  .card-media {
    height: 210px;
  }

  .price-wrap {
    min-height: 30px;
  }

  .price {
    font-size: 19px;
    min-height: 30px;
  }

  .title {
    font-size: 14px;
    min-height: 34px;
  }

  .info {
    font-size: 12px;
    min-height: 20px;
  }

  .badge-top-left {
    top: 10px;
    left: 10px;
  }

  .badge-bottom-left {
    left: 10px;
    bottom: 10px;
    gap: 5px;
    max-width: calc(100% - 20px);
  }

  .badge {
    padding: 6px 10px;
    font-size: 11px;
  }

  .badge-dot {
    width: 7px;
    height: 7px;
  }

  .favorite-btn {
    width: 38px;
    height: 38px;
    right: 10px;
    bottom: 118px;
  }

  .favorite-icon {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .fav-page {
    margin: 0 auto 52px;
  }

  .fav-title {
    font-size: 20px;
  }

  .fav-count {
    display: inline-block;
    font-size: 14px;
  }

  .fav-h2 {
    margin-left: 12px;
    font-size: 16px;
  }

  .fav-empty {
    padding: 2px 12px;
    font-size: 13px;
  }

  .fav-slider {
    padding: 0 12px;
    margin-top: 14px;
  }

  .catalogFavorite {
    gap: 10px;
  }

  .card-link {
    flex: 0 0 165px;
    width: 165px;
  }

  .pages {
    width: 165px;
    gap: 3px;
  }

  .card-media {
    height: 185px;
    border-radius: 9px;
  }

  .image {
    border-radius: 9px;
  }

  .price-wrap {
    min-height: 28px;
  }

  .price {
    font-size: 17px;
    min-height: 28px;
  }

  .title {
    font-size: 13px;
    line-height: 1.3;
    min-height: 32px;
  }

  .info {
    font-size: 11px;
    min-height: 18px;
  }

  .badge-top-left {
    top: 8px;
    left: 8px;
  }

  .badge-bottom-left {
    left: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
  }

  .badge {
    padding: 5px 8px;
    font-size: 10px;
    gap: 5px;
  }

  .badge-icon {
    width: 12px;
    min-width: 12px;
    font-size: 10px;
  }

  .favorite-btn {
    width: 34px;
    height: 34px;
    right: 8px;
    bottom: 108px;
  }

  .favorite-icon {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .fav-title {
    font-size: 18px;
  }

  .fav-h2 {
    font-size: 15px;
    margin-left: 10px;
  }

  .fav-slider {
    padding: 0 10px;
  }

  .card-link {
    flex: 0 0 150px;
    width: 150px;
  }

  .pages {
    width: 150px;
  }

  .card-media {
    height: 170px;
  }

  .price {
    font-size: 16px;
  }

  .title {
    font-size: 12px;
    min-height: 30px;
  }

  .info {
    font-size: 10px;
  }

  .favorite-btn {
    bottom: 98px;
  }
}