/**
 * Fiche produit — DS (par-dessus vdp-product-unified).
 * Pas d’IDs Elementor, pas de #place_order.
 */

body.vdp-product-unified.single-product {
  background: var(--vdp-background, #f7f6f3);
}

body.vdp-product-unified .product_title,
body.vdp-product-unified h1.product_title {
  font-family: var(--vdp-font-display, "Cormorant Garamond", Georgia, serif) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Desktop : specs près du CTA */
@media (min-width: 768px) {
  body.vdp-product-unified.single-product .vdp-pu-buy-box .vdp-lascours-chars-panel {
    display: block !important;
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.vdp-product-unified .vdp-pu-buy-box .vdp-lascours-chars-panel__title {
    display: none;
  }

  body.vdp-product-unified .vdp-pu-buy-box .vdp-lascours-chars-card,
  body.vdp-product-unified .vdp-pu-buy-box .vdp-lascours-chars {
    border: 1px solid var(--vdp-border, #e5e2de);
    border-radius: var(--vdp-radius, 8px);
    overflow: hidden;
  }

  body.vdp-product-unified .vdp-pu-buy-box .vdp-lascours-chars__row {
    grid-template-columns: 38% 1fr;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem !important;
  }
}

body.vdp-product-unified .single_add_to_cart_button,
body.vdp-product-unified form.cart .button {
  border-radius: var(--vdp-radius, 8px) !important;
  text-transform: none !important;
}

body.vdp-product-unified form.cart .quantity .qty {
  border-radius: var(--vdp-radius, 8px);
  min-height: 48px;
}

body.vdp-product-unified .vdp-pu-panel__title {
  font-family: var(--vdp-font-display, "Cormorant Garamond", Georgia, serif) !important;
}

body.vdp-product-unified .vdp-pu-sticky-bar__btn {
  border-radius: var(--vdp-radius, 8px);
  min-height: 48px;
}

body.vdp-product-unified .vdp-pu-panel__body h1 {
  font-size: 1.25rem !important;
  line-height: 1.3 !important;
  margin: 0 0 0.75rem !important;
}

/* Mobile */
@media (max-width: 900px) {
  body.vdp-product-unified.single-product #content-wrap,
  body.vdp-product-unified.single-product .elementor-location-single {
    overflow-x: hidden;
    max-width: 100%;
  }
  body.vdp-product-unified .vdp-pu-hero-wrap > .elementor-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.25rem !important;
    padding: 0.75rem 12px 1.5rem !important;
  }

  body.vdp-product-unified .vdp-pu-hero-wrap .elementor-column,
  body.vdp-product-unified .vdp-pu-hero-wrap .elementor-col-50 {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
  }

  body.vdp-product-unified .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  body.vdp-product-unified .woocommerce-product-gallery__wrapper,
  body.vdp-product-unified .flex-viewport,
  body.vdp-product-unified .woocommerce-product-gallery__image {
    max-width: 100% !important;
  }

  body.vdp-product-unified .woocommerce-product-gallery .flex-control-thumbs {
    flex-wrap: wrap;
  }

  body.vdp-product-unified .woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
  }

  body.vdp-product-unified .woocommerce-product-gallery .flex-control-thumbs img {
    width: 56px !important;
    height: 56px !important;
    object-fit: cover;
    max-width: 56px !important;
  }

  body.vdp-product-unified .product_title,
  body.vdp-product-unified h1.product_title {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }

  body.vdp-product-unified .price {
    font-size: 1.35rem !important;
    margin: 0 0 0.75rem !important;
  }

  /* Tableau complet trop large : déjà plus bas en accordéon */
  body.vdp-product-unified.single-product .vdp-pu-buy-box .vdp-lascours-chars-panel {
    display: none !important;
  }

  body.vdp-product-unified.single-product .vdp-lascours-trust-list {
    display: none !important;
  }

  body.vdp-product-unified form.cart .quantity .qty {
    width: 72px;
    max-width: 30%;
  }

  body.vdp-product-unified .single_add_to_cart_button,
  body.vdp-product-unified form.cart .button {
    width: 100%;
    min-height: 48px !important;
  }

  body.vdp-product-unified .vdp-pu-lower {
    padding: 1rem 12px 2.5rem;
    gap: 10px;
  }

  body.vdp-product-unified .vdp-pu-lower .vdp-pu-panel {
    padding: 0;
    overflow: hidden;
  }

  body.vdp-product-unified .vdp-pu-lower .vdp-pu-panel__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    margin: 0 !important;
    padding: 12px 16px !important;
    border-bottom: 0 !important;
    font-size: 1.1rem !important;
  }

  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel__title {
    cursor: pointer;
  }

  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel__title::after {
    content: "+";
    flex: 0 0 auto;
    font-family: var(--vdp-font, Inter, system-ui, sans-serif);
    font-weight: 500;
    color: var(--vdp-red, #a30e16);
  }

  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel.is-open .vdp-pu-panel__title::after {
    content: "−";
  }

  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel:not(.is-open) .vdp-pu-panel__body,
  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel:not(.is-open) .vdp-pu-specs,
  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel:not(.is-open) .vdp-pu-steps,
  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel:not(.is-open) .vdp-pu-delivery__intro {
    display: none;
  }

  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel.is-open .vdp-pu-panel__body,
  body.vdp-accordions .vdp-pu-lower .vdp-pu-panel.is-open .vdp-pu-specs {
    display: block;
    padding: 0 16px 16px;
  }

  body.vdp-product-unified .vdp-lascours-chars__row {
    grid-template-columns: 1fr !important;
    gap: 0.2rem !important;
    padding: 0.7rem 0.9rem !important;
  }
}
