/* =========================
   FAVORITES — FINAL
========================= */

.fav{
  height: 100vh;
  display: flex;
  flex-direction: column;

  font-family: var(--main-font-family);
  color: var(--main-font-color);
  background: #fff;
  
}

/* ================= HEADER (FIXED) ================= */

.fav__head{
  flex-shrink: 0;

  display: flex;
  align-items: center;

  min-height: var(--header-height);
  padding: 1.2vw 2.8vw;

  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #fff;
  z-index: 2;
  border-bottom: #686868bd solid 1px;
}

.fav__title{
  font-size: .9vw;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: .4vw;
}

.fav__title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2vw;
  height: 1px;
  background: rgba(0,0,0,.25);
}

/* ================= LIST (SCROLL) ================= */

.fav__list{
  flex: 1;
  overflow-y: auto;

  padding: 1.4vw 2.8vw 2vw;
}

/* custom scrollbar (optional, modern) */
.fav__list::-webkit-scrollbar{
  width: 6px;
}
.fav__list::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.2);
  border-radius: 10px;
}

/* ================= CARD ================= */

.favCard{
  display: grid;
  grid-template-columns: 4.8vw 1fr auto;
  gap: 1vw;

  align-items: flex-start;

  padding: .9vw;
  margin-bottom: .7vw;

  background: #fff;
  border-radius: .6vw;

  cursor: pointer;

  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.favCard:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,.1);
}

/* ================= IMAGE (SMART) ================= */

.favCard__img{
  width: 4.8vw;
  aspect-ratio: 2 / 3;

  background: #f5f5f5;
  border-radius: .45vw;

  display: flex;
  align-items: center;
  justify-content: center;
}

.favCard__img img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10%;
  display: block;
}

/* ================= CONTENT ================= */

.favCard__title{
  font-size: .95vw;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .04em;
  text-transform: uppercase;

  position: relative;
  padding-bottom: .45vw;

  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.favCard__title::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1.6vw;
  height: 1px;
  background: rgba(0,0,0,.2);
}

.favCard__price{
  margin-top: .6vw;
  font-size: .95vw;
  font-weight: 700;
}

.favCard__old{
  margin-left: .5vw;
  font-size: .85vw;
  font-weight: 500;
  color: #999;
  text-decoration: line-through;
}

.favCard__status{
  margin-top: .45vw;
  font-size: .75vw;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.favCard__status.is-out{ color: #dc2626; }
.favCard__status.is-low{ color: #f59e0b; }

/* ================= DELETE ================= */

.favCard__del{
  background: none;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: .35;
  transition: opacity .2s ease, transform .2s ease;
}

.favCard:hover .favCard__del{
  opacity: 1;
}

.favCard__del:hover{
  transform: scale(1.15);
  color: #e11d48;
}

.card__del-icon{
  width: 1.8vw;
  height: 1.8vw;
}

/* ================= RESPONSIVE ================= */

/* <= 1024px */
@media (max-width: 1024px){
  .fav__head,
  .fav__list{ padding: 2vw; }

  .fav__title{ font-size: 1.6vw; }

  .favCard{
    grid-template-columns: 8vw 1fr auto;
    padding: 1.4vw;
    border-radius: 1vw;
  }

  .favCard__img{ width: 8vw; }
  .favCard__title,
  .favCard__price{ font-size: 1.6vw; }
  .favCard__status{ font-size: 1.4vw; }
  .card__del-icon{ width: 3.6vw; height: 3.6vw; }
}

/* <= 768px */
@media (max-width: 768px){
  .fav__title{ font-size: 2.4vw; }

  .favCard{
    grid-template-columns: 11vw 1fr auto;
    gap: 2vw;
    padding: 2vw;
    border-radius: 1.6vw;
  }

  .favCard__img{ width: 11vw; }
  .favCard__title,
  .favCard__price{ font-size: 2.2vw; }
  .favCard__status{ font-size: 1.9vw; }
  .card__del-icon{ width: 5vw; height: 5vw; }
}

/* <= 480px */
@media (max-width: 480px){
  .favCard{
    grid-template-columns: 15vw 1fr auto;
    padding: 3vw;
    border-radius: 2.4vw;
  }

  .favCard__img{ width: 15vw; }
  .favCard__title,
  .favCard__price{ font-size: 3.2vw; }
  .favCard__status{ font-size: 2.6vw; }
  .card__del-icon{ width: 7vw; height: 7vw; }
}



/* ================= EMPTY ================= */
.fav__empty {
  font-size: .95vw;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .9;

  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  padding: 2vw;
}

/* ========== RESPONSIVE EMPTY ========== */
@media (max-width: 1024px) {
  .fav__empty { font-size: 1.6vw; }
}

@media (max-width: 768px) {
  .fav__empty { font-size: 2.4vw; padding: 3vw; }
}

@media (max-width: 480px) {
  .fav__empty { font-size: 3.2vw; padding: 4vw; }
}
