.phc-book-shell,
.phc-book-shell .phc-book {
	--navy: #14385f;
	--green: #1f6a4b;
	--cyan: #35b9e9;
	--baby: #eaf7fc;
	--ink: #183144;
	--muted: #607787;
	--line: #dbe7ed;
	--paper: #ffffff;
	--soft: #f6fafc;
	--gold: #e0c14b;
}

.phc-book-shell,
.phc-book-shell *,
.phc-book-shell *::before,
.phc-book-shell *::after {
	box-sizing: border-box;
}

/* Break out of the theme's narrow content column to go true full-width.
   The heavy lifting (stripping ancestor max-width/padding) is done in
   catalog.js, since block themes nest multiple constrained containers
   and a pure-CSS 100vw trick breaks asymmetrically depending on theme
   padding. This CSS is the fallback while JS loads / if disabled. */
.phc-fullbleed {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Elements with `display:flex`/etc. set explicitly (like .phc-hero) would
   otherwise override the browser's default `[hidden]{display:none}` UA
   rule, since same-specificity author styles beat user-agent styles —
   this keeps the JS show/hide toggles (cover <-> catalog <-> section
   drill-down) actually working. */
.phc-book-shell [hidden] {
	display: none !important;
}

/* Many themes/page-builders (Elementor, Bootstrap-like frameworks, etc.)
   apply a global `img { width: 100%; height: auto; }`-style reset that
   would otherwise stretch our logo to fill its container. Explicit sizes
   below win over that with !important. */
.phc-book-shell img {
	max-width: 100%;
}

/* We use real <button> elements for the clickable TOC cards / ghost buttons
   for accessibility (keyboard + screen readers), but the active theme or
   page builder (Elementor, WooCommerce, Bootstrap-like frameworks, etc.)
   commonly applies its own global button skin (background gradient, color,
   border-radius, uppercase text, letter-spacing) at a specificity/origin
   that beats a plain class selector. Reset those properties back to plain
   values before our own rules style them again below. */
.phc-book-shell button {
	font: inherit !important;
	line-height: normal !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-align: left !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

/* ---------- PAGE / BOOK SHELL ---------- */
.phc-book-shell {
	background: #edf4f7;
	padding: 28px 18px;
	font-family: Arial, Helvetica, sans-serif;
	color: var(--ink);
}

/* The active theme's global styles often target bare h1-h4 with a serif
   font at higher specificity than a single class selector can beat —
   force every heading inside the book back to the catalog's own font. */
.phc-book-shell h1,
.phc-book-shell h2,
.phc-book-shell h3,
.phc-book-shell h4 {
	font-family: Arial, Helvetica, sans-serif !important;
}

.phc-book {
	max-width: 1180px;
	margin: 0 auto;
	background: var(--paper);
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 18px 70px rgba(20,56,95,.15);
}

/* ---------- COVER / HERO ---------- */
.phc-hero {
	min-height: 640px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 72px;
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 82% 18%, rgba(53,185,233,.25) 0 12%, transparent 34%),
		radial-gradient(circle at 90% 88%, rgba(31,106,75,.13) 0 14%, transparent 38%),
		linear-gradient(135deg,#fff 0%,#f7fbfc 45%,#eef7fa 100%);
}

.phc-hero-circle {
	position: absolute;
	width: 440px;
	height: 440px;
	border: 1px solid rgba(20,56,95,.12);
	border-radius: 50%;
	right: -170px;
	top: 80px;
	pointer-events: none;
}

.phc-hero-top,
.phc-hero-footer {
	position: relative;
	z-index: 1;
}

.phc-hero-logo {
	height: 46px !important;
	width: auto !important;
	max-width: 220px !important;
	display: block;
}

.phc-hero-brand {
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	font-size: 14px;
	color: var(--navy);
}

.phc-hero-kicker {
	margin-top: 90px;
	font-size: 14px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 700;
}

.phc-hero-title {
	font-size: clamp(34px, 5vw, 64px);
	line-height: .98;
	letter-spacing: -.02em;
	color: var(--navy);
	max-width: 700px;
	margin: 12px 0 20px;
	font-weight: 800;
}

.phc-hero-subtitle {
	max-width: 590px;
	font-size: 18px;
	line-height: 1.6;
	color: var(--muted);
	margin: 0;
}

.phc-hero-footer {
	display: flex;
	gap: 18px;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-top: 40px;
}

.phc-hero-edition {
	line-height: 1.55;
	color: var(--muted);
	font-size: 14px;
}

.phc-hero-edition strong {
	color: var(--navy);
}

/* Themes commonly style bare <a> links globally (color, underline) at a
   specificity that beats a single class selector — harden every property
   a theme is likely to touch. */
.phc-hero-button {
	display: inline-block;
	border: 0 !important;
	color: #fff !important;
	background: linear-gradient(90deg, var(--navy), #1f5a88) !important;
	padding: 16px 28px;
	border-radius: 12px !important;
	cursor: pointer;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none !important;
	box-shadow: 0 8px 20px rgba(20,56,95,.18) !important;
	transition: transform .15s ease;
}

.phc-hero-button:hover,
.phc-hero-button:focus,
.phc-hero-button:visited,
.phc-hero-button:active {
	transform: translateY(-2px);
	color: #fff !important;
	text-decoration: none !important;
}

/* ---------- CATALOG (TOC + section detail) ---------- */
.phc-catalog {
	min-height: 640px;
}

.phc-topbar {
	padding: 26px 34px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	background: rgba(255,255,255,.95);
	backdrop-filter: blur(8px);
	z-index: 5;
}

.phc-topbar-title {
	display: flex;
	gap: 12px;
	align-items: center;
}

.phc-mark {
	height: 38px !important;
	width: auto !important;
	max-width: 180px !important;
	flex: 0 0 auto;
}

.phc-topbar h2 {
	margin: 0;
	color: var(--navy);
	font-size: 20px;
}

.phc-small {
	font-size: 12px;
	color: var(--muted);
	margin-top: 2px;
}

.phc-ghost {
	border: 1px solid var(--line) !important;
	background: #fff !important;
	color: var(--navy) !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	padding: 11px 14px;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
}

.phc-ghost:hover {
	border-color: var(--cyan);
}

.phc-inner {
	padding: 42px 34px 48px;
}

.phc-hero-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.phc-hero-row h3 {
	font-size: 32px;
	margin: 0;
	color: var(--navy);
}

.phc-hero-row p {
	margin: 8px 0 0;
	color: var(--muted);
	max-width: 620px;
	line-height: 1.55;
}

.phc-search-wrap {
	position: relative;
	margin: 26px 0 22px;
}

.phc-search-input {
	width: 100%;
	padding: 15px 16px;
	border: 1px solid var(--line);
	border-radius: 12px;
	outline: none;
	background: #fbfdfe;
	color: var(--ink);
	font-size: 15px;
	font-family: inherit;
}

.phc-search-input:focus {
	border-color: var(--cyan);
}

.phc-section-label {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .16em;
	font-weight: 700;
	color: var(--muted);
	margin: 30px 0 12px;
}

/* Table of Contents grid */
.phc-toc-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0,1fr));
	gap: 16px;
}

