.image-layout {
  display: flex;
  gap: 12px;
  align-items: stretch;
  /* étire les enfants */
  width: 100%;
  position: relative;
}

/* Conteneur principal */
.product-images {
  width: 100%;
}

/* === MINIATURES === */
.thumbnails-carousel-wrapper {
  flex-shrink: 0;
  width: 100px;
  /* ⬅️ augmenté pour grands écrans */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.thumbnails-carousel {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

/* Flèches */
.scroll-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  color: #333;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.scroll-arrow:hover {
  opacity: 1;
}

.scroll-arrow.up {
  top: -16px;
}

.scroll-arrow.down {
  bottom: -16px;
}

/* Miniature */
.thumb-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border 0.2s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-wrapper.active {
  border-color: #ff9900;
  box-shadow: 0 0 0 2px #ff9900;
}

.thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.thumb-wrapper:hover img {
  transform: scale(1.05);
}

/* === IMAGE PRINCIPALE === */
.main-image {
  flex-grow: 1;
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  background-color: #f8f8f8;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.main-image img.loaded {
  opacity: 1;
}

/* Spinner */
.adastra-img-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  border: 4px solid #ccc;
  border-top: 4px solid #ff9900;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Row sans marges */
.row.no-gutters {
  margin-right: 0;
  margin-left: 0;
}

.row.no-gutters > [class^="col-"] {
  padding-right: 8px;
  padding-left: 8px;
}

/* === IMAGE PRINCIPALE – LIMITER LA TAILLE SUR GRANDS ECRANS === */
.main-image {
  flex-grow: 1;
  position: relative;
  width: 100%;
  max-width: none;
  aspect-ratio: 1 / 1;
  max-height: 80vh;
  /* ✅ Limite à 80% de la hauteur écran */
  background-color: #f8f8f8;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MINIATURES – limiter hauteur totale également */
.thumbnails-carousel-wrapper {
  flex-shrink: 0;
  width: 100px;
  max-height: 80vh;
  /* ✅ idem pour le carrousel */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.thumbnails-carousel {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.thumbnails-carousel::-webkit-scrollbar {
  width: 5px;
}

.thumbnails-carousel::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}

.local-price-top {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0px;
  color: #555;
}

.containeres {
  padding: 25px 0;
}

/* === MOBILE === */
@media (max-width: 768px) {
  .image-layout {
    flex-direction: row;
  }

  .thumbnails-carousel-wrapper {
    width: 60px;
  }

  .thumb-wrapper {
    width: 100%;
    height: auto;
  }

  .scroll-arrow {
    width: 28px;
    height: 28px;
  }

  .thumbnails-carousel {
    max-height: 280px;
  }

  .main-image {
    max-width: 100%;
  }

  .adastra-carousel-wrapper {
    padding-left: 20px;
    padding-right: 20px;
  }

  .fancybox-image,
  .fancybox-spaceball {
    background: transparent;
    border: 0;
    height: 100%;
    left: 0;
    margin: 10px;
    max-height: none;
    max-width: none;
    padding: 20px;
    position: absolute;
    top: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .checkout-action-bar {
    padding: 8px;
  }

  .checkout-buttons {
    gap: 8px;
  }

  .checkout-action-link {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
  }

  .checkout-action-link i {
    font-size: 16px;
  }

  .checkout-action-link.icon-only-btn {
    padding: 6px;
    width: 34px;
    height: 34px;
  }

  .checkout-action-link.order-btn {
    font-size: 13px;
    padding: 6px 12px;
  }
}

.price-with-shipping {
  background-color: #fff;
}

.product-sizes-inline,
.product-colors-inline,
.product-condition-inline {
  font-size: 1rem;
  /* Taille lisible sur mobile et desktop */
  margin-top: 0.4rem;
  color: #333;
  font-weight: 400;
  line-height: 1.4;
}

.product-condition-inline {
  font-size: 1rem;
  color: #777;
}

.product-condition-inline {
  margin-top: 6px;
  color: #555;
  font-weight: 400;
}

.brand-link-inline {
  color: #007185;
  text-decoration: none;
  font-weight: 500;
  text-decoration: underline;
}

.brand-link-inline:hover {
  text-decoration: underline;
}

@media screen and (max-width: 480px) {
  .product-sizes-inline,
  .product-colors-inline,
  .product-condition-inline {
    font-size: 1rem;
  }
}

.product-title {
  font-size: 1.4rem;
  /* Adapté aux mobiles */
  font-weight: 600;
  /* Un peu moins épais que 700 pour un look moderne */
  line-height: 1.3;
  color: #222;
  margin-bottom: 0.6rem;
  word-break: break-word;
  /* Pour éviter les débordements sur petits écrans */
}

@media screen and (min-width: 768px) {
  .product-title {
    font-size: 1.8rem;
    /* Plus grand sur les tablettes et ordinateurs */
  }

  .local-price-top {
    font-size: 0.9rem;
  }
}

.product-info > div:not(:last-child),
.product-custom-field:not(:last-child) {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.product-custom-fields {
  margin-top: 24px;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.product-custom-fields-header {
  background-color: #f7f7f7;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  border-bottom: 1px solid #e0e0e0;
}

.product-custom-field-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 1rem;
  border-bottom: 1px solid #f1f1f1;
  transition: background-color 0.2s ease;
}

.product-custom-field-row:last-child {
  border-bottom: none;
}

.product-custom-field-row:hover {
  background-color: #fafafa;
}

.product-custom-field-label {
  color: #555;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-custom-field-value {
  color: #222;
  font-weight: 600;
  text-align: right;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hidden-custom-field {
  display: none;
}

.see-more-custom-fields {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #007185;
  background-color: #fefefe;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.see-more-custom-fields:hover {
  background-color: #f2f2f2;
  color: #0056a3;
}

.product-custom-field-row.hidden {
  display: none;
}

.see-more-custom-fields {
  display: block;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #007185;
  background-color: #fefefe;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.see-more-custom-fields:hover {
  background-color: #f2f2f2;
  color: #0056a3;
}

.price-with-shipping {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.shipping-info-line a {
  text-decoration: none;
  font-size: 0.9rem;
  color: #007185;
  transition: color 0.2s ease;
}

.shipping-info-line i {
  font-size: 0.9rem;
  opacity: 0.8;
}

.price-with-shipping:hover,
.price-with-shipping {
  background-color: #f9f9f9;
}

.custom-fields-spinner {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.custom-fields-spinner::after {
  content: "";
  width: 24px;
  height: 24px;
  border: 3px solid #ccc;
  border-top-color: #ff9900;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.product-shipping-section {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

.shipping-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.shipping-label {
  font-weight: 600;
  color: #333;
}

.shipping-price {
  font-weight: bold;
  color: #000;
  font-size: 1.1rem;
}

.shipping-promo-box {
  font-size: 0.9rem;
  color: #555;
  background-color: #fff3cd;
  padding: 0.7rem 1rem;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.consumer-law-info {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fdfdfd;
  margin-top: 16px;
}

.consumer-law-info .law-icon {
  font-size: 24px;
  color: #444;
  flex-shrink: 0;
}

.consumer-law-info .law-text p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.consumer-law-info .law-text a {
  color: #0b5f6e;
  text-decoration: underline;
  font-weight: 500;
}
@media screen and (min-width: 768px) {
  .product-title {
    font-size: 1.4rem;
  }

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

  .price-amount {
    font-size: 1.1rem;
  }

  .price-currency {
    font-size: 1rem;
  }

  .product-description {
    font-size: 1rem;
    line-height: 1.5;
  }

  .product-location span {
    font-size: 1rem;
  }

  .product-brand,
  .product-category,
  .product-condition,
  .product-created-at,
  .product-views,
  .product-users_who_ordered,
  .product-custom-field-row,
  .product-custom-field-label,
  .product-custom-field-value {
    font-size: 0.95rem;
  }

  .product-custom-fields-header {
    font-size: 1rem;
    padding: 8px 12px;
  }

  .product-custom-field-row {
    padding: 8px 12px;
  }

  .shipping-info-line a {
    font-size: 0.85rem;
  }

  .product-details {
    padding: 15px;
  }

  .see-more-custom-fields {
    font-size: 0.9rem;
    margin: 10px 0 0;
  }

  .modal .modal-content {
    font-size: 0.95rem;
  }
}
