/* ============================================================
   MAKO CATEGORY CARDS (large clickable tiles)
   ============================================================ */

.click-card {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.click-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.click-card:hover img {
  transform: scale(1.03);
  opacity: 0.6;
}

.click-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  /* Smaller spotlight for visibility */
  background: radial-gradient(
    circle,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.35) 14%,
    rgba(0,0,0,0.00) 36%
  );
}

/* Sliding arrow on category cards */
.click-card-arrow {
  font-size: 7rem;
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85);
  animation: arrowSlide 2.2s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

/* Fix Columns block spacing */
.wp-block-columns .wp-block-column .click-card,
.wp-block-column .click-card {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.wp-block-columns {
  row-gap: 0 !important;
}


/* ============================================================
   SHARED SLIDE ANIMATION (no pause)
   ============================================================ */

@keyframes arrowSlide {
  0% {
    transform: translateX(0);
    opacity: 0.6;
  }
  50% {
    transform: translateX(20px);
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 0.6;
  }
}


/* ============================================================
   MAKO RETAIL PRODUCT IMAGES ONLY
   Only applies inside .mako-retail-products wrapper
   ============================================================ */

/* Ensure wrappers are positioned for arrow overlay */
.mako-retail-products .wc-block-grid__product-image,
.mako-retail-products .wp-block-woocommerce-product-image,
.mako-retail-products .woocommerce ul.products li.product a {
  position: relative;
  display: block;
  text-align: left;
}

/* Base product images */
.mako-retail-products .wc-block-grid__product-image img,
.mako-retail-products .wp-block-woocommerce-product-image img,
.mako-retail-products .woocommerce ul.products li.product a img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hover zoom + dim */
.mako-retail-products .wc-block-grid__product-image:hover img,
.mako-retail-products .wp-block-woocommerce-product-image:hover img,
.mako-retail-products .woocommerce ul.products li.product a:hover img {
  transform: scale(1.03);
  opacity: 0.5;
}

/* Sliding arrow overlay + smaller spotlight */
.mako-retail-products .wc-block-grid__product-image::after,
.mako-retail-products .wp-block-woocommerce-product-image::after,
.mako-retail-products .woocommerce ul.products li.product a::after {
  content: "➜";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 7rem;
  color: #ffffff;
  pointer-events: none;

  background: radial-gradient(
    circle,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.35) 14%,
    rgba(0,0,0,0.00) 36%
  );

  text-shadow: 0 2px 12px rgba(0,0,0,0.85);

  opacity: 1;
  animation: arrowSlide 3s ease-in-out infinite;
  transition: opacity 0.3s ease;
}


/* ============================================================
   PRODUCT TITLES: WRAP + SCALE ON DESKTOP (matches Sparmadillo)
   ============================================================ */

@media (min-width: 769px) {
  /* Classic WooCommerce loop titles */
  .woocommerce ul.products li.product .woocommerce-loop-product__title,

  /* WooCommerce Blocks product grid titles */
  .wc-block-grid__product-title,
  .wc-block-components-product-title,
  .wp-block-post-title {
    /* Allow wrapping (no truncation) */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    overflow-wrap: anywhere;
    word-break: normal;

    /* Keep the scaling behaviour */
    font-size: clamp(1.1rem, 1.6vw, 1.8rem) !important;
    line-height: 1.2;
  }
}


/* ============================================================
   PRODUCT BUTTONS: SCALE ON DESKTOP (matches Sparmadillo)
   Targets Gutenberg Button blocks used in grids
   ============================================================ */

@media (min-width: 769px) {
  .mako-retail-products .wp-block-buttons .wp-block-button__link,
  .mako-retail-products .wp-block-button__link.wp-element-button {
    font-size: clamp(0.75rem, 1.2vw, 1.05rem) !important;
    line-height: 1.1;

    padding:
      clamp(8px, 0.9vw, 14px)
      clamp(12px, 1.4vw, 22px) !important;

    white-space: nowrap;
  }
}


/* ============================================================
   SCALE ALL PRODUCT IMAGES TO 75% & ALIGN
   (preserved from MAKO)
   ============================================================ */

/* Base: shrink all product image wrappers */
.wc-block-grid__product-image,
.wp-block-woocommerce-product-image,
.woocommerce ul.products li.product a {
  width: 75% !important;
  display: block !important;
}

/* Desktop/tablet: align image to the RIGHT */
@media (min-width: 769px) {
  .wc-block-grid__product-image,
  .wp-block-woocommerce-product-image,
  .woocommerce ul.products li.product a {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}

/* Mobile: center image when layout stacks */
@media (max-width: 768px) {
  .wc-block-grid__product-image,
  .wp-block-woocommerce-product-image,
  .woocommerce ul.products li.product a {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}