/* --- PRODUCT DETAIL PAGE: CLEAN FINAL STYLES --- */

.product-details .container {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
}

/* Product Gallery: Square, Centered */
.product-gallery {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07) !important;
    overflow: hidden !important;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.gallery-main-image {
    width: 100% !important;
    height: 300px !important;
    position: relative !important;
    overflow: hidden !important;
}

.mainSwiper {
    width: 100% !important;
    height: 100% !important;
}

.mainSwiper .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.gallery-thumbnails {
    width: 100% !important;
    padding: 0 !important;
    background: #fff !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.thumbSwiper {
    width: auto !important;
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 8px !important;
    background: #fff !important;
    overflow: visible !important;
}

.thumbSwiper .swiper-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
}

.thumbSwiper .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    background: #fff !important;
    display: block !important;
}

/* Product Info Card */
.product-info {
    padding: 20px !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}
.product-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    color: #333 !important;
}
.product-price, .product-price .current-price {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 15px 0 !important;
}

/* Product Description: Compact Card */
.product-description {
  background: #1e1e3f !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2) !important;
  padding: 24px 28px !important;
  margin-top: 32px !important;
  color: #ffffff !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  min-height: 320px !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

/* Similar Products: Align with Main Content */
.similar-products {
  padding-top: 32px !important;
  padding-bottom: 32px !important;
  background: transparent !important;
}
.similar-products-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 18px !important;
  overflow-x: auto !important;
  padding-bottom: 0 !important;
  margin-left: 0 !important;
  scrollbar-width: none !important; /* Firefox */
}
.similar-products-row::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari */
}
.similar-products .product-card {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  background: #1e1e3f !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2) !important;
  margin: 0 10px 20px 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  overflow: hidden !important;
  position: relative !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
}
.similar-products .product-card .product-image {
  width: 100% !important;
  aspect-ratio: 1/1 !important;
  background: #2d2d5f !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}
.similar-products .product-card .product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 12px 12px 0 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.similar-products .product-card .product-info {
  width: 100% !important;
  padding: 16px 12px 12px 12px !important;
  background: #2d2d5f !important;
  border-radius: 0 0 12px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  border-top: 1px solid rgba(139, 92, 246, 0.2) !important;
}
.similar-products .product-card .product-title {
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  text-align: center !important;
  margin: 0 0 6px 0 !important;
  line-height: 1.3 !important;
}
.similar-products .product-card .product-price {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #c084fc !important;
  text-align: center !important;
  margin: 0 0 10px 0 !important;
}
.similar-products .product-card .add-to-cart-btn {
  width: 100% !important;
  padding: 10px 0 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%) !important;
  color: #ffffff !important;
  border: none !important;
  margin-top: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3) !important;
}
.similar-products .product-card .add-to-cart-btn:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
}

/* Hide Swiper navigation arrows */
.mainSwiper .swiper-button-next,
.mainSwiper .swiper-button-prev {
    display: none !important;
}

/* Mobile: Remove top blank space in gallery */
@media (max-width: 767.98px) {
  .main-swiper .swiper-slide {
    align-items: flex-start !important;
  }
  .similar-products .product-card {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    border-radius: 7px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
    margin: 0 4px 10px 0 !important;
    padding: 0 !important;
  }
  .similar-products .product-card .product-image {
    aspect-ratio: 1/1 !important;
    border-radius: 7px 7px 0 0 !important;
  }
  .similar-products .product-card .product-image img {
    border-radius: 7px 7px 0 0 !important;
  }
  .similar-products .product-card .product-info {
    padding: 7px 4px 6px 4px !important;
    border-radius: 0 0 7px 7px !important;
    gap: 2px !important;
  }
  .similar-products .product-card .product-title {
    font-size: 0.85rem !important;
    margin-bottom: 1px !important;
  }
  .similar-products .product-card .product-price {
    font-size: 0.9rem !important;
    margin-bottom: 2px !important;
  }
  .similar-products .product-card .add-to-cart-btn {
    font-size: 0.85rem !important;
    padding: 5px 0 !important;
    border-radius: 5px !important;
    margin-top: 2px !important;
  }
}

/* Fix: Thumbnails should not be cut/cropped */
.thumb-swiper {
    width: 100% !important;
    height: 70px !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    background: #fff !important;
    overflow: visible !important;
    padding: 0 8px !important;
    border-radius: 0 0 12px 12px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    z-index: 2 !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.thumb-swiper .swiper-wrapper {
    height: 70px !important;
    align-items: center !important;
}

.thumb-swiper .swiper-slide {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    margin: 0 4px !important;
}

.thumb-swiper .swiper-slide img {
    height: 60px !important;
    width: auto !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    background: #fff !important;
    display: block !important;
}
/* FINAL OVERRIDE: Force main image height for square gallery, override styles.css */
.product-gallery .main-swiper .swiper-slide img,
.main-swiper .swiper-slide img,
.mainSwiper .swiper-slide img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: -45px auto !important;
    background: none !important;
    padding: 0 !important;
}

