/* Extracted from theme style.css. Keep cascade order in functions.php. */

/* ========================================= */
/* PRODUCT PAGE STYLES                        */
/* ========================================= */

/* Product Hero Section */
.product-hero {
  background: var(--gradient-learnio);
  padding: 6rem 2rem 3.5rem;
  overflow: hidden;
  border-radius: 0 0 2.5rem 2.5rem;
  position: relative;

  .bubble {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 1);
    opacity: 0.1;
    animation: moveBubble 10s infinite ease-in-out;
  }

  .bubble1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 20%;
    animation-duration: 15s;
  }

  .bubble2 {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 50%;
    animation-duration: 12s;
  }

  .bubble3 {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 80%;
    animation-duration: 18s;
  }

  .bubble4 {
    width: 90px;
    height: 90px;
    top: 30%;
    left: 80%;
    animation-duration: 14s;
  }

  .bubble5 {
    width: 180px;
    height: 180px;
    top: 60%;
    left: 40%;
    animation-duration: 20s;
  }

  .bubble6 {
    width: 130px;
    height: 130px;
    top: 20%;
    left: 70%;
    animation-duration: 17s;
  }

  .bubble7 {
    width: 110px;
    height: 110px;
    top: 50%;
    left: 10%;
    animation-duration: 16s;
  }

  .bubble8 {
    width: 160px;
    height: 160px;
    top: 80%;
    left: 30%;
    animation-duration: 13s;
  }

  .bubble9 {
    width: 140px;
    height: 140px;
    top: 15%;
    left: 90%;
    animation-duration: 19s;
  }
}

.product-hero__inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;

  display: flex;
  justify-content: space-between;
  align-items: center;

  a {
    text-decoration: none;
  }
}

.product-hero__inner-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;

  padding: 1rem 1.5rem;
  border-radius: var(--radius-3);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  text-align: center;
  transition: all 0.2s ease;

  img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
  }

  .product-teacher__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .product-teacher__label {
    font-size: 0.75rem;
    text-transform: uppercase;
  }

  .product-teacher__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--purple-stroke);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .product-teacher__name:hover {
    color: var(--purple-stroke-hover);
  }

  &:hover {
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
  }

}

.product-hero__title {
  font-family: var(--title-font);
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.product-hero__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.product-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);

  transition: all 0.2s ease;

  a {
    color: white;
  }

  &:hover {
    border-color: var(--purple-stroke);
    background-color: var(--purple-stroke);
  }
}

.product-meta-tag.no-hover {
  cursor: default;

  &:hover {
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
  }

  a {
    pointer-events: none;
  }
}

.product-meta-tag img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* Product Main Content */
.product-main {
  padding: 4rem 2rem 6rem;
  background: var(--bg);
}

.product-container {
  max-width: 1400px;
  margin: 0 auto;
}

.product-content {
  display: flex;
  gap: 2rem;
  background-color: rgb(241, 241, 241);
  padding: 2rem;
  border-radius: var(--radius-2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);

  .product-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 1rem;
    height: 100%;

    .product-left-top {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
    }

    .product-stat {
      flex: 1;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      background-color: white;

      gap: 0.8rem;
      border-radius: 10px;
      padding: 1rem 1rem;
      width: 100%;

      &.description {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
        max-height: none;
        overflow-y: auto;

        p {
          width: 100%;
          word-wrap: break-word;
          overflow-wrap: break-word;
          max-width: 100%;
        }

        .description-head {
          display: flex;
          align-items: center;
          gap: 0.8rem;
        }
      }

      .product-stat-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background-color: #dfcfec;
        padding: 0.3rem;

        img {
          width: 1.2rem;
          height: 1.2rem;
          object-fit: contain;
        }
      }

      .product-stat-value {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;

        p {
          line-height: 1;
        }
      }
    }
  }

  .product-right {
    flex: 1;

    form {
      display: flex;
      flex-direction: column;
      gap: 1rem;

      .product-slots {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;

        label {
          font-size: 0.875rem;
          font-weight: 600;
          color: var(--gray-2);
        }

        select {
          padding: 0.5rem;
          border: 1px solid var(--purple-stroke);
          border-radius: var(--radius-3);
          font-size: 1rem;
          transition: border-color 0.2s ease;
        }

        select:focus {
          outline: none;
        }

        .alert-mensaje,
        .available-mensaje {
          display: flex;
          align-items: center;
          gap: 0.5rem;
          padding: 0.5rem;
          border-radius: var(--radius-3);
          background-color: rgba(255, 0, 0, 0.2);
          font-size: 0.875rem;
          font-weight: 600;
          color: red;

          .icon {
            display: flex;
            align-items: center;
            justify-content: center;

            img {
              width: 1.2rem;
              height: 1.2rem;
              object-fit: contain;
            }
          }
        }

        .available-mensaje {
          background-color: rgba(0, 255, 0, 0.2);
          color: #09bb15;
        }
      }
    }

    .final-price {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem;
      border-radius: var(--radius-3);
      background-color: white;
    }
  }
}

/* Related Products Section */
.related-products-section {
  margin-top: 4rem;
}

.related-products-title {
  font-family: var(--title-font);
  font-size: 2rem;
  font-weight: 700;
  color: var(--purple-stroke);
  margin-bottom: 2rem;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.related-products-grid .teacher-card {
  max-width: none;
}

.related-products-grid .card-image {
  height: 15rem;
}

.related-products-grid .card-image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-products-grid .card-info__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-products-grid .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.related-products-grid .card-footer .price {
  font-family: var(--title-font);
  font-weight: 700;
  color: var(--purple-stroke);
}

.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles)) button.button.alt {
  width: 120px;
  height: 45px;

  border-radius: var(--radius-2);
  background-color: var(--purple-stroke);
  border: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  width: 100%;
}