/* ============================================================
   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;
  background: radial-gradient(
    circle,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.35) 14%,
    rgba(0, 0, 0, 0) 36%
  );
}

.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;
}

.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
   ============================================================ */

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

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

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

/* ============================================================
   PRODUCT TITLES / BUTTONS (generic, non-WooCommerce)
   ============================================================ */

@media (min-width: 769px) {
  .wp-block-post-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    font-size: clamp(1.1rem, 1.6vw, 1.8rem) !important;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (min-width: 769px) {
  .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;
    white-space: nowrap;
  }
}

/* ============================================================
   UNDER-IMAGE COPY
   ============================================================ */

.sp-under-image-copy {
  margin-top: 20px;
  padding: 15px;
}

/* ============================================================
   ENQUIRY FORM WRAPPER (used on all 3 new product pages)
   ============================================================ */

.sp-is-hidden {
  display: none !important;
}

.sp-enquiry-wrap {
  margin-top: 1px !important;
  padding: 1px;
  background: #f7f7f7;
  border-radius: 8px;
}

.sp-enquiry-wrap h3 {
  margin: 0 0 10px;
}

.sp-enquiry-wrap p {
  margin: 0 0 14px;
}

.sp-cf7-custom-only {
  margin-top: 16px;
}

.sp-cf7-custom-intro {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.sp-enquiry-wrap input,
.sp-enquiry-wrap select,
.sp-enquiry-wrap textarea {
  width: 100%;
}

/* ============================================================
   PERMANENT PRODUCT PAGE MEASURING GUIDE
   ============================================================ */

.sp-under-image-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sp-measure-guide-btn {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 16px;
  border: 2px solid #0b1d49;
  border-radius: 10px;
  background: #0b1d49;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  touch-action: manipulation;
}

.sp-measure-guide-btn:hover,
.sp-measure-guide-btn:focus {
  background: #16326b;
  color: #fff;
  text-decoration: none;
}

.sp-measure-guide-btn[aria-expanded="true"] {
  background: #fff;
  color: #0b1d49;
}

.sp-measure-guide-btn[aria-expanded="true"]:hover,
.sp-measure-guide-btn[aria-expanded="true"]:focus {
  background: #f5f7fb;
  color: #0b1d49;
}

.sp-measure-guide-panel {
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 10px;
  max-width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.sp-measure-guide-panel[hidden] {
  display: none !important;
}

.sp-measure-guide-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.sp-under-image-secondary-link {
  font-weight: 600;
  text-decoration: underline;
}

.sp-under-image-secondary-link:hover,
.sp-under-image-secondary-link:focus {
  text-decoration: underline;
}

.sp-home-decision-buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

.sp-home-decision-buttons .wp-block-button {
  margin: 0;
  flex: 0 0 auto;
}

.sp-home-decision-buttons .wp-block-button__link {
  min-width: 220px;
  text-align: center;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* Stack and centre on tablet + mobile */
@media (max-width: 999px) {
  .sp-home-decision-buttons {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .sp-home-decision-buttons .wp-block-button {
    width: auto !important;
    margin: 0 auto !important;
    flex: 0 0 auto;
  }

  .sp-home-decision-buttons .wp-block-button__link {
    display: block;
    min-width: 240px;
    width: 240px;
    margin: 0 auto;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }
}

.sp-home-hero h1 {
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

.sp-home-hero p {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.click-card--labelled {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  text-decoration: none;
}

.click-card--labelled img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.click-card--labelled .click-card-overlay {
  border-radius: 10px;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px;
  background: linear-gradient(
    to top,
    rgba(6, 15, 41, 0.78) 0%,
    rgba(6, 15, 41, 0.48) 38%,
    rgba(6, 15, 41, 0.12) 68%,
    rgba(6, 15, 41, 0) 100%
  );
  pointer-events: none;
}

.click-card--labelled .click-card-copy {
  color: #fff;
  max-width: 80%;
}

.click-card--labelled .click-card-title {
  display: block;
  font-size: clamp(2.2rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.click-card--labelled .click-card-subtitle {
  display: block;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.35;
  margin-bottom: 14px;
  opacity: 0.95;
}

.click-card--labelled .click-card-cta {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0b1d49;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.click-card--labelled:hover img,
.click-card--labelled:focus img {
  transform: scale(1.03);
}

@media (max-width: 999px) {
  .click-card--labelled .click-card-overlay {
    padding: 18px;
  }

  .click-card--labelled .click-card-title {
    font-size: 1.5rem;
  }

  .click-card--labelled .click-card-subtitle {
    font-size: 0.95rem;
  }

  .click-card--labelled .click-card-cta {
    font-size: 0.9rem;
  }
}

.sp-category-image {
  overflow: hidden;
  border-radius: 10px;
}

.sp-category-image img {
  display: block;
  width: 100%;
  height: auto;
}

.sp-field-highlight {
  position: relative;
  animation: spFieldPulse 1.8s ease-out 1;
  border-radius: 8px;
}

@keyframes spFieldPulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(237, 144, 20, 0.45),
      0 0 0 0 rgba(237, 144, 20, 0.25);
    background-color: rgba(237, 144, 20, 0.20);
  }
  35% {
    box-shadow:
      0 0 0 12px rgba(237, 144, 20, 0.18),
      0 0 24px rgba(237, 144, 20, 0.18);
    background-color: rgba(237, 144, 20, 0.18);
  }
  100% {
    box-shadow:
      0 0 0 18px rgba(237, 144, 20, 0),
      0 0 0 rgba(237, 144, 20, 0);
    background-color: transparent;
  }
}

/* Get Sizing Help page form compact layout */
#sp-sizing-help-form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  align-items: start;
}

/* Remove excess CF7 paragraph spacing */
#sp-sizing-help-form p {
  margin: 0;
}

/* Labels */
#sp-sizing-help-form label {
  display: block;
  margin-bottom: 6px;
  line-height: 1.3;
}

/* Inputs / selects / textarea */
#sp-sizing-help-form input[type="text"],
#sp-sizing-help-form input[type="email"],
#sp-sizing-help-form input[type="tel"],
#sp-sizing-help-form input[type="number"],
#sp-sizing-help-form select,
#sp-sizing-help-form textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Make longer fields full width */
#sp-sizing-help-form p:has(textarea),
#sp-sizing-help-form p:has(input[type="file"]),
#sp-sizing-help-form p:has(.wpcf7-submit) {
  grid-column: 1 / -1;
}

/* Fallback if :has() is unsupported somewhere */
#sp-sizing-help-form .full-width {
  grid-column: 1 / -1;
}

/* Make textarea less tall */
#sp-sizing-help-form textarea {
  min-height: 120px;
}

/* Submit row */
#sp-sizing-help-form .wpcf7-submit {
  min-width: 220px;
}

