/**
 * @file
 * Product page component styles.
 */

/* Product Page - Main Content Spacing */
.node--type-products #main-content,
.page-node-type-products #main-content,
.node--type-products .main-content,
.page-node-type-products .main-content {
  margin-bottom: 0; /* Related Products section handles bottom spacing */
}

/* Override site-wide body field constraints for product pages */
/* Prevents local-theme.css rule: #main-content .node__main-content .field--name-body { width: 80%; margin: auto; } */
.node--type-products #main-content .field--name-body,
.node--type-products .node__main-content .field--name-body,
.node--type-products #main-content .node__main-content .field--name-body,
.page-node-type-products #main-content .field--name-body,
.page-node-type-products .node__main-content .field--name-body,
.page-node-type-products #main-content .node__main-content .field--name-body,
.product-page .field--name-body {
  width: 100% !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
}

/* Product Page Wrapper */
.product-page__wrapper {
  width: 100%;
}

.product-page__wrapper .row {
  margin: 0;
}

.product-page__wrapper .col-md-12 {
  padding: 0;
}

/* Product Hero Section */
.product-hero {
  padding: 40px 0;
  background-color: #fff;
}

.product-hero__container {
  /* Using Bootstrap grid with flexbox for vertical alignment */
}

.product-hero__container .row {
  margin: 0;
  display: flex;
  align-items: center; /* Vertically center content */
  min-height: 100%; /* Ensure row takes full height */
}

.product-hero__image {
  padding: 0 15px;
  display: flex;
  align-items: center; /* Center image vertically if needed */
}

.product-hero__image-wrapper {
  width: 100%;
}

.product-hero__image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.product-hero__content {
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertically center content within column */
  height: 100%; /* Take full height of parent */
}

.product-hero__logo {
  margin-bottom: 20px;
}

.product-hero__logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.product-hero__title {
  font-size: 2.5em;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: #2d2d2d;
  line-height: 1.2;
}

/* Subtitle inside H1 (SEO): smaller, primary blue, on its own line */
.product-title .product-subtitle {
  display: block;
  font-size: 0.55em;
  font-weight: 500;
  color: var(--color-brand-blue);
  margin-top: 0.35em;
  line-height: 1.3;
}

.product-hero__description {
  font-size: 1.1em;
  line-height: 1.6;
  color: #555;
  margin-bottom: 30px;
}

/* Override site-wide body field constraints for product pages */
.node--type-products .product-hero__description .field--name-body,
.page-node-type-products .product-hero__description .field--name-body,
#main-content .product-hero__description .field--name-body {
  width: 100%;
  margin: 0;
}

.product-hero__actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.product-hero__cta {
  display: inline-block;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-button);
  line-height: var(--line-height-normal);
  transition: all 0.3s ease;
  text-align: center;
  /* Override Bootstrap .btn-primary / .btn border (dark blue) – hero CTAs use background only */
  border: none;
}

.product-hero__cta--quote {
  background-color: var(--color-brand-green);
  color: var(--color-brand-white);
}

.product-hero__cta--quote:hover {
  background-color: var(--color-brand-blue);
  color: var(--color-brand-white);
}

.product-hero__cta--downloads {
  background-color: var(--color-brand-green);
  color: var(--color-brand-white);
}

.product-hero__cta--downloads:hover {
  background-color: var(--color-brand-blue);
  color: var(--color-brand-white);
}

/* Key Features Icons Section */
.product-features-icons {
  padding: 40px 0;
  background-color: #fff;
  border-top: 1px solid #eaeaea;
}

.product-features-icons__container {
  /* Using Bootstrap container, no fixed width needed */
}

.product-features-icons__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  justify-items: center;
}

