/**
 * Pharmaceutical Products Catalog
 * Shortcode: [pharma_products_catalog]
 */

:root {
	--ppc-green: #1e6fa8;
	--ppc-green-dark: #175a87;
	--ppc-green-light: #e8f1fa;
	--ppc-green-soft: #f0f6fc;
	--ppc-sidebar-header-bg: #f0f2f5;
	--ppc-text: #1a1a1a;
	--ppc-text-muted: #5c6670;
	--ppc-border: #e0e0e0;
	--ppc-radius: 12px;
	--ppc-shadow: 0 4px 24px rgba(30, 111, 168, 0.08);
	--ppc-shadow-hover: 0 8px 32px rgba(30, 111, 168, 0.12);
}

.elementor-widget-shortcode .ppc-catalog,
.elementor-element .ppc-catalog,
.ppc-catalog {
	display: grid;
	grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-family: "Inter", sans-serif;
	color: var(--ppc-text);
}

.elementor-widget-shortcode .ppc-catalog *,
.elementor-element .ppc-catalog *,
.ppc-catalog * {
	box-sizing: border-box;
}

.ppc-catalog button {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	box-shadow: none;
	outline: none;
	text-shadow: none;
}

.ppc-catalog button:focus-visible {
	outline: 2px solid var(--ppc-green);
	outline-offset: 2px;
}

/* Headings */
.ppc-accordion__title,
.ppc-product__title,
.ppc-product__title a {
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

.ppc-categories__header {
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

/* —— Sidebar (flat list design) —— */
.ppc-catalog__sidebar {
	min-width: 0;
	padding-right: 8px;
}

.ppc-categories-panel {
	border: 1px solid var(--ppc-border);
	background: #fff;
	overflow: hidden;
}

.ppc-categories__header {
	margin: 0;
	padding: 18px 16px;
	background: var(--ppc-sidebar-header-bg);
	border-bottom: 1px solid var(--ppc-border);
	color: var(--ppc-green);
	font-size: 1.125rem;
	font-weight: 700;
	text-align: center;
	letter-spacing: 0.02em;
}

.ppc-categories {
	display: block;
}

.ppc-categories__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ppc-categories__item {
	margin: 0;
	border-bottom: 1px solid var(--ppc-border);
}

.ppc-categories__item:last-child {
	border-bottom: 0;
}

.ppc-categories__row {
	display: flex;
	align-items: stretch;
	min-height: 48px;
}

.ppc-categories__link,
.ppc-categories__link--all {
	flex: 1;
	display: block;
	min-width: 0;
	margin: 0;
	padding: 14px 16px;
	background: #fff !important;
	color: var(--ppc-green) !important;
	font-family: "Inter", sans-serif;
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.45;
	text-align: left;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.ppc-categories__link:hover,
.ppc-categories__link--all:hover {
	background: #f8f9fa !important;
	color: var(--ppc-green) !important;
}

.ppc-categories__link.is-active,
.ppc-categories__link--all.is-active {
	background: var(--ppc-green) !important;
	color: #fff !important;
	font-weight: 500;
}

.ppc-categories__link.is-active:hover,
.ppc-categories__link--all.is-active:hover {
	background: var(--ppc-green-dark) !important;
	color: #fff !important;
}

.ppc-categories__expand {
	flex: 0 0 40px;
	width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	background: #fff !important;
	border: 0;
	border-left: 1px solid var(--ppc-border);
	cursor: pointer;
	transition: background 0.2s ease;
}

.ppc-categories__item:has(.ppc-categories__link.is-active) .ppc-categories__expand {
	background: var(--ppc-green) !important;
	border-left-color: rgba(255, 255, 255, 0.2);
}

.ppc-categories__expand:hover {
	background: #f0f2f5 !important;
}

.ppc-categories__item:has(.ppc-categories__link.is-active) .ppc-categories__expand:hover {
	background: var(--ppc-green-dark) !important;
}

.ppc-categories__arrow {
	display: block;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--ppc-green);
	border-bottom: 2px solid var(--ppc-green);
	transform: rotate(-45deg);
	transition: transform 0.25s ease, border-color 0.2s ease;
}

.ppc-categories__item:has(.ppc-categories__link.is-active) .ppc-categories__arrow {
	border-right-color: #fff;
	border-bottom-color: #fff;
}

.ppc-categories__item.is-expanded > .ppc-categories__row .ppc-categories__arrow {
	transform: rotate(45deg);
}

.ppc-categories__list--nested {
	border-top: 1px solid var(--ppc-border);
	background: #fafbfc;
}

.ppc-categories__list--nested[hidden] {
	display: none !important;
}

.ppc-categories__list--nested .ppc-categories__link {
	padding-left: 28px;
	font-size: 0.875rem;
}

.ppc-categories__list--nested .ppc-categories__item:last-child {
	border-bottom: 0;
}

/* Mobile / tablet: category sidebar accordion */
.ppc-sidebar-mobile__trigger,
.ppc-sidebar-mobile__backdrop,
.ppc-sidebar-mobile__close,
.ppc-sidebar-mobile__panel-head {
	display: none;
}

body.ppc-sidebar-open {
	overflow: hidden;
}

.ppc-catalog__content {
	position: relative;
	min-width: 0;
	padding-left: 8px;
}

/* —— Product type icon navigation —— */
.ppc-type-icons {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	margin: 0 0 28px;
	padding: 0;
}

.ppc-type-icons__viewport {
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.ppc-type-icons__track {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 2px 8px;
}

.ppc-type-icons__track::-webkit-scrollbar {
	display: none;
}

.ppc-type-icons__item {
	flex: 0 0 108px;
	width: 108px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--ppc-green);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.ppc-type-icons__item:hover,
.ppc-type-icons__item:focus-visible {
	transform: translateY(-2px);
	text-decoration: none;
	color: var(--ppc-green);
}

.ppc-type-icons__circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	border: 2px solid var(--ppc-green);
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ppc-type-icons__item:hover .ppc-type-icons__circle,
.ppc-type-icons__item:focus-visible .ppc-type-icons__circle {
	border-color: var(--ppc-green-dark);
	box-shadow: 0 6px 18px rgba(30, 111, 168, 0.14);
}

.ppc-type-icons__image {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: contain;
}

.ppc-type-icons__fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--ppc-green);
}

.ppc-type-icons__label {
	display: block;
	width: 100%;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
}

.ppc-type-icons__controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	align-self: flex-end;
	gap: 4px;
	flex: 0 0 auto;
	margin-top: 2px;
}

