/*
 Theme Name:   Woodmart Child
 Description:  Parapharmacie Maroc. Design per the approved spec: pharmacy green
               as the trust anchor, neutral ground, one warm accent reserved for
               price and promo. No page builder on shop, category or product
               templates - those render thousands of times and decide CWV.
 Author:       RMG Solutions
 Author URI:   https://rmgsolutions.ma
 Template:     woodmart
 Version:      1.1.0
 Text Domain:  woodmart
*/

/* =========================================================================
   Design tokens

   Pharmacy green is the francophone signifier for "pharmacie" - it does the
   trust work instantly for cold traffic landing from a brand search, which is
   most of the traffic this site is built to earn. The warm accent is reserved
   strictly for price and promo so it never competes with itself.
   ========================================================================= */

:root {
	/* Teal taken from the ParaYama logo (#106f85). Variable names kept for compatibility. */
	--para-green: #106f85;
	--para-green-dark: #0b5466;
	--para-green-tint: #e5f1f3;

	--para-ink: #12262b;
	--para-ink-soft: #53656a;
	--para-ink-faint: #8a999d;

	--para-surface: #f4f8f9;
	--para-rule: rgba(18, 38, 43, 0.12);

	/* Price and promo only. Never decoration. */
	--para-accent: #d9531e;
}

/* =========================================================================
   Trust strip
   Delivery threshold, speed, payment, authenticity - the four claims every
   Moroccan competitor makes. Omitting any of them reads as amateur here.
   ========================================================================= */

.para-trustbar {
	background: var(--para-green);
	color: #fff;
}

.para-trustbar__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem 2.25rem;
	max-width: 1400px;
	margin-inline: auto;
	padding: 0.55rem 1rem;
	font-size: 0.79rem;
	line-height: 1.4;
}

.para-trustbar__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	white-space: nowrap;
}

.para-trustbar__item svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	opacity: 0.85;
}

@media (max-width: 768px) {
	.para-trustbar__inner {
		gap: 0.3rem 1rem;
		font-size: 0.7rem;
	}
	/* Four claims will not fit two-up on a phone; drop the weakest. */
	.para-trustbar__item:nth-child(4) {
		display: none;
	}
}

/* =========================================================================
   Layout shift protection
   CLS is the cheapest Core Web Vital to lose and the cheapest to protect.
   ========================================================================= */

.woocommerce ul.products li.product img,
.woocommerce div.product div.images img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	height: auto;
	width: 100%;
	background: #fff;
}

/* =========================================================================
   Catalog density
   Shoppers arrive knowing the product name - `cicaplast baume b5` alone is
   9,900 searches a month. Price visible without hover, compact cards.
   ========================================================================= */

.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price ins,
.wd-product .price,
.wd-product .price ins {
	color: var(--para-accent);
	font-weight: 700;
	text-decoration: none;
}

.woocommerce ul.products li.product .price del,
.wd-product .price del {
	color: var(--para-ink-faint);
	font-weight: 400;
}

/* Out-of-stock should be legible, not hidden - 3,167 of the market's
   20,270 listings are out of stock, so this state is common. */
.wd-product .wd-product-stock.stock.out-of-stock {
	color: var(--para-ink-faint);
}

/* =========================================================================
   Rayon list beside the hero - Elementor wd_mega_menu, menu "Category menu"
   ========================================================================= */

/* Packshots shot on white: multiply drops the box out against the page. */
.elementor-widget-wd_mega_menu .wd-nav-img {
	object-fit: contain;
	mix-blend-mode: multiply;
}

/* =========================================================================
   Homepage rayon tiles
   ========================================================================= */

.elementor-widget-wd_product_categories .wd-cat-thumb {
	width: 100%;
	max-width: 168px;
	aspect-ratio: 1 / 1;
	transition: transform 0.22s ease;
}

.elementor-widget-wd_product_categories .category-grid-item .wd-cat-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	border-radius: 0;
	overflow: visible;
}

.elementor-widget-wd_product_categories .wd-cat-image {
	width: 100%;
	height: 100%;
	margin: 0;
}

