/* Champions Furniture — product card v1.3.1
 * Native WooCommerce counterpart to champions-custom-css-product-card-v2(1).css.
 * One authoritative card design: no Elementor selectors or Filter Everything dependencies.
 * Keep this file loaded AFTER WooCommerce and champions.css.
 */

/* Product grids preserve two columns on mobile, including very narrow screens. */
.woocommerce ul.products,
.woocommerce .products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 26px 16px !important;
  align-items: stretch;
}
.cf-home-products .woocommerce ul.products,
.cf-home-products .woocommerce .products {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Card shell follows original Elementor v2 Grid, NOT a flexbox. */
.woocommerce ul.products li.product.cf-product-card,
.woocommerce .products li.product.cf-product-card {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  width: 100% !important;
  min-width: 0;
  height: 100%;
  padding: 0 !important;
  margin: 0 !important;
  background: #fff;
  border: 1px solid #d9d4c7;
  border-radius: 16px;
  overflow: visible;
  box-shadow: 0 4px 18px rgba(18, 55, 42, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .woocommerce .products li.product.cf-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(18, 55, 42, .13);
  }
}

/* Product photography must ALWAYS be centered and completely visible. */
.woocommerce .products li.product.cf-product-card > a.cf-card-image {
  display: grid !important;
  place-items: center;
  width: 100%;
  height: 260px;
  min-height: 260px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: #f7f3ea;
  border-radius: 15px 15px 0 0;
}
.woocommerce .products li.product.cf-product-card > a.cf-card-image img,
.woocommerce ul.products li.product.cf-product-card > a.cf-card-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  transform: scale(.985);
  transform-origin: center center;
  transition: transform .35s ease, filter .35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .woocommerce .products li.product.cf-product-card:hover > a.cf-card-image img {
    transform: scale(1);
    filter: saturate(1.03);
  }
}

.woocommerce .products li.product.cf-product-card .cf-card-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  padding: 14px 16px 16px;
  background: #fff;
  border-radius: 0 0 15px 15px;
}
.woocommerce .products li.product.cf-product-card h2.woocommerce-loop-product__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-family: Manrope, Poppins, Arial, sans-serif;
  font-size: 15.5px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  color: #12372a;
}
.woocommerce .products li.product.cf-product-card h2.woocommerce-loop-product__title a {
  color: #12372a;
  text-decoration: none;
}
.woocommerce .products li.product.cf-product-card h2.woocommerce-loop-product__title a:hover {
  color: #b87333;
}
.woocommerce .products li.product.cf-product-card .cf-card-price {
  margin: 0 0 8px;
  color: #b87333;
  font-family: Manrope, Poppins, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
}
.woocommerce .products li.product.cf-product-card .cf-card-price .price,
.woocommerce .products li.product.cf-product-card .cf-card-price .woocommerce-Price-amount {
  font-family: inherit;
  font-size: inherit !important;
  line-height: inherit;
  color: #b87333 !important;
  font-weight: 700;
}
.woocommerce .products li.product.cf-product-card .cf-card-price del,
.woocommerce .products li.product.cf-product-card .cf-card-price del .woocommerce-Price-amount {
  color: rgba(29, 38, 49, .45) !important;
  font-weight: 500;
  font-size: 13px !important;
}
.woocommerce .products li.product.cf-product-card .cf-card-price ins { text-decoration: none; }

