/* =========================================================
   MOLIGHT — PREMIUM PRODUCT CARDS
   ========================================================= */

.product-card {
  --product-content-inset: 1em;
  --product-card-background: var(--section-bg-color, var(--color-base-white));
  --product-card-foreground: var(--section-text-color, var(--color-base-black));
  --product-card-border-color: rgba(var(--product-card-foreground), 0.10);
  --product-card-border: 1px solid var(--product-card-border-color);

  position: relative;
  overflow: hidden;
  border-radius: var(--product-card-border-radius);
  background: rgb(var(--product-card-background));
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}


/* =========================
   HOVER
   ========================= */

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
  border-color: rgba(var(--product-card-foreground), 0.16);
}


/* =========================
   BADGES
   ========================= */

.product-card .badge {
  position: absolute;
  inset-block-start: var(--product-content-inset);
  z-index: 3;

  background-color: var(--badge-bg-color);
  color: var(--badge-text-color);

  border-radius: calc(var(--product-card-border-radius) * 0.66);
  padding: 0.4em 0.9em;

  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.product-card .badge[data-position$="left"] {
  inset-inline-start: var(--product-content-inset);
}

.product-card .badge[data-position$="right"] {
  inset-inline-end: var(--product-content-inset);
}

.product-card .badge span {
  max-width: 32ch;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================
   PRODUCT IMAGE
   ========================= */

.product-card .img-link {
  display: block;
  overflow: hidden;
  outline-offset: -1px;
  background: #f7f7f5;
}

.product-card .img-link img {
  width: 100%;
  height: var(--product-img-height);

  object-fit: cover;
  -o-object-fit: cover;

  border-radius: var(--product-card-border-radius);
  pointer-events: none;

  transition: transform 0.55s ease;
}

.product-card:hover .img-link img {
  transform: scale(1.035);
}


/* =========================
   PLACEHOLDER
   ========================= */

.product-card .img-link .card-placeholder {
  width: 100%;
  height: 100%;

  background-color: rgba(var(--product-card-foreground), 0.05);
  border-radius: var(--product-card-border-radius);
}

.product-card .img-link .card-placeholder svg {
  color: rgba(var(--product-card-foreground), 0.6);
}


/* =========================
   PRODUCT INFORMATION
   ========================= */

.product-card .info {
  padding: 18px 18px 20px;

  display: grid;
  gap: 8px;

  border-radius: var(--product-card-border-radius);

  background-color: var(--product-card-background);
  color: rgb(var(--product-card-foreground));
}


/* =========================
   PRODUCT TITLE
   ========================= */

.product-card .info .title {
  justify-self: var(--product-card-text-alignment);

  max-width: 100%;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  color: currentColor;

  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;

  letter-spacing: -0.01em;
}


/* =========================
   PRICE
   ========================= */

.product-card .info .price {
  justify-self: var(--product-card-text-alignment);

  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 10px;

  margin-top: 2px;

  font-size: var(--text-md);
}

.product-card .info .price .current {
  color: #B8872E;

  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;

  letter-spacing: -0.02em;
}

.product-card .info .price .compare-at {
  color: currentColor;

  font-size: 14px;
  font-weight: 400;

  opacity: 0.55;

  text-decoration: line-through;
}


/* =========================
   BUTTON
   ========================= */

.product-card .info button.secondary,
.product-card .info .yc-btn.secondary {
  width: 100%;
  margin-block-start: 10px;
  min-height: 44px;

  border: 1px solid #013f30;
  border-radius: 7px;

  background-color: transparent;
  color: #013f30;

  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;

  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease;
}

.product-card .info button.secondary:hover,
.product-card .info .yc-btn.secondary:hover {
  background-color: #013f30;
  color: #ffffff;
  transform: translateY(-1px);
}

/* =========================================================
   STANDARD PRODUCT CARD
   ========================================================= */

.product-card[data-style$="standard"] {
  --product-img-height: 390px;

  border: var(--product-card-border);
}

.product-card[data-style$="standard"] .img-link {
  display: block;

  border-bottom: 1px solid
    rgba(var(--product-card-foreground), 0.07);
}

.product-card[data-style$="standard"] .img-link,
.product-card[data-style$="standard"] img {
  height: var(--product-img-height);
}

.product-card[data-style$="standard"] img,
.product-card[data-style$="standard"] .card-placeholder {
  border-end-end-radius: 0;
  border-end-start-radius: 0;
}

.product-card[data-style$="standard"] .info {
  position: static;

  border-start-end-radius: 0;
  border-start-start-radius: 0;
}

.product-card[data-style$="standard"] .info button {
  width: 100%;
}


/* =========================================================
   COMPACT PRODUCT CARD
   ========================================================= */

.product-card[data-style$="compact"] {
  --product-img-height: 400px;
}

.product-card[data-style$="compact"]::before {
  content: "";

  position: absolute;
  width: 100%;
  height: 100%;

  z-index: 1;

  border-radius: var(--product-card-border-radius);

  -webkit-backdrop-filter: var(--overlay-blur);
  backdrop-filter: var(--overlay-blur);

  background-color: var(--overlay-background);

  opacity: 0;

  transition: var(--transition-duration-normal);

  pointer-events: none;
}

.product-card[data-style$="compact"]:hover::before {
  opacity: 1;
}

.product-card[data-style$="compact"] .img-link {
  display: block;
}

.product-card[data-style$="compact"] .img-link,
.product-card[data-style$="compact"] img {
  height: var(--product-img-height);
}

.product-card[data-style$="compact"] .info {
  position: absolute;

  z-index: 2;

  inset-block-end: 0;

  margin: var(--product-content-inset);
  padding: var(--product-content-inset);

  width: -webkit-fill-available;
  width: -moz-available;
  width: stretch;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .product-card[data-style$="standard"] {
    --product-img-height: 330px;
  }

  .product-card .info {
    padding: 16px;
  }

  .product-card .info .price .current {
    font-size: 19px;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

  .product-card {
    border-radius: 10px;
  }

  .product-card:hover {
    transform: none;
    box-shadow: none;
  }

  .product-card[data-style$="standard"] {
    --product-img-height: 260px;
  }

  .product-card .info {
    padding: 14px;
    gap: 6px;
  }

  .product-card .info .title {
    font-size: 14px;
  }

  .product-card .info .price .current {
    font-size: 18px;
  }

  .product-card .info button.secondary,
  .product-card .info .yc-btn.secondary {
    min-height: 42px;
    margin-block-start: 8px;
    font-size: 12px;
  }
}