/* =========================================
   PRODUCT CARD COMPONENT
   ========================================= */
.product-card {
  position: relative;
  width: 100%;
  transition: all 0.3s ease;
  font-family: var(--h1-font-body, "Outfit", sans-serif);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card:hover .product-image {
  transform: scale(1.05);
  /* Subtle zoom on hover */
}

.product-image-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background-color: #ffffff;
  /* Clean background for letterboxing */
}

.product-actions-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

/* Show actions on hover */
.product-card:hover .product-actions-overlay {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile: always show actions or handle differently */
@media (max-width: 768px) {
  .product-actions-overlay {
    opacity: 1;
    transform: translateX(0);
  }
}

.action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #000000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 15px;
}

/* HOVER EFFECT: White bg/Black icon -> Black bg/White icon */
.action-btn:hover {
  background-color: #000000;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #d93f3f;
  /* Sale Red */
  color: white;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
}

/* Sale Badge - Red solid */
.product-badge.sale-badge {
  background: #d71515;
  color: white;
}

/* New Arrival Badge - Black solid */
.product-badge.new-badge {
  background: #000000;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px){
  .product-badge.new-badge{
     top: 5px;
     left: 5px;

  }
  .product-badge.sale-badge{
    top: 5px;
    left: 5px;

  }


}

.product-details {
  padding-top: 8px;
  text-align: center;
}

.product-meta-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #888;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  font-weight: 500;
  flex-wrap: wrap;
  min-height: 18px;
}

.meta-item {
  white-space: nowrap;
}

.meta-separator {
  color: #d1d1d1;
  font-size: 10px;
}

.product-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: #1c1c1c;
  text-align: center;
  /* Force 2 lines height */
  height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .product-title {
    height: 40px; /* Force 2 lines height on mobile */
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-meta-row {
    gap: 3px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .product-title {
    height: 40px; /* Force 2 lines height on mobile */
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-meta-row {
    gap: 3px;
    font-size: 8.5px;
  }
}

.product-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.product-title a:hover {
  color: #c5a059;
  /* Accent Color */
}

.product-price {
  font-weight: 600;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  /* Centered */
  font-size: 15px;
  color: #1c1c1c;
  padding-bottom: 10px;
}

.regular-price {
  color: #999;
  text-decoration: line-through;
  font-size: 13px;
  font-weight: 400;
}

.current-price {
  color: var(--t1-color-black);
  /* Sale color if on sale, otherwise inherit main text */
}

/* If not on sale, maybe keep it black. But for now using sale color or main color logic is inside template usually. */
/* Just making price distinct */
.btn-buy-now {
  display: flex;
  width: fit-content;
  margin: 10px auto 0;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #000;
  color: #fff;
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #000;
}

.btn-buy-now:hover {
  background: transparent;
  color: #000;
  border-color: #000;
}

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #000;
  color: #fff;
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid #000;
  margin-top: 10px;
  /* Added spacing from price */
  cursor: pointer;
}

.btn-add-cart:hover {
  background: transparent;
  color: #000;
  border-color: #000;
}

/* REPOSITIONING BUTTONS */
/* Remove old overlay styles if conflicting or override */
/* We removed the wrapper in HTML, so .product-actions-overlay rules won't apply */

.wishlist-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 6;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.cart-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 6;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.product-card:hover .wishlist-btn,
.product-card:hover .cart-btn {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure mobile visibility */
@media (max-width: 768px) {
  .wishlist-btn,
  .cart-btn {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Product Category Tag */
.product-category-tag {
  position: absolute;
  left: 10px;
  bottom: 10px; /* Positioned above the wishlist button (10px bottom + 38px height + ~7px spacing) */
  background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent black */
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 20px; /* Pill shape */
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  pointer-events: none; /* Let clicks pass through if needed, though usually not for tags */
}

/* Hover effect on card -> lift tag slightly */
.product-card:hover .product-category-tag {
  transform: translateY(-2px);
  background-color: rgba(0, 0, 0, 0.75);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Ensure mobile visibility adjustments if needed */
@media (max-width: 768px) {
  .product-category-tag {
    bottom: 10px; /* Maintain position above wishlist button on mobile */
    font-size: 9px;
    padding: 3px 8px;
  }
}

/* OUT OF STOCK STYLING */
.product-card.out-of-stock .product-image-wrapper img {
    opacity: 0.6;
    filter: grayscale(100%);
}

.product-card.out-of-stock .product-details h3 a,
.product-card.out-of-stock .product-price {
    color: #999;
}

.out-of-stock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.product-card.out-of-stock .add-to-cart-btn,
.product-card.out-of-stock .btn-buy-now {
    /* Styles are inline in HTML too, but this reinforces */
    pointer-events: none;
    opacity: 0.5;
    background-color: #ccc;
    border-color: #ccc;
}
