/* ==========================================================================
   Pharmélia v2 — design system layer (loaded after pharmelia.css)
   One container, one spacing scale, one type scale across the platform.
   ========================================================================== */
:root:root {
	--ph-wrap-max: 1200px;
	--ph-pad: 16px;            /* page side padding */
	--ph-gap: 24px;            /* vertical rhythm between sections */
	--ph-card-pad: 16px;
	--ph-r-sm: 12px;
	--ph-r: 16px;
	--ph-r-lg: 20px;
	--ph-shadow: 0 1px 2px rgba(11, 26, 74, .04), 0 4px 16px rgba(11, 26, 74, .05);
	--ph-shadow-hover: 0 2px 4px rgba(11, 26, 74, .06), 0 10px 28px rgba(11, 26, 74, .09);
	--ph-topbar-h: 56px;

	--ph-fs-xs: 12px;
	--ph-fs-sm: 13px;
	--ph-fs-base: 15px;
	--ph-fs-md: 16px;
	--ph-fs-lg: 18px;
	--ph-fs-xl: 22px;
	--ph-fs-2xl: 26px;

	--theme-normal-container-max-width: var(--ph-wrap-max);
	--theme-narrow-container-max-width: 760px;
}
@media (min-width: 1000px) {
	:root:root { --ph-pad: 24px; --ph-gap: 32px; --ph-card-pad: 20px; --ph-fs-xl: 24px; --ph-fs-2xl: 30px; }
}

/* ---------- Typography ---------- */
body.pharmelia { font-size: var(--ph-fs-base); line-height: 1.6; }
body.pharmelia h1, body.pharmelia .page-title, body.pharmelia .product_title { font-size: var(--ph-fs-xl) !important; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
body.pharmelia h2 { font-size: var(--ph-fs-lg); font-weight: 600; line-height: 1.4; }
body.pharmelia h3 { font-size: var(--ph-fs-md); font-weight: 600; line-height: 1.45; }
html[dir="rtl"] body.pharmelia { letter-spacing: 0; }
html:not([dir="rtl"]) body.pharmelia .ph-sec__title, html:not([dir="rtl"]) body.pharmelia h1 { letter-spacing: -0.01em; }

/* ---------- Container ---------- */
.ph-wrap { width: 100%; max-width: calc(var(--ph-wrap-max) + 2 * var(--ph-pad)); margin-inline: auto; padding-inline: var(--ph-pad); box-sizing: border-box; }
.ph-stack { display: flex; flex-direction: column; gap: var(--ph-gap); padding-block: var(--ph-pad) calc(var(--ph-gap) + 8px); }
body.pharmelia .ct-container, body.pharmelia .ct-container-narrow { padding-inline: 0; }
@media (max-width: 999.98px) {
	body.pharmelia { --theme-container-edge-spacing: calc(100vw - 2 * var(--ph-pad)); }
	body.pharmelia main#main > .ct-container,
	body.pharmelia .site-main > .ct-container { width: calc(100% - 2 * var(--ph-pad)); }
}
body.pharmelia [data-vertical-spacing*="top"] { padding-top: var(--ph-gap) !important; }
body.pharmelia [data-vertical-spacing*="bottom"] { padding-bottom: var(--ph-gap) !important; }

/* ---------- Mobile top bar (replaces Blocksy header < 1000px) ---------- */
.ph-topbar { display: none; }
@media (max-width: 999.98px) {
	body.pharmelia #header, body.pharmelia header#header, body.pharmelia .ct-header { display: none !important; }
	.ph-topbar {
		position: sticky; top: 0; z-index: 990; display: flex; align-items: center; justify-content: space-between;
		height: calc(var(--ph-topbar-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--ph-pad) 0;
		background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
		border-bottom: 1px solid var(--ph-line);
	}
	.ph-topbar .ph-logo img { width: 30px; height: 27px; }
	.ph-topbar .ph-logo span { font-size: 21px; }
	.ph-topbar__actions { display: flex; align-items: center; gap: 8px; }
	.ph-topbar .ph-iconbtn { width: 38px; height: 38px; }
	body.admin-bar .ph-topbar { top: 46px; }
}
.ph-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.ph-logo img { object-fit: contain; }
.ph-logo span { font-family: 'Quicksand', var(--ph-font); font-weight: 700; color: var(--ph-primary); line-height: 1; }
.ph-iconbtn { border-radius: 50%; border: 1px solid var(--ph-line); display: inline-flex; align-items: center; justify-content: center; color: var(--ph-ink); background: var(--ph-surface); }

/* ---------- Language switch (segmented) ---------- */
.ph-lang { display: inline-flex; align-items: center; padding: 3px; border-radius: 999px; background: var(--ph-bg); border: 1px solid var(--ph-line); gap: 2px; }
.ph-lang__opt {
	min-width: 34px; height: 30px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 600; color: var(--ph-text) !important; text-decoration: none !important; line-height: 1; transition: background .15s, color .15s;
}
.ph-lang__opt[lang="ar"] { font-size: 15px; font-family: var(--ph-font); }
.ph-lang__opt:hover { color: var(--ph-primary) !important; }
.ph-lang__opt.is-on { background: var(--ph-surface); color: var(--ph-primary) !important; box-shadow: 0 1px 3px rgba(11, 26, 74, .12); pointer-events: none; }
.ph-menu-lang { display: flex !important; align-items: center; margin-inline-start: 12px; }
.ph-menu-lang > .ph-lang { --x: 0; }
body.pharmelia .ph-menu-lang a { padding: 0 10px !important; height: 30px !important; }
@media (max-width: 999.98px) { .ph-menu-lang { display: none !important; } }

/* Desktop header polish */
@media (min-width: 1000px) {
	body.pharmelia .ct-header [data-row="middle"] { border-bottom: 1px solid var(--ph-line); }
	body.pharmelia .ct-header .menu > li > a { font-size: 15px; font-weight: 500; color: var(--ph-ink); }
	body.pharmelia .ct-header .menu > li.current-menu-item > a { color: var(--ph-primary); font-weight: 600; }
}

/* ---------- Home: hero ---------- */
.ph-app { padding: 0; max-width: none; }
.ph-hero {
	background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: var(--ph-r-lg);
	padding: var(--ph-card-pad); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--ph-shadow);
}
.ph-hero__kicker { font-size: var(--ph-fs-sm); font-weight: 600; color: var(--ph-accent-dark); }
.ph-hero__title { margin: 0; font-size: var(--ph-fs-xl) !important; line-height: 1.35; color: var(--ph-ink); font-weight: 500 !important; }
.ph-hero__title strong { font-weight: 700; }
.ph-hero__sub { margin: 4px 0 0; font-size: var(--ph-fs-sm); color: var(--ph-text); }
.ph-hero__cta { display: flex; flex-direction: column; gap: 8px; }
.ph-hero__note { margin: 0; font-size: var(--ph-fs-xs); color: var(--ph-muted); }
@media (min-width: 690px) { .ph-hero__cta { flex-direction: row; } .ph-hero__cta .ph-btn { flex: 1; } }
@media (min-width: 1000px) {
	.ph-hero { flex-direction: row; align-items: center; gap: 24px; padding: 20px 24px; }
	.ph-hero__text { flex: 0 0 auto; max-width: 420px; }
	.ph-hero .ph-search { flex: 1; }
	.ph-hero__cta { flex: 0 0 auto; }
	.ph-hero__note { display: none; }
}
.ph-search__scan { border-radius: var(--ph-r-sm); }

/* ---------- Home: banner slider ---------- */
.ph-slider { position: relative; margin: 0; }
.ph-slider__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--ph-r-lg);
	gap: 0; padding: 0; margin: 0; overscroll-behavior-x: contain;
}
.ph-slider__track::-webkit-scrollbar { display: none; }
.ph-slider .ph-banner {
	flex: 0 0 100%; max-width: none; scroll-snap-align: start; scroll-snap-stop: always;
	position: relative; overflow: hidden; border-radius: var(--ph-r-lg); min-height: 0;
	aspect-ratio: 16 / 9; padding: 0; display: flex; align-items: stretch; color: #fff; text-decoration: none; isolation: isolate;
}
@media (min-width: 690px) { .ph-slider .ph-banner { aspect-ratio: 21 / 8; } }
.ph-banner__media, .ph-banner__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-banner__media img { object-fit: cover; object-position: left center; margin: 0 !important; border: 0; border-radius: 0; }
html:not([dir="rtl"]) .ph-banner__media img { transform: scaleX(-1); object-position: left center; }
.ph-slider .ph-banner::after {
	content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background: linear-gradient(to left, var(--ph-b) 0%, var(--ph-b) 34%, var(--ph-b0) 72%);
}
html:not([dir="rtl"]) .ph-slider .ph-banner::after { background: linear-gradient(to right, var(--ph-b) 0%, var(--ph-b) 34%, var(--ph-b0) 72%); }
.ph-banner--blue { --ph-b: rgba(4, 40, 156, .94); --ph-b0: rgba(4, 40, 156, 0); background: var(--ph-primary); }
.ph-banner--teal { --ph-b: rgba(14, 102, 112, .94); --ph-b0: rgba(14, 102, 112, 0); background: var(--ph-accent-dark); }
.ph-banner--ink  { --ph-b: rgba(11, 26, 74, .94); --ph-b0: rgba(11, 26, 74, 0); background: var(--ph-ink); }
.ph-slider .ph-banner__txt {
	position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px;
	width: 62%; max-width: 520px; padding: 18px 20px;
}
@media (min-width: 690px) { .ph-slider .ph-banner__txt { width: 50%; padding: 28px 40px; gap: 10px; } }
.ph-slider .ph-banner__kicker { font-size: var(--ph-fs-xs); font-weight: 600; color: rgba(255,255,255,.82); letter-spacing: .01em; }
.ph-slider .ph-banner__title { font-size: 17px; font-weight: 700; line-height: 1.4; }
@media (min-width: 690px) { .ph-slider .ph-banner__title { font-size: 26px; line-height: 1.35; } }
.ph-slider .ph-banner__text { font-size: var(--ph-fs-xs); color: rgba(255,255,255,.85); }
@media (max-width: 420px) { .ph-slider .ph-banner__text { display: none; } }
.ph-slider .ph-banner__cta {
	margin-top: 6px; align-self: flex-start; background: #fff; color: var(--ph-ink); font-size: var(--ph-fs-sm); font-weight: 600;
	padding: 8px 14px; border-radius: var(--ph-r-sm); box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.ph-slider__dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
body.pharmelia .ph-slider__dot {
	width: 7px; height: 7px; min-height: 0; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.55); transition: width .2s, background .2s;
}
body.pharmelia .ph-slider__dot.is-on { width: 20px; background: #fff; }
.ph-banners, .ph-banners__dots { display: none; } /* legacy markup */

/* ---------- Trust strip ---------- */
.ph-trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .ph-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ph-trust li {
	display: flex; align-items: center; gap: 10px; background: var(--ph-surface); border: 1px solid var(--ph-line);
	border-radius: var(--ph-r); padding: 12px;
}
.ph-trust svg { flex: none; color: var(--ph-accent-dark); width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--ph-accent-soft); }
.ph-trust span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ph-trust strong { font-size: var(--ph-fs-sm); font-weight: 600; color: var(--ph-ink); }
.ph-trust small { font-size: var(--ph-fs-xs); color: var(--ph-muted); }
.ph-trust--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph-trust--compact li { padding: 10px; }

