/* Fiche produit (maquette Colorfulens-Tirage), Task 12 : delta par-dessus les
   règles .cl-product-shell* du Customizer, chargé avant lui (d'où `html body…`
   et quelques !important contre des règles globales déjà en !important). */

/* Un seul seuil pour colonnes ET sticky : en 1 colonne, le bloc sticky
   (borné par toute la grille) recouvrirait le résumé au scroll. */
html body.single-product .cl-product-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  isolation: isolate;
}

html body.single-product .cl-product-shell::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  z-index: -1;
  width: 620px;
  height: 620px;
  background: var(--bg2);
  animation: morph 16s ease-in-out infinite;
  transition: background-color .9s;
  pointer-events: none;
}

/* Spécificité > `.woocommerce div.product div.images { position: relative }`,
   qui annulait le sticky du Customizer en gardant son top:118px (décalage). */
html body.single-product.woocommerce div.product div.images.cl-product-shell__gallery,
html body.single-product.woocommerce-page div.product div.images.cl-product-shell__gallery {
  position: relative;
  top: auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

html body.single-product .cl-product-shell__gallery .woocommerce-product-gallery__image {
  overflow: hidden;
  border-radius: 48px;
  background: var(--bg2);
  box-shadow: 0 30px 60px -30px rgba(10, 16, 12, .45);
}

html body.single-product .cl-product-shell__gallery .woocommerce-product-gallery__image a,
html body.single-product .cl-product-shell__gallery .woocommerce-product-gallery__image img {
  border-radius: 0;
}

html body.single-product .cl-product-shell__gallery .woocommerce-product-gallery__image img {
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
  object-fit: cover;
}

html body.single-product .cl-product-shell__gallery .woocommerce-product-gallery__trigger {
  top: 18px;
  right: 18px;
}

/* Carte résumé */
html body.single-product .cl-product-shell__summary {
  position: relative;
  z-index: 8;
  padding: 32px clamp(24px, 3vw, 40px);
  border: 0;
  border-radius: 40px;
  background: var(--card);
  box-shadow: 0 20px 50px -30px rgba(10, 16, 12, .35);
  backdrop-filter: none;
}

html body.single-product .cl-product-shell__eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}

html body.single-product .cl-product-shell__summary .product_title {
  margin: 0 0 16px;
  padding-inline: 0 !important;
  font-family: 'EB Garamond', serif !important;
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 400;
  line-height: 1.02;
  text-align: left !important;
  color: var(--ink);
}

html body.single-product .cl-product-shell__summary > .price {
  font-family: 'EB Garamond', serif;
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
}

/* Sélecteurs de variation : <select> natifs conservés, habillés en pilule */
html body.single-product .cl-product-shell__summary .variations select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
  padding: 0 44px 0 18px;
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  background-color: var(--bg2) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231B241D' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  color: var(--ink);
  font: 500 15px 'Hanken Grotesk', sans-serif;
  cursor: pointer;
}

html[data-cl-theme="dark"] body.single-product .cl-product-shell__summary .variations select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ECE8DA' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

html body.single-product .cl-product-shell__summary .variations select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Quantité : <input type=number> natif, en pilule */
html body.single-product .cl-product-shell__summary .quantity .qty {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
}

@media (min-width: 980px) {
  html body.single-product .cl-product-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body.single-product.woocommerce div.product div.images.cl-product-shell__gallery,
  html body.single-product.woocommerce-page div.product div.images.cl-product-shell__gallery {
    position: sticky;
    top: 110px;
  }
}

@media (max-width: 767px) {
  html body.single-product .cl-product-shell__gallery .woocommerce-product-gallery__image {
    border-radius: 28px;
  }

  html body.single-product .cl-product-shell__summary {
    padding: 24px 20px;
    border-radius: 28px;
  }

  html body.single-product .cl-product-shell__summary .product_title {
    font-size: clamp(34px, 10vw, 46px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.single-product .cl-product-shell::before {
    animation: none;
  }
}