.phc-cat-card {
	min-height: 180px;
	min-width: 0;
	border: 1px solid var(--line) !important;
	background: linear-gradient(180deg, #fff, var(--phc-section-bg, #f8fbfc)) !important;
	border-radius: 18px !important;
	box-shadow: none !important;
	padding: 22px;
	text-align: left;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	transition: transform .18s ease, border-color .18s ease;
	display: block;
	font-family: inherit;
	color: inherit !important;
	width: 100%;
}

.phc-cat-card:hover {
	transform: translateY(-3px);
	border-color: var(--phc-section-accent, #a9dfee);
}

.phc-cat-card .phc-cat-num {
	font-size: 12px;
	color: var(--muted) !important;
	font-weight: 700;
	letter-spacing: .08em;
}

.phc-cat-card h4 {
	font-size: 21px;
	color: var(--phc-section-accent, var(--navy)) !important;
	margin: 24px 0 8px;
}

.phc-cat-card p {
	color: var(--muted) !important;
	line-height: 1.45;
	margin: 0 0 20px;
	font-size: 13.5px;
}

.phc-cat-card .phc-cat-link {
	font-weight: 700;
	color: var(--green) !important;
	font-size: 14px;
}

.phc-cat-card::after {
	content: "";
	position: absolute;
	width: 110px;
	height: 110px;
	border-radius: 50%;
	background: var(--phc-section-bg, rgba(53,185,233,.10));
	opacity: .6;
	right: -35px;
	bottom: -45px;
}

.phc-cat-card.phc-hidden {
	display: none;
}

/* Section detail (drill-down single-category view) */
.phc-section-detail {
	background: var(--phc-section-bg, transparent);
	margin: -42px -34px 0;
	padding: 30px 34px 48px;
}

.phc-crumb-back {
	margin-bottom: 18px;
}

.phc-section-detail-head {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	align-items: flex-end;
}

.phc-section-detail-head h3 {
	font-size: 34px;
	color: var(--phc-section-accent, var(--navy));
	margin: 0;
}

/* Card grid (products inside a section) */
.phc-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin-top: 6px;
}

.phc-card {
	position: relative;
	min-width: 0; /* grid items default to min-width:auto (content size); without this, long
	                 unbroken product names (e.g. "FLUOCINONIDE/MINOXIDIL/FINASTERIDE") force
	                 the card wider than its column and cause page-wide horizontal scroll. */
	background: #fff;
	border: 1px solid var(--line);
	border-top: 4px solid var(--phc-section-accent, var(--cyan));
	border-radius: 12px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(20,56,95,0.05);
	transition: box-shadow .15s ease, transform .15s ease;
}

.phc-card:hover {
	box-shadow: 0 10px 24px rgba(20,56,95,0.1);
	transform: translateY(-2px);
}

.phc-card-unavailable {
	opacity: 0.65;
}

.phc-card-title {
	font-size: 15.5px;
	font-weight: 700;
	color: var(--navy);
	margin: 0 0 4px;
	padding-right: 66px;
	overflow-wrap: break-word;
	word-break: break-word;
}

.phc-card-note {
	display: block;
	font-size: 11.5px;
	font-style: italic;
	color: var(--muted);
	margin-bottom: 8px;
}

.phc-card-indication {
	font-size: 13px;
	color: var(--ink);
	line-height: 1.5;
	margin: 0 0 12px;
	overflow-wrap: break-word;
	word-break: break-word;
}

.phc-card-meta {
	margin-top: auto;
	border-top: 1px dashed var(--line);
	padding-top: 10px;
	margin-bottom: 12px;
}

.phc-meta-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 12px;
	padding: 2px 0;
}

