/* =========================================================
   eh-produk-hijau.css  —  Produk Ramah Lingkungan Section
   BEM: .eh-produk-hijau / .eh-ph__*
   ========================================================= */

/* ── CSS Variables ────────────────────────────────────── */
.eh-produk-hijau {
	--ph-green:       #2E7D32;
	--ph-green-light: #F0FAF4;
	--ph-text-dark:   #1A2332;
	--ph-text-mid:    #546E7A;
	--ph-text-light:  #78909C;
	--ph-card-bg:     #FFFFFF;
	--ph-border:      #D8EDE0;
	--ph-radius:      10px;
	--ph-gap:         14px;
	--ph-card-w:      180px;
}

/* ── Section wrapper ──────────────────────────────────── */
.eh-produk-hijau {
	display: block;
	width: 100%;
	background: var(--ph-green-light);
	padding: 24px 0 28px;
	box-sizing: border-box;
}

/* ── Inner container ──────────────────────────────────── */
.eh-ph__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ── Header row ───────────────────────────────────────── */
.eh-ph__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	gap: 12px;
}

.eh-ph__header-left {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.eh-ph__leaf {
	font-size: 16px;
	line-height: 1;
}

.eh-ph__heading {
	font-size: 15px;
	font-weight: 700;
	color: var(--ph-text-dark);
	margin: 0;
	line-height: 1.2;
	white-space: nowrap;
}

.eh-ph__view-all {
	font-size: 12.5px;
	font-weight: 500;
	color: var(--ph-green);
	text-decoration: none;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	transition: opacity 0.15s;
	flex-shrink: 0;
}

.eh-ph__view-all:hover {
	opacity: 0.72;
	text-decoration: underline;
}

/* ── Filter tab strip ─────────────────────────────────── */
.eh-ph__tabs-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.eh-ph__tabs-wrap:empty {
	display: none;
}

.eh-ph__tab {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 20px;
	border: 1.5px solid #C8E0CC;
	background: #FFFFFF;
	color: var(--ph-text-mid);
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	white-space: nowrap;
}

.eh-ph__tab:hover {
	border-color: var(--ph-green);
	color: var(--ph-green);
}

.eh-ph__tab.is-active,
.eh-ph__tab[aria-pressed="true"] {
	background: var(--ph-green);
	border-color: var(--ph-green);
	color: #FFFFFF;
}

/* ── Carousel wrapper ─────────────────────────────────── */
.eh-ph__carousel-wrap {
	position: relative;
}

/* ── Scrollable track ─────────────────────────────────── */
.eh-ph__track {
	display: flex;
	gap: var(--ph-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
	list-style: none;
	margin: 0;
	padding-left: 0;
}

.eh-ph__track::-webkit-scrollbar { display: none; }

/* ── Arrow buttons ────────────────────────────────────── */
.eh-ph__arrow {
	display: none;
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	z-index: 10;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1.5px solid #C8E0CC;
	background: #FFFFFF;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.eh-ph__arrow:hover {
	border-color: var(--ph-green);
	box-shadow: 0 4px 12px rgba(46,125,50,0.15);
}

.eh-ph__arrow svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--ph-text-dark);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.eh-ph__arrow--prev { left: -17px; }
.eh-ph__arrow--next { right: -17px; }
.eh-ph__arrow.is-visible { display: flex; }
.eh-ph__arrow.is-hidden  { opacity: 0.3; cursor: default; pointer-events: none; }

/* ── Single card item ─────────────────────────────────── */
.eh-ph__item {
	flex: 0 0 auto;
	width: var(--ph-card-w);
	scroll-snap-align: start;
}

.eh-ph__item.is-hidden {
	display: none;
}

.eh-ph__card {
	display: block;
	background: var(--ph-card-bg);
	border: 1px solid var(--ph-border);
	border-radius: var(--ph-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s, transform 0.2s;
}

.eh-ph__card:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,0.10);
	transform: translateY(-2px);
}

.eh-ph__card:focus-visible {
	outline: 2px solid var(--ph-green);
	outline-offset: 2px;
}

/* ── Card image ───────────────────────────────────────── */
.eh-ph__img-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #F5F5F5;
}

.eh-ph__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	background: #FFFFFF;
	transition: transform 0.35s ease;
}

.eh-ph__card:hover .eh-ph__img {
	transform: scale(1.04);
}

.eh-ph__img-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
	color: #A5D6A7;
	font-size: 32px;
}

/* ── Eco-label badge ──────────────────────────────────── */
.eh-ph__badge {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* ── Card body ────────────────────────────────────────── */
.eh-ph__body {
	padding: 8px 10px 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* ── Product name ─────────────────────────────────────── */
.eh-ph__name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ph-text-dark);
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Price ────────────────────────────────────────────── */
.eh-ph__price {
	font-size: 12px;
	color: var(--ph-green);
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

.eh-ph__price-unit {
	font-size: 10.5px;
	color: var(--ph-text-light);
	font-weight: 400;
}

/* ── Empty state ──────────────────────────────────────── */
.eh-ph__empty {
	color: var(--ph-text-light);
	font-size: 13px;
	margin: 0;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
	.eh-produk-hijau { --ph-card-w: 170px; }
}

@media (max-width: 768px) {
	.eh-produk-hijau {
		--ph-card-w: 155px;
		--ph-gap: 10px;
	}
	.eh-ph__inner { padding: 0 16px; }
	.eh-ph__header { flex-wrap: wrap; }
}

@media (max-width: 480px) {
	.eh-produk-hijau { --ph-card-w: 140px; }
	.eh-ph__heading { font-size: 13.5px; }
}
