/**
 * Fiches produit — Tout en Papier (accent coral #fd8179)
 */

:root {
	--tep-accent: #fd8179;
	--tep-accent-hover: #e86b63;
	--tep-ink: #2d3436;
	--tep-muted: #636e72;
	--tep-line: #f0e4e3;
	--tep-soft: #fff8f7;
	--tep-radius: 12px;
	--tep-font-display: 'Abril Fatface', Georgia, serif;
	--tep-font-secondary: 'Nunito Sans', 'Segoe UI', sans-serif;
	--tep-font-body: Comfortaa, 'Segoe UI', sans-serif;
}

body.tep-single-product-page #main-content {
	padding-top: 8px;
}

/* Ne jamais laisser une mention orpheline / clearfix vide au-dessus du layout TB */
body.tep-single-product-page #main-content > .clearfix:empty,
body.tep-single-product-page #main-content > .clearfix:has(> .syj-hama-disclosure:only-child) {
	display: none !important;
}

body.tep-single-product-page .et_pb_wc_title .product_title,
body.tep-single-product-page .et_pb_wc_title h1 {
	font-family: var(--tep-font-display);
	font-size: clamp(1.35rem, 2.4vw, 1.85rem);
	font-weight: 400;
	line-height: 1.25;
	color: var(--tep-ink);
	margin: 0 0 10px;
}

body.tep-single-product-page .tep-product-intro {
	font-family: var(--tep-font-body);
	font-size: 14px;
	line-height: 1.5;
	color: var(--tep-muted);
	margin: 0 0 18px;
}

/* Galerie — cadre léger, sans casser le slider Divi */
body.tep-single-product-page .et_pb_wc_gallery,
body.tep-single-product-page .woocommerce-product-gallery {
	background: #fff;
	border: 1px solid var(--tep-line);
	border-radius: var(--tep-radius);
	padding: 10px;
	box-sizing: border-box;
	margin-bottom: 20px;
	overflow: visible;
}

body.tep-single-product-page .et_pb_slider.et_pb_wc_gallery .et_pb_gallery_items,
body.tep-single-product-page .et_pb_wc_gallery.et_pb_slider .et_pb_gallery_items {
	display: block !important;
	flex: none !important;
	position: relative !important;
	min-height: 200px;
}

body.tep-single-product-page .et_pb_wc_gallery .et_pb_gallery_image,
body.tep-single-product-page .et_pb_wc_gallery .et_pb_gallery_image a {
	display: block !important;
	line-height: 0;
}

/* Image principale (slider) */
body.tep-single-product-page .woocommerce-product-gallery__image img,
body.tep-single-product-page .et_pb_wc_gallery.et_pb_slider img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	opacity: 1 !important;
	visibility: visible !important;
	border-radius: 8px;
	object-fit: contain;
	background: #fff;
}

/* Vignettes sous l’image (module grille) — bandeau compact */
body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid {
	padding: 8px;
	margin: 0 0 16px;
}

/* Une seule vignette = doublon inutile de l’image principale */
body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid:has(.et_pb_gallery_item:only-child) {
	display: none !important;
}

body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid .et_pb_gallery_items {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	align-items: stretch;
	justify-content: flex-start;
	min-height: 0 !important;
}

body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid .et_pb_gallery_item {
	display: block !important;
	float: none !important;
	position: relative !important;
	width: 64px !important;
	max-width: 64px !important;
	margin: 0 !important;
	flex: 0 0 64px !important;
}

body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid .et_pb_gallery_image,
body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid .et_pb_gallery_image a {
	width: 64px !important;
	height: 64px !important;
	overflow: hidden;
	border-radius: 6px;
	border: 1px solid var(--tep-line);
	background: #fff;
	box-sizing: border-box;
}

body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid img {
	display: block !important;
	width: 64px !important;
	height: 64px !important;
	max-width: 64px !important;
	object-fit: cover !important;
	border-radius: 5px;
	opacity: 1 !important;
	visibility: visible !important;
}

body.tep-single-product-page .et_pb_wc_gallery.et_pb_gallery_grid .et_overlay {
	display: none !important;
}

/* Encart prix / Amazon */
body.tep-single-product-page .tep-product-price {
	margin: 0 0 14px;
	padding: 10px 14px;
	background: var(--tep-soft);
	border: 1px solid var(--tep-line);
	border-left: 4px solid var(--tep-accent);
	border-radius: 10px;
}