.ppc-type-icons__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	background: var(--ppc-green) !important;
	color: #fff !important;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.ppc-type-icons__nav:hover:not(:disabled) {
	background: var(--ppc-green-dark) !important;
}

.ppc-type-icons__nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ppc-accordion-wrap {
	position: relative;
	min-height: 80px;
}

.ppc-catalog--sidebar-only,
.ppc-catalog--content-only {
	display: block;
}

.ppc-catalog--sidebar-only .ppc-catalog__sidebar,
.ppc-catalog--content-only .ppc-catalog__content {
	padding-left: 0;
	padding-right: 0;
}

/* —— Product type accordion —— */
.ppc-accordion {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ppc-accordion__item {
	width: 100%;
	border-radius: var(--ppc-radius);
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--ppc-border);
	box-shadow: var(--ppc-shadow);
	transition: box-shadow 0.3s ease, border-color 0.3s ease;
	scroll-margin-top: 24px;
}

.ppc-accordion__item:hover {
	box-shadow: var(--ppc-shadow-hover);
}

.ppc-accordion__item.is-open {
	border-color: #b8d4ea;
}

.ppc-accordion__heading {
	margin: 0;
}

.ppc-accordion__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin: 0;
	padding: 18px 24px;
	background: linear-gradient(135deg, var(--ppc-green) 0%, #3d8fc4 100%) !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-align: left;
	cursor: pointer;
	transition: filter 0.25s ease, padding 0.2s ease;
}

.ppc-accordion__trigger:hover,
.ppc-accordion__trigger:focus {
	filter: brightness(1.06);
}

.ppc-accordion__title {
	flex: 1;
	min-width: 0;
	font-size: 16px !important;
}

.ppc-accordion__icon {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	position: relative;
	flex-shrink: 0;
}