/* ---------- Sections ---------- */
.ph-sec { gap: 12px; }
.ph-sec__head { align-items: center; }
.ph-sec__title { font-size: var(--ph-fs-lg) !important; font-weight: 700 !important; }
.ph-sec__more { display: inline-flex; align-items: center; gap: 4px; font-size: var(--ph-fs-sm); font-weight: 600; padding: 6px 0; }
.ph-sec__more::after { content: '‹'; font-size: 16px; line-height: 1; }
html:not([dir="rtl"]) .ph-sec__more::after { content: '›'; }

/* Categories */
.ph-cats { gap: 12px 10px; }
.ph-cat__img { border-radius: var(--ph-r); box-shadow: none; transition: box-shadow .2s, transform .2s; }
.ph-cat:hover .ph-cat__img { box-shadow: var(--ph-shadow-hover); }
.ph-cat__name { font-size: var(--ph-fs-xs); font-weight: 600; }
@media (min-width: 1000px) { .ph-cat__name { font-size: var(--ph-fs-sm); } }

/* Rails: same edge as the container, peeking on phones, grid-like on desktop */
.ph-rail { margin: 0 calc(-1 * var(--ph-pad)); padding: 2px var(--ph-pad) 6px; scroll-padding-inline: var(--ph-pad); gap: 12px; }
.ph-rail__item { flex: 0 0 160px; }
@media (min-width: 1000px) { .ph-rail { margin: 0; padding: 2px 0 6px; } .ph-rail__item { flex: 0 0 calc((100% - 4 * 12px) / 5); } }
.ph-tile { border-radius: var(--ph-r); padding: 10px; transition: box-shadow .2s; }
.ph-tile:hover { box-shadow: var(--ph-shadow-hover); }
.ph-tile__title { font-size: var(--ph-fs-sm); }
.ph-tile__price { font-size: var(--ph-fs-base); font-weight: 700; }

/* Last order / first order */
.ph-last { border-radius: var(--ph-r-lg); padding: var(--ph-card-pad); background: linear-gradient(135deg, var(--ph-primary) 0%, var(--ph-primary-dark) 100%); }
.ph-last__label { font-size: var(--ph-fs-xs); }
.ph-last__sum { font-size: var(--ph-fs-lg); }
.ph-first { border-radius: var(--ph-r); }

/* Brands & help */
.ph-brand { border-radius: var(--ph-r-sm); }
.ph-help { border-radius: var(--ph-r-lg); padding: var(--ph-card-pad); }

/* Remove legacy home header pieces */
.ph-apphead { display: none !important; }

/* Cards: unify radius/borders across catalogue */
body.pharmelia ul.products li.ph-card { border-radius: var(--ph-r); padding: 12px; transition: box-shadow .2s; }
body.pharmelia ul.products li.ph-card:hover { box-shadow: var(--ph-shadow-hover); }
.ph-toolbar { gap: 12px; margin-bottom: 16px; }

