/* ========================================
   PRODUCT CARD (Redesigned - Template Match)
======================================== */
.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.12);
  box-shadow: 0 2px 8px rgba(90,15,56,0.06), 0 4px 16px rgba(90,15,56,0.05);
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94), box-shadow 0.4s ease, border-color 0.3s ease;
  position: relative;
  perspective: 800px;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 100%;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201,168,76,0.25);
  box-shadow: 0 12px 40px rgba(90,15,56,0.12), 0 4px 12px rgba(201,168,76,0.1);
}

/* Image area with frame */
.product-card-img {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, #faf5f0, #f5e8de, #ede0d4);
  overflow: hidden;
  margin: 10px; border-radius: calc(var(--radius-lg) - 4px);
  text-decoration: none;
  cursor: pointer;
}

/* Clickable info area (category + name + price) */
.product-card-info-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-card-info-link:hover .product-name {
  color: var(--gold);
}
.product-card-img .img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; color: rgba(201,168,76,0.25);
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.product-card:hover .img-placeholder {
  transform: scale(1.08);
}

/* Real product image */
.product-card-img .product-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: absolute;
  inset: 0;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.5s ease;
}
.product-card-img .product-img-primary {
  position: relative; z-index: 1;
}
.product-card-img .product-img-hover {
  position: absolute; inset: 0;
  z-index: 2;
  opacity: 0;
}
.product-card:hover .product-img-primary {
  transform: scale(1.08);
}
.product-card:hover .product-img-hover {
  opacity: 1;
  transform: scale(1.05);
}
/* Fallback: if no hover image, still zoom primary */
.product-card:hover .product-img:only-child {
  transform: scale(1.08);
}

/* Gold frame border inside image */
.product-card-img .img-frame {
  position: absolute; inset: 6px;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: calc(var(--radius-lg) - 8px);
  z-index: 3; pointer-events: none;
}

/* Geometric gold diamond pattern overlay on card */
.card-pattern {
  position: absolute; inset: 0;
  z-index: 1; pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='geo' x='0' y='0' width='120' height='120' patternUnits='userSpaceOnUse'%3E%3Cpath d='M60 5 L115 60 L60 115 L5 60 Z' fill='none' stroke='%23C9A84C' stroke-width='0.8'/%3E%3Cpath d='M60 20 L100 60 L60 100 L20 60 Z' fill='none' stroke='%23C9A84C' stroke-width='0.5'/%3E%3Cline x1='60' y1='0' x2='60' y2='120' stroke='%23C9A84C' stroke-width='0.4'/%3E%3Cline x1='0' y1='60' x2='120' y2='60' stroke='%23C9A84C' stroke-width='0.4'/%3E%3Cpath d='M0 0 L30 0 L0 30 Z' fill='none' stroke='%23C9A84C' stroke-width='0.5'/%3E%3Cpath d='M120 0 L90 0 L120 30 Z' fill='none' stroke='%23C9A84C' stroke-width='0.5'/%3E%3Cpath d='M0 120 L30 120 L0 90 Z' fill='none' stroke='%23C9A84C' stroke-width='0.5'/%3E%3Cpath d='M120 120 L90 120 L120 90 Z' fill='none' stroke='%23C9A84C' stroke-width='0.5'/%3E%3Cpath d='M60 52 L68 60 L60 68 L52 60 Z' fill='none' stroke='%23C9A84C' stroke-width='0.6'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='120' height='120' fill='url(%23geo)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  background-repeat: repeat;
}

/* Wishlist */
.wishlist-btn {
  position: absolute; top: 26px; right: 26px;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  font-size: 17px; color: var(--lavender);
  transition: all 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border: 1.5px solid rgba(255,255,255,0.6);
}
.wishlist-btn:hover { color: var(--coral); transform: scale(1.15); box-shadow: 0 4px 16px rgba(255,92,122,0.2); }
.wishlist-btn.active {
  color: var(--coral);
  background: rgba(255,92,122,0.12);
  border-color: rgba(255,92,122,0.3);
}
.wishlist-btn .fa-heart { transition: transform 0.25s cubic-bezier(0.68,-0.55,0.265,1.55); }
.wishlist-btn.active .fa-heart { transform: scale(1.25); }