.ppc-accordion__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	margin: 0;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: translate(-50%, -50%) rotate(-45deg);
	transition: transform 0.3s ease;
}

.ppc-accordion__item.is-open .ppc-accordion__icon::after {
	transform: translate(-50%, -50%) rotate(45deg);
}

.ppc-accordion__panel {
	background: var(--ppc-green-soft);
	border-top: 1px solid rgba(30, 111, 168, 0.08);
}

.ppc-accordion__panel-inner {
	padding: 8px;
}

/* —— Product cards —— */
.ppc-product {
	display: flex;
	align-items: stretch;
	gap: 28px;
	margin: 0;
	padding: 20px;
	background: #fff;
	border: 1px solid transparent;
	border-radius: 10px;
	font-family: "Inter", sans-serif;
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.ppc-product + .ppc-product {
	margin-top: 8px;
}

.ppc-product:hover {
	background: #fff;
	border-color: var(--ppc-border);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.ppc-product__media {
	flex: 0 0 220px;
	width: 220px;
	min-width: 0;
}

.ppc-product__media-link {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 10px;
	overflow: hidden;
	background: var(--ppc-green-soft);
	border: 1px solid var(--ppc-border);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ppc-product:hover .ppc-product__media-link {
	border-color: #b8d4ea;
}

.ppc-product__image {
	display: block;
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.ppc-product__image--placeholder {
	object-fit: contain;
	padding: 18px;
	background: var(--ppc-green-soft);
}

.ppc-product__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 20px;
	padding: 4px 0;
}

.ppc-product__info {
	flex: 1;
	min-width: 0;
}

.ppc-product__title {
	margin: 0 0 10px;
	font-size: 26px !important;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.ppc-product__title a {
	color: var(--ppc-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.ppc-product__title a:hover {
	color: var(--ppc-green);
	text-decoration: none;
}

.ppc-product__meta {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 400;
	color: var(--ppc-text-muted);
	line-height: 1.65;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ppc-product__action {
	flex: 0 0 auto;
	padding-top: 0;
}

.ppc-product__read-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 130px;
	padding: 12px 24px;
	background: var(--ppc-green) !important;
	color: #fff !important;
	text-decoration: none;
	border: 2px solid var(--ppc-green);
	border-radius: 50px;
	font-family: "Inter", sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.ppc-product__read-more:hover {
	background: var(--ppc-green-dark) !important;
	border-color: var(--ppc-green-dark);
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(30, 111, 168, 0.3);
}

.ppc-empty {
	margin: 0;
	padding: 32px 24px;
	background: #fff;
	border: 1px dashed var(--ppc-border);
	border-radius: var(--ppc-radius);
	color: var(--ppc-text-muted);
	font-size: 0.9375rem;
	text-align: center;
}

@media (max-width: 1024px) {
	.elementor-widget-shortcode .ppc-catalog,
	.elementor-element .ppc-catalog,
	.ppc-catalog {
		display: flex !important;
		flex-direction: column !important;
		grid-template-columns: none !important;
		grid-template-rows: unset !important;
		gap: 20px;
		width: 100% !important;
		max-width: 100% !important;
	}

	.elementor-widget-shortcode .ppc-catalog__sidebar,
	.elementor-element .ppc-catalog__sidebar,
	.ppc-catalog__sidebar {
		order: 1;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		padding: 0;
		grid-column: auto !important;
	}

	.elementor-widget-shortcode .ppc-catalog__content,
	.elementor-element .ppc-catalog__content,
	.ppc-catalog__content {
		display: block !important;
		order: 2;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		padding: 0;
		grid-column: auto !important;
		overflow: visible !important;
		visibility: visible !important;
		opacity: 1 !important;
	}

	.ppc-catalog--content-only,
	.ppc-catalog--sidebar-only {
		display: block !important;
		grid-template-columns: none !important;
	}

	/* Category trigger bar */
	.ppc-sidebar-mobile__trigger {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		margin: 0;
		padding: 16px 20px;
		background: var(--ppc-green) !important;
		color: #fff !important;
		border: 0;
		border-radius: 0;
		font-family: var(--e-global-typography-primary-font-family), sans-serif;
		font-size: 16px !important;
		font-weight: 700;
		text-align: left;
		cursor: pointer;
	}

	.ppc-sidebar-mobile__trigger-icon {
		flex: 0 0 28px;
		width: 28px;
		height: 28px;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgba(255, 255, 255, 0.2);
		border-radius: 50%;
		position: relative;
	}

	.ppc-sidebar-mobile__trigger-icon::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 7px;
		height: 7px;
		border-right: 2px solid #fff;
		border-bottom: 2px solid #fff;
		transform: translate(-50%, -50%) rotate(-45deg);
		transition: transform 0.3s ease;
	}

	.ppc-sidebar-mobile.is-open .ppc-sidebar-mobile__trigger-icon::after {
		transform: translate(-50%, -50%) rotate(45deg);
	}

	.ppc-sidebar-mobile__backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 9998;
		background: rgba(0, 0, 0, 0.5);
	}

	.ppc-sidebar-mobile__backdrop[hidden] {
		display: none !important;
	}

	.ppc-sidebar-mobile__panel {
		display: flex;
		flex-direction: column;
		position: fixed;
		inset: 0;
		z-index: 9999;
		width: 100%;
		max-width: 100%;
		height: 100%;
		height: 100dvh;
		background: #fff;
		overflow: hidden;
	}

	.ppc-sidebar-mobile__panel[hidden] {
		display: none !important;
	}

	.ppc-sidebar-mobile__panel-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex: 0 0 auto;
		padding: 16px 20px;
		background: var(--ppc-sidebar-header-bg);
		border-bottom: 1px solid var(--ppc-border);
	}

	.ppc-sidebar-mobile__panel-title {
		font-family: var(--e-global-typography-primary-font-family), sans-serif;
		font-size: 1.125rem;
		font-weight: 700;
		color: var(--ppc-green);
	}

	.ppc-sidebar-mobile__close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0;
		background: transparent !important;
		color: var(--ppc-green) !important;
		border: 1px solid var(--ppc-border);
		border-radius: 50%;
		font-size: 1.5rem;
		line-height: 1;
		cursor: pointer;
	}

	.ppc-sidebar-mobile__panel .ppc-categories-panel {
		flex: 1;
		border: 0;
		border-radius: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.ppc-product {
		flex-direction: column;
		align-items: stretch;
		gap: 18px;
		padding: 16px;
	}

	.ppc-product__media {
		flex: 0 0 auto;
		width: 100%;
	}

	.ppc-product__image {
		height: 200px;
	}

	.ppc-product__body {
		gap: 16px;
		padding: 0;
	}

	.ppc-product__title {
		font-size: 22px !important;
	}

	.ppc-product__read-more {
		width: 100%;
	}

	.ppc-type-icons {
		margin-bottom: 20px;
	}

	.ppc-type-icons__item {
		flex: 0 0 92px;
		width: 92px;
	}

	.ppc-type-icons__circle {
		width: 76px;
		height: 76px;
	}

	.ppc-type-icons__image,
	.ppc-type-icons__fallback {
		width: 48px;
		height: 48px;
	}

	.ppc-type-icons__label {
		font-size: 0.75rem;
	}
}

@media (min-width: 1025px) {
	.elementor-widget-shortcode .ppc-catalog__content,
	.elementor-element .ppc-catalog__content,
	.ppc-catalog__content {
		min-width: 0;
	}

	.ppc-sidebar-mobile__panel {
		display: block !important;
		position: static;
		inset: auto;
		width: 100%;
		height: auto;
		max-width: none;
		background: transparent;
		overflow: visible;
	}

	.ppc-sidebar-mobile__panel[hidden] {
		display: block !important;
	}

	.ppc-categories__header--desktop {
		display: block;
	}
}

@media (max-width: 1024px) {
	.ppc-categories__header--desktop {
		display: none;
	}
}

@media (max-width: 480px) {
	.ppc-product__title {
		font-size: 20px !important;
	}

	.ppc-accordion__trigger,
	.ppc-accordion__title {
		font-size: 16px !important;
	}

	.ppc-accordion__trigger {
		padding: 16px 18px;
	}
}