.elementor-widget-wd_product_categories .wd-cat-image img {
	width: 100%;
	height: 100%;
	padding: 6%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.elementor-widget-wd_product_categories .category-grid-item:hover .wd-cat-thumb {
	transform: translateY(-4px);
}

/* Theme already scales the image on hover; that plus the lift is too much. */
.elementor-widget-wd_product_categories .category-grid-item:hover .wd-cat-image {
	transform: none;
}

/* cat-design-default is printed inside the widget, so it lands after this file
   and wins every tie - hence .cat-design-default in the selectors below.
   It overlays the caption on the image, which hides a round tile completely. */
.elementor-widget-wd_product_categories .cat-design-default .wd-cat-content {
	position: static;
	transform: none;
	padding: 12px 4px 0 !important;
	background: none;
}

.elementor-widget-wd_product_categories .cat-design-default .wd-entities-title {
	position: static;
	inset: auto;
	display: block;
	margin: 0;
	min-height: 2.6em; /* keeps counts aligned when "Bébé & Maman" wraps */
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	color: var(--para-ink);
	transition: color 0.18s ease;
}

.elementor-widget-wd_product_categories .category-grid-item:hover .wd-entities-title {
	color: var(--para-green);
}

/* Counts reassure on a 15k catalog; the theme only reveals them on hover. */
.elementor-widget-wd_product_categories .cat-design-default mark,
.elementor-widget-wd_product_categories .cat-design-default .wd-cat-count {
	margin-top: 2px;
	opacity: 1;
	transform: none;
	background: none;
	color: var(--para-ink-faint);
	font-size: 0.8rem;
	font-weight: 400;
}

.elementor-widget-wd_product_categories .wd-sub-categories {
	display: none;
}

@media (max-width: 1024px) {
	.elementor-widget-wd_product_categories .wd-cat-thumb {
		max-width: 140px;
	}
}

/* =========================================================================
   Brand index (/marque/)
   Gated to brands with enough products to be indexable, so the page does not
   spend crawl budget linking to hubs we noindex ourselves.
   ========================================================================= */

.para-brand-index {
	padding: 40px 0 64px;
}

.para-brand-index__title {
	margin: 0 0 8px;
	font-size: 1.9rem;
	font-weight: 700;
	color: var(--para-ink);
}

.para-brand-index__intro {
	margin: 0 0 28px;
	max-width: 62ch;
	color: var(--para-ink-soft);
}

.para-brand-index__jump {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 36px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--para-rule);
}

.para-brand-index__jump a {
	min-width: 34px;
	padding: 5px 8px;
	border: 1px solid var(--para-rule);
	border-radius: 6px;
	color: var(--para-ink);
	font-size: 0.86rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.para-brand-index__jump a:hover {
	background: var(--para-green);
	border-color: var(--para-green);
	color: #fff;
}

.para-brand-index__group {
	margin-bottom: 30px;
	scroll-margin-top: 120px;
}

.para-brand-index__letter {
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--para-green-tint);
	color: var(--para-green);
	font-size: 1.05rem;
	font-weight: 700;
}

.para-brand-index__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 2px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.para-brand-index__list a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 7px 2px;
	color: var(--para-ink);
	text-decoration: none;
	border-bottom: 1px solid rgba(20, 32, 27, 0.06);
}

.para-brand-index__list a:hover .para-brand-index__name {
	color: var(--para-green);
}

.para-brand-index__count {
	color: var(--para-ink-faint);
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
}

/* =========================================================================
   Brand filter (para-core widget, shop sidebar)
   ========================================================================= */

.para-brand-filter {
	margin: 0;
	padding: 0;
	max-height: 260px;
	overflow-y: auto;
	list-style: none;
}

.para-brand-filter a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 0;
	color: var(--para-ink);
	font-size: 0.9rem;
	text-decoration: none;
}

.para-brand-filter a:hover .para-brand-filter__name {
	color: var(--para-green);
}

.para-brand-filter__item.is-active a {
	color: var(--para-green);
	font-weight: 600;
}

.para-brand-filter__item.is-active a::before {
	content: "×";
	margin-right: 6px;
	font-weight: 700;
}

