/* ============================================================
   SPARMADILLO 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.5;
}

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

  /* Smaller spotlight */
  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%
  );
}

/* 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 Gutenberg Columns spacing for category tiles */
.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;
  }
}


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

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

/* Base product images */
.sparmadillo-retail-products .wc-block-grid__product-image img,
.sparmadillo-retail-products .wp-block-woocommerce-product-image img,
.sparmadillo-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 */
.sparmadillo-retail-products .wc-block-grid__product-image:hover img,
.sparmadillo-retail-products .wp-block-woocommerce-product-image:hover img,
.sparmadillo-retail-products .woocommerce ul.products li.product a:hover img {
  transform: scale(1.03);
  opacity: 0.5;
}

/* Arrow overlay (sliding + smaller spotlight) */
.sparmadillo-retail-products .wc-block-grid__product-image::after,
.sparmadillo-retail-products .wp-block-woocommerce-product-image::after,
.sparmadillo-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;

  /* Smaller spotlight */
  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;
}


/* ============================================================
   MOBILE COLUMN ORDER UTILITY
   ============================================================ */

@media (max-width: 781px) {
  .reverse-mobile {
    flex-direction: column-reverse;
  }
}

/* Product titles: scale on desktop AND wrap (no truncation) */
@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 */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;

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

    /* Helps long words/URLs wrap cleanly */
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* Product buttons: scale on desktop as window shrinks */
@media (min-width: 769px) {

  /* WooCommerce Blocks buttons */
  .wc-block-grid__product .wp-block-button__link,
  .wc-block-components-product-button__button,

/* Scale Gutenberg "View Product" buttons on desktop (more noticeable scaling) */
@media (min-width: 769px) {

  /* Optional: scope to your product grid wrapper if you have one */
  .sparmadillo-retail-products .wp-block-buttons .wp-block-button__link,
  .mako-retail-products .wp-block-buttons .wp-block-button__link,
  .wp-block-buttons .wp-block-button__link {
    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;

    /* keeps the label tidy */
    white-space: nowrap;
  }
}
/* =========================
   Spa measurement tooltip (REVISED)
   Fixes desktop narrow-window overflow
   ========================= */

.spa-measure-help {
  margin: 12px 0;
  font-size: 14px;
}

.help-trigger {
  position: relative;
  display: inline-block;
  cursor: pointer;
  text-decoration: underline;
}

/* Tooltip container (mobile-first + safe on narrow desktop too) */
.help-tooltip {
  display: none;
  position: absolute;
  z-index: 9999;

  top: calc(100% + 10px);
  left: 0;               /* <-- always anchor from the left of the trigger */
  right: auto;           /* <-- prevent right-anchoring */

  /* This prevents overflow on slim windows */
  width: min(90vw, 340px);
  max-width: calc(100vw - 24px); /* 12px breathing room each side */

  background: #fff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

/* Make tooltip larger on desktop, but still viewport-safe */
@media (min-width: 768px) {
  .help-tooltip {
    width: min(520px, 90vw);
  }
}

@media (min-width: 1024px) {
  .help-tooltip {
    width: min(600px, 80vw);
  }
}

.help-tooltip img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.help-tooltip small {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(0,0,0,0.72);
  text-align: left;
}

/* Show on hover (desktop) + tap/focus (mobile) */
.help-trigger:hover .help-tooltip,
.help-trigger:focus-within .help-tooltip {
  display: block;
}
