/* Product cards used in WooCommerce loops */

/* Product grid */
ul.products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: stretch;
}

@media (max-width: 1200px) {
  ul.products {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1024px) {
  ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Card */
ul.products li.product.bollypiano-product-card {
  background-color: #FFFFFF;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}

ul.products li.product.bollypiano-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Image background */
.bollypiano-product-image-wrapper {
  width: 100%;
  height: 157px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

/* Keep wishlist button outside clickable media link */
a.bollypiano-product-card__media-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.bollypiano-product-image-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  border-radius: 12px 12px 0 0;
}

/* Footer is pinned to card bottom */
.bollypiano-product-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.bollypiano-product-content__body {
  flex: 0 0 auto;
}

.bollypiano-product-content__footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

/* Ignore tracking nodes in layout flow */
.bollypiano-product-content__footer > script,
.bollypiano-product-content__footer > input[type="hidden"] {
  display: none;
}

/* Title and price block link */
a.bollypiano-product-card__details-link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.bollypiano-product-card__details-link:hover .woocommerce-loop-product__title {
  color: var(--primary);
}

.bollypiano-product-content__footer .add_to_cart_button,
.bollypiano-product-content__footer a.button.add_to_cart_button,
.bollypiano-product-content__footer form.cart {
  width: 100%;
  box-sizing: border-box;
}

.bollypiano-product-content__footer .player-button {
  width: 100%;
  box-sizing: border-box;
}

/* Title */
.bollypiano-product-card .woocommerce-loop-product__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f1f1f;
  margin: 0;
  line-height: 1.4;
}

/* Keep smooth color transition on hover */
.bollypiano-product-card__details-link .woocommerce-loop-product__title {
  transition: color 0.3s ease;
}

/* Price */
.bollypiano-product-card .price {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

/* Add to cart */
.bollypiano-product-card .button,
.bollypiano-product-card .add_to_cart_button,
.bollypiano-product-card a.button {
  background-color: var(--primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 0.5rem 1.5rem !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  width: 100% !important;
}

.bollypiano-product-card .button:hover,
.bollypiano-product-card .add_to_cart_button:hover,
.bollypiano-product-card a.button:hover {
  background-color: #C57200 !important;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 129, 0, 0.3);
}