.para-brand-filter__count {
	color: var(--para-ink-faint);
	font-size: 0.78rem;
	font-variant-numeric: tabular-nums;
}

.para-brand-filter__reset {
	margin: 8px 0 0;
	font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
 * Bundle components
 *
 * Product Bundles gives every component the class `bundled_product_title
 * product_title`, and WoodMart styles `.product_title` at 34px because it means
 * the page's own H1. So each component in a pack rendered at page-heading size.
 * Scope them back down; a component is a line item, not a title.
 * -------------------------------------------------------------------------- */
.bundled_product_title.product_title {
	font-size: 1rem;
	line-height: 1.35;
	font-weight: 600;
	margin: 0 0 4px;
}

.bundled_product_excerpt.product_excerpt {
	font-size: 0.85rem;
	color: var(--para-ink-faint);
	margin: 0 0 6px;
}

.bundled_item_wrap {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 12px 0;
	border-bottom: 1px solid rgba(2, 1, 1, 0.08);
}

.bundled_product_images.images {
	flex: 0 0 64px;
	max-width: 64px;
	margin: 0;
}

.bundled_item_wrap .stock {
	font-size: 0.82rem;
	margin: 0;
}

/* Bundle buy row. WoodMart injects "Acheter Maintenant" with JS as a direct child
 * of .bundle_data, while the add-to-cart sits two levels deeper inside
 * .bundle_wrap > .bundle_button, and .bundle_data is display:block - so they
 * stacked. Flatten the wrapper and lay the row out like a simple product's. */
form.cart.bundle_form .bundle_data {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 10px;
	row-gap: 10px;
}

/* Most shoppers are on a phone, where this row always wraps: the add-to-cart
 * fills the space beside the quantity box, and buy-now takes its own full line. */
form.cart.bundle_form .bundle_button {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 auto;
}

form.cart.bundle_form .bundle_button .single_add_to_cart_button {
	flex: 1 1 auto;
}

form.cart.bundle_form .bundle_price:empty,
form.cart.bundle_form .bundle_error:empty {
	display: none;
}

@media (max-width: 768.98px) {
	form.cart.bundle_form .bundle_button,
	form.cart.bundle_form .wd-buy-now-btn {
		flex: 1 1 100%;
	}
}

form.cart.bundle_form .bundle_wrap {
	display: contents;
}

form.cart.bundle_form .bundle_availability {
	flex: 0 0 100%;
	margin: 0 0 10px;
}

form.cart.bundle_form .bundle_price,
form.cart.bundle_form .bundle_error {
	flex: 0 0 100%;
}

/* Sentence case. Woodmart capitalises button labels; French capitalises the
   first word only, so "Voir les solaires" rendered as "Voir Les Solaires". */
.btn,
.wd-btn-text {
	text-transform: none;
}

/* Floating contact. Bottom-left; WoodMart's scroll-to-top owns bottom-right. */
.para-contact {
	position: fixed;
	/* A droite, au-dessus du bouton "haut de page" de WoodMart: a gauche les
	   boutons recouvraient la colonne des rayons. */
	right: 18px;
	bottom: 86px;
	z-index: 350;
	display: flex;
	flex-direction: column;
	/* Sans ca, la colonne etire le bouton WhatsApp a la largeur du telephone. */
	align-items: flex-end;
	gap: 10px;
}

.para-contact__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	border-radius: 999px;
	background: var(--para-green);
	color: #fff;
	box-shadow: 0 6px 18px rgba(20, 32, 27, 0.22);
	transition: background 0.18s ease, transform 0.18s ease;
}

.para-contact__btn:hover,
.para-contact__btn:focus-visible {
	background: var(--para-green-dark);
	color: #fff;
	transform: translateY(-1px);
}

.para-contact__btn--wa {
	background: #25d366;
	color: #0b3d22;
}

.para-contact__btn--wa:hover,
.para-contact__btn--wa:focus-visible {
	background: #1eb855;
	color: #0b3d22;
}

/* Pastilles rondes: le pave avec le numero chevauchait les boutons de
   section alignes a droite. Le numero reste dans l'aria-label et le href. */