/* Sale badge */
.sale-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 5px 12px; border-radius: 6px;
  background: linear-gradient(135deg, var(--coral), #ff7b93);
  color: #fff;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; z-index: 5;
  box-shadow: 0 2px 8px rgba(255,92,122,0.3);
}

/* Card body - centered text */
.product-card-body { padding: 20px 18px 22px; text-align: center; flex: 1; display: flex; flex-direction: column; }
.product-category {
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--lavender); margin-bottom: 6px;
}
.product-name {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  color: var(--color-text); margin-bottom: 8px;
  line-height: 1.25;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}
.product-price {
  font-size: 20px; font-weight: 700;
  color: var(--gold); margin-bottom: 16px;
  font-family: var(--font-heading);
}
.product-price .original-price {
  font-size: 14px; color: var(--lavender);
  text-decoration: line-through; margin-left: 8px; font-weight: 400;
}

/* Size pills */
.size-selector { margin-bottom: 14px; }
.size-selector-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--color-text-muted); margin-bottom: 8px;
}
.size-pills { display: flex; justify-content: center; gap: 5px; flex-wrap: nowrap; }
.size-pill {
  padding: 6px 12px; border-radius: 20px;
  border: 1.5px solid var(--color-border-light);
  font-size: 12px; font-weight: 600;
  color: var(--color-text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  background: transparent;
}
.size-pill:hover {
  border-color: var(--gold); color: var(--gold);
}
.size-pill.active {
  background: var(--gold); color: #fff;
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(201,168,76,0.3);
}

/* Scent notes + card actions */
.card-bottom { position: relative; min-height: 50px; margin-top: auto; }
.scent-notes {
  display: flex; justify-content: center; gap: 14px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.scent-note {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.scent-note-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: var(--color-gold-bg);
  border: 1.5px solid var(--color-gold-border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.scent-note-icon svg { width: 24px; height: 24px; }
.scent-note span {
  font-size: 10px; font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.card-actions {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 8px; justify-content: center;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.product-card:hover .scent-notes {
  opacity: 0; transform: translateY(-12px); pointer-events: none;
}
.product-card:hover .card-actions {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.btn-buy-now, .btn-add-cart {
  padding: 10px 20px; border-radius: 25px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-buy-now {
  background: var(--color-text); color: #fff;
  border: 1.5px solid var(--color-text);
}
.btn-buy-now:hover {
  background: var(--primary); border-color: var(--primary);
}
.btn-add-cart {
  background: var(--gold); color: #fff;
  border: 1.5px solid var(--gold);
}
.btn-add-cart:hover {
  background: var(--color-gold-dark); border-color: var(--color-gold-dark);
}
.btn-add-cart.added {
  background: var(--color-success); border-color: var(--color-success);
}

/* Swiper slide equal heights */
.swiper-wrapper { align-items: stretch; }
.swiper-slide { height: auto; }

/* Product slider wrapper */
.product-slider-wrap { position: relative; }
.product-slider-wrap .swiper-button-next,
.product-slider-wrap .swiper-button-prev {
  color: var(--color-text); width: 42px; height: 42px;
  background: #fff; border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}
.product-slider-wrap .swiper-button-next:hover,
.product-slider-wrap .swiper-button-prev:hover {
  background: var(--color-gold); color: #fff;
}
.product-slider-wrap .swiper-button-next::after,
.product-slider-wrap .swiper-button-prev::after {
  font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 16px;
}
.product-slider-wrap .swiper-button-next::after { content: '\f054'; }
.product-slider-wrap .swiper-button-prev::after { content: '\f053'; }

/* Mobile/touch: always show card action buttons since hover is unavailable */
@media (hover: none) {
  .card-actions {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    position: relative;
  }
  .product-card .scent-notes {
    display: none;
  }
  .card-bottom {
    min-height: auto;
  }
}

/* ── Tablet ── */
@media (max-width: 1023px) {
  .product-name { font-size: 17px; }
  .product-price { font-size: 17px; }
  .product-card-img { margin: 8px; }
  .product-card-info { padding: 12px 14px 14px; }
  .size-pill { padding: 5px 12px; font-size: 11px; }
}
@media (max-width: 430px) {
  .product-name { font-size: 15px; }
  .product-price { font-size: 15px; margin-bottom: 12px; }
  .product-card-info { padding: 10px 12px 12px; }
  .size-pill { padding: 4px 10px; font-size: 10px; }
}