/* Consistent style for images and videos in main gallery */
.mainSwiper .swiper-slide img,
.mainSwiper .swiper-slide video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 20px !important;
  background: #fff !important;
}
.mainSwiper .swiper-slide {
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.gallery-main-image,
.mainSwiper {
  height: 320px !important;
  min-height: 220px !important;
  max-height: 400px !important;
}

/* --- DETAILED DESCRIPTION SECTION --- */
.detailed-description-card {
    width: 70vw;
    margin: auto;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
    padding: 28px 24px;
    margin-top: 32px;
    margin-bottom: 32px;
    color: #ffffff;
    font-family: 'Poppins', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #1e1e3f;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.detailed-description-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: 0.5px;
    font-family: 'Poppins', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}
.detailed-description-brief {
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: #ffffff;
}
.detailed-description-features-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 18px;
    margin-bottom: 10px;
    font-family: 'Poppins', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
}
.detailed-description-features {
    margin-bottom: 18px;
    padding-left: 18px;
}
.detailed-description-features li {
    font-size: 1.08rem;
    margin-bottom: 7px;
    color: #ffffff;
    font-family: 'Poppins', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
}
.detailed-description-images {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-start;
    align-items: flex-start;
    margin-top: 18px;
}
.detailed-description-img {
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(139, 92, 246, 0.2);
    background: #2d2d5f;
    object-fit: cover;
    width: 500px;
    height: 300px;
    max-width: 100%;
    transition: box-shadow 0.2s;
}
.detailed-description-img:hover {
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.detailed-description-block {
    margin-bottom: 22px;
}
.detailed-description-text {
    font-size: 1.15rem;
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 12px;
    font-family: 'Poppins', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}
.detailed-description-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}
.detailed-description-img {
    margin: 0 auto;
}

/* --- SPECIFICATION SECTION DARK THEME --- */
.product-description table,
.product-description .table,
.specification-table,
.specifications-table {
    background: #2d2d5f !important;
    color: #ffffff !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.product-description table th,
.product-description .table th,
.specification-table th,
.specifications-table th {
    background: #1e1e3f !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2) !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
}

.product-description table td,
.product-description .table td,
.specification-table td,
.specifications-table td {
    background: #2d2d5f !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1) !important;
    padding: 12px 16px !important;
}

.product-description table tr:last-child td,
.product-description .table tr:last-child td,
.specification-table tr:last-child td,
.specifications-table tr:last-child td {
    border-bottom: none !important;
}

/* --- PRODUCT DESCRIPTION TABLE STYLES --- */
.product-description table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 16px 0 !important;
}

.product-description table tr:hover {
    background: rgba(139, 92, 246, 0.1) !important;
}

/* --- KEY FEATURES SECTION --- */
.product-description h3,
.product-description h4,
.product-description h5 {
    color: #ffffff !important;
    margin-bottom: 12px !important;
}

.product-description ul,
.product-description ol {
    color: #ffffff !important;
}

.product-description li {
    color: #ffffff !important;
    margin-bottom: 8px !important;
}

.product-description p {
    color: #ffffff !important;
    margin-bottom: 12px !important;
}
@media (max-width: 768px) {
    .detailed-description-card {
        padding: 16px 6px;
    }
    .detailed-description-images {
        flex-direction: column;
        gap: 12px;
    }
    .detailed-description-img {
        width: 100%;
        height: auto;
        max-width: 100vw;
        min-width: 0;
    }
    .detailed-description-block {
        margin-bottom: 16px;
    }
    .detailed-description-img {
        width: 100%;
        height: auto;
        max-width: 100vw;
    }
}
@media (max-width: 767.98px) {
  .detailed-description-card {
    width: 93vw;
  }
}

/* --- Review Media Gallery Thumb Styles (force from product-detail.css) --- */
.review-media-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    justify-content: flex-start;
    align-content: center;
    max-width: 500px;
    margin-bottom: 20px;
}
.review-media-thumb, .review-media-showmore {
    width: 100px !important;
    height: 100px !important;
    min-width: 100px !important;
    min-height: 100px !important;
    max-width: 100px !important;
    max-height: 100px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    background: #fafafa !important;
    margin: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    position: relative;
    text-align: center;
}
.review-media-showmore {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #2563eb;
    cursor: pointer;
}
@media (max-width: 768px) {
    .review-media-gallery {
        max-width: 380px;
        gap: 6px;
    }
    .review-media-thumb, .review-media-showmore {
        width: 90px !important;
        height: 90px !important;
        min-width: 90px !important;
        min-height: 90px !important;
        max-width: 90px !important;
        max-height: 90px !important;
    }
}
@media (min-width: 769px) {
    .review-media-gallery {
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: repeat(2, 1fr);
        max-width: 860px;
    }
}

/* --- Rate Product Modal Star Color --- */
#rate-stars .fa-star {
    color: #e0e0e0 !important; /* Default: light gray for unselected */
    transition: color 0.2s;
}
#rate-stars .fa-star.selected {
    color: #ffc107 !important; /* Filled yellow for selected */
    text-shadow: 0 1px 2px #bfa00433;
}

@media (min-width: 992px) {
    .gallery-main-image {
        height: 400px !important;
    }
    .mainSwiper {
        height: 400px !important;
    }
}

/* Make video non-interactive so anchor gets the tap/click */
.mainSwiper .swiper-slide a.glightbox-product > video {
  pointer-events: none !important;
}

