/* =====================================================
   PRODUCT DETAILS PAGE CSS
   ===================================================== */
.product-details-page {
  background-color: var(--white);
}

.fs-sm {
  font-size: 0.85rem;
}
.letter-spacing-1 {
  letter-spacing: 1px;
}
.text-purple {
  color: var(--purple-primary) !important;
}
.bg-purple {
  background-color: var(--purple-primary) !important;
}
.btn-purple {
  background-color: var(--purple-primary);
  color: var(--white);
}
.btn-purple:hover {
  background-color: var(--purple-dark);
  color: var(--white);
}

/* Gallery */
.main-image-box {
  background-color: var(--grey-light);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}
.main-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}
.main-image-box:hover img {
  transform: scale(1.15);
}

.thumbnail-box {
  width: 80px;
  height: 80px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--grey-light);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumbnail-box.active, .thumbnail-box:hover {
  border-color: var(--purple-primary);
}

/* Size Selection */
.btn-size {
  border: 1px solid var(--grey);
  background-color: var(--white);
  color: var(--text-primary);
  padding: 6px 16px;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.btn-size:hover {
  border-color: var(--purple-primary);
}
.btn-size.active {
  background-color: var(--purple-primary);
  border-color: var(--purple-primary);
  color: var(--white);
}

/* Color Selection */
.btn-color {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--grey);
  padding: 0;
  transition: transform 0.2s ease;
}
.btn-color:hover {
  transform: scale(1.1);
}
.btn-color.active {
  border-color: var(--purple-primary);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--purple-primary);
}

/* Quantity Control */
.qty-control {
  width: 130px;
  height: 48px;
}
.qty-control button {
  width: 40px;
  height: 100%;
  font-size: 1.2rem;
  padding: 0;
}
.qty-control input {
  font-weight: bold;
}
.qty-control input:disabled {
  background-color: transparent;
}

/* Action Buttons */
.btn-add-cart-main {
  height: 48px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}
.btn-wishlist-main {
  height: 48px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}
.btn-wishlist-main.active {
  background-color: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}

/* Tabs */
.product-tabs .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 20px;
}
.product-tabs .nav-link:hover {
  color: var(--purple-primary);
  border-color: transparent;
}
.product-tabs .nav-link.active {
  color: var(--purple-primary);
  border-color: var(--purple-primary);
  background-color: transparent;
}

@media (max-width: 767.98px) {
  .qty-control {
    width: 100%;
  }
  .btn-wishlist-main {
    width: 100%;
  }
  .product-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
}
/* =========================================================
   MAIN PRODUCT IMAGE
   ========================================================= */

.main-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
    transition:
        opacity 0.2s ease,
        transform 0.4s ease;
}

.main-image-box img.changing {
    opacity: 0.25;
}


/* =========================================================
   HORIZONTAL THUMBNAILS
   ========================================================= */

.product-gallery-horizontal {
    display: flex;
    gap: 12px;

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 4px 2px 10px;

    scroll-behavior: smooth;

    scrollbar-width: thin;
}


/* Chrome / Edge / Safari */

.product-gallery-horizontal::-webkit-scrollbar {
    height: 5px;
}

.product-gallery-horizontal::-webkit-scrollbar-track {
    background: #eeeeee;
    border-radius: 10px;
}

.product-gallery-horizontal::-webkit-scrollbar-thumb {
    background: var(--purple-primary, #4a1259);
    border-radius: 10px;
}


/* Individual thumbnail */

.gallery-image-item {
    flex: 0 0 95px;

    width: 95px;
    height: 95px;

    padding: 4px;

    background: #ffffff;

    border: 2px solid #eeeeee;
    border-radius: 9px;

    overflow: hidden;

    cursor: pointer;

    transition:
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.gallery-image-item:hover {
    border-color: var(--purple-primary, #4a1259);

    transform: translateY(-2px);
}


.gallery-image-item.active {
    border-color: var(--purple-primary, #4a1259);

    box-shadow:
        0 0 0 2px rgba(74, 18, 89, 0.10);
}


.gallery-image-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 5px;

    pointer-events: none;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .gallery-image-item {
        flex: 0 0 85px;

        width: 85px;
        height: 85px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .main-image-box {
        aspect-ratio: 1 / 1;
        border-radius: 10px;
    }


    .main-image-box img {
        padding: 10px;
    }


    .product-gallery-horizontal {
        gap: 8px;

        padding-bottom: 8px;
    }


    .gallery-image-item {
        flex: 0 0 72px;

        width: 72px;
        height: 72px;

        border-radius: 7px;
    }

}