@charset "utf-8";
/* **************************************************************************************
* Bestsellers 상품디스플레이 CSS
************************************************************************************** */

@charset "utf-8";
/* **************************************************************************************
* Bestsellers 상품디스플레이 CSS
************************************************************************************** */

/* ---------- Base card ---------- */

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 342px;
  overflow: hidden;
  border: 1px solid #ded8e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--card-shadow);
  cursor: pointer;
}

.product-card.top-card {
  background: #6f6d6a;
  color: #fff;
}

.product-card > b {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  color: #111;
  font-size: 45px;
  line-height: 1;
  font-weight: 700;
}

.product-card.top-card > b {
  color: #fff;
  text-shadow: 2px 2px 0 #f3b4df;
}

.seller-rail .product-card.top-card > b {
  color: #fff;
  font-style: italic;
  font-size: 30px;
  font-weight: 900;

  /* dark outline so the white fill reads against light images too */
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.55);
  paint-order: stroke fill;

  /* soft blurred shadow for depth/pop on busy or mid-tone images */
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.seller-rail .product-card.top-card .product-img {
  color: #261f31;
  background: transparent;
}

.seller-rail .product-card.top-card .product-rating em {
  color: #5f536c;
}

.product-img {
  position: relative;
  display: grid;
  place-items: center;
  background: #8a8985;
  font-size: 26px;
  font-weight: 800;
  height: fit-content !important;
}

.product-img img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.product-card:not(.top-card) .product-img {
  color: #111;
  background: #fff;
}

.seller-section .product-card p {
  margin: 14px 10px 4px;
  font-size: 12px;
  font-weight: 700;
  min-height: 15px;
}

.product-card h3 {
  min-height: 35px;
  margin: 0 10px 6px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}

.seller-section .product-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-overflow: ellipsis;
  white-space: normal;
  max-height: 2.5em;
}

.product-rating,
.product-rating1 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 10px 8px;
  font-size: 13px;
}

.product-rating span,
.product-rating1 span {
  display: inline-grid;
  place-items: center;
  width: 12px;
  height: 12px;
}

.product-rating span img,
.product-rating1 span img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-rating b,
.product-rating1 b {
  font-size: 1em;
  font-weight: 400;
}

.product-rating em,
.product-rating1 em {
  color: #7a718c;
  font-style: normal;
  font-size: 1em;
}

.product-card small {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 5px 10px 11px;
  color: #f13c3c;
  font-size: 16px;
  font-weight: 600;
}

.product-card small del {
  color: #494949;
  font-size: 14px;
  font-weight: 400;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 6px;
  margin: auto 8px 8px;
}

.card-actions button {
  display: grid;
  place-items: center;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #7943e2;
  cursor: pointer;
  transition: background 0.3s ease;
}

.card-actions button:hover {
  background: #31136c;
}

.card-actions button img {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  object-fit: contain;
}

.card-actions button img.hide {
  display: none;
}

/* Slightly taller action buttons on the seller rail only, desktop only
   (bestseller cards and the flattened mobile layout keep their heights). */
@media (min-width: 1121px) {
  .seller-rail .product-card .card-actions button {
    height: 34px;
  }
}

/* ---------- Tablet + mobile (<=1120px): grid layout, flattened card ---------- */

