/* Contenedor principal del producto */
.product-detail {
  .row {
    align-items: flex-start;
  }
}

/* Galería principal */
.main-gallery {
  position: relative;
}

/* Slider principal */
.main-swiper {
  width: 100%;
  height: 500px;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;

  .swiper-slide {
    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      border-radius: 1rem;
      background: #f8f9fa;
    }
  }

  /* Flechas circulares */
  .swiper-button-prev,
  .swiper-button-next {
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -22px;

    &::after {
      font-size: 18px;
      font-weight: bold;
    }

    &:hover {
      background: #007bff;
      transform: scale(1.1);
      transition: all 0.3s ease;
    }
  }
}

/* Slider de miniaturas */
.thumb-swiper {
  margin-top: 1.5rem;
  height: 120px;

  .swiper-slide {
    width: auto;
    height: 100%;
    opacity: 0.5;
    cursor: pointer;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    &:hover {
      opacity: 0.8;
      transform: translateY(-2px);
    }

    &.swiper-slide-thumb-active {
      opacity: 1;
      border: 3px solid #007bff;
      box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }
  }
}

/* Información del producto */
.product-detail {
  h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #343a40;
    margin-bottom: 1rem;
    line-height: 1.2;

    @media (max-width: 768px) {
      font-size: 1.8rem;
      margin-top: 1.5rem;
    }
  }

  .brand {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 1rem;
  }

  .product-price {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    > div {
      font-size: 1.2rem;
      color: #6c757d;

    }

    .text-primary {
      font-size: 1.8rem !important;
      font-weight: bold !important;
    }

    // Agregar badge de descuento
    position: relative;

    &::after {
      content: "¡OFERTA!";
      position: absolute;
      top: -10px;
      right: 0;
      background: #dc3545;
      color: white;
      padding: 0.25rem 0.5rem;
      border-radius: 0.25rem;
      font-size: 0.75rem;
      font-weight: bold;
    }
  }

  .product-sizes {
    margin-top: 1.5rem;

    .field__label {
      font-weight: 600;
      margin-bottom: 0.5rem;
      color: #343a40;
    }

    .field__items,
    .field__item {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;

      .field__item,
      span {
        min-width: 45px;
        height: 45px;
        border: 2px solid #ddd;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.9rem;
        background: #fff;
        transition: all 0.3s ease;

        &:hover {
          border-color: #007bff;
          background: #f8f9ff;

        }

        &.active {
          border-color: #007bff;
          background: #007bff;
          color: #fff;
          box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
          transform: translateY(-2px);
        }
      }
    }
  }

  .product-description {
    line-height: 1.6;
    color: #555;
    font-size: 1rem;

    p {
      margin-bottom: 1rem;
    }
  }

  .button {
    .button--primary{
      width: 50%;
      height: 50px;
      padding: 10px 20px;
      cursor: pointer;
      font-size: 14px;
      background: #007bff;
      color: #fff;
      border: none;
      border-radius: 0.5rem;
      transition: background 0.3s ease;
      &:hover {
        background: #0056b3;
      }
    }
    .form-wrapper {
      justify-content: center;
      display: flex;
    }
  }
}

/* Responsivo */
@media (max-width: 768px) {
  .main-swiper {
    height: 400px;

    .swiper-button-prev,
    .swiper-button-next {
      width: 35px;
      height: 35px;
      margin-top: -17px;

      &::after {
        font-size: 16px;
      }
    }
  }

  .thumb-swiper {
    height: 80px;
    margin-top: 1rem;
  }

  .product-detail {
    h1 {
      font-size: 1.5rem;
      margin-top: 1.5rem;
    }

    .product-price {
      .text-primary {
        font-size: 1.5rem !important;
      }
    }

    .product-sizes {
      .field__items,
      .field__item {
        gap: 0.5rem;

        .field__item,
        span {
          min-width: 40px;
          height: 40px;
          font-size: 0.85rem;
        }
      }
    }
  }
}