/* Mobile: stack back to one column */
@media (max-width: 999px) {
  #sp-sizing-help-form form {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* HTML Sitemap */
.html-sitemap {
  max-width: 900px;
  margin: 0 auto;
}

.html-sitemap h1 {
  margin-bottom: 24px;
}

.html-sitemap ul {
  list-style: disc !important;
  margin: 0 0 1em 1.5em !important;
  padding-left: 1.5em !important;
}

.html-sitemap ul ul {
  list-style: circle !important;
  margin-top: 0.5em !important;
}

.html-sitemap ul ul ul {
  list-style: square !important;
}

.html-sitemap li {
  margin-bottom: 0.45em;
  line-height: 1.6;
}

.html-sitemap a {
  text-decoration: underline;
}

.html-sitemap a:hover,
.html-sitemap a:focus {
  text-decoration: none;
}

.grecaptcha-badge {
  visibility: hidden;
}

/* ============================================================
   CONTACT FORM 7 FIELD STYLING
   Product page forms + Get Sizing Help form
   ============================================================ */

.sp-enquiry-wrap .wpcf7-form-control:not(.wpcf7-submit),
#sp-sizing-help-form .wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1.5px solid #cfd8e3;
  border-radius: 8px;
  padding: 8px 10px;
  color: #0b1d49;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Textareas */
.sp-enquiry-wrap textarea.wpcf7-form-control,
#sp-sizing-help-form textarea.wpcf7-form-control {
  min-height: 140px;
  resize: vertical;
}

