/*
 * product-card.css — TCB Elementor Theme
 * Product grid and individual card layout, hover effects, quick-add overlay,
 * wishlist save button, price, and metadata rows.
 * Scoped to avoid conflicts with Elementor and WooCommerce.
 */

/* ─── Product Grid ───────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 23px;
}

/* ─── Product Card Shell ─────────────────────────────────────────────────── */
.product-card {
  display: flex;
  flex-direction: column;
}

/* ─── Product Photo ──────────────────────────────────────────────────────── */
.product-photo {
  position: relative;
  aspect-ratio: 3 / 3.85;
  overflow: hidden;
  background: #edebe7;
}

/* ─── Photo Button (full-bleed clickable image) ──────────────────────────── */
.photo-button {
  width: 100%;
  height: 100%;
  padding: 0;
  display: block;
}

.photo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s, transform 0.7s;
}

/* ─── Alternate / Hover Image ────────────────────────────────────────────── */
.photo-button .alternate-image {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.product-photo:hover .alternate-image {
  opacity: 1;
}

.product-photo:hover img {
  transform: scale(1.025);
}

/* ─── Product Tag (badge overlay) ────────────────────────────────────────── */
.product-tag {
  position: absolute;
  top: 15px;
  left: 13px;
  background: #fafaf3ed;
  font-size: 8px;
  padding: 7px 9px;
  letter-spacing: 0.7px;
  pointer-events: none;
}

/* ─── Save / Wishlist Button ─────────────────────────────────────────────── */
.save-button {
  position: absolute;
  right: 12px;
  top: 11px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fafaf3df;
}

.save-button svg {
  width: 17px;
  height: 17px;
}

.save-button.is-saved svg {
  fill: var(--green);
  stroke: var(--green);
}

/* ─── Quick-Add Overlay ──────────────────────────────────────────────────── */
.quick-add {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: #fafaf5ec;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
}

.quick-add span {
  font-size: 17px;
}

/* Reveal quick-add on hover or keyboard focus within card */
.product-photo:hover .quick-add,
.product-photo:focus-within .quick-add {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Touch Devices: Quick-Add Always Visible ────────────────────────────── */
@media (hover: none) {
  .quick-add {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Product Info Row ───────────────────────────────────────────────────── */
.product-info {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 16px;
}

.product-kind {
  font-size: 8px;
  letter-spacing: 1.1px;
  color: #7a7e73;
}

.product-info h3 {
  font-size: 13px;
  font-weight: 500;
  margin-top: 7px;
}

/* ─── Price ──────────────────────────────────────────────────────────────── */
.price {
  font-size: 13px;
  white-space: nowrap;
}

.price del {
  color: #92958b;
  font-size: 10px;
  display: block;
  text-align: right;
  margin-top: 4px;
}

/* ─── Product Meta Row ───────────────────────────────────────────────────── */
.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #7e8276;
  margin-top: 10px;
}

/* ─── Discount Badge ─────────────────────────────────────────────────────── */
.discount {
  color: #5b7246;
}