.feature-icon {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Feature icons for User Capacity, Number of Stations, Number of Exercises */
.feature-icon--capacity,
.feature-icon--stations,
.feature-icon--exercises {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-icon--capacity .feature-icon__icon,
.feature-icon--stations .feature-icon__icon,
.feature-icon--exercises .feature-icon__icon {
  display: none; /* Hide the icon, we'll use the value in the circle */
}

.feature-icon--capacity .feature-icon__value,
.feature-icon--stations .feature-icon__value,
.feature-icon--exercises .feature-icon__value {
  font-size: 2em;
  font-weight: 700;
  color: var(--color-brand-white);
  background-color: var(--color-brand-blue);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  line-height: 1;
}

.feature-icon--capacity .feature-icon__label,
.feature-icon--stations .feature-icon__label,
.feature-icon--exercises .feature-icon__label {
  font-size: 1em;
  color: #000;
  text-align: center;
  line-height: 1.3;
  font-weight: 700;
  margin-top: 0;
}

/* Taxonomy term feature icons - icon sized to match blue circles, no background */
.feature-icon--taxonomy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-icon--taxonomy .feature-icon__icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.feature-icon--taxonomy .feature-icon__icon img,
.feature-icon--taxonomy .feature-icon__icon svg {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
}

.feature-icon--taxonomy .feature-icon__label {
  font-size: 1em;
  color: #000;
  text-align: center;
  line-height: 1.3;
  font-weight: 700;
  margin-top: 0;
}

/* Legacy styling for other feature icons (if any) */
.feature-icon__icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-green);
}

.feature-icon__icon svg {
  width: 100%;
  height: 100%;
}

.feature-icon__value {
  font-size: 1.8em;
  font-weight: 700;
  color: #2d2d2d;
}

.feature-icon__label {
  font-size: 0.9em;
  color: #666;
  text-align: center;
  line-height: 1.3;
}

/* Product Gallery Section */
.product-gallery {
  padding: 40px 0;
  background-color: transparent;
  overflow: visible;
  display: block;
  visibility: visible;
}

.product-gallery__container {
  /* Using Bootstrap container, no fixed width needed */
}

.product-gallery__carousel {
  position: relative;
}

.product-gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.product-gallery__image {
  width: 100%;
  height: auto;
}

.product-gallery__link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.product-gallery__link:hover {
  opacity: 0.9;
}

.product-gallery__link img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-gallery__link:hover img {
  transform: scale(1.05);
}

/* Owl Carousel Customization for Product Gallery */
.product-gallery__carousel .owl-nav {
  text-align: center;
  margin-top: 20px;
  position: relative;
}

.product-gallery__carousel .owl-nav button {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: var(--color-brand-green);
  color: var(--color-brand-white);
  border: none;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 24px;
}

.product-gallery__carousel .owl-nav button:hover {
  background-color: var(--color-brand-green);
}

.product-gallery__carousel .owl-nav button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Hide dots completely - using nav buttons only */
.product-gallery__carousel .owl-dots {
  display: none !important;
}

/* Product Highlights Section */
.product-highlights {
  padding: 60px 0;
  background-color: #fff;
}

.product-highlights__container {
  /* Using Bootstrap container, no fixed width needed */
}

.product-highlights__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* Highlight Boxes — unified with category-highlight-box in local-components.css.
   Both use the same design tokens for consistent styling across product & category pages. */
.highlight-box {
  padding: 30px;
  border-radius: 4px;
  color: var(--color-brand-white);
  display: block;
}

.highlight-box--blue {
  background-color: var(--color-brand-blue);
}

.highlight-box--green {
  background-color: var(--color-brand-green);
}

.highlight-box--yellow {
  background-color: var(--color-brand-yellow);
}

/* All text in highlight boxes should be white */
.highlight-box,
.highlight-box * {
  color: var(--color-brand-white) !important;
}

/* H3 headings inside highlight boxes */
.highlight-box h3,
.highlight-box__content h3 {
  color: var(--color-brand-white) !important;
  font-size: var(--font-size-2xl, 24px);
  font-weight: var(--font-weight-bold, 700);
  margin: 0 0 15px 0;
  text-transform: uppercase;
}

.highlight-box__content {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-brand-white) !important;
}

.highlight-box__content p {
  margin: 0;
  color: var(--color-brand-white) !important;
}