/* Make dropdowns match the text-field styling */
.sp-enquiry-wrap select.wpcf7-form-control,
#sp-sizing-help-form select.wpcf7-form-control {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 8px 36px 8px 10px;
  background-color: #f8fafc;
  border: 1.5px solid #cfd8e3;
  border-radius: 8px;
  color: #0b1d49;
  line-height: 1.3;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%230b1d49' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

/* Focus state */
.sp-enquiry-wrap select.wpcf7-form-control:focus,
#sp-sizing-help-form select.wpcf7-form-control:focus,
.sp-enquiry-wrap .wpcf7-form-control:not(.wpcf7-submit):focus,
#sp-sizing-help-form .wpcf7-form-control:not(.wpcf7-submit):focus {
  outline: none;
  background: #ffffff;
  border-color: #33c4e7;
  box-shadow: 0 0 0 3px rgba(51, 196, 231, 0.16);
}

/* Hide old IE arrow */
.sp-enquiry-wrap select.wpcf7-form-control::-ms-expand,
#sp-sizing-help-form select.wpcf7-form-control::-ms-expand {
  display: none;
}

/* Placeholder text */
.sp-enquiry-wrap ::placeholder,
#sp-sizing-help-form ::placeholder {
  color: #7b8794;
  opacity: 1;
}

/* Labels slightly clearer */
.sp-enquiry-wrap label,
#sp-sizing-help-form label {
  font-weight: 600;
  color: #0b1d49;
}

/* Optional: give each field block a little more spacing */
.sp-enquiry-wrap p,
#sp-sizing-help-form p {
  margin-bottom: 4px;
}

/* Extra spacing before CF7 submit button */
.sp-enquiry-wrap .wpcf7-form-control-wrap:has(+ p .wpcf7-submit),
.sp-enquiry-wrap p:has(.wpcf7-submit) {
  margin-top: 30px;
}

/* ============================================================
   FORM WRAPPER BACKGROUND
   ============================================================ */

/* Product page enquiry forms */
.sp-enquiry-wrap {
  background: #e9eef5;
  border: 1px solid #d4dde8;
  border-radius: 12px;
  padding: 20px !important;
}

/* Get Sizing Help form */
#sp-sizing-help-form {
  background: #e9eef5;
  border: 1px solid #d4dde8;
  border-radius: 12px;
  padding: 20px;
}

/* Optional: tidy heading spacing inside the product form box */
.sp-enquiry-wrap h3 {
  margin: 0 0 8px;
}

.sp-enquiry-wrap .sp-enquiry-copy {
  margin-bottom: 16px;
}

/* Rounded corners on Gutenberg gallery images */
.wp-block-gallery .wp-block-image img {
  border-radius: 10px;
}

/* Rounded corners on Cover blocks */
.wp-block-cover {
  border-radius: 10px;
  overflow: hidden;
}

/* Hover effect for Square/Round/Rectangular spa cover tiles */
.sp-tile-square,
.sp-tile-round,
.sp-tile-rectangular {
  overflow: hidden;
  transition: transform 0.2s ease;
}

.sp-tile-square img,
.sp-tile-round img,
.sp-tile-rectangular img {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sp-tile-square:hover img,
.sp-tile-round:hover img,
.sp-tile-rectangular:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}