/* =========================================
   EXTRA PREMIUM PRODUCT CARD CSS
========================================= */

.product-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 119, 255, 0.14);
  border-radius: 28px;
  padding: 14px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    rgba(0, 119, 255, 0.35),
    transparent 35%,
    rgba(0, 95, 224, 0.28)
  );
  opacity: 0;
  z-index: 0;
  transition: 0.4s ease;
}

.product-card::after {
  content: "";
  position: absolute;
  top: -80px;
  left: -120px;
  width: 90px;
  height: 220%;
  background: rgba(255, 255, 255, 0.45);
  transform: rotate(25deg);
  opacity: 0;
  transition: 0.65s ease;
}

.product-card:hover {
  transform: translateY(-10px) scale(1.01);
  border-color: rgba(0, 119, 255, 0.38);
  box-shadow: 0 28px 70px rgba(0, 119, 255, 0.18);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover::after {
  left: 130%;
  opacity: 1;
}

.product-image-box,
.product-content {
  position: relative;
  z-index: 2;
}

/* IMAGE BOX */
.product-image-box {
  height: 315px;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(
    circle at top,
    #ffffff 0%,
    #eef7ff 48%,
    #dbeafe 100%
  );
}

.product-image-box a {
  display: block;
  width: 100%;
  height: 100%;
}

.product-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.55s ease,
    filter 0.55s ease;
}

.product-card:hover .product-image-box img {
  transform: scale(1.08) rotate(1deg);
  filter: saturate(1.08) contrast(1.04);
}

/* DISCOUNT BADGE */
.discount-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 20;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0077ff, #005fe0);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(0, 119, 255, 0.35);
}

/* CONTENT */
.product-content {
  padding: 20px 5px 4px;
}

.product-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-name {
  flex: 1;
  margin: 0;
  min-height: 54px;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.35;
  color: #071327;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.svg-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.svg-stars svg {
  width: 16px;
  height: 16px;
}

.svg-stars svg path {
  stroke: #ffb703;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.svg-stars svg.filled path {
  fill: #ffb703;
}

.svg-stars svg.empty path {
  fill: #ffffff;
}

/* WISHLIST */
.wishlist-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1px solid rgba(0, 119, 255, 0.14);
  border-radius: 50%;
  background: #f4f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.32s ease;
}

.wishlist-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #0077ff;
  stroke-width: 2;
  transition: 0.32s ease;
}

.wishlist-btn:hover {
  transform: translateY(-3px) scale(1.08);
  background: #0077ff;
  box-shadow: 0 12px 25px rgba(0, 119, 255, 0.28);
}

.wishlist-btn:hover svg,
.wishlist-btn.active svg {
  fill: #ffffff;
  stroke: #ffffff;
}

.wishlist-btn.active {
  background: linear-gradient(135deg, #0077ff, #005fe0);
}

/* RATING */
.rating-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.rating-text {
  font-size: 14px;
  font-weight: 800;
  color: #7c8da5;
}

/* PRICE */
.price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.new-price {
  font-size: 28px;
  font-weight: 950;
  color: #0077ff;
  line-height: 1;
}

.old-price {
  font-size: 15px;
  font-weight: 800;
  color: #94a3b8;
  text-decoration: line-through;
}

/* ADD TO CART */
.add-cart-btn {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #0077ff, #005fe0);
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: 0.35s ease;
  box-shadow: 0 14px 28px rgba(0, 119, 255, 0.25);
}

.add-cart-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 60%;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  transform: skewX(-22deg);
  transition: 0.55s ease;
}

.add-cart-btn:hover::before {
  left: 130%;
}

.add-cart-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 35px rgba(0, 119, 255, 0.35);
}

.add-cart-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  z-index: 2;
}

.add-cart-btn.out-of-stock,
.add-cart-btn.added {
  cursor: not-allowed;
  transform: none;
}

.add-cart-btn.out-of-stock {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: none;
}

.add-cart-btn.added {
  background: linear-gradient(135deg, #0d78cf, #5aa0ce);
  box-shadow: 0 14px 28px rgba(148, 190, 238, 0.22);
}

.add-cart-btn.out-of-stock::before,
.add-cart-btn.added::before {
  display: none;
}

/* TOP SELLING RIBBON */
.top-selling-ribbon,
.new-arrival-ribbon {
  position: absolute;
  top: 17px;
  right: -46px;
  z-index: 25;
  width: 165px;
  height: 32px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
}

.top-selling-ribbon {
  background: linear-gradient(135deg, #ff8a00, #ff2d2d);
  box-shadow: 0 10px 24px rgba(255, 80, 0, 0.38);
}

.new-arrival-ribbon {
  background: linear-gradient(135deg, #22c55e, #15803d);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.36);
}

/* PRODUCT DETAIL HEART */
.pd-heart-btn {
  width: 100%;
  min-height: 48px;
  margin-bottom: 18px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #ffffff;
  color: #071327;
  font-size: 15px;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.3s ease;
}

.pd-heart-btn:hover,
.pd-heart-btn.active {
  background: linear-gradient(135deg, #0077ff, #005fe0);
  color: #ffffff;
  border-color: #0077ff;
}

.pd-heart-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #0077ff;
  stroke-width: 2.4;
}

.pd-heart-btn:hover svg,
.pd-heart-btn.active svg {
  fill: #ffffff;
  stroke: #ffffff;
}

/* RELATED GRID */
.related-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* TABLET */
@media (max-width: 768px) {
  .product-card {
    padding: 12px;
    border-radius: 22px;
  }

  .product-image-box {
    border-radius: 20px;
  }

  .product-name {
    font-size: 17px;
    min-height: 48px;
  }

  .new-price {
    font-size: 24px;
  }

  .add-cart-btn {
    height: 50px;
    font-size: 15px;
  }

  .related-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE */
@media (max-width: 480px) {
  .product-card {
    padding: 9px;
    border-radius: 18px;
  }

  .product-image-box {
    height: 185px;
    border-radius: 15px;
  }

  .discount-badge {
    top: 10px;
    left: 10px;
    height: 29px;
    padding: 0 10px;
    font-size: 10px;
  }

  .product-content {
    padding-top: 13px;
  }

  .product-name {
    font-size: 14px;
    min-height: 40px;
  }

  .wishlist-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .wishlist-btn svg {
    width: 17px;
    height: 17px;
  }
  .svg-stars svg {
    width: 13px;
    height: 13px;
  }

  .rating-text {
    font-size: 10px;
  }
  .new-price {
    font-size: 20px;
  }

  .old-price {
    font-size: 13px;
  }

  .add-cart-btn {
    height: 44px;
    border-radius: 12px;
    font-size: 13px;
  }

  .top-selling-ribbon,
  .new-arrival-ribbon {
    top: 13px;
    right: -50px;
    width: 155px;
    height: 27px;
    font-size: 9px;
  }

  .related-product-grid {
    grid-template-columns: 1fr 1fr;
    gap:5px;
  }
  .add-cart-btn svg{
    display: none;
  }
}