.phc-meta-label {
	color: var(--muted);
	font-weight: 600;
}

.phc-meta-value {
	color: var(--ink);
	text-align: right;
	overflow-wrap: break-word;
	word-break: break-word;
	max-width: 60%;
}

.phc-card-footer {
	display: flex;
	justify-content: flex-end;
}

.phc-card-price-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.phc-card-price-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--muted);
}

.phc-card-price {
	background: linear-gradient(135deg, var(--gold), #f0d876);
	color: #4a3d00;
	font-weight: 800;
	font-size: 14px;
	padding: 5px 12px;
	border-radius: 999px;
	white-space: nowrap;
}

.phc-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.phc-badge-out {
	background: #fbe4e4;
	color: #b32d2e;
}

.phc-badge-discontinued {
	background: #ececec;
	color: #6a6a6a;
}

.phc-card.phc-hidden {
	display: none;
}

.phc-empty {
	padding: 30px;
	border: 1px dashed var(--line);
	border-radius: 14px;
	text-align: center;
	color: var(--muted);
	margin-top: 20px;
}

@media (max-width: 820px) {
	.phc-hero { padding: 42px 28px; min-height: 560px; }
	.phc-toc-grid { grid-template-columns: 1fr 1fr; }
	.phc-hero-kicker { margin-top: 60px; }
}

@media (max-width: 560px) {
	.phc-book-shell { padding: 0; }
	.phc-book { border-radius: 0; }
	.phc-toc-grid { grid-template-columns: 1fr; }
	.phc-inner { padding: 28px 20px 40px; }
	.phc-section-detail { margin: -28px -20px 0; padding: 24px 20px 40px; }
	.phc-topbar { padding: 18px 20px; }
	.phc-topbar .phc-small { display: none; }
	.phc-hero-title { font-size: 38px; }
	.phc-hero-kicker { margin-top: 50px; }
	.phc-card-grid { grid-template-columns: 1fr; }
}
