/* ===========================
   PRODUCT PAGES
   =========================== */

/* Main grid area placement */
.main {
  grid-area: main;
}

/* Wrapper for the product page - two-column grid with images, info*/
.product-page-wrapper {
  display: grid;
  grid-template-areas:
    "images info";
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr min-content;
  gap: 40px;
  padding: 40px;
  background-color: white;
  justify-items: center;
  max-width: 100%;
  margin: 0 auto;
}

/* ===========================
   PRODUCT IMAGE CAROUSEL
   =========================== */

/* Carousel container */
.product-carousel {
  grid-area: images;
  width: 100%;
  max-width: 600px;
  position: relative;
  overflow: hidden;
  margin: auto;
}

/* Each slide hidden by default */
.carousel-slide {
  display: none;
}

/* Make active slide visible */
.carousel-slide.active {
  display: block;
}

/* Carousel images made to fit container */
.carousel-slide img {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

/* Fade animation for slide transitions */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from { opacity: .4; }
  to   { opacity: 1; }
}


/* ===========================
   CAROUSEL NAVIGATION ARROWS
   =========================== */

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  margin-top: -22px;
  color: black;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  background-color: rgba(255, 255, 255, 0.8);
  user-select: none;
  z-index: 10;
}

.next {
  right: 0;
}

/* Highlight arrows when hovered */
.prev:hover, .next:hover {
  background-color: #E69D00;
  color: white;
}

/* ===========================
   CAROUSEL DOT INDICATORS
   =========================== */

/* Container for dot indicators */
.carousel-dots {
  text-align: center;
  margin-top: 10px;
}

/* Individual dot styling */
.dot {
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.dot.active,
.carousel-dots .dot:hover {
  background-color: #E69D00;
}

/* ===========================
   PRODUCT INFO CARD
   =========================== */

/* Info card container */
.product-card {
  grid-area: info;
  background-color: #E69D00;
  padding: 20px;
  color: black;
  border-radius: 10px;
}

/* Detailed product description */
.product-details {
  color: black;
  font-weight: 600;
  padding: 40px;
  border-radius: 10px;
  background-color: antiquewhite;
}

/* Price heading inside product card */
.price h3 {
  margin-bottom: 0.5rem;
}

/* Variants list */
.variants ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.variants li {
  background: antiquewhite;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.variants li span.bold-text {
  font-weight: 700;
}

/* ===========================
   PRICE BUTTON STYLING
   =========================== */


.price .price-item { position: relative; }
.price .price-button { position: relative; overflow: hidden; }

/* Corner ribbon (50% OFF) */
.price .price-button .ribbon {
  position: absolute;
  top: -12px;
  right: -150px;
  transform: rotate(45deg);
  background: #e60000;
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: .5px;
  padding: 6px 56px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  pointer-events: none;
  z-index: 5;
}

/* Old price with diagonal strikethrough */
.price .old-price {
  position: relative;
  color: #8b8b8b !important;
  margin: 0 8px;
  font-weight: 500;
}

.price .old-price::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 55%;
  border-top: 2px solid #8b8b8b;
  transform: rotate(-12deg);
  transform-origin: center;
}

/* New discounted price */
.price .new-price {
  color: #e60000 !important;
  font-weight: 900;
  font-size: 1.25rem;
}

/* Keep spans inline and neat */
.price .price-button span {
  display: inline-block;
  vertical-align: middle;
}

.price .bold-text {
  margin-right: 6px;
}
/* ===========================
   RESPONSIVE ADJUSTMENTS (LESS THAN 768px)
   =========================== */

@media (max-width: 768px) {
  /* Stack the product page content vertically on mobile */
  .product-page-wrapper {
    display: flex;
    flex-direction: column;
    padding: 20px;
  }

  .product-carousel {
    width: 100%;
  }

  .product-details {
    padding: 20px;
  }

  .product-details p{
    font-size: 1rem;
  } 
}