/* WhatsApp and cart are separate, aligned CTAs. */
.woocommerce .products li.product.cf-product-card .cf-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: end;
  gap: 12px;
  min-width: 0;
  padding-top: 8px;
}
.woocommerce .products li.product.cf-product-card .cf-card-actions .cf-card-whatsapp-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  margin: 0;
  background: #25d366;
  color: #fff !important;
  border: 0;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .28);
  font-family: Manrope, Poppins, Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.woocommerce .products li.product.cf-product-card .cf-card-actions .cf-card-whatsapp-btn:hover {
  background: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(18, 140, 126, .32);
}
.cf-card-actions .cf-card-whatsapp-icon {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.cf-card-actions .cf-card-whatsapp-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
.woocommerce .products li.product.cf-product-card .cf-card-actions a.button,
.woocommerce .products li.product.cf-product-card .cf-card-actions button.button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 0 !important;
  padding: 9px 14px !important;
  background: transparent !important;
  color: #b87333 !important;
  border: 1.5px solid #b87333 !important;
  border-radius: 50px !important;
  font-family: Manrope, Poppins, Arial, sans-serif;
  font-size: 13px !important;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  text-decoration: none;
  white-space: normal;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.woocommerce .products li.product.cf-product-card .cf-card-actions a.button:hover,
.woocommerce .products li.product.cf-product-card .cf-card-actions button.button:hover {
  background: #b87333 !important;
  color: #fff !important;
  transform: translateY(-2px);
}
.woocommerce .products li.product.cf-product-card .cf-card-actions a.added_to_cart {
  color: #12372a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-top: 5px;
}

/* Sale label is output only for products with an actual WooCommerce sale price. */
.woocommerce .products li.product.cf-product-card > .cf-sale-badge {
  position: absolute;
  z-index: 3;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 20px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 15px;
  background: #b87333;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18, 55, 42, .18);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}

/* Mobile follows the original dense two-column loop design. */
@media (max-width: 767px) {
  .woocommerce ul.products,
  .woocommerce .products,
  .cf-home-products .woocommerce ul.products,
  .cf-home-products .woocommerce .products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 10px !important;
  }
  .woocommerce ul.products li.product.cf-product-card,
  .woocommerce .products li.product.cf-product-card {
    min-height: 0;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }
  .woocommerce .products li.product.cf-product-card > a.cf-card-image {
    height: 155px;
    min-height: 155px;
    border-radius: 0;
  }
  .woocommerce .products li.product.cf-product-card > a.cf-card-image img {
    transform: none;
  }
  .woocommerce .products li.product.cf-product-card .cf-card-body {
    padding: 8px 6px 6px;
    border-radius: 0;
  }
  .woocommerce .products li.product.cf-product-card h2.woocommerce-loop-product__title {
    font-size: 13.5px !important;
    line-height: 1.25 !important;
    min-height: 2.5em;
    max-height: 2.5em;
    margin: 0 0 4px !important;
    text-align: center;
  }
  .woocommerce .products li.product.cf-product-card .cf-card-price {
    font-size: 13.5px;
    font-weight: 800;
    margin-bottom: 7px;
    text-align: center;
  }
  .woocommerce .products li.product.cf-product-card .cf-card-actions {
    gap: 0;
    padding-top: 0;
  }
  .woocommerce .products li.product.cf-product-card .cf-card-actions .cf-card-whatsapp-btn {
    min-height: 38px;
    padding: 8px 5px;
    font-size: 11px;
    border-radius: 0;
    box-shadow: none;
  }
  .woocommerce .products li.product.cf-product-card .cf-card-actions .cf-card-whatsapp-icon svg {
    width: 14px;
    height: 14px;
  }
  /* Exactly as in the supplied mobile design: inquiry first, no duplicate Add to Cart. */
  .woocommerce .products li.product.cf-product-card .cf-card-actions .button,
  .woocommerce .products li.product.cf-product-card .cf-card-actions .added_to_cart {
    display: none !important;
  }
  .woocommerce .products li.product.cf-product-card > .cf-sale-badge {
    top: -7px;
    min-height: 26px;
    padding: 5px 10px;
    font-size: 11.5px;
  }
}
@media (max-width: 360px) {
  /* Retain TWO columns rather than the older source stylesheet's one-column exception. */
  .woocommerce .products li.product.cf-product-card > a.cf-card-image { height: 135px; min-height: 135px; }
  .woocommerce .products li.product.cf-product-card h2.woocommerce-loop-product__title { font-size: 12.5px !important; }
  .woocommerce .products li.product.cf-product-card .cf-card-actions .cf-card-whatsapp-btn { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .woocommerce .products li.product.cf-product-card,
  .woocommerce .products li.product.cf-product-card img,
  .woocommerce .products li.product.cf-product-card .cf-card-actions a { transition: none !important; transform: none !important; }
}