/* Bottom nav: align with topbar style */
@media (max-width: 999.98px) {
	.ph-nav { background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
}

/* Focus visibility */
body.pharmelia a:focus-visible, body.pharmelia button:focus-visible, body.pharmelia input:focus-visible, body.pharmelia select:focus-visible {
	outline: 2px solid var(--ph-primary); outline-offset: 2px;
}

/* --- v2.0.1 fixes --- */
@media (max-width: 689.98px) {
	.ph-slider .ph-banner { aspect-ratio: auto; min-height: 212px; }
	.ph-slider .ph-banner__txt { width: 68%; padding: 16px 18px 30px; }
	.ph-slider .ph-banner::after { background: linear-gradient(to left, var(--ph-b) 0%, var(--ph-b) 48%, var(--ph-b0) 86%); }
	html:not([dir="rtl"]) .ph-slider .ph-banner::after { background: linear-gradient(to right, var(--ph-b) 0%, var(--ph-b) 48%, var(--ph-b0) 86%); }
	.ph-slider .ph-banner__title { font-size: 16px; }
	.ph-banner__media img { object-position: 15% center; }
}
@media (min-width: 1000px) { .ph-slider .ph-banner { aspect-ratio: auto; height: 340px; } }
.ph-slider .ph-banner__cta { white-space: nowrap; }

/* Trust strip: one swipeable row on phones */
@media (max-width: 899.98px) {
	.ph-trust { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--ph-pad)); padding: 0 var(--ph-pad); gap: 8px; scroll-snap-type: x proximity; }
	.ph-trust::-webkit-scrollbar { display: none; }
	.ph-trust li { flex: 0 0 auto; padding: 8px 12px 8px 10px; scroll-snap-align: start; }
	.ph-trust svg { width: 30px; height: 30px; padding: 6px; }
	.ph-trust strong, .ph-trust small { white-space: nowrap; }
}

/* ==========================================================================
   Product page (wholesale)
   ========================================================================== */
body.single-product .ph-pdp { display: flex; flex-direction: column; gap: var(--ph-gap); }
.ph-pdp__grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 900px) { .ph-pdp__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; } }
.ph-pdp__gallery { background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: var(--ph-r-lg); padding: 12px; }
@media (max-width: 899.98px) { .ph-pdp__gallery { max-width: 420px; width: 100%; margin-inline: auto; } }
@media (min-width: 900px) { .ph-pdp__gallery { position: sticky; top: 100px; } }
body.single-product .ph-pdp .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; max-width: none !important; }
body.single-product .ph-pdp .woocommerce-product-gallery img { border-radius: var(--ph-r); background: var(--ph-surface-2); }
body.single-product .ph-pdp .onsale { display: none; }
.ph-pdp__info { display: flex; flex-direction: column; gap: 12px; }
.ph-pdp__brand { align-self: flex-start; font-size: var(--ph-fs-sm); font-weight: 700; color: var(--ph-accent-dark) !important; text-decoration: none; background: var(--ph-accent-soft); padding: 4px 10px; border-radius: 999px; }
body.pharmelia .ph-pdp__title { margin: 0; font-size: var(--ph-fs-xl) !important; text-align: start; }
.ph-pdp__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--ph-fs-sm); color: var(--ph-muted); }
.ph-pdp__meta span + span::before { content: '·'; margin-inline-end: 14px; color: var(--ph-line); }
.ph-pdp__price { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--ph-r); background: var(--ph-surface); border: 1px solid var(--ph-line); }
.ph-pdp__price-label { font-size: var(--ph-fs-xs); color: var(--ph-muted); font-weight: 500; }
.ph-pdp__price-val { font-size: 26px; font-weight: 700; color: var(--ph-ink); line-height: 1.3; }
.ph-pdp__price-val del { font-size: 15px; color: var(--ph-muted); font-weight: 400; margin-inline-end: 8px; }
.ph-pdp__price-val ins { text-decoration: none; color: var(--ph-danger); }
.ph-pdp__desc { font-size: var(--ph-fs-base); color: var(--ph-text); }
.ph-pdp__desc p { margin: 0; }
.ph-pdp__buy { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--ph-r-lg); background: var(--ph-surface); border: 1px solid var(--ph-line); box-shadow: var(--ph-shadow); }
.ph-pdp__qtyrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ph-pdp__qtylabel { font-weight: 600; color: var(--ph-ink); }
.ph-buy--pdp .ph-qty { display: inline-flex !important; }
.ph-qty--lg { height: 48px; border-radius: 14px; }
body.pharmelia .ph-qty--lg .ph-qty__btn { width: 46px; height: 46px; min-height: 46px; font-size: 22px; }
body.pharmelia .ph-qty--lg .ph-qty__input { width: 72px; height: 46px; min-height: 46px; font-size: 18px; }
.ph-pdp__quick { display: flex; gap: 8px; }
body.pharmelia .ph-pdp__quick .ph-chip { flex: 1; justify-content: center; height: 38px; min-height: 38px; padding: 0; background: var(--ph-bg); border-color: var(--ph-line); color: var(--ph-primary); font-weight: 600; border-radius: 12px; }
body.pharmelia .ph-pdp__quick .ph-chip:hover { background: var(--ph-primary-soft); }
.ph-pdp__hint { margin: 0; font-size: var(--ph-fs-xs); color: var(--ph-warn-ink); }
.ph-pdp__hint:empty { display: none; }
.ph-pdp__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px dashed var(--ph-line); }
.ph-pdp__total span { color: var(--ph-text); }
.ph-pdp__total strong { font-size: 20px; color: var(--ph-ink); }
.ph-btn--block { width: 100%; }
body.pharmelia .ph-btn.is-done { background: var(--ph-ok) !important; }
.ph-pdp__tocart { text-align: center; font-weight: 600; color: var(--ph-primary); text-decoration: none; font-size: var(--ph-fs-sm); }
.ph-pdp__tocart.is-hidden { display: none; }
.ph-pdp__link { text-align: center; font-size: var(--ph-fs-sm); font-weight: 600; color: var(--ph-primary); }
.ph-pdp__terms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ph-pdp__terms li { font-size: var(--ph-fs-xs); color: var(--ph-accent-dark); background: var(--ph-accent-soft); border-radius: 10px; padding: 8px 10px; font-weight: 500; }
.ph-pdp__terms li::before { content: '✓ '; font-weight: 700; }
.ph-pdp__specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 4px 0 0; padding: 14px 16px; border-radius: var(--ph-r); border: 1px solid var(--ph-line); background: var(--ph-surface); font-size: var(--ph-fs-sm); }
.ph-pdp__specs dt { color: var(--ph-muted); font-weight: 500; }
.ph-pdp__specs dd { margin: 0; color: var(--ph-ink); font-weight: 500; text-align: start; }
.ph-pdp__specs dd[dir="ltr"] { text-align: end; }
html:not([dir="rtl"]) .ph-pdp__specs dd[dir="ltr"] { text-align: start; }
.ph-pdp__long { background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: var(--ph-r-lg); padding: var(--ph-card-pad); }
.ph-pdp__notify .cwginstock-subscribe-form { margin: 0; }
/* Sticky add bar on phones */
.ph-pdp__sticky { display: none; }
@media (max-width: 999.98px) {
	.ph-pdp__sticky {
		display: flex; position: fixed; inset-inline: 10px; bottom: calc(var(--ph-nav-h) + env(safe-area-inset-bottom, 0px) + 8px); z-index: 997;
		align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 16px;
		background: var(--ph-surface); border: 1px solid var(--ph-line); box-shadow: 0 8px 24px rgba(11, 26, 74, .14);
		transform: translateY(140%); opacity: 0; transition: transform .25s ease, opacity .25s ease; pointer-events: none;
	}
	.ph-pdp__sticky.is-on { transform: none; opacity: 1; pointer-events: auto; }
	.ph-pdp__sticky-price { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 17px; color: var(--ph-ink); }
	.ph-pdp__sticky-price small { font-size: 12px; font-weight: 400; color: var(--ph-muted); }
	.ph-pdp__sticky .ph-btn { height: 44px; min-height: 44px; padding: 0 20px; }
	body.single-product .ph-min--bar { display: none !important; }
}
/* Hide WooCommerce default blocks we replaced */
body.single-product .ph-pdp .product_meta, body.single-product .ph-pdp .woocommerce-tabs { display: none; }
@media (max-width: 899.98px) {
	.ph-pdp__gallery { max-width: 300px; padding: 8px; }
	body.single-product .ph-pdp .flex-control-thumbs { display: none; }
}
body.pharmelia .woocommerce-breadcrumb, body.pharmelia .ct-breadcrumbs { margin-bottom: 4px; }
body.single-product .ph-pdp { max-width: calc(var(--ph-wrap-max) + 2 * var(--ph-pad)); margin-inline: auto; padding: 8px var(--ph-pad) var(--ph-gap); box-sizing: border-box; width: 100%; }

