.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 240px;
  background-color: var(--border);
  margin-bottom: 100px;
  h1 {
    font-size: 48px;
    font-weight: 300;
  }
  .breadcrumb {
    a,
    span {
      font-size: 12px;
    }
    a {
      text-decoration: none;
      color: var(--text-gray);
    }
  }
}
.product-container {
  margin: 2rem auto;
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 0 15px;

  .product-details {
    width: 100%;
    padding: 10px 0;
    text-align: center;

    .product-title {
      font-size: 1.5em;
      margin-bottom: 10px;
    }

    .price {
      font-size: 1.3em;
      margin: 10px 0;
      text-align: right;
      width: 100%;
      color: var(--text-gray);
      &.sale {
        color: var(--gold);
      }
      .old-prc {
        text-decoration: line-through;
        color: var(--text-gray);
        margin-left: 10px;
      }
    }

    .spec {
      color: var(--text-gray);
      line-height: 1.6;
      margin: 15px 0;
      .title {
        font-weight: bold;
      }
      .link {
        color: var(--text-gray);
        text-decoration: none;
        &:hover {
          color: var(--gold);
        }
      }
    }
  }

  .product-image-container {
    width: 100%;

    .zoom-wrapper {
      position: relative;
      overflow: hidden;
      width: 100%;
      height: auto;
      aspect-ratio: 1 / 1;
      border-radius: 8px;
      border: 1px solid var(--border);

      /* Only apply zoom cursor to images, not videos */
      &.image-media {
        cursor: zoom-in;

        &:hover {
          .product-media {
            transform: scale(1.5);
          }
        }
      }

      /* For video media, use default cursor and no zoom */
      &.video-media {
        cursor: default;

        .product-media {
          /* No transform on hover for videos */
          transform: none !important;
        }
      }

      .product-media {
        width: 100%;
        height: 100%;
        border-radius: 8px;
        transition: transform 0.2s ease-out;
        object-fit: cover;
        will-change: transform;
        border: 1px solid var(--border);
      }
    }

    .thumbnails {
      margin-top: 10px;
      width: 100%;
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;

      .thumbnail {
        width: 83px;
        height: 83px;
        aspect-ratio: 1 / 1;
        border: 1px solid var(--border);
        border-radius: 4px;
        cursor: pointer;
        position: relative;

        &.active {
          border-color: var(--gold);
          border-width: 2px;
        }

        i.fa-play {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          color: rgba(255, 255, 255, 0.8);
          pointer-events: none;
          font-size: 30px;
          z-index: 2;
        }
        &::after {
          content: "";
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          pointer-events: none;
          height: 100%;
          background-color: var(--gold-dark);
          opacity: 0;
          transition: opacity 0.3s ease;
        }
        &:hover {
          &::after {
            opacity: 0.5;
          }
        }
        img,
        video {
          width: 100%;
          height: 100%;
          object-fit: cover;
          border-radius: 3px;
        }
      }
    }
  }
}
.product-tabs {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
  .tab-header {
    display: flex;
    margin-bottom: 15px;
    justify-content: center;
    position: relative;
    flex-wrap: wrap;
    .tab-button {
      padding: 8px 15px;
      background: none;
      border: none;
      font-size: 14px;
      cursor: pointer;
      position: relative;
      color: var(--text-gray);
      margin: 5px;
      &.active {
        color: var(--gold);
        &::after {
          content: "";
          position: absolute;
          bottom: -1px;
          left: 0;
          right: 0;
          height: 2px;
          background-color: var(--gold);
        }
      }
    }
  }
  .tab-content {
    padding: 15px 0;
    max-width: 100%;
    margin: 0 auto;
    .tab-pane {
      display: none;
      &.active {
        display: block;
      }
      p {
        line-height: 1.6;
        color: var(--text-gray);
        margin-bottom: 15px;
        text-align: justify;
      }
    }
  }
}
