/* Product Details - Clean & Modern Design */

/* ===== BASE LAYOUT ===== */
.product-details-page {
  background: var(--background-white);
  min-height: 100vh;
  overflow: visible !important;
}

/* ===== HERO ANIMATIONS ===== */
.shop-hero-content {
  animation: fadeInUp 0.8s ease-out;
}

.shop-hero-badge {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.shop-hero-title {
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.shop-hero-subtitle {
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--background-soft);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 62, 100, 0.1);
}

.breadcrumb-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: var(--primary-orange);
}

.breadcrumb-separator {
  color: #9ca3af;
  margin: 0 0.25rem;
}

.breadcrumb-current {
  color: var(--text-dark);
  font-weight: 600;
}

/* ===== MAIN PRODUCT SECTION ===== */
.product-section {
  padding: 2rem 0;
  overflow: visible !important;
  position: relative;
}

.product-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  gap: 2.5rem;
  position: relative;
}

.product-info-section {
  flex: 1.6;
  min-width: 0;
}

.product-right {
  flex: 1;
  position: relative;
  min-width: 0;
}

.product-right-sticky {
  position: relative;
  top: 0;
  z-index: 100;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  will-change: transform;
}

/* Scrollbar personnalisée pour le sticky - cachée mais fonctionnelle */
.product-right-sticky::-webkit-scrollbar {
  width: 4px;
}

.product-right-sticky::-webkit-scrollbar-track {
  background: transparent;
}

.product-right-sticky::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 2px;
}

.product-right-sticky::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 62, 100, 0.2);
}

/* ===== PRODUCT IMAGE ===== */
.product-image-section {
  margin-bottom: 1rem;
}

.product-image-wrapper {
  background: white;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  border: 1px solid rgba(0, 62, 100, 0.06);
  overflow: visible;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-image-wrapper:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper:hover .image-zoom-hint {
  opacity: 1;
}

.product-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  object-fit: cover;
  max-height: 300px;
  transition: transform 0.3s ease;
}

.product-image-wrapper:hover .product-image {
  transform: scale(1.02);
}

.image-zoom-hint {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ===== IMAGE LIGHTBOX ===== */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 10000;
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zoomIn 0.3s ease;
  padding: 60px 20px 20px 20px;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 600px;
  min-height: 500px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(232, 67, 36, 0.9);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  background: var(--primary-orange);
  transform: scale(1.1);
}

/* ===== PRODUCT INFO ===== */
.product-info-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.product-header {
  padding-bottom: 0.25rem !important;
  border-bottom: 1px solid rgba(0, 62, 100, 0.08);
  margin-bottom: 0 !important;
}

.product-category {
  display: inline-block;
  background: rgba(232, 67, 36, 0.1);
  color: var(--primary-orange);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  line-height: 1;
  gap: 1rem;
  padding: 0;
  margin-bottom: 0;
}

.product-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-orange);
  font-family: "Montserrat", sans-serif;
  margin: 0;
}

.product-stock {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.product-stock.in-stock {
  color: #10b981;
}

.product-stock.out-stock {
  color: #ef4444;
}

.product-description {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  padding-top: 0.5rem !important;
  margin-top: 0 !important;
}

.product-description p {
  margin-bottom: 2.5rem;
}

.product-description p:last-child {
  margin-bottom: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.product-description br + br {
  display: block;
  margin-bottom: 1.5rem;
  content: "";
}

/* ===== FEATURES ===== */
.product-features {
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid rgba(0, 62, 100, 0.08);
}

.features-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.feature-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: #4b5563 !important;
  font-weight: 400 !important;
  font-size: 0.96rem !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 0 !important;
  transition: none !important;
  position: relative !important;
}

.feature-item::before {
  content: "✓" !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: #e84324 !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  position: static !important;
  left: auto !important;
  top: auto !important;
}

.feature-item:hover {
  background: none !important;
  border: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== ACTIONS ===== */
.product-actions {
  margin: 1rem 0;
}

.quantity-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quantity-label {
  display: block;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.quantity-controls {
  display: inline-flex;
  align-items: center;
  background: var(--background-soft);
  border: 1px solid rgba(0, 62, 100, 0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-dark);
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: rgba(0, 62, 100, 0.1);
  color: var(--primary-blue);
}

.qty-input {
  border: none;
  padding: 0.6rem 0.4rem;
  text-align: center;
  width: 50px;
  font-weight: 500;
  background: transparent;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.qty-input:focus {
  outline: none;
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.action-buttons button {
  width: 100%;
  min-height: 44px;
}

/* ===== GUARANTEES ===== */
.product-guarantees {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.guarantee-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.8rem 0.3rem;
  background: transparent;
  border-radius: 0;
  border: none;
  transition: all 0.3s ease;
}

.guarantee-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 62, 100, 0.1);
}

.guarantee-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 0.4rem;
}

.guarantee-icon[src] {
  filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%)
    hue-rotate(346deg) brightness(104%) contrast(97%);
}

.guarantee-item span {
  font-size: 0.65rem;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.2;
}

/* ===== SPECIFICATIONS ===== */
.specifications-section {
  padding: 3rem 0;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.specifications-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(232, 67, 36, 0.03);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

.specs-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

.specs-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2.5rem;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  position: relative;
}

.specs-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-orange);
  border-radius: 2px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 62, 100, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(30px);
}