/* Product Specifications Accordion */
.product-specifications {
  padding: 60px 0;
  background-color: #fff;
}

.product-specifications__container {
  /* Using Bootstrap container, no fixed width needed */
}

.product-specifications__title {
  font-size: 2em;
  font-weight: 700;
  margin: 0 0 30px 0;
  color: #2d2d2d;
}

.product-specifications__accordion {
  border: 1px solid #eaeaea;
  border-radius: 4px;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid #eaeaea;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  padding: 20px;
  background-color: #fff;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  font-weight: 600;
  color: #2d2d2d;
  transition: background-color 0.3s ease;
}

.accordion-header:hover {
  background-color: #f4f4f4;
}

.accordion-header__text {
  flex: 1;
}

.accordion-header__icon {
  font-size: 1.5em;
  font-weight: 300;
  color: #666;
  transition: transform 0.3s ease;
}

.accordion-item.is-open .accordion-header {
  background-color: #f4f4f4;
}

.accordion-content {
  display: none;
  padding: 0 20px;
  background-color: transparent;
}

.accordion-content__inner {
  padding: 20px 0;
  color: #555;
  line-height: 1.6;
}

.accordion-header__text {
  flex: 1;
  color: #000;
  font-weight: 700;
  font-size: 1.1em;
}

.accordion-item.is-open .accordion-content {
  display: block;
}

/* Technical Design Features Section */
.technical-design-features {
  padding: 60px 0;
  background-color: var(--color-brand-blue);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.03) 10px,
    rgba(255, 255, 255, 0.03) 20px
  );
  color: var(--color-brand-white);
  position: relative;
  overflow: hidden;
  clear: both;
}

.technical-design-features__container {
  /* Using Bootstrap container, no fixed width needed */
  position: relative;
  z-index: 1;
}

/* Related Fitness Package Section */
.related-fitness-package {
  padding: 60px 0;
  background-color: #fff;
  position: relative;
  clear: both;
}

.related-fitness-package__container {
  /* Using Bootstrap container, no fixed width needed */
  position: relative;
  z-index: 1;
}

.related-fitness-package__title {
  font-size: 1.5em;
  font-weight: 700;
  margin: 0 0 30px 0;
  color: #2d2d2d;
}

/* View output - make items display horizontally */
.related-fitness-package__container .view-related-fitness-packages,
.related-fitness-package__container .view {
  /* Ensure View wrapper doesn't interfere */
}

.related-fitness-package__container .view-content,
.related-fitness-package__container .views-view-grid,
.related-fitness-package__container .views-view-unformatted {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
}

/* If View uses item-list structure */
.related-fitness-package__container .item-list,
.related-fitness-package__container .item-list ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-fitness-package__container .item-list li {
  margin: 0;
  padding: 0;
}

/* Ensure product teasers display correctly in grid */
.related-fitness-package__container .product-teaser {
  margin-bottom: 0; /* Remove bottom margin since grid gap handles spacing */
  height: 100%; /* Make all cards same height */
}

