/* ==========================================================================
   Product Page Section
   ========================================================================== */

.product {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media screen and (min-width: 750px) {
  .product {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

.product__wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-top: 3rem;
}

@media screen and (max-width: 989px) {
  .product__media-wrapper {
    position: static;
  }
}

@media screen and (min-width: 990px) {
  .product__wrapper {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

/* Product Media */
.product__media-wrapper {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.product__media {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background-color: rgba(var(--color-text), 0.05);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.product__featured-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: rgba(255,255,255,0.02);
}

.product__media-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media screen and (min-width: 750px) {
  .product__media-list {
    grid-template-columns: repeat(5, 1fr);
  }
}

.product__media-item {
  position: relative;
  padding-bottom: 100%;
  background-color: rgba(var(--color-text), 0.05);
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.product__media-item:hover,
.product__media-item.active {
  opacity: 1;
}

.product__media-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.product__info {
  display: flex;
  flex-direction: column;
}

.product__info-wrapper > * {
  margin-bottom: 2rem;
}

.product__title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media screen and (min-width: 750px) {
  .product__title {
    font-size: 4rem;
  }
}

.product__price .price__amount {
  font-size: 2.4rem;
}

.product__price .price__compare {
  font-size: 2rem;
}

/* Variants */
.product__variants {
  margin-bottom: 2rem;
}

.product-option {
  margin-bottom: 1.5rem;
}

.product-option__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.product-option__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.product-option__values input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-option__values label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  padding: 0.8rem 1.6rem;
  font-size: 1.4rem;
  border: 1px solid rgba(var(--color-text), 0.3);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-option__values input[type="radio"]:checked + label {
  background-color: var(--color-button);
  color: var(--color-button-text);
  border-color: var(--color-button);
}

.product-option__values label:hover {
  border-color: var(--color-button);
}

/* Quantity */
.product__quantity label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.quantity__input {
  width: 100px;
}

/* Buy Buttons */
.product__buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-form__submit {
  margin-bottom: 1rem;
}

/* Description */
.product__description {
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--color-text), 0.1);
}