@media (max-width: 1120px) {
  .seller-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(30px, 1vw, 26px) clamp(7px, 1.2vw, 14px);
    overflow: visible;
    align-items: stretch;
    cursor: auto;
    touch-action: auto;
    transform: none !important;
    width: 100%;
    max-width: min(100%, 960px);
    margin-inline: auto;
  }

  .seller-rail article {
    flex: initial;
    min-width: 0;
  }

  .seller-rail .product-card.top-card,
  .seller-rail .product-card:not(.top-card) {
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    align-self: auto;
  }

  .seller-section .product-card,
  .seller-section .product-card.top-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    color: #111;
    background: transparent;
    box-shadow: none;
    container-type: inline-size;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
  }

  .seller-section .product-card > b {
    top: 8px;
    left: 8px;
    z-index: 3;
    color: var(--purple);
    font-size: clamp(21px, 5cqi, 28px);
    line-height: 1;
    font-style: normal;
    text-shadow: none;
  }

  .seller-section .product-card.top-card > b {
    top: clamp(6px, 2cqi, 10px);
    left: clamp(6px, 2cqi, 10px);
    z-index: 3;
    color: #fff;
    font-size: clamp(30px, 14cqi, 42px);
    line-height: 1;
    font-style: italic;
    text-shadow: 1px 1px 0 rgba(64, 47, 88, 0.18);
  }

  .seller-section .product-img {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 5px;
    color: transparent;
    background: #fff;
    font-size: 0;
    min-height: unset;
    aspect-ratio: 1 / 1;
  }

  .seller-section .product-card.top-card:nth-child(1) .product-img {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 42%),
      linear-gradient(28deg, #d6b4ff 0%, #f39bd6 38%, #ffc9ae 72%, #ffd8cd 100%);
  }

  .seller-section .product-card.top-card:nth-child(2) .product-img {
    background:
      linear-gradient(210deg, rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0) 42%),
      linear-gradient(138deg, #ffc1cb 0%, #ffaec1 28%, #f7bddf 58%, #d0b6ff 100%);
  }

  .seller-section .product-card.top-card:nth-child(3) .product-img {
    background:
      linear-gradient(35deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 44%),
      linear-gradient(310deg, #d8b7ff 0%, #eba6e6 32%, #ffabc4 62%, #ffd5b8 100%);
  }

  .seller-section .product-card p {
    margin: clamp(7px, 2.7cqi, 10px) 0 clamp(3px, 1.2cqi, 5px);
    font-size: 14px;
    line-height: 1.1;
  }

  .seller-section .product-card h3 {
    display: -webkit-box;
    height: auto;
    min-height: calc(2 * 1.35em);
    max-height: none;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: clamp(13px, 6cqi, 17px);
    line-height: 1.35;
    font-weight: 600;
  }

  .seller-section .product-rating,
  .seller-section .product-rating1 {
    display: none;
  }

  .seller-section .product-card small {
    display: flex;
    align-items: baseline;
    gap: clamp(3px, 1.4cqi, 5px);
    margin: clamp(6px, 3cqi, 8px) 0 0;
    font-size: clamp(15px, 7cqi, 21px);
    line-height: 1;
    font-weight: 700;
  }

  .seller-section .product-card small del {
    display: none;
  }

  .seller-section .sale-rate {
    color: #ff2f48;
    font-style: normal;
  }

  .seller-section .sale-price {
    color: #111;
    font-weight: 800;
  }

  .seller-section .card-actions {
    display: block;
    margin: 0;
  }

  .seller-section .card-actions button:first-child {
    display: none;
  }

  .seller-section .card-actions button:last-child {
    position: absolute;
    top: calc(100cqi - clamp(30px, 12cqi, 38px));
    right: clamp(5px, 2.8cqi, 10px);
    bottom: auto;
    width: clamp(24px, 10cqi, 32px);
    height: clamp(24px, 10cqi, 32px);
    padding: 5px;
    border: 0;
    color: #222;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: none;
    border-radius: 50%;
  }

  .seller-section .card-actions button:last-child img {
    width: clamp(19px, 7.8cqi, 24px);
    height: clamp(19px, 7.8cqi, 24px);
  }
}

/* ---------- Tablet only (761–1120px) ---------- */

@media (min-width: 761px) and (max-width: 1120px) {
  .seller-rail {
    --seller-tablet-card-width: clamp(168px, 26vw, 212px);
    display: grid;
    grid-template-columns: repeat(3, var(--seller-tablet-card-width));
    grid-template-rows: auto auto;
    column-gap: clamp(8px, 1.6vw, 14px);
    row-gap: clamp(24px, 3.8vw, 42px);
    justify-content: center;
    align-items: end;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }

  .seller-section .product-card,
  .seller-section .product-card.top-card {
    width: var(--seller-tablet-card-width);
    max-width: var(--seller-tablet-card-width);
  }

  .seller-rail .product-card:not(.top-card) {
    align-self: end;
  }
}

/* ---------- Mobile (<=760px) ---------- */