/* ==========================================================================
   Auth: register & login
   ========================================================================== */
.ph-auth { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-block: 8px var(--ph-gap); }
.ph-auth__head { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.ph-auth__kicker { font-size: var(--ph-fs-sm); font-weight: 600; color: var(--ph-accent-dark); }
body.pharmelia .ph-auth__title { margin: 0; font-size: var(--ph-fs-2xl) !important; font-weight: 700; color: var(--ph-ink); }
.ph-auth__sub { margin: 0; font-size: var(--ph-fs-sm); color: var(--ph-text); }
.ph-auth__card { background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: var(--ph-r-lg); padding: 20px; box-shadow: var(--ph-shadow); }
body.pharmelia .ph-auth__card form.register { border: 0; padding: 0; margin: 0; background: none; }
.ph-auth__req { margin: 0 0 8px; font-size: var(--ph-fs-xs); color: var(--ph-muted); }
.ph-auth__alt { text-align: center; margin: 0; font-size: var(--ph-fs-sm); }
.ph-auth__alt a, .ph-auth__help a { font-weight: 600; color: var(--ph-primary); }
.ph-auth__help { margin: 10px 0 0; font-size: var(--ph-fs-xs); color: var(--ph-muted); text-align: center; }
.ph-opt { font-weight: 400; color: var(--ph-muted); font-size: .9em; }
.ph-hint { display: block; margin-top: 6px; font-size: var(--ph-fs-xs); color: var(--ph-muted); }
body.pharmelia .ph-auth .form-row, body.pharmelia .ph-auth .b2bking_custom_registration_container { margin-bottom: 14px !important; }
body.pharmelia .ph-auth button[name="register"] { width: 100%; height: 52px; font-size: var(--ph-fs-md); margin-top: 6px; }
.ph-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
.ph-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: var(--ph-fs-xs); color: var(--ph-muted); position: relative; }
.ph-steps b { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ph-surface); border: 1.5px solid var(--ph-line); color: var(--ph-muted); font-size: 13px; position: relative; z-index: 1; }
.ph-steps li:not(:last-child)::after { content: ''; position: absolute; top: 15px; inset-inline-start: calc(50% + 18px); inset-inline-end: calc(-50% + 18px); height: 1.5px; background: var(--ph-line); }
.ph-steps li.is-on { color: var(--ph-ink); font-weight: 600; }
.ph-steps li.is-on b { background: var(--ph-primary); border-color: var(--ph-primary); color: #fff; }
.ph-steps li.is-done b { background: var(--ph-ok); border-color: var(--ph-ok); color: #fff; }
/* Login page */
body.pharmelia.woocommerce-account:not(.logged-in) .woocommerce { max-width: 520px; margin-inline: auto; }
.ph-auth__head--login { margin: 8px 0 16px; }
body.pharmelia.woocommerce-account:not(.logged-in) #customer_login .u-column1 > h2 { display: none; }
body.pharmelia.woocommerce-account:not(.logged-in) .entry-header,
body.pharmelia.woocommerce-account:not(.logged-in) .hero-section { display: none; }
body.pharmelia .woocommerce form.login { box-shadow: var(--ph-shadow); padding: 20px; }
body.pharmelia .woocommerce form.login .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 8px; }
body.pharmelia .woocommerce-error li, body.pharmelia .woocommerce-message, body.pharmelia .woocommerce-info { font-size: var(--ph-fs-sm); }

/* Cart extras */
.ph-cart-extra { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.ph-cart-extra__more { align-self: flex-start; font-weight: 600; color: var(--ph-primary); text-decoration: none; }
.ph-min__go--ghost { background: var(--ph-surface) !important; color: var(--ph-primary) !important; border: 1px solid var(--ph-line); }
.ph-min--card { border-radius: var(--ph-r-lg); box-shadow: var(--ph-shadow); }
body.pharmelia .wc-block-cart, body.pharmelia .wc-block-checkout { font-family: var(--ph-font); }
body.pharmelia .wc-block-cart-items__row { border-color: var(--ph-line) !important; }
body.pharmelia .wc-block-components-sidebar .wc-block-components-panel, body.pharmelia .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block {
	background: var(--ph-surface); border: 1px solid var(--ph-line); border-radius: var(--ph-r-lg); padding: 4px 16px;
}
body.pharmelia .ct-header .menu > li > a { text-transform: none !important; letter-spacing: 0 !important; }

/* ===== Shop toolbar v2.1 — one category row + one compact filter row ===== */
.ph-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
body.pharmelia .ph-search.ph-search--archive input.dgwt-wcas-search-input {
	background: #fff !important; border: 1px solid var(--ph-line) !important;
	border-radius: var(--ph-r-sm, 12px) !important; min-height: 46px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
body.pharmelia .ph-search.ph-search--archive input.dgwt-wcas-search-input:focus { border-color: var(--ph-primary) !important; box-shadow: 0 0 0 3px rgba(31,111,235,.12); }
.ph-filters { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ph-filters::-webkit-scrollbar { display: none; }
.ph-filters .ph-chip { flex: 0 0 auto; }
.ph-chip--toggle { gap: 6px; }
.ph-chip--toggle .ph-stock__dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; display: inline-block; }
.ph-chip--toggle.is-on .ph-stock__dot { background: #fff; }
.ph-sort { margin-inline-start: auto; }
.ph-sort form.woocommerce-ordering { margin: 0 !important; float: none !important; }
body.pharmelia .ph-sort select.orderby {
	min-height: 36px; height: 36px; border: 0; background-color: transparent; box-shadow: none;
	padding: 0 14px 0 30px; font-size: 13px; font-weight: 500; border-radius: 19px; max-width: 190px;
}
html:not([dir="rtl"]) body.pharmelia .ph-chip--select select,
html:not([dir="rtl"]) body.pharmelia .ph-sort select.orderby { padding: 0 30px 0 14px; }
.ph-count { margin: 0; font-size: 13px; color: var(--ph-muted); }
body.pharmelia .ph-filters .ph-chip--select select { width: auto; max-width: 160px; }
@media (max-width: 640px) {
	.ph-filters { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(0,1fr); overflow: visible; }
	.ph-sort { margin-inline-start: 0; }
	.ph-filters .ph-chip--select, .ph-filters .ph-sort { min-width: 0; }
	body.pharmelia .ph-filters .ph-chip--select select, body.pharmelia .ph-sort select.orderby { width: 100%; max-width: none; text-overflow: ellipsis; }
}
.ph-sort form.woocommerce-ordering { position: relative; }
.ph-sort form.woocommerce-ordering svg { position: absolute; top: 50%; inset-inline-end: 12px; inset-inline-start: auto; transform: translateY(-50%); pointer-events: none; margin: 0; }
@media (max-width: 640px) { .ph-filters { grid-template-columns: auto minmax(0,1fr) minmax(0,1.25fr); } }
body.pharmelia .ph-filters select { line-height: 36px; padding-top: 0; padding-bottom: 0; }

/* Cart: classic layout (FR) — minimum bar spans full width; hide long descriptions in cart lines */
.ct-woocommerce-cart-form > .ph-min { grid-column: 1 / -1; }
.wc-block-components-product-metadata__description, .woocommerce-cart-form .ph-desc { display: none; }

/* ===== Typography v2.1 — IBM Plex Sans Arabic for reading/UI, Readex Pro kept for headings (brand) ===== */
:root, body.pharmelia {
	--ph-font: 'IBM Plex Sans Arabic', 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	--ph-font-head: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}
body.pharmelia { line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.pharmelia h1, body.pharmelia h2, body.pharmelia h3,
body.pharmelia .page-title, body.pharmelia .ph-pdp__title, body.pharmelia .ph-hero__title,
body.pharmelia .ph-sec__title, body.pharmelia .ph-banner__title, body.pharmelia .ph-auth__title {
	font-family: var(--ph-font-head); letter-spacing: 0; line-height: 1.35;
}
body.pharmelia .ph-num, body.pharmelia .woocommerce-Price-amount { font-family: var(--ph-font-head); font-feature-settings: "tnum" 1; }

/* ===================================================================
   Cart & checkout v2.1 — cards, sticky summary, clear steps
   =================================================================== */
body.woocommerce-cart .entry-content, body.woocommerce-checkout .entry-content { max-width: var(--ph-wrap-max, 1200px); margin-inline: auto; }

/* Steps */
.ph-osteps { display: flex; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: s; }
.ph-osteps__i { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--ph-surface); border: 1px solid var(--ph-line); color: var(--ph-muted); font-size: 12.5px; font-weight: 500; }
.ph-osteps__n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ph-bg, #eef3f8); color: var(--ph-muted); font-size: 12px; font-weight: 700; font-family: var(--ph-font-head); }
.ph-osteps__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-osteps__i.is-on { border-color: var(--ph-primary); color: var(--ph-primary); background: #fff; box-shadow: 0 0 0 3px rgba(4,40,156,.06); }
.ph-osteps__i.is-on .ph-osteps__n { background: var(--ph-primary); color: #fff; }
.ph-osteps__i.is-done { color: var(--ph-ok, #16794a); }
.ph-osteps__i.is-done .ph-osteps__n { background: var(--ph-ok, #16794a); color: #fff; }

/* Expected profit banner */
.ph-cart-profit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; background: #ecf8f1; border: 1px solid #cdebd9; color: #15603b; font-size: 13.5px; }
.ph-cart-profit svg { flex: none; }
.ph-cart-profit strong { font-size: 16px; margin-inline-start: auto; }
.ph-cart-profit small { flex-basis: 100%; color: #3d7a59; font-size: 11.5px; padding-inline-start: 30px; }
.ph-cart-profit[hidden] { display: none; }

/* Layout */
body.pharmelia .wc-block-cart { padding-top: 0; }
body.pharmelia .wc-block-cart .wc-block-components-main { padding-inline-end: 0; }
@media (min-width: 1000px) {
	body.pharmelia .wc-block-cart.wc-block-components-sidebar-layout { gap: 24px; flex-wrap: nowrap; }
	body.pharmelia .wc-block-cart .wc-block-components-main { width: auto; flex: 1 1 auto; }
	body.pharmelia .wc-block-cart .wc-block-components-sidebar { width: 360px; flex: none; padding-inline-start: 0; position: sticky; top: 96px; align-self: flex-start; }
}

/* Items as one card with row dividers */
body.pharmelia table.wc-block-cart-items { background: #fff; border: 1px solid var(--ph-line); border-radius: 18px; border-collapse: separate; border-spacing: 0; overflow: hidden; margin: 0; }
body.pharmelia .wc-block-cart-items__header { display: none; }
body.pharmelia .wc-block-cart-items__row { display: grid !important; grid-template-columns: 76px 1fr auto; grid-template-areas: "img prod total"; gap: 4px 14px; align-items: start; padding: 14px 16px !important; border-top: 1px solid var(--ph-line); }
body.pharmelia .wc-block-cart-items__row:first-child { border-top: 0; }
body.pharmelia .wc-block-cart-items__row td { border: 0 !important; padding: 0 !important; }
body.pharmelia .wc-block-cart-item__image { grid-area: img; }
body.pharmelia .wc-block-cart-item__image img { width: 76px !important; height: 76px; object-fit: contain; border-radius: 12px; background: #f4f7fb; padding: 4px; }
body.pharmelia .wc-block-cart-item__product { grid-area: prod; min-width: 0; }
body.pharmelia .wc-block-cart-item__total { grid-area: total; text-align: end; }
body.pharmelia .wc-block-cart-item__wrap { display: flex; flex-direction: column; gap: 4px; }
body.pharmelia .wc-block-components-product-name { font-size: 14.5px; font-weight: 600; color: var(--ph-ink) !important; line-height: 1.4; text-decoration: none; }
body.pharmelia .wc-block-cart-item__prices { font-size: 12.5px; color: var(--ph-muted); }
body.pharmelia .wc-block-cart-item__prices .wc-block-components-product-price__value { font-weight: 500; }
body.pharmelia .wc-block-cart-item__total .wc-block-components-product-price,
body.pharmelia .wc-block-cart-item__total .wc-block-components-product-price__value { font-size: 15px; font-weight: 700; color: var(--ph-ink); }
body.pharmelia .wc-block-cart-item__total .wc-block-components-sale-badge { display: none; }
body.pharmelia .wc-block-cart-item__quantity { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
body.pharmelia .wc-block-components-quantity-selector { width: 124px; height: 38px; border: 1px solid var(--ph-line) !important; border-radius: 12px !important; background: #fff; margin: 0 !important; }
body.pharmelia .wc-block-components-quantity-selector::after { display: none; }
body.pharmelia .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { font-size: 15px; font-weight: 700; font-family: var(--ph-font-head); color: var(--ph-ink); min-width: 0; height: 36px; }
body.pharmelia .wc-block-components-quantity-selector__button { min-width: 38px; color: var(--ph-primary) !important; font-size: 18px; opacity: 1; }
body.pharmelia .wc-block-components-quantity-selector__button:disabled { color: var(--ph-line) !important; }
body.pharmelia .wc-block-cart-item__remove-link { font-size: 12px !important; color: var(--ph-muted) !important; text-decoration: none !important; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
body.pharmelia .wc-block-cart-item__remove-link:hover { color: var(--ph-danger) !important; }
body.pharmelia .wc-block-components-product-metadata { display: none; }
body.pharmelia .wc-block-components-product-badge { border-radius: 999px; font-size: 11px; padding: 1px 8px; }

/* Summary card */
body.pharmelia .wc-block-cart .wc-block-components-sidebar .wp-block-woocommerce-cart-totals-block,
body.pharmelia .wc-block-cart__sidebar { background: #fff; border: 1px solid var(--ph-line); border-radius: 18px; padding: 16px 18px; }
body.pharmelia .wc-block-cart__totals-title { font-family: var(--ph-font-head); font-size: 16px !important; font-weight: 600; text-transform: none !important; text-align: start !important; padding: 0 0 8px !important; margin: 0 !important; color: var(--ph-ink); }
body.pharmelia .wc-block-cart .wc-block-components-totals-wrapper { padding: 10px 0 !important; border-top: 1px solid var(--ph-line); }
body.pharmelia .wc-block-cart .wc-block-components-totals-item { font-size: 14px; }
body.pharmelia .wc-block-cart .wc-block-components-totals-item__description { font-size: 12px; color: var(--ph-muted); }
body.pharmelia .wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { font-size: 15px; font-weight: 600; }
body.pharmelia .wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 20px; font-weight: 700; color: var(--ph-primary); }
body.pharmelia .wc-block-cart__submit { margin: 8px 0 0 !important; }
body.pharmelia .wc-block-cart__submit-button { width: 100%; font-size: 16px !important; box-shadow: 0 6px 16px rgba(4,40,156,.22); }

/* Mobile: sticky checkout bar sits above the app bottom nav */
@media (max-width: 999.98px) {
	body.pharmelia .wc-block-cart__submit-container--sticky {
		bottom: calc(var(--ph-nav-h) + env(safe-area-inset-bottom, 0px)) !important;
		padding: 10px 14px !important; background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
		border-top: 1px solid var(--ph-line); box-shadow: 0 -8px 20px rgba(11,26,74,.08); z-index: 997;
	}
	body.pharmelia .wc-block-cart__submit-container--sticky::before { display: none; }
	body.pharmelia.woocommerce-cart { padding-bottom: calc(var(--ph-nav-h) + 84px + env(safe-area-inset-bottom, 0px)); }
	body.pharmelia .wc-block-cart-items__row { grid-template-columns: 64px 1fr auto; gap: 4px 12px; padding: 12px !important; }
	body.pharmelia .wc-block-cart-item__image img { width: 64px !important; height: 64px; }
	.ph-osteps__i { padding: 7px 8px; font-size: 11.5px; }
	.ph-osteps__n { width: 22px; height: 22px; }
}
/* The floating minimum bar is redundant on cart/checkout (the cart has its own card). */
body.woocommerce-cart .ph-min--bar, body.woocommerce-checkout .ph-min--bar { display: none !important; }

/* Below-cart extras */
.ph-cart-extra { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 8px; }
.ph-cart-extra__more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ph-primary); text-decoration: none; }
.ph-cart-extra__more::before { content: "←"; }
html:not([dir="rtl"]) .ph-cart-extra__more::before { content: "→"; }
html[dir="rtl"] .ph-cart-extra__more::before { content: "→"; }
html:not([dir="rtl"]) .ph-cart-extra__more::before { content: "←"; }

/* Empty cart */
.ph-empty { text-align: center; padding: 40px 20px 32px; background: #fff; border: 1px solid var(--ph-line); border-radius: 20px; max-width: 520px; margin: 8px auto 24px; }
.ph-empty__ic { width: 76px; height: 76px; border-radius: 50%; display: inline-grid; place-items: center; background: #eef3fb; color: var(--ph-primary); margin-bottom: 12px; }
.ph-empty__t { font-size: 20px !important; margin: 0 0 6px !important; color: var(--ph-ink); }
.ph-empty__p { color: var(--ph-muted); margin: 0 0 18px; font-size: 14px; }
.ph-empty__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ph-empty__cta .ph-btn { min-height: 46px; padding: 0 20px; border-radius: 14px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; }

/* Retail price line (cards) and box (product page) */
.ph-pvp-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--ph-muted); margin-top: 2px; }
.ph-pvp-line b { color: #15803d; font-weight: 600; }
.ph-pvp-line__sep { opacity: .5; }
.ph-pvp { margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: #f3faf6; border: 1px solid #d5eedf; font-size: 13.5px; }
.ph-pvp__row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 3px 0; color: var(--ph-text); }
.ph-pvp__row small { color: var(--ph-muted); font-size: 11.5px; }
.ph-pvp__row--gain bdi { color: #15803d; font-weight: 600; }
.ph-pvp__row--total { border-top: 1px dashed #c4e3cf; margin-top: 4px; padding-top: 8px; font-weight: 600; color: #15603b; }
.ph-pvp__row--total strong { font-size: 16px; color: #15803d; }
.ph-pvp__note { margin: 6px 0 0; font-size: 11.5px; color: var(--ph-muted); }
/* Cart grid: beat Woo's mobile grid placement */
body.pharmelia .wc-block-cart .wc-block-cart-items__row .wc-block-cart-item__image { grid-column: 1 !important; grid-row: 1 / span 2 !important; }
body.pharmelia .wc-block-cart .wc-block-cart-items__row .wc-block-cart-item__product { grid-column: 2 !important; grid-row: 1 !important; }
body.pharmelia .wc-block-cart .wc-block-cart-items__row .wc-block-cart-item__total { grid-column: 3 !important; grid-row: 1 !important; white-space: nowrap; }
/* Quantity input: no inherited form-field box */
body.pharmelia .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	border: 0 !important; background: transparent !important; box-shadow: none !important; min-height: 0 !important; height: 36px !important; padding: 0 !important; border-radius: 0 !important; text-align: center;
}
body.pharmelia .wc-block-components-product-name { unicode-bidi: plaintext; text-align: start; }

/* ===== Banner tones v2.1 — brand-harmonious, each banner its own colour ===== */
.ph-slider .ph-banner::after { background: linear-gradient(to left, var(--ph-b) 0%, var(--ph-b2, var(--ph-b)) 40%, var(--ph-b0) 76%); }
html:not([dir="rtl"]) .ph-slider .ph-banner::after { background: linear-gradient(to right, var(--ph-b) 0%, var(--ph-b2, var(--ph-b)) 40%, var(--ph-b0) 76%); }
.ph-banner--rose  { --ph-b: rgba(124, 29, 76, .95); --ph-b2: rgba(176, 56, 106, .82); --ph-b0: rgba(176, 56, 106, 0); --ph-cta: #8A2257; --ph-chip: rgba(251, 237, 241, .2); background: #8A2257; }
.ph-banner--teal  { --ph-b: rgba(10, 88, 97, .95); --ph-b2: rgba(18, 139, 150, .82); --ph-b0: rgba(18, 139, 150, 0); --ph-cta: #0E6670; --ph-chip: rgba(228, 243, 241, .2); background: #0E6670; }
.ph-banner--royal { --ph-b: rgba(2, 27, 107, .96); --ph-b2: rgba(31, 69, 181, .84); --ph-b0: rgba(31, 69, 181, 0); --ph-cta: #04289C; --ph-chip: rgba(232, 238, 251, .2); background: #04289C; }
.ph-banner--mint  { --ph-b: rgba(15, 92, 80, .95); --ph-b2: rgba(36, 140, 118, .82); --ph-b0: rgba(36, 140, 118, 0); --ph-cta: #0F5C50; --ph-chip: rgba(228, 243, 241, .2); background: #0F5C50; }
.ph-banner--blue  { --ph-b2: rgba(4, 40, 156, .8); --ph-cta: #04289C; --ph-chip: rgba(255,255,255,.18); }
.ph-banner--ink   { --ph-b2: rgba(11, 26, 74, .8); --ph-cta: #0B1A4A; --ph-chip: rgba(255,255,255,.18); }
.ph-slider .ph-banner__kicker { align-self: flex-start; background: var(--ph-chip, rgba(255,255,255,.18)); color: #fff; padding: 3px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.ph-slider .ph-banner__cta { color: var(--ph-cta, var(--ph-ink)); }

/* ===== Full-width bottom banner ===== */
.ph-wide {
	position: relative; display: block; overflow: hidden; isolation: isolate; color: #fff; text-decoration: none;
	width: 100vw; margin-inline: calc(50% - 50vw); min-height: 300px; background: #0E6670;
}
.ph-wide__media, .ph-wide__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-wide__media img { object-fit: cover; object-position: left center; margin: 0 !important; border-radius: 0; }
html:not([dir="rtl"]) .ph-wide__media img { transform: scaleX(-1); }
.ph-wide::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to left, rgba(2,27,107,.95) 0%, rgba(14,102,112,.86) 42%, rgba(18,139,150,0) 78%); }
html:not([dir="rtl"]) .ph-wide::after { background: linear-gradient(to right, rgba(2,27,107,.95) 0%, rgba(14,102,112,.86) 42%, rgba(18,139,150,0) 78%); }
.ph-wide__in { position: relative; z-index: 1; max-width: var(--ph-wrap-max, 1200px); margin: 0 auto; padding: 36px var(--ph-pad, 16px); min-height: inherit; display: flex; flex-direction: column; justify-content: center; }
.ph-wide__txt { width: min(560px, 62%); display: flex; flex-direction: column; gap: 10px; }
.ph-wide__kicker { align-self: flex-start; background: rgba(255,255,255,.16); padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.ph-wide__title { font-family: var(--ph-font-head); font-size: 30px; font-weight: 700; line-height: 1.3; }
.ph-wide__list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: rgba(255,255,255,.92); }
.ph-wide__list li::before { content: '✓'; margin-inline-end: 6px; color: #9EE6DA; font-weight: 700; }
.ph-wide__cta { align-self: flex-start; margin-top: 6px; background: #fff; color: #04289C; font-weight: 700; font-size: 14.5px; padding: 11px 20px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
@media (min-width: 1000px) { .ph-wide { min-height: 380px; } .ph-wide__title { font-size: 36px; } }
@media (max-width: 689.98px) {
	.ph-wide { min-height: 420px; }
	.ph-wide__media img { object-position: 22% center; }
	.ph-wide::after { background: linear-gradient(to top, rgba(2,27,107,.97) 0%, rgba(14,102,112,.88) 48%, rgba(18,139,150,0) 82%) !important; }
	.ph-wide__in { justify-content: flex-end; padding-bottom: 28px; }
	.ph-wide__txt { width: 100%; }
	.ph-wide__title { font-size: 22px; }
}
body.home .ph-app, body.pharmelia .ph-app { overflow-x: clip; }
@media (max-width: 689.98px) {
	.ph-wide { min-height: 460px; }
	.ph-wide__media img { object-position: 30% 20%; }
	html:not([dir="rtl"]) .ph-wide__media img { object-position: 70% 20%; }
	.ph-wide::after { background: linear-gradient(to top, rgba(2,27,107,.97) 0%, rgba(14,102,112,.9) 40%, rgba(18,139,150,0) 66%) !important; }
}
body.pharmelia .wc-block-cart .wc-block-components-sidebar .wp-block-woocommerce-cart-totals-block { border: 0; padding: 0; background: transparent; }

/* ===== Archive head (shop / category / brand) ===== */
body.ph-archive .hero-section, body.ph-archive .woocommerce-products-header, body.ph-archive .ct-breadcrumbs { display: none !important; }
body.ph-archive .ct-container, body.ph-archive .site-main > .ct-container { padding-top: 24px; }
.ph-ahead {
	display: flex; align-items: center; gap: 16px; margin: 0 0 16px; padding: 16px 18px;
	background: #fff; border: 1px solid var(--ph-line); border-radius: 20px; position: relative; overflow: hidden;
}
.ph-ahead::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: linear-gradient(180deg, var(--ph-primary), var(--ph-accent, #128B96)); }
.ph-ahead__media { flex: none; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: #eef3fb; display: grid; place-items: center; color: var(--ph-primary); }
.ph-ahead__media img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; border-radius: 0; }
.ph-ahead__txt { flex: 1; min-width: 0; }
body.pharmelia .ph-ahead__title { margin: 0 !important; font-size: 22px !important; line-height: 1.3; color: var(--ph-ink); }
.ph-ahead__desc { margin: 4px 0 0; font-size: 13.5px; color: var(--ph-muted); line-height: 1.55; }
.ph-ahead__count { flex: none; align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: #eef3fb; color: var(--ph-primary); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
@media (min-width: 1000px) {
	.ph-ahead { padding: 20px 24px; gap: 20px; }
	.ph-ahead__media { width: 76px; height: 76px; }
	body.pharmelia .ph-ahead__title { font-size: 26px !important; }
	.ph-ahead__count { align-self: center; }
}
@media (max-width: 689.98px) {
	.ph-ahead { padding: 12px 14px; gap: 12px; border-radius: 16px; }
	.ph-ahead__media { width: 52px; height: 52px; border-radius: 14px; }
	body.pharmelia .ph-ahead__title { font-size: 18px !important; }
	.ph-ahead__desc { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.ph-ahead__count { font-size: 11.5px; padding: 3px 9px; }
}

/* ===== Header cart icon (desktop) ===== */
.ph-menu-cart { display: flex; align-items: center; }
.ph-hcart { position: relative; display: inline-grid !important; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ph-primary) !important; background: #eef3fb; margin-inline-start: 6px; padding: 0 !important; }
.ph-hcart:hover { background: var(--ph-primary); color: #fff !important; }
.ph-hcart .ph-nav__badge { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--ph-accent, #128B96); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; border: 2px solid #fff; box-sizing: content-box; display: block; }
.ph-hcart .ph-nav__badge.is-empty { display: none; }
/* Bottom banner: aligned with the other sections (not full-bleed) */
.ph-wide { width: auto; margin-inline: 0; border-radius: var(--ph-r-lg, 20px); }
.ph-wide__in { padding-inline: 40px; margin: 0; max-width: none; }
@media (max-width: 689.98px) { .ph-wide__in { padding-inline: 20px; } }
/* Banners are whole-card links: no link-blue on hover */
body.pharmelia a.ph-banner, body.pharmelia a.ph-banner:hover, body.pharmelia a.ph-banner:focus,
body.pharmelia a.ph-banner:hover *:not(.ph-banner__cta), body.pharmelia a.ph-wide, body.pharmelia a.ph-wide:hover,
body.pharmelia a.ph-wide:hover *:not(.ph-wide__cta) { color: #fff !important; text-decoration: none; }
body.pharmelia a.ph-banner:hover .ph-banner__cta, body.pharmelia a.ph-wide:hover .ph-wide__cta { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.ph-banner__cta, .ph-wide__cta { transition: transform .15s, box-shadow .15s; }
/* Cart items: white card background */
body.pharmelia .wc-block-cart table.wc-block-cart-items,
body.pharmelia .wc-block-cart .wc-block-cart-items__row { background: #fff !important; }
body.pharmelia .wc-block-cart .wp-block-woocommerce-cart-order-summary-block, body.pharmelia .wc-block-cart .wc-block-components-sidebar .wc-block-components-panel { border: 0 !important; padding: 0 !important; box-shadow: none !important; }
/* Summary card: equal inner padding on both sides, thin dividers */
body.pharmelia .wc-block-cart .wc-block-components-sidebar.wc-block-cart__sidebar { padding: 20px !important; }
body.pharmelia .wc-block-cart .wp-block-woocommerce-cart-order-summary-heading-block { border-bottom: 1px solid var(--ph-line); padding-bottom: 12px !important; }
body.pharmelia .wc-block-cart .wc-block-cart__totals-title { padding: 0 !important; }
body.pharmelia .wc-block-cart .wc-block-components-totals-wrapper:first-of-type { border-top: 0; }
body.pharmelia .wc-block-cart .wc-block-components-totals-wrapper::after, body.pharmelia .wc-block-cart .wc-block-components-totals-wrapper::before { display: none; }
body.pharmelia .wc-block-cart .wc-block-components-totals-item { align-items: center; padding: 4px 0 !important; }
body.pharmelia .wc-block-cart .wc-block-cart__submit { margin-top: 14px !important; }
body.pharmelia .wc-block-cart .wc-block-cart__totals-title { border: 0 !important; }
body.pharmelia .wc-block-cart .wp-block-woocommerce-cart-order-summary-heading-block { padding-bottom: 14px !important; margin-bottom: 4px !important; }
body.pharmelia .wc-block-cart .wc-block-components-totals-item__description:empty { display: none; }
body.pharmelia .wc-block-cart .wc-block-components-totals-item__value strong { color: #15803d; font-weight: 600; }

/* ===== Desktop header v2.2 — slimmer, sticky, pill navigation ===== */
@media (min-width: 1000px) {
	body.pharmelia #header.ct-header { position: sticky; top: 0; z-index: 900; }
	body.pharmelia .ct-header [data-device="desktop"] [data-row="middle"] {
		--height: 72px; min-height: 72px;
		background: rgba(255,255,255,.92) !important; backdrop-filter: saturate(160%) blur(10px);
		border-bottom: 1px solid var(--ph-line); box-shadow: 0 1px 0 rgba(11,26,74,.02), 0 6px 18px -12px rgba(11,26,74,.18);
	}
	body.pharmelia .ct-header [data-row="middle"] > .ct-container { min-height: 72px; }
	body.pharmelia .ct-header .site-title, body.pharmelia .ct-header .site-title a { font-size: 22px !important; }
	body.pharmelia .ct-header .site-title a::before { width: 30px !important; height: 30px !important; background-size: contain; }
	/* Menu as pills */
	body.pharmelia .ct-header .menu { gap: 4px; align-items: center; }
	body.pharmelia .ct-header .menu > li > a {
		--menu-item-height: 40px; height: 40px; padding: 0 14px !important; border-radius: 12px;
		font-size: 14.5px; font-weight: 500; color: var(--ph-ink) !important; transition: background .15s, color .15s;
	}
	body.pharmelia .ct-header .menu > li > a:hover { background: #f1f5fb; color: var(--ph-primary) !important; }
	body.pharmelia .ct-header .menu > li.current-menu-item > a,
	body.pharmelia .ct-header .menu > li.current_page_item > a { background: #e8eefb; color: var(--ph-primary) !important; font-weight: 600; }
	body.pharmelia .ct-header .menu > li > a::after, body.pharmelia .ct-header .menu > li > a::before { display: none !important; }
	/* Utility cluster: language, cart, search — same size, same rhythm */
	body.pharmelia .ct-header .ph-menu-lang { margin-inline-start: 10px; padding-inline-start: 14px; border-inline-start: 1px solid var(--ph-line); height: 32px; display: flex; align-items: center; }
	body.pharmelia .ct-header .ph-menu-lang > *, body.pharmelia .ct-header .ph-menu-cart > a { height: auto; }
	body.pharmelia .ph-hcart { width: 40px; height: 40px; margin-inline-start: 8px; }
	body.pharmelia .ct-header .ct-header-search {
		width: 40px; height: 40px; border-radius: 50%; background: #eef3fb; color: var(--ph-primary) !important;
		display: inline-grid !important; place-items: center; margin-inline-start: 8px; --theme-icon-color: var(--ph-primary);
	}
	body.pharmelia .ct-header .ct-header-search:hover { background: var(--ph-primary); --theme-icon-color: #fff; --theme-icon-hover-color: #fff; color: #fff !important; }
	body.pharmelia .ct-header .ct-header-search .ct-icon { width: 17px; height: 17px; }
	body.pharmelia .ct-header .ct-header-search .ct-label { display: none !important; }
}
body.pharmelia #header .ct-container { padding-top: 0 !important; padding-bottom: 0 !important; }
@media (min-width: 1000px) {
	body.pharmelia #header .ct-header-search { background: #eef3fb !important; border-radius: 50% !important; width: 40px; height: 40px; display: inline-grid !important; place-items: center; --theme-icon-color: var(--ph-primary); }
	body.pharmelia #header .ct-header-search:hover { background: var(--ph-primary) !important; --theme-icon-color: #fff; --theme-icon-hover-color: #fff; }
	body.pharmelia #header .ph-hcart { background: #eef3fb; color: var(--ph-primary) !important; }
	body.pharmelia #header .ph-hcart svg { width: 20px; height: 20px; }
	body.pharmelia #header .ph-hcart .ph-nav__badge { top: -5px; inset-inline-end: -6px; min-width: 16px; height: 18px; line-height: 18px; padding: 0 4px; font-size: 10.5px; }
}
@media (min-width: 1000px) {
	body.pharmelia #header .menu > li.ph-menu-cart > a.ph-hcart { border-radius: 50% !important; padding: 0 !important; width: 40px; height: 40px; background: #eef3fb; }
	body.pharmelia #header .menu > li.ph-menu-cart > a.ph-hcart:hover { background: var(--ph-primary); color: #fff !important; }
	body.pharmelia #header .menu > li.ph-menu-cart > a.ph-hcart svg { width: 20px !important; height: 20px !important; }
}