.para-contact__label {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.para-contact__btn {
		transition: none;
	}
	.para-contact__btn:hover,
	.para-contact__btn:focus-visible {
		transform: none;
	}
}

/* Pastille verte "Soins anti-imperfections": le conteneur est passe en schema
   sombre pour rendre le titre lisible, ce qui a noirci ce texte-la aussi. */
.elementor-element-b0b4646,
.elementor-element-b0b4646 * {
	color: #fff;
}

/* =========================================================================
   Tuiles de marque

   Quatre fonds sourds tires de la palette, pas quatre couleurs de marque:
   l'accent reste reserve au prix. Le bandeau bas porte l'info d'achat pour
   que l'image du haut n'ait rien a expliquer.
   ========================================================================= */
.para-tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}

@media (max-width: 1024px) { .para-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .para-tiles { grid-template-columns: 1fr; } }

.para-tile {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 10px;
	background: #fff;
	color: var(--para-ink);
	box-shadow: 0 1px 0 var(--para-rule);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.para-tile:hover,
.para-tile:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 10px 26px rgba(20, 32, 27, 0.13);
	color: var(--para-ink);
}

.para-tile__art {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 5;
	background-position: center;
	background-size: cover;
}

.para-tile--0 .para-tile__art { background-color: #e5f1f3; }
.para-tile--1 .para-tile__art { background-color: #eef1f5; }
.para-tile--2 .para-tile__art { background-color: #f5f1ea; }
.para-tile--3 .para-tile__art { background-color: #edf0ec; }

.para-tile__shot {
	width: 68%;
	height: 68%;
	object-fit: contain;
	/* Les packshots sont des JPEG sur blanc: sans ca, chaque produit arrive
	   dans un rectangle blanc pose sur le fond teinte. */
	mix-blend-mode: multiply;
	transition: transform 0.25s ease;
}

.para-tile:hover .para-tile__shot { transform: scale(1.05); }

.para-tile__brand {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.86);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--para-ink);
}

.para-tile.has-bg .para-tile__brand { background: rgba(255, 255, 255, 0.92); }

.para-tile__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 12px;
	background: #fff;
	border-top: 1px solid var(--para-rule);
}

.para-tile__mini {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	object-fit: contain;
	border-radius: 5px;
	background: var(--para-surface);
}

.para-tile__meta { min-width: 0; flex: 1 1 auto; }

.para-tile__name {
	display: block;
	overflow: hidden;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.para-tile__price {
	display: block;
	margin-top: 1px;
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--para-accent);
}

.para-tile__price del { margin-right: 5px; font-weight: 500; opacity: 0.55; }
.para-tile__price ins { text-decoration: none; }

/* WooCommerce enveloppe le montant dans son propre span, que WoodMart colore
   en vert: ailleurs sur le site le prix est a l'accent, il doit l'etre ici. */
.para-tile__price .woocommerce-Price-amount,
.para-tile__price bdi,
.para-tile__price span {
	color: inherit;
}

.para-tile__cta {
	flex: 0 0 auto;
	padding: 7px 15px;
	border-radius: 999px;
	background: var(--para-green);
	font-size: 0.8rem;
	font-weight: 600;
	color: #fff;
	transition: background 0.16s ease;
}

.para-tile:hover .para-tile__cta { background: var(--para-green-dark); }

@media (prefers-reduced-motion: reduce) {
	.para-tile,
	.para-tile__shot,
	.para-tile__cta { transition: none; }
	.para-tile:hover { transform: none; }
	.para-tile:hover .para-tile__shot { transform: none; }
}

/* =========================================================================
   Navigation par besoin

   Des pastilles rondes plutot que des cartes: la forme dit « point d'entree »
   et non « produit a acheter ». On entre par le motif - acne, taches, rides -
   parce que c'est avec ca qu'on se leve, pas avec « Visage ».
   ========================================================================= */
.para-besoins {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
	gap: 18px 10px;
}

.para-besoin {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
	color: var(--para-ink);
}

.para-besoin__disc {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: var(--para-green-tint);
	transition: transform 0.2s ease, background 0.2s ease;
}

.para-besoin__disc img {
	width: 74%;
	height: 74%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.para-besoin:hover .para-besoin__disc,
.para-besoin:focus-visible .para-besoin__disc {
	background: #dcebe4;
	transform: translateY(-3px);
}

.para-besoin__label {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--para-ink);
}

.para-besoin:hover .para-besoin__label { color: var(--para-green); }

.para-besoin__count {
	font-size: 0.78rem;
	color: var(--para-ink-faint);
}

@media (prefers-reduced-motion: reduce) {
	.para-besoin__disc { transition: none; }
	.para-besoin:hover .para-besoin__disc { transform: none; }
}

/* =========================================================================
   Marques

   Concu pour un logo: fond blanc, image contenue, marge autour. Aucun des 587
   termes n'en porte un pour l'instant, donc on retombe sur un produit de la
   marque - mieux qu'un cadre vide, et le jour ou un logo est depose la carte
   n'a pas besoin de changer.
   ========================================================================= */
.para-marques {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
	gap: 12px;
}

.para-marque {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 16px 12px 13px;
	border: 1px solid var(--para-rule);
	border-radius: 10px;
	background: #fff;
	color: var(--para-ink);
	text-align: center;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.para-marque:hover,
.para-marque:focus-visible {
	border-color: var(--para-green);
	box-shadow: 0 6px 18px rgba(20, 32, 27, 0.09);
	transform: translateY(-2px);
	color: var(--para-ink);
}

.para-marque__shot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 62px;
	margin-bottom: 10px;
}

.para-marque__shot img {
	max-width: 82%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

/* Un vrai logo a droit a toute la largeur et pas de fusion de blanc. */
.para-marque.has-logo .para-marque__shot img {
	max-width: 100%;
	mix-blend-mode: normal;
}

.para-marque__name {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
}

.para-marque:hover .para-marque__name { color: var(--para-green); }

.para-marque__count {
	font-size: 0.76rem;
	color: var(--para-ink-faint);
}

@media (prefers-reduced-motion: reduce) {
	.para-marque { transition: none; }
	.para-marque:hover { transform: none; }
}

/* =========================================================================
   Fiche produit

   Le prix y etait vert, alors qu'il est a l'accent partout ailleurs - cartes
   produit, tuiles, rangee des marques. Le seul endroit ou le prix decide
   vraiment etait le seul a ne pas suivre la regle du theme: l'accent est
   reserve au prix et a la promo.
   ========================================================================= */
.wd-single-price .price,
.wd-single-price .price .woocommerce-Price-amount,
.wd-single-price .price bdi,
.wd-single-price .price ins,
.single-product .summary .price,
.single-product .summary .price .woocommerce-Price-amount,
.single-product .summary .price bdi,
.single-product .summary .price ins {
	color: var(--para-accent);
}

.wd-single-price .price del,
.wd-single-price .price del .woocommerce-Price-amount,
.wd-single-price .price del bdi,
.single-product .summary .price del,
.single-product .summary .price del bdi {
	color: var(--para-ink-faint);
}

/* Meme correction de casse que sur les boutons du theme: WooCommerce a les
   siens, que la regle precedente ne couvrait pas. */
.single_add_to_cart_button,
.wd-buy-now-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	text-transform: none;
}

/* Rassurance sous le bouton d'achat. Discrete: elle doit se lire d'un coup
   d'oeil au moment de cliquer, pas concurrencer le bouton. */
.para-reassure {
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.para-reassure__item {
	position: relative;
	margin: 0 0 6px;
	padding-left: 22px;
	font-size: 0.86rem;
	line-height: 1.45;
	color: var(--para-ink-soft);
}

.para-reassure__item:last-child { margin-bottom: 0; }

.para-reassure__item::before {
	position: absolute;
	left: 0;
	top: 0.05em;
	color: var(--para-green);
	font-weight: 700;
	content: "\2713";
}

.para-reassure__item--ask::before { content: "\2709"; font-weight: 400; }

.para-reassure__item--cod { font-weight: 600; color: var(--para-ink); }

.para-reassure__item a {
	color: var(--para-green);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.para-reassure__item a:hover { color: var(--para-green-dark); }
