/* ============================================
   🛍️ PRODUCT DETAILS PAGE - LUXURY DESIGN
   ============================================ */

/* Product Details Container */
.product-details-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  padding-bottom: 40px;
}

/* ===== Breadcrumb Navigation ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.breadcrumb a:hover {
  color: #23947d;
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #ccc;
  font-size: 16px;
}

.breadcrumb-current {
  color: #555;
  font-weight: 500;
}

/* ===== Main Product Section ===== */
.product-details-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
}

/* ===== Product Image Section ===== */
.product-image-section {
  position: relative;
}

.product-main-image {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.product-main-image img {
  width: 100%;
  max-height: 500px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.5s ease;
  background-color: #fff;
}

.product-main-image:hover img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 30px;
  right: 25px;
  z-index: 10;
}

.badge-in-stock,
.badge-out-stock {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-in-stock {
  background: linear-gradient(135deg, #2ca58d, #1b8a73);
  color: #fff;
}

.badge-out-stock {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
}

/* ===== Product Image Gallery (Optional - for future use) ===== */
.product-image-gallery {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.product-image-gallery .thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.product-image-gallery .thumbnail:hover,
.product-image-gallery .thumbnail.active {
  border-color: var(--accent);
  transform: scale(1.05);
}

/* ===== Product Info Section ===== */
.product-info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 8px 16px;
  background: linear-gradient(135deg, #e8f5f2, #d4ede7);
  color: var(--accent);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(44, 165, 141, 0.2);
}

.product-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #222;
  margin: 0;
  line-height: 1.3;
}

/* ===== Product Price Section ===== */
.product-price-section {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.product-price {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(135deg, #2ca58d, #1b8a73);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.currency {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  color: var(--accent);
}

.product-price-free {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  background: linear-gradient(135deg, #27ae60, #16a085);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Product Stock ===== */
.product-stock {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fdfc;
  border-radius: 10px;
  font-size: 15px;
}

/* ===== Product Description ===== */
.product-description {
  background: #f9fbfc;
  padding: 20px;
  border-radius: 12px;
  border-right: 4px solid var(--accent);
}

.product-description h3 {
  margin-top: 0;
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 12px;
}

.product-description p {
  color: #555;
  line-height: 1.8;
  margin: 0;
  font-size: 15px;
}

/* ===== Product Specifications ===== */
.product-specifications {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #eee;
}

.product-specifications h3 {
  margin-top: 0;
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 16px;
}

.product-specifications ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-specifications li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 15px;
}

.product-specifications li:last-child {
  border-bottom: none;
}

.spec-label {
  font-weight: 600;
  color: #333;
}

.spec-value {
  color: #666;
  text-align: left;
}

/* ===== Product Actions ===== */
.product-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-add-to-cart,
.btn-back-to-shop {
  flex: 1;
  min-width: 200px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-add-to-cart {
  background: #2ca58d;
  color: #fff;
  box-shadow: 0 4px 15px rgba(44, 165, 141, 0.3);
}

.btn-add-to-cart:hover:not(:disabled) {
  background: linear-gradient(135deg, #1b8a73, #136d5d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 165, 141, 0.4);
}

.btn-back-to-shop {
  background: #fff;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-back-to-shop:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(44, 165, 141, 0.2);
}

/* ===== Related Products Section ===== */
.related-products-section {
  padding: 40px 0;
}

.section-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: #222;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
}

.section-title i {
  color: var(--accent);
}

.related-products-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  /* Prevent vertical scroll */
  gap: 20px;
  padding: 10px 5px 20px 5px;
  /* Add top/side padding */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.related-products-grid::-webkit-scrollbar {
  display: none;
}

.related-product-card {
  flex: 0 0 280px;
  width: 280px;
  scroll-snap-align: start;
  display: flex !important;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.related-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.related-product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.related-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-product-card:hover .related-product-image img {
  transform: scale(1.1);
}

.related-product-info {
  padding: 16px;
}

.related-product-info h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.related-product-price {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

/* ============================================
   📱 RESPONSIVE DESIGN
   ============================================ */

/* Tablets and below */
@media (max-width: 768px) {
  .product-details-main {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px;
  }

  .product-main-image img {
    height: 350px;
  }

  .product-title {
    font-size: 24px;
  }

  .product-actions {
    flex-direction: column;
  }

  .btn-add-to-cart,
  .btn-back-to-shop {
    min-width: 100%;
  }

  .related-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .breadcrumb {
    font-size: 13px;
    padding: 10px 14px;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  .product-details-container {
    padding: 0 12px;
  }

  .product-main-image img {
    height: 280px;
  }

  .product-details-main {
    padding: 16px;
  }

  .product-price {
    font-size: 32px;
  }

  .currency {
    font-size: 18px;
  }

  .product-description,
  .product-specifications {
    padding: 16px;
  }

  .section-title {
    font-size: 20px;
  }

  .breadcrumb {
    font-size: 12px;
    gap: 6px;
  }

  .related-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Smooth Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-details-main {
  animation: fadeIn 0.6s ease;
}

/* Related Products logic now uses .reveal class */

/* ===== Product Like Button (YouTube-style) ===== */
.product-like-container {
  display: flex;
  justify-content: flex-start;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0;
}

.product-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f0f0f0;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
  color: #606060;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-like-btn .like-icon {
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
  color: #606060;
}

.product-like-btn .like-count {
  min-width: 20px;
  text-align: center;
  font-size: 15px;
}

/* Hover state */
.product-like-btn:hover {
  background: #e8e8e8;
  border-color: #d0d0d0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Liked state (active) */
.product-like-btn.liked {
  background: linear-gradient(135deg, #2ca58d, #1b8a73);
  border-color: #2ca58d;
  color: #fff;
}

.product-like-btn.liked .like-icon {
  color: #fff;
}

.product-like-btn.liked:hover {
  background: linear-gradient(135deg, #1b8a73, #136d5d);
  border-color: #1b8a73;
}

/* Animation when clicking */
.product-like-btn.animating {
  animation: likePress 0.4s ease;
}

@keyframes likePress {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .product-like-btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  .product-like-btn .like-icon {
    width: 16px;
    height: 16px;
  }

  .product-like-btn .like-count {
    font-size: 14px;
  }
}

/* ===== Product Slider (Revised for Sliding) ===== */
.product-slider {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  background: #fff;
  aspect-ratio: 1 / 1;
}

.product-slider-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #fff;
  padding: 10px;
}

.product-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* Drop shadow to separate white image from white bg */
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
  transition: transform 0.4s ease;
}

.product-slide:hover img {
  transform: scale(1.05);
  /* Subtle zoom on hover */
}

/* Dots */
.product-slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.product-slider-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-slider-dots span.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* Updated Arrow Styles */
.slider-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  /* Hidden by default */
  visibility: hidden;
}

/* Show arrows on hover (Desktop) AND verify "Fixed for mobile" */
.product-slider:hover .slider-arr {
  opacity: 1;
  visibility: visible;
}

.slider-arr:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 6px 16px rgba(44, 165, 141, 0.4);
}

.slider-arr-prev {
  right: 15px;
  /* RTL Next */
}

.slider-arr-next {
  left: 15px;
  /* RTL Prev */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .product-slider {
    aspect-ratio: 1 / 1;
  }

  /* User requested arrows fixed for mobile */
  .slider-arr {
    opacity: 1;
    visibility: visible;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .slider-arr:active {
    transform: translateY(-50%) scale(0.95);
  }

  /* Adjust dot position slightly */
  .product-slider-dots {
    bottom: 15px;
  }
}