.spec-item:nth-child(1) {
  animation-delay: 0.1s;
}
.spec-item:nth-child(2) {
  animation-delay: 0.2s;
}
.spec-item:nth-child(3) {
  animation-delay: 0.3s;
}
.spec-item:nth-child(4) {
  animation-delay: 0.4s;
}
.spec-item:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spec-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.spec-label {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
  position: relative;
}

.spec-label::before {
  content: "▸";
  color: var(--primary-orange);
  margin-right: 0.5rem;
  font-weight: bold;
}

.spec-value {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  background: rgba(232, 67, 36, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.spec-item:hover .spec-value {
  background: rgba(232, 67, 36, 0.1);
  color: var(--primary-orange);
  transform: scale(1.05);
}

.product-price-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.price-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ===== RELATED PRODUCTS ===== */
.related-section-inline {
  padding: 2rem 0 0 0;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(0, 62, 100, 0.08);
}

.related-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2rem;
  font-family: "Montserrat", sans-serif;
}

/* Carousel Container */
.related-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.related-grid {
  display: flex;
  gap: 0.8rem;
  transition: transform 0.5s ease;
  will-change: transform;
}

.related-card {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0, 62, 100, 0.08);
  transition: transform 0.2s;
  flex: 0 0 calc((100% - 1.6rem) / 3);
  min-width: 0;
}

.related-card:hover {
  transform: translateY(-2px);
}

.related-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--background-soft);
  padding: 0.3rem;
  overflow: hidden;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-info {
  padding: 0.4rem;
}

.related-category {
  color: var(--primary-orange);
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.1rem;
}

.related-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-price {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-orange);
  margin-bottom: 0.3rem;
  font-family: "Montserrat", sans-serif;
}

.related-link {
  display: inline-block;
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.6rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--primary-blue);
  border-radius: 10px;
  transition: all 0.2s;
  width: 100%;
  text-align: center;
}

.related-link:hover {
  background: var(--primary-blue);
  color: white;
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-btn {
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.carousel-btn:hover {
  background: var(--primary-blue-dark);
  transform: scale(1.1);
}

.carousel-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 62, 100, 0.2);
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot:hover {
  background: rgba(232, 67, 36, 0.5);
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--primary-orange);
  width: 24px;
  border-radius: 4px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .product-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .product-info-section {
    flex: 1;
  }

  .product-right {
    flex: 1;
    position: static;
  }

  .product-right-sticky {
    position: static !important;
    top: auto !important;
    transform: none !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .product-guarantees {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .product-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Casser les conteneurs pour que tous les éléments soient au même niveau */
  .product-info-section {
    display: contents;
  }

  .product-right {
    display: contents;
    position: static;
  }

  /* Ordre à l'intérieur de product-info-section */
  .product-header {
    order: 1;
  }

  .product-description {
    order: 2;
  }

  .product-features {
    order: 3;
  }

  .product-specs {
    order: 7;
  }

  .related-section-inline {
    order: 8;
  }

  /* Ordre à l'intérieur de product-right */
  .product-image-section {
    order: 4;
  }

  .product-price-section {
    order: 5;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .product-actions {
    order: 6;
  }

  .product-guarantees {
    order: 9;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-container,
  .specs-container,
  .related-container {
    padding: 0 20px;
  }

  .product-title {
    font-size: 1.8rem;
  }

  .product-price {
    font-size: 1.8rem;
  }

  .action-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .related-card {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .product-container,
  .specs-container,
  .related-container {
    padding: 0 15px;
  }

  .product-title {
    font-size: 1.5rem;
  }

  .product-price {
    font-size: 1.5rem;
  }

  .quantity-controls {
    justify-content: center;
  }

  .product-guarantees {
    grid-template-columns: 1fr;
  }

  .guarantee-item {
    flex-direction: row;
    text-align: left;
    padding: 1rem;
  }

  .guarantee-icon {
    margin-bottom: 0;
    margin-right: 1rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-card {
    flex: 0 0 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .spec-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}
