/* =========================================================
   TryLoveMe shared product card
   One component for Home, shop, categories, search and recommendations.
   ========================================================= */

.tlm-product-card {
  position: relative;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  padding: 10px;
  border: 1px solid rgba(58, 31, 34, .09);
  border-radius: var(--tlm-radius-lg);
  background: var(--tlm-pure-white);
  box-shadow: var(--tlm-shadow-sm);
  transition: transform var(--tlm-duration-normal) ease, box-shadow var(--tlm-duration-normal) ease, border-color var(--tlm-duration-normal) ease;
}
.tlm-product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(225,128,177,.32);
  box-shadow: 0 18px 42px rgba(62, 43, 50, .09);
}
.tlm-product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.04;
  overflow: hidden;
  border-radius: var(--tlm-radius-md);
  background: var(--tlm-pure-white);
}
.tlm-product-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity .35s ease, transform .55s cubic-bezier(.2,.65,.25,1);
}
.tlm-product-card__image--secondary { opacity: 0; }
.tlm-product-card__image--secondary:not([src]) { visibility: hidden; }
.tlm-product-card__image--secondary.is-loaded { visibility: visible; }
.tlm-product-card__media.has-secondary.secondary-ready:hover .tlm-product-card__image--primary { opacity: 0; }
.tlm-product-card__media.has-secondary.secondary-ready:hover .tlm-product-card__image--secondary.is-loaded { opacity: 1; transform: scale(1.025); }
.tlm-product-card__media:not(.has-secondary):hover .tlm-product-card__image--primary { transform: scale(1.025); }
.tlm-product-card__badges {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-right: 52px;
  pointer-events: none;
}
.tlm-product-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 5px 9px;
  border-radius: var(--tlm-radius-pill);
  background: rgba(255,255,255,.94);
  color: var(--tlm-deep-black);
  box-shadow: 0 3px 12px rgba(23,21,20,.06);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.tlm-product-badge--sale { background: var(--tlm-deep-black); color: #fff; }

/* Wishlist lives on the product image, where users expect it. */
.tlm-product-card__wishlist {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(23,21,20,.10);
  border-radius: var(--tlm-radius-pill);
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.92);
  color: var(--tlm-text);
  box-shadow: 0 6px 18px rgba(23,21,20,.07);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.tlm-product-card__wishlist-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0;
  line-height: 1;
  color: var(--tlm-text);
}
.tlm-product-card__wishlist-icon::before {
  content: "♡";
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}
.tlm-product-card__wishlist:hover { transform: translateY(-1px) scale(1.03); border-color: rgba(23,21,20,.24); background: #fff; }
.tlm-product-card__wishlist:hover .tlm-product-card__wishlist-icon { transform: scale(1.06); }
.tlm-product-card__wishlist.is-active,
.tlm-product-card__wishlist[aria-pressed="true"] { background: #fff; color: var(--tlm-accent); border-color: rgba(184,111,127,.42); }
.tlm-product-card__wishlist.is-active .tlm-product-card__wishlist-icon,
.tlm-product-card__wishlist[aria-pressed="true"] .tlm-product-card__wishlist-icon { color: var(--tlm-accent); }
.tlm-product-card__wishlist.is-active .tlm-product-card__wishlist-icon::before,
.tlm-product-card__wishlist[aria-pressed="true"] .tlm-product-card__wishlist-icon::before { content: "♥"; }
.tlm-product-card__wishlist:focus-visible { outline: 2px solid var(--tlm-accent); outline-offset: 2px; }

.tlm-product-card__body {
  flex: 1;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  padding: 14px 5px 4px;
}
.tlm-product-card__copy {
  min-height: 68px;
  display: flex;
  flex-direction: column;
}
.tlm-product-card__category {
  margin: 0 0 6px;
  color: var(--tlm-muted);
  font-size: 9px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .11em;
}
.tlm-product-card__title {
  display: -webkit-box;
  min-height: 40px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 520;
  letter-spacing: -.014em;
}
.tlm-product-card__title a { display: block; }
.tlm-product-card__purchase { margin-top: auto; padding-top: 12px; }
.tlm-product-card .tlm-product-card__price {
  min-height: 22px;
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--tlm-text);
  font-family: var(--tlm-font);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.tlm-product-card .tlm-product-card__price .woocommerce-Price-amount,
.tlm-product-card .tlm-product-card__price .woocommerce-Price-amount bdi,
.tlm-product-card .tlm-product-card__price .woocommerce-Price-currencySymbol,
.tlm-product-card .tlm-product-card__price del,
.tlm-product-card .tlm-product-card__price ins { font: inherit; line-height: inherit; }
.tlm-product-card .tlm-product-card__price del { color: var(--tlm-muted); font-size: 12px; font-weight: 400; opacity: .6; }
.tlm-product-card .tlm-product-card__price ins { text-decoration: none; font-weight: 750; }

/* Product card CTA — one stable layout for add-to-cart and product links. */
.tlm-product-card .tlm-product-card__button,
.woocommerce .tlm-product-card a.tlm-product-card__button,
.woocommerce .tlm-product-card a.tlm-product-card__button.button {
  position: relative;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 48px 0 18px;
  border: 0;
  border-radius: var(--tlm-radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tlm-accent);
  color: var(--tlm-pure-white);
  box-shadow: 0 8px 20px rgba(225,128,177,.18);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .075em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform var(--tlm-duration-fast) var(--tlm-ease), box-shadow var(--tlm-duration-fast) var(--tlm-ease), background var(--tlm-duration-fast) var(--tlm-ease);
}
.tlm-product-card__button-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tlm-product-card__button-icon {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border-radius: var(--tlm-radius-pill);
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.20);
  color: var(--tlm-pure-white);
  transform: translateY(-50%);
  pointer-events: none;
  transition: transform var(--tlm-duration-fast) var(--tlm-ease), background var(--tlm-duration-fast) var(--tlm-ease);
}
.tlm-product-card__button-icon svg {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
}
.tlm-product-card .tlm-product-card__button:hover,
.tlm-product-card .tlm-product-card__button:focus-visible,
.woocommerce .tlm-product-card a.tlm-product-card__button:hover,
.woocommerce .tlm-product-card a.tlm-product-card__button.button:hover {
  background: #d96fa5;
  color: var(--tlm-pure-white);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(225,128,177,.26);
}
.tlm-product-card .tlm-product-card__button:hover .tlm-product-card__button-icon,
.tlm-product-card .tlm-product-card__button:focus-visible .tlm-product-card__button-icon {
  background: rgba(255,255,255,.30);
  transform: translate(1px,-50%);
}
.tlm-product-card .tlm-product-card__button.added {
  background: var(--tlm-accent);
  color: var(--tlm-pure-white);
}
.tlm-product-card .tlm-product-card__button:focus-visible {
  outline: 2px solid var(--tlm-accent);
  outline-offset: 3px;
}
/* WooCommerce inserts this after successful AJAX add; keep the card layout stable. */
.tlm-product-card .added_to_cart.wc-forward { display: none; }

@media (max-width:767px) {
  .tlm-product-card__body { min-height:140px; padding-top:11px; }
  .tlm-product-card__copy { min-height:56px; }
  .tlm-product-card__purchase { margin-top:10px; padding-top:0; }
  .tlm-product-card .tlm-product-card__button { height: 42px; min-height: 42px; padding-left: 14px; padding-right: 44px; font-size: 9px; }
  .tlm-product-card__button-icon { right: 6px; width: 28px; height: 28px; }
}


/* Product media is intentionally a single white surface. No decorative platform. */
.tlm-product-card__media,
.tlm-product-card__media::before,
.tlm-product-card__media::after { background-color: var(--tlm-pure-white); }
.tlm-product-card__media::before,
.tlm-product-card__media::after { content: none; }
.tlm-product-card__image { background: transparent; }
