/* =====================================
   CARTE PRODUIT
===================================== */
.ma-carte-produit {
    position: relative;
    overflow: hidden;
    padding: 15px;
    background: #fff;
    box-shadow: 0 3px 15px rgba(0,0,0,0.15);
    transition: transform .25s ease, box-shadow .25s ease;
}

.ma-carte-produit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}


/* =====================================
   IMAGE WRAP
===================================== */
.product-image-wrap {
    position: relative;
    display: block;
    width: 100%;
}


/* === STACK IMAGES (compatible JS variation switch) === */
.variation-images-stack {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.variation-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.variation-image[data-active="true"] {
    opacity: 1;
    z-index: 2;
}


/* === Logo marque === */
.eael-brand-shortcode {
    position: absolute;
    padding: 0;
    margin: 0;

    width: 25%;
    height: 20%;
    z-index: 10;

    background-color: #f3f3f3;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    overflow: hidden;
}

.eael-brand-shortcode img {
    max-width: 90%;
    max-height: 90%;
    padding: 3%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}


/* === SWATCHES (adapté à ton HTML color-swatches + swatch-item) === */
/* CONTENEUR OVERLAY */
.colors-swatches-only {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 20;
}

.color-swatches {
    display: grid !important;
    grid-template-columns: repeat(5, 20px);
    grid-auto-rows: 20px;
    grid-auto-flow: row;
    gap: 6px;
    align-content: end;
    direction: rtl;
    transform: scaleY(-1);
}

.swatch-item {
    display: block;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    cursor: pointer;
    border: 1px solid #f3f3f3;
    transition: transform 0.2s ease, border 0.2s ease;
}

.swatch-item.active {
    border: 2px solid #00ABCD;
    transform: scale(1.15);
}

.color-swatches::before,
.color-swatches::after {
    content: none !important;
    display: none !important;
}

/* === DESCRIPTION PRODUIT === */
.product-details-wrap {
    max-width: 100%;
    padding-top: 15px;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-family: "TeX-Gyre Adventor", Sans-serif;
    font-size: 1.1em;
    font-weight: 800;
}

.woocommerce-loop-product__title {
    padding: 0;
    margin: 0;
    font-family: "TeX-Gyre Adventor", Sans-serif;
    font-size: 1em !important;

    line-height: inherit;
    font-weight: inherit;
    text-align: inherit;

    min-width: 60%;

    overflow-wrap: break-word;
    word-break: break-word;

    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}


/* brand name */
.eael-brandname-shortcode {
    font-family: "TeX-Gyre Adventor", Sans-serif;
    font-size: 0.8em;
    font-weight: 700;
}


/* === GRID PRODUITS WOOCOMMERCE === */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    height: auto !important;
    overflow: visible !important;
}

.woocommerce ul.products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}





/* ================================
   VARIATION IMAGES - BASE
================================ */

.variation-images-stack {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* toutes les images superposées */
.variation-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  backface-visibility: hidden;
}

/* image active */
.variation-image[data-active="true"] {
  opacity: 1;
}

/* z-index propre géré par JS mais sécurité CSS */
.main-image {
  z-index: 2;
}

.secondary-image {
  z-index: 1;
}

/* hover effet léger (optionnel mais propre) */
.variation-images-stack:hover .variation-image[data-active="true"] {
  transform: scale(1.02);
}