body.tep-single-product-page .tep-product-price__label {
	margin: 0 0 4px;
	font-family: Comfortaa, 'Segoe UI', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--tep-muted);
	text-transform: none;
}

body.tep-single-product-page .tep-product-price__hint {
	margin: 0;
	font-family: Comfortaa, 'Segoe UI', sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--tep-ink);
	line-height: 1.35;
}

/* Module prix Divi (si montant affiché) */
body.tep-single-product-page .et_pb_wc_price .price {
	margin: 0 0 18px !important;
	font-family: Comfortaa, 'Segoe UI', sans-serif !important;
}

body.tep-single-product-page .et_pb_wc_price .price .amount {
	color: var(--tep-accent) !important;
	font-weight: 700 !important;
}

/* CTA Amazon */
body.tep-single-product-page .et_pb_wc_add_to_cart form.cart {
	margin: 0 0 12px;
}

body.tep-single-product-page .et_pb_wc_add_to_cart .single_add_to_cart_button,
body.tep-single-product-page .et_pb_wc_add_to_cart .single_add_to_cart_button.button,
body.tep-single-product-page form.cart .single_add_to_cart_button,
body.tep-single-product-page form.cart .single_add_to_cart_button.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 380px;
	min-height: 52px;
	padding: 14px 24px !important;
	border-radius: 10px !important;
	font-family: Comfortaa, 'Segoe UI', sans-serif !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	color: #ffffff !important;
	background: var(--tep-accent) !important;
	background-color: var(--tep-accent) !important;
	border: none !important;
	box-shadow: 0 4px 14px rgba(253, 129, 121, 0.28);
	text-shadow: none !important;
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body.tep-single-product-page .et_pb_wc_add_to_cart .single_add_to_cart_button:hover,
body.tep-single-product-page .et_pb_wc_add_to_cart .single_add_to_cart_button:focus-visible,
body.tep-single-product-page form.cart .single_add_to_cart_button:hover,
body.tep-single-product-page form.cart .single_add_to_cart_button:focus-visible {
	color: #ffffff !important;
	background: var(--tep-accent-hover) !important;
	box-shadow: 0 6px 18px rgba(253, 129, 121, 0.35);
	transform: translateY(-1px);
}

body.tep-single-product-page .et_pb_wc_add_to_cart .single_add_to_cart_button::before,
body.tep-single-product-page .et_pb_wc_add_to_cart .single_add_to_cart_button::after {
	display: none !important;
	content: none !important;
}

/* Note pratique + mention légale */
body.tep-single-product-page .tep-product-affiliate-notice {
	display: block;
	clear: both;
	width: 100%;
	box-sizing: border-box;
	font-family: Comfortaa, 'Segoe UI', sans-serif;
	font-size: 13px;
	line-height: 1.5;
	color: var(--tep-ink);
	margin: 0 0 10px;
	padding: 12px 14px;
	background: #fff;
	border: 1px dashed #d4a5a1;
	border-radius: 8px;
}

body.tep-single-product-page .syj-hama-disclosure {
	display: block !important;
	clear: both !important;
	width: 100% !important;
	box-sizing: border-box !important;
	font-family: Comfortaa, 'Segoe UI', sans-serif !important;
	font-size: 12px !important;
	line-height: 1.5 !important;
	color: var(--tep-muted) !important;
	margin: 0 0 18px !important;
	padding: 10px 12px !important;
	background: var(--tep-soft) !important;
	border: 1px solid var(--tep-line) !important;
	border-radius: 8px !important;
}

/* Description */
body.tep-single-product-page .et_pb_wc_description {
	margin-top: 8px;
	font-family: Comfortaa, 'Segoe UI', sans-serif;
	font-size: 15px;
	line-height: 1.65;
	color: var(--tep-ink);
}

body.tep-single-product-page .et_pb_wc_description p {
	margin: 0 0 0.85em;
}

/* Meta */
body.tep-single-product-page .et_pb_wc_meta,
body.tep-single-product-page .product_meta {
	font-family: Comfortaa, 'Segoe UI', sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--tep-muted);
	padding-top: 16px;
	border-top: 1px solid var(--tep-line);
	margin-top: 8px;
}

