/* Product Lifestyle Images Section */
.product-lifestyle-images-wrap {
  position: relative;
  z-index: 5;
}

.product-lifestyle-images-section {
  position: relative;
  background-color: var(--lifestyle-bg-color, transparent);
}

.lifestyle-images-grid {
  display: flex;
  gap: 0;
}

.lifestyle-image-item {
  width: 100%;
}

.lifestyle-images-count-1 .lifestyle-image-item,
.lifestyle-images-count-2 .lifestyle-image-item {
  width: 50%;
}

.lifestyle-images-count-3 .lifestyle-image-item {
  width: 33.333%;
}

@media (max-width: 768px) {
  .lifestyle-images-grid {
    flex-direction: column;
  }

  .lifestyle-images-grid .lifestyle-image-item {
    width: 100%;
  }

  /* Text panel renders before its paired image in the DOM (so heading
     content isn't buried after a decorative photo for assistive tech /
     SEO), but the reference design shows the image first on mobile —
     order flips it visually without touching the DOM. */
  .lifestyle-text-item {
    order: 2;
  }
}

/* PDP Lifestyle Text Content panel — pairs with the first grid image when
   product.metafields.custom.lifestyle_text_content is set. */
.lifestyle-text-item {
  display: flex;
  align-items: center;
}

.lifestyle-text-content {
  width: 620px;
  max-width: 100%;
  margin: auto;
  padding: 5rem 1rem;
  text-align: left;
}
.lifestyle-top {
  margin-bottom: 2.5rem;
}
@media screen and (min-width: 768px) {
  .lifestyle-text-content {
    transform: translateX(3rem);
  }
  .lifestyle-top {
    margin-bottom: 5rem;
  }
}

.lifestyle-text-top-title {
  margin: 0 0 1rem;
  font-size: 36px;
}

.lifestyle-text-description {
  margin: 0 0 2.5rem;
  font-size: 16px;
}

.lifestyle-text-lower-title {
  margin: 0 0 1.5rem;
  font-size: 58px;
}

.lifestyle-text-button {
  display: flex;
}

@media (max-width: 1450px) and (min-width: 768px) {
  .lifestyle-top {
    margin-bottom: 2rem;
  }
  .lifestyle-text-top-title {
    font-size: 28px;
  }
  .lifestyle-text-lower-title {
    font-size: 34px;
  }
}

@media (max-width: 768px) {
  .lifestyle-text-content {
    padding: 2rem 1.5rem;
  }

  .lifestyle-text-top-title {
    font-size: 28px;
  }

  .lifestyle-text-lower-title {
    font-size: 34px;
  }
  .lifestyle-text-button div {
    width: 100%;
  }
}

.lifestyle-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--lifestyle-aspect-ratio, 1);
}

.lifestyle-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lifestyle-image-fade {
  opacity: 0;
  animation: fadeIn 0.6s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lifestyle-video {
  position: relative;
  background: #000;
}

.lifestyle-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lifestyle-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lifestyle-video:hover .lifestyle-video-overlay,
.lifestyle-video.is-paused .lifestyle-video-overlay {
  opacity: 1;
}

.lifestyle-video-play {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lifestyle-video-play:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.lifestyle-video-play svg {
  color: #000;
}

.lifestyle-video-play .icon-play {
  display: none;
  margin-left: 3px;
}

.lifestyle-video-play .icon-pause {
  display: block;
}

.lifestyle-video.is-paused .lifestyle-video-play .icon-play {
  display: block;
}

.lifestyle-video.is-paused .lifestyle-video-play .icon-pause {
  display: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .lifestyle-image-fade {
    animation: none;
  }

  .lifestyle-video-overlay {
    transition: none;
  }
}

.lifestyle-video-play:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  .lifestyle-video-play {
    background: white;
    border: 2px solid #000;
  }
}

@media screen and (max-width: 989px) {
  .lifestyle-images-grid.has-text {
    flex-direction: column;
  }

  .lifestyle-images-grid.has-text.lifestyle-images-count-1 .lifestyle-image-item {
    width: 100%;
  }
  .lifestyle-text-item {
    order: 2;
  }
  .lifestyle-text-content {
    padding-top: 3rem;
    padding-top: 4rem;
    transform: none;
  }
  .lifestyle-bottom {
    margin-bottom: 3.5rem;
  }
}