/*
Theme Name: Fizzible Astra child theme
Author: Jason Petire
Author URI: https://www.codesandcanvas.co.za/elementor-13/
Description: A child theme for. a site I am working on
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fizzible-astra-child-theme
Template: astra
*/

/* =========================================================
   FIZZIBLE - WooCommerce Product Card Styles
   Applies to: content-product.php custom markup
   ========================================================= */

/* Ensure our card doesn't inherit odd list spacing */
.woocommerce ul.products li.product.fz-card {
  list-style: none;
  margin: 0 0 24px;
}

/* Main card */
.woocommerce ul.products li.product.fz-card .fz-card__inner {
  position: relative;
  border-radius: 24px;
  padding: 18px;
  background: #f3f4f6; /* soft grey pastel */
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  overflow: visible; /* required so offset layer shows */
  transition: transform 160ms ease, box-shadow 160ms ease;
}

/* Offset outline layer (behind) */
.woocommerce ul.products li.product.fz-card .fz-card__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: #d6d8dd; /* darker grey outline */
  transform: translate(7px, 7px);
  z-index: -1;
  transition: transform 160ms ease;
}

/* Hover: lift slightly and tighten outline offset */
.woocommerce ul.products li.product.fz-card .fz-card__inner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0,0,0,0.10);
}

.woocommerce ul.products li.product.fz-card .fz-card__inner:hover::before {
  transform: translate(5px, 5px);
}

/* Image wrapper: inset deeper into the card */
.woocommerce ul.products li.product.fz-card .fz-card__imageLink {
  display: block;
  text-decoration: none;
}

.woocommerce ul.products li.product.fz-card .fz-card__image {
  border-radius: 20px;
  overflow: hidden;
  background: #e5e7eb; /* soft inner contrast */
  padding: 12px; /* creates inset depth */
}

/* The product image itself */
.woocommerce ul.products li.product.fz-card .fz-card__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* Text content area */
.woocommerce ul.products li.product.fz-card .fz-card__content {
  padding-top: 14px;
  padding-right: 52px; /* space for the eye button */
}

/* Category label (quiet) */
.woocommerce ul.products li.product.fz-card .fz-card__category {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.2;
  opacity: 0.75;
  margin: 0 0 4px;
}

/* Product title (dominant) */
.woocommerce ul.products li.product.fz-card .fz-card__title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

/* Title link */
.woocommerce ul.products li.product.fz-card .fz-card__title a {
  text-decoration: none;
  color: inherit;
}

/* Eye button */
.woocommerce ul.products li.product.fz-card .fz-card__eye {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  text-decoration: none;
  transition: transform 160ms ease;
}

.woocommerce ul.products li.product.fz-card .fz-card__eye svg {
  fill: currentColor;
  opacity: 0.9;
}

/* Eye hover */
.woocommerce ul.products li.product.fz-card .fz-card__inner:hover .fz-card__eye {
  transform: scale(1.05);
}

/* Small screen tweaks */
@media (max-width: 480px) {
  .woocommerce ul.products li.product.fz-card .fz-card__inner {
    padding: 16px;
    border-radius: 22px;
  }

  .woocommerce ul.products li.product.fz-card .fz-card__inner::before {
    border-radius: 22px;
    transform: translate(6px, 6px);
  }

  .woocommerce ul.products li.product.fz-card .fz-card__image {
    border-radius: 18px;
    padding: 10px;
  }

  .woocommerce ul.products li.product.fz-card .fz-card__content {
    padding-right: 50px;
  }

  .woocommerce ul.products li.product.fz-card .fz-card__title {
    font-size: 18px;
  }
}

/* Remove the grey frame so the image fills the whole area */
.woocommerce ul.products li.product.fz-card .fz-card__image {
  background: transparent;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
}

/* Make the image fill the wrapper nicely */
.woocommerce ul.products li.product.fz-card .fz-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;      /* wrapper handles rounding */
  object-fit: cover;     /* crop to fill */
}
.woocommerce ul.products li.product.fz-card .fz-card__image {
  aspect-ratio: 1 / 1;   /* square image area */
}

/* Keep all product cards the same size by locking the image area */
.woocommerce ul.products li.product.fz-card .fz-card__image{
  aspect-ratio: 1 / 1;   /* square window (change to 4/3 if you want taller) */
  overflow: hidden;
  border-radius: 20px;
}

/* Make the image fill the window without stretching */
.woocommerce ul.products li.product.fz-card .fz-card__image img{
  width: 100%;
  height: 100%;
  object-fit: cover;     /* crops to fit */
  display: block;
}
/* FORCE consistent card image height (prevents tall images making cards bigger) */
.woocommerce ul.products li.product.fz-card a.fz-card__imageLink{
  display: block !important;
}

.woocommerce ul.products li.product.fz-card .fz-card__image{
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;   /* change to 4 / 3 if you prefer */
  height: auto !important;
  overflow: hidden !important;
}

.woocommerce ul.products li.product.fz-card .fz-card__image img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
/* ---- Keep card heights consistent when product names are long ---- */

/* Ensure consistent spacing and layout */
.woocommerce ul.products li.product.fz-card .fz-card__content{
  min-height: 86px; /* adjust if you want more/less breathing room */
  display: flex;
  flex-direction: column;
}

/* Category: keep to a single line */
.woocommerce ul.products li.product.fz-card .fz-card__category{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Title: clamp to 2 lines (prevents tall cards) */
.woocommerce ul.products li.product.fz-card .fz-card__title a{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;  /* number of lines */
  overflow: hidden;
}

/* Optional: keep the eye pinned even if text changes */
.woocommerce ul.products li.product.fz-card .fz-card__eye{
  bottom: 14px;
}