body.tep-single-product-page .product_meta a {
	color: var(--tep-accent);
	font-weight: 600;
	text-decoration: none;
}

body.tep-single-product-page .product_meta a:hover {
	text-decoration: underline;
}

/* Masquer bruit WooZone éventuel */
body.tep-single-product-page .WooZone-price-info,
body.tep-single-product-page .WooZone-free-shipping {
	display: none !important;
}

/* Produits liés — titres secondaires lisibles (pas Abril Fatface) */
body.tep-single-product-page .et_pb_wc_related_products > h2,
body.tep-single-product-page .et_pb_wc_related_products .products + h2,
body.tep-single-product-page .related.products > h2,
body.tep-single-product-page .et_pb_wc_related_products .et_pb_module_header,
body.tep-single-product-page .product .related > h2 {
	font-family: var(--tep-font-secondary) !important;
	font-size: 1.25rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: -0.01em;
	color: var(--tep-ink) !important;
	padding-bottom: 12px !important;
	margin-bottom: 8px;
}

body.tep-single-product-page .et_pb_wc_related_products .woocommerce-loop-product__title,
body.tep-single-product-page .et_pb_wc_related_products ul.products li.product h2,
body.tep-single-product-page .et_pb_wc_related_products ul.products li.product .woocommerce-loop-product__title,
body.tep-single-product-page ul.products li.product .woocommerce-loop-product__title,
body.tep-single-product-page .related ul.products li.product h2 {
	font-family: var(--tep-font-secondary) !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	letter-spacing: 0 !important;
	color: var(--tep-ink) !important;
	padding-bottom: 6px !important;
	margin: 8px 0 4px !important;
}

/* Vignettes related — cadre carré uniforme */
body.tep-single-product-page .et_pb_wc_related_products ul.products {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
	gap: 0;
}

body.tep-single-product-page .et_pb_wc_related_products ul.products li.product,
body.tep-single-product-page .related ul.products li.product {
	display: flex !important;
	flex-direction: column;
	float: none !important;
	margin-bottom: 24px !important;
}

body.tep-single-product-page .et_pb_wc_related_products ul.products li.product .woocommerce-LoopProduct-link,
body.tep-single-product-page .et_pb_wc_related_products ul.products li.product > a.woocommerce-LoopProduct-link,
body.tep-single-product-page .et_pb_wc_related_products ul.products li.product > a:first-child {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none !important;
	color: inherit !important;
}

body.tep-single-product-page .et_pb_wc_related_products ul.products li.product .et_shop_image,
body.tep-single-product-page .related ul.products li.product .et_shop_image {
	display: block !important;
	position: relative;
	width: 100% !important;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 10px;
	background: var(--tep-soft);
	border: 1px solid var(--tep-line);
	box-sizing: border-box;
	margin: 0 0 10px;
}

body.tep-single-product-page .et_pb_wc_related_products ul.products li.product .et_shop_image picture,
body.tep-single-product-page .related ul.products li.product .et_shop_image picture {
	display: block;
	width: 100%;
	height: 100%;
}

body.tep-single-product-page .et_pb_wc_related_products ul.products li.product .et_shop_image img,
body.tep-single-product-page .related ul.products li.product .et_shop_image img,
body.tep-single-product-page .et_pb_wc_related_products ul.products li.product img.attachment-woocommerce_thumbnail,
body.tep-single-product-page .et_pb_wc_related_products ul.products li.product img.wp-post-image {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 10px !important;
	object-fit: contain !important;
	object-position: center !important;
	box-sizing: border-box !important;
	border-radius: 0 !important;
}

body.tep-single-product-page .et_pb_wc_related_products ul.products li.product .et_shop_image .et_overlay,
body.tep-single-product-page .related ul.products li.product .et_shop_image .et_overlay {
	display: none !important;
}

body.tep-single-product-page .et_pb_wc_related_products ul.products li.product .price,
body.tep-single-product-page .related ul.products li.product .price {
	font-family: var(--tep-font-body) !important;
	font-size: 0.9rem !important;
}

@media (max-width: 980px) {
	body.tep-single-product-page .et_pb_wc_add_to_cart .single_add_to_cart_button,
	body.tep-single-product-page form.cart .single_add_to_cart_button {
		max-width: none;
	}
}