@media (max-width: 760px) {
  .seller-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px 8px;
    overflow: visible;
    width: 100%;
    max-width: min(100%, 960px);
    margin-inline: auto;
  }

  .seller-rail article {
    flex: initial;
    min-width: 0;
  }

  .seller-section .product-card {
    min-height: 210px;
    border-radius: 8px;
  }

  .seller-section .product-card.top-card > b {
    top: 8px;
    left: 8px;
    font-size: 30px;
    color: #fff;
    font-style: italic;
    text-shadow: 1px 1px 0 rgba(64, 47, 88, 0.18);
  }

  .seller-section .product-img {
    height: 126px;
    overflow: hidden;
    border-radius: 5px;
    color: transparent;
    background: #fff;
    font-size: 0;
  }

  .seller-section .product-card.top-card:nth-child(1) .product-img {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 42%),
      linear-gradient(28deg, #d6b4ff 0%, #f39bd6 38%, #ffc9ae 72%, #ffd8cd 100%);
  }

  .seller-section .product-card.top-card:nth-child(2) .product-img {
    background:
      linear-gradient(210deg, rgba(255, 255, 255, 0.44) 0%, rgba(255, 255, 255, 0) 42%),
      linear-gradient(138deg, #ffc1cb 0%, #ffaec1 28%, #f7bddf 58%, #d0b6ff 100%);
  }

  .seller-section .product-card.top-card:nth-child(3) .product-img {
    background:
      linear-gradient(35deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 44%),
      linear-gradient(310deg, #d8b7ff 0%, #eba6e6 32%, #ffabc4 62%, #ffd5b8 100%);
  }

  .seller-section .product-card p {
    margin: 8px 0 5px;
    font-size: 13px;
    line-height: 1.08;
    font-weight: 700;
  }

  .seller-section .product-card h3 {
    display: -webkit-box;
    height: auto;
    min-height: calc(2 * 1.35em);
    max-height: none;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
  }

  .seller-section .product-rating,
  .seller-section .product-rating1 {
    gap: 2px;
    margin: 0 8px 3px;
    font-size: 9px;
    display: none;
  }

  .seller-section .product-rating span,
  .seller-section .product-rating1 span {
    font-size: 1.17em;
  }

  .seller-section .product-rating b,
  .seller-section .product-rating1 b {
    font-size: 1em;
  }

  .seller-section .product-rating em,
  .seller-section .product-rating1 em {
    font-size: 0.83em;
  }

  .seller-section .product-card small {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 10px 0 10px;
    color: #f13c3c;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
  }

  .seller-section .product-card small del {
    font-size: 8px;
    display: none;
  }

  .seller-section .sale-rate {
    color: #ff2f48;
    font-style: normal;
  }

  .seller-section .sale-price {
    color: #111;
    font-weight: 700;
  }

  .seller-section .card-actions {
    display: block;
    margin: 0;
  }

  .seller-section .card-actions button:first-child {
    display: none;
  }

  .seller-section .card-actions button:last-child {
    position: absolute;
    top: auto;
    bottom: 110px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 5px;
    border: 0;
    color: #111;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: none;
    border-radius: 50%;
  }

  .seller-section .card-actions button:last-child img {
    width: 20px;
    height: 20px;
  }

  .seller-section .product-card,
  .seller-section .product-card.top-card {
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    color: #111;
    background: transparent;
    box-shadow: none;
  }

  .seller-section .product-card > b {
    top: 7px;
    left: 6px;
    color: var(--purple);
    font-size: 24px;
    line-height: 1;
    font-style: normal;
    font-weight: 600;
    text-shadow: none;
  }

  .seller-section .product-card .product-img {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: unset;
    max-height: none;
    aspect-ratio: 1 / 1;
  }

  .seller-section .product-card .product-img {
    height: 126px;
    aspect-ratio: auto;
  }

  .seller-section .product-card:nth-child(-n + 3) .product-img a {
    width: 94%;
    height: 94%;
  }
}

/* ---------- Small mobile (<=380px) ---------- */

@media (max-width: 380px) {
  .seller-rail {
    gap: 9px 7px;
  }

  .seller-section .product-card p {
    margin-top: 9px;
  }

  .seller-section .product-card h3 {
    min-height: calc(2 * 1.35em);
    margin-bottom: 8px;
  }

  .seller-section .product-card small {
    flex-wrap: wrap;
    row-gap: 2px;
    margin-top: 0;
    font-size: clamp(13px, 3.8vw, 15px);
    line-height: 1.12;
  }

  .seller-section .product-card,
  .seller-section .product-card.top-card {
    height: auto;
    min-height: calc(((100vw - 42px) / 3) + 90px);
    aspect-ratio: auto;
  }
}

@media (max-width: 760px) {
  @container (max-width: 118px) {
    .seller-section .product-card small {
      margin-bottom: 14px;
    }
  }
}

/* ---------- Desktop (>=1121px): horizontal rail, 6 cards visible, cqi-fluid ---------- */

@media (min-width: 1121px) {
  .product-card:not(.top-card) .product-img img {
    aspect-ratio: 1 / 0.95;
  }

  .trend-rail,
  .seller-rail {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
  }

  .seller-rail {
    gap: var(--seller-rail-gap);
    overflow: visible;
    scroll-snap-type: none;
    align-items: flex-end;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    will-change: transform;
  }

  .seller-rail.is-dragging {
    cursor: grabbing;
  }

  .seller-rail .product-card.top-card,
  .seller-rail .product-card:not(.top-card) {
    flex: 0 0 calc((100% - (var(--seller-rail-gap) * 5)) / 6);
    width: calc((100% - (var(--seller-rail-gap) * 5)) / 6);
    max-width: calc((100% - (var(--seller-rail-gap) * 5)) / 6);
    container-type: inline-size;
    min-height: 0;
  }

  .seller-rail .product-card.top-card > b {
    top: 6.1cqi;
    left: 7cqi;
    font-size: 23cqi;
  }

  .seller-rail .product-card:not(.top-card) > b {
    top: 6.4cqi;
    left: 7.3cqi;
    font-size: 20.5cqi;
  }

  .seller-rail .product-card .product-img {
    height: 88.6cqi;
    font-size: 11.4cqi;
  }

  .seller-rail .product-card p {
    margin: 6.1cqi 4.4cqi 1.8cqi;
    font-size: 6cqi;
  }

  .seller-rail .product-card h3 {
    min-height: 15.4cqi;
    font-size: 6.8cqi;
    font-weight: 700;
  }

  .seller-rail .product-card .product-rating,
  .seller-rail .product-card .product-rating1 {
    gap: 1.8cqi;
    margin: 0 4.4cqi 3.5cqi;
    font-size: 5.7cqi;
  }

  .seller-rail .product-card .product-rating span,
  .seller-rail .product-card .product-rating1 span {
    width: 5.3cqi;
    height: 5.3cqi;
  }

  .seller-rail .product-card small {
    gap: 2.6cqi;
    margin: 2.2cqi 4.4cqi 4.8cqi;
    font-size: 7cqi;
  }

  .seller-rail .product-card small del {
    font-size: 6.1cqi;
  }

  .seller-rail .product-card .card-actions {
    gap: 2.6cqi;
    margin: auto 3.5cqi 3.5cqi;
    grid-template-columns: 1fr 14.9cqi;
  }

  .seller-rail .product-card .card-actions button {
    height: 13.2cqi;
    border-radius: 3.1cqi;
  }

  .seller-rail .product-card .card-actions button img {
    width: 7.9cqi;
    height: 7.9cqi;
  }

  .seller-rail .product-card.top-card {
    flex: 0 0 min(calc((100% - 150px) / 6), 228px);
    width: min(calc((100% - 150px) / 6), 228px);
    max-width: 228px;
    height: auto;
    min-height: 0;
    border-color: rgba(64, 47, 88, 0.18);
    color: #261f31;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.54) 0%, rgba(255, 255, 255, 0) 34%),
      linear-gradient(28deg, #d6b4ff 0%, #f39bd6 22%, #ffc9ae 50%, #ffd8cd 100%);
    aspect-ratio: 228 / 390;
  }

  .seller-rail .product-card:not(.top-card) {
    flex: 0 0 min(calc((100% - 150px) / 6), 219px);
    width: min(calc((100% - 150px) / 6), 219px);
    max-width: 219px;
    height: auto;
    min-height: 0;
    align-self: end;
    aspect-ratio: 219 / 362;
  }
}
