/*
 * Template 4 Product UI for Zuricom (WooCommerce)
 *
 * Goals:
 * - Match Template 4 product-card behavior: image swap on hover, action bar slide-in, vertical icon actions.
 * - Match Template 4 single-product gallery behavior: vertical thumbs + elevateZoom + gallery popup.
 * - Be Elementor-first: in Elementor editor, disable absolute overlays that can block selection.
 */

/* ------------------------------
   Product cards (loop)
--------------------------------*/

/* Strong overrides to avoid theme conflicts */
body.zuri-t4-products .zuri-product-card .product-action,
body.zuri-t4-products .zuri-product-card .product-action-vertical{
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.zuri-t4-products .zuri-product-card:hover .product-action,
body.zuri-t4-products .zuri-product-card:hover .product-action-vertical{
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}


body.zuri-t4-products ul.products {
  margin: 0;
  padding: 0;
}

body.zuri-t4-products ul.products li.product {
  list-style: none;
  margin: 0 0 3rem;
}

body.zuri-t4-products .zuri-product-card {
  position: relative;
  background: #fff;
  transition: box-shadow .35s ease;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

body.zuri-t4-products .zuri-product-card:hover {
  box-shadow: 0 5px 20px rgba(0,0,0,0.06);
}

body.zuri-t4-products .zuri-product-card .product-media {
  position: relative;
  overflow: hidden;
  background: #f7f7f7;
}

body.zuri-t4-products .zuri-product-card .product-media a {
  display: block;
  position: relative;
}


body.zuri-t4-products .zuri-product-card.product-11 .product-media{
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.zuri-t4-products .zuri-product-card.product-11 .product-media > a{
  width: 100%;
  height: 100%;
}
body.zuri-t4-products .zuri-product-card.product-11 img.product-image,
body.zuri-t4-products .zuri-product-card.product-11 img.product-image-hover{
  width: 100%;
  height: 100%;
  object-fit: contain;
}


body.zuri-t4-products .zuri-product-card img.product-image {
  width: 100%;
  height: auto;
  display: block;
}

body.zuri-t4-products .zuri-product-card img.product-image-hover {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s ease;
}

body.zuri-t4-products .zuri-product-card:hover img.product-image-hover {
  opacity: 1;
}

/* Vertical icon actions (wishlist/quickview) */
body.zuri-t4-products .zuri-product-card .product-action-vertical {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transform: translateX(15px);
  transition: all .35s ease;
}

body.zuri-t4-products .zuri-product-card:hover .product-action-vertical {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

body.zuri-t4-products .zuri-product-card .btn-product-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  color: #333;
  text-decoration: none;
}

body.zuri-t4-products .zuri-product-card .btn-product-icon:hover {
  background: #a259ff;
  border-color: #a259ff;
  color: #fff;
}

/* Add-to-cart CTA (fade in below title/price, not over the image) */
body.zuri-t4-products .zuri-product-card .product-body{
  position: relative;
}

body.zuri-t4-products .zuri-product-card .product-action {
  position: static;
  display: block;
  z-index: 1;
  margin-top: 10px;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease, max-height .25s ease;
}

body.zuri-t4-products .zuri-product-card:hover .product-action {
  opacity: 1;
  visibility: visible;
  max-height: 80px;
  transform: translateY(0);
}

body.zuri-t4-products .zuri-product-card .btn-product.btn-cart,
body.zuri-t4-products .zuri-product-card .button.btn-product.btn-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 190px;
  height: 38px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  color: #333;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: 11px;
  transition: all .25s ease;
}

body.zuri-t4-products .zuri-product-card .btn-product.btn-cart:hover,
body.zuri-t4-products .zuri-product-card .button.btn-product.btn-cart:hover {
  background: #a259ff;
  border-color: #a259ff;
  color: #fff;
}

body.zuri-t4-products .zuri-product-card .product-body {
  padding: 1.6rem 1.8rem 7rem;
  text-align: center;
}

body.zuri-t4-products .zuri-product-card .product-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 .6rem;
}

body.zuri-t4-products .zuri-product-card .product-title a {
  color: #333;
  text-decoration: none;
}

body.zuri-t4-products .zuri-product-card .product-title a:hover {
  color: #a259ff;
}

body.zuri-t4-products .zuri-product-card .product-price {
  font-weight: 700;
}

/* ------------------------------
   Single product gallery (Template 4 style)
--------------------------------*/

body.zuri-t4-products .product-gallery.product-gallery-vertical .row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

body.zuri-t4-products .product-gallery.product-gallery-vertical .product-main-image {
  position: relative;
  flex: 1 1 auto;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

/* Prevent the main product image from becoming absurdly tall on single product pages */
body.zuri-t4-products.single-product #product-zoom {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: contain;
}

/* Ensure the WooCommerce images column never stretches beyond its intended width */


body.zuri-t4-products .product-gallery.product-gallery-vertical .btn-product-gallery {
  position: absolute;
  right: 12px;
  bottom: 12px;
  top: auto;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

body.zuri-t4-products .product-image-gallery {
  width: 92px;
  flex: 0 0 92px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.zuri-t4-products .product-gallery-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  opacity: .9;
}

body.zuri-t4-products .product-gallery-item.active {
  border-color: #a259ff;
  opacity: 1;
}

body.zuri-t4-products .product-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 767px) {
  body.zuri-t4-products .product-gallery.product-gallery-vertical .row {
    flex-direction: column;
  }
  body.zuri-t4-products .product-image-gallery {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }
}

/* ------------------------------
   Quickview modal
--------------------------------*/

.mfp-content .zuri-t4-quickview {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

.mfp-content .zuri-t4-quickview .product-details {
  padding: 10px 14px;
}

/* Elementor-first: don't let overlays block editing inside Elementor iframe */
body.elementor-editor-active.zuri-t4-products .zuri-product-card .product-action,
body.elementor-editor-active.zuri-t4-products .zuri-product-card .product-action-vertical {
  /* Keep Template 4 behavior, but prevent overlays from blocking editing */
  pointer-events: none !important;
}