/* Responsive: fewer columns on smaller screens */
@media (max-width: 992px) {
  .related-fitness-package__container .view-content,
  .related-fitness-package__container .views-view-grid,
  .related-fitness-package__container .views-view-unformatted,
  .related-fitness-package__container .item-list,
  .related-fitness-package__container .item-list ul {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .related-fitness-package__container .view-content,
  .related-fitness-package__container .views-view-grid,
  .related-fitness-package__container .views-view-unformatted,
  .related-fitness-package__container .item-list,
  .related-fitness-package__container .item-list ul {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
  }
}

/* Related Products Section */
.related-products {
  padding: 60px 0;
  margin-bottom: 3rem; /* Space before footer */
  background-color: #f8f9fa;
  position: relative;
  clear: both;
}

.related-products__container {
  /* Using Bootstrap container, no fixed width needed */
  position: relative;
  z-index: 1;
}

.related-products__title {
  font-size: 1.5em;
  font-weight: 700;
  margin: 0 0 30px 0;
  color: #2d2d2d;
}

.related-products__subtitle {
  font-size: 1em;
  color: #666;
  margin: 0 0 30px 0;
}

/* View output - make items display horizontally */
.related-products__container .view-related-products,
.related-products__container .view {
  /* Ensure View wrapper doesn't interfere */
}

.related-products__container .view-content,
.related-products__container .views-view-grid,
.related-products__container .views-view-unformatted {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
}

/* If View uses item-list structure */
.related-products__container .item-list,
.related-products__container .item-list ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-products__container .item-list li {
  margin: 0;
  padding: 0;
}

/* Ensure product teasers display correctly in grid */
.related-products__container .product-teaser {
  margin-bottom: 0; /* Remove bottom margin since grid gap handles spacing */
  height: 100%; /* Make all cards same height */
}

/* Related Products - Product Title Styling */
.related-products .views-field-title,
.related-products .node__title,
.related-products__container .product-teaser__title,
.related-products__container .views-field-title,
.related-products__container .node__title,
.view-related-products .views-field-title {
  text-align: center;
}

.related-products .views-field-title a,
.related-products .node__title a,
.related-products__container .product-teaser__title a,
.related-products__container .views-field-title a,
.related-products__container .node__title a,
.view-related-products .views-field-title a {
  color: var(--color-brand-secondary-blue) !important;
  font-weight: var(--font-weight-bold, 700);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide, 0.025em);
  text-decoration: none;
  display: block;
}

.related-products .views-field-title a:hover,
.related-products__container .views-field-title a:hover,
.view-related-products .views-field-title a:hover {
  color: var(--color-brand-secondary-blue) !important;
  text-decoration: none;
}

/* Related Products - Space between image and title */
.related-products .views-field-field-product-image,
.related-products .views-field-field-primary-image,
.related-products__container .views-field-field-product-image,
.related-products__container .views-field-field-primary-image,
.view-related-products .views-field-field-product-image,
.view-related-products .views-field-field-primary-image {
  margin-bottom: 1.5rem;
}

/* Related Products - Margin above title */
.related-products .views-field-title,
.related-products__container .views-field-title,
.view-related-products .views-field-title {
  margin-top: 1.5em;
}

.related-products .views-field-title .field-content,
.related-products__container .views-field-title .field-content,
.view-related-products .views-field-title .field-content {
  margin-top: 1.5em;
}

/* Related Products - Product Category Styling */
.related-products .views-field-field-product-category,
.related-products .field--name-field-product-category,
.related-products__container .product-teaser__category,
.related-products__container .views-field-field-product-category,
.related-products__container .field--name-field-product-category,
.view-related-products .views-field-field-product-category {
  text-align: center !important;
  color: #666;
  font-size: var(--font-size-sm, 14px);
  margin-top: 0.5rem;
}

/* Ensure all text in Related Products grid items is centered */
.related-products .views-row,
.related-products__container .views-row,
.view-related-products .views-row {
  text-align: center;
}

/* Responsive: fewer columns on smaller screens */
@media (max-width: 992px) {
  .related-products__container .view-content,
  .related-products__container .views-view-grid,
  .related-products__container .views-view-unformatted,
  .related-products__container .item-list,
  .related-products__container .item-list ul {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .related-products__container .view-content,
  .related-products__container .views-view-grid,
  .related-products__container .views-view-unformatted,
  .related-products__container .item-list,
  .related-products__container .item-list ul {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .product-hero__container .row {
    flex-direction: column; /* Stack on mobile */
    align-items: stretch; /* Full width on mobile */
  }

  .product-hero__image,
  .product-hero__content {
    /* Bootstrap will stack columns automatically on mobile */
    margin-bottom: 20px;
    width: 100%;
  }

  .product-hero__content {
    height: auto; /* Reset height on mobile */
  }

  .product-hero__title {
    font-size: 2em;
  }

  .product-features-icons__grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
  }

  .product-highlights__grid {
    grid-template-columns: 1fr;
  }

  .product-specifications__title {
    font-size: 1.5em;
  }
}

