/**
 * Storefront — Product List. Semua selector di-scope ke .stfr-pl-wrap / .stfr-pl.
 * Mengikuti storefront-product-list-widget.html (HTML menang bila beda dengan teks).
 *
 * Token warna dikumpulkan di satu tempat (blok --stfr-pl-* di bawah) dan bisa
 * ditimpa lewat Controls Elementor. Breakpoint HTML: 1100 / 860 / 620.
 */

.stfr-pl-wrap {
	--stfr-pl-primary: #2d5a4d;
	--stfr-pl-primary-dark: #1d3b32;
	--stfr-pl-primary-light: #3e7a68;
	--stfr-pl-accent: #d4b038;
	--stfr-pl-accent-dark: #a9872b;
	--stfr-pl-accent-light: #e6c665;
	--stfr-pl-n900: #1a1f1d;
	--stfr-pl-n700: #4a5550;
	--stfr-pl-n500: #8a9490;
	--stfr-pl-n400: #b9c2be;
	--stfr-pl-n300: #d8dedb;
	--stfr-pl-n100: #f4f6f5;
	--stfr-pl-tint: #eaf0ec;
	--stfr-pl-success: #2f855a;
	position: relative;
	color: var(--stfr-pl-n900);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.stfr-pl-wrap *,
.stfr-pl-wrap *::before,
.stfr-pl-wrap *::after {
	box-sizing: border-box;
}

.stfr-pl__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.stfr-pl-wrap [hidden] {
	display: none !important;
}

/* ---- Tab Jenis ---- */
.stfr-pl__types {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.stfr-pl__type {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 20px 24px;
	border: 1.5px solid var(--stfr-pl-n300);
	border-radius: 16px;
	background: #fff;
	color: var(--stfr-pl-n900);
	font: inherit;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(26, 31, 29, .04);
	transition: border-color .15s, background-color .15s, color .15s, box-shadow .15s;
}

.stfr-pl__type:hover {
	border-color: var(--stfr-pl-primary-light);
}

.stfr-pl__type[aria-selected="true"] {
	border-color: var(--stfr-pl-primary);
	background: var(--stfr-pl-primary);
	color: #fff;
	box-shadow: 0 8px 24px rgba(45, 90, 77, .25);
}

.stfr-pl__type:focus-visible,
.stfr-pl__card:focus-within,
.stfr-pl__morebtn:focus-visible,
.stfr-pl__reset:focus-visible,
.stfr-pl-seg button:focus-visible,
.stfr-pl__btn:focus-visible {
	outline: 1px solid var(--stfr-pl-primary);
	outline-offset: 2px;
}

.stfr-pl__type[aria-selected="true"]:focus-visible {
	outline-color: var(--stfr-pl-accent);
}

.stfr-pl__type-ic {
	display: grid;
	flex: none;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--stfr-pl-tint);
	color: var(--stfr-pl-primary);
}

.stfr-pl__type[aria-selected="true"] .stfr-pl__type-ic {
	background: rgba(255, 255, 255, .14);
	color: var(--stfr-pl-accent-light);
}

.stfr-pl__type-ic svg,
.stfr-pl__type-ic i {
	width: 24px;
	height: 24px;
	font-size: 24px;
}

.stfr-pl__type-tx {
	display: block;
	min-width: 0;
}

.stfr-pl__type-title {
	display: block;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.stfr-pl__type-desc {
	display: block;
	margin-top: 2px;
	font-size: 14px;
	color: inherit;
	opacity: .78;
}

.stfr-pl__type-count {
	flex: none;
	margin-left: auto;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--stfr-pl-n100);
	color: var(--stfr-pl-primary);
	font-size: 13px;
	font-weight: 600;
}

.stfr-pl__type[aria-selected="true"] .stfr-pl__type-count {
	background: var(--stfr-pl-accent);
	color: var(--stfr-pl-n900);
}

/* ---- Toolbar ---- */
.stfr-pl-filter {
	position: relative;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.stfr-pl__types + .stfr-pl-filter {
	margin-top: 24px;
}

.stfr-pl-wrap .stfr-pl-filter .stfr-pl-filter__field {
	box-sizing: border-box;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--stfr-pl-n400);
	border-radius: 10px;
	background-color: #fff;
	color: var(--stfr-pl-n900);
	font: inherit;
	font-size: 15px;
	box-shadow: none;
}

.stfr-pl-wrap .stfr-pl-filter .stfr-pl-filter__field:focus {
	border-color: var(--stfr-pl-primary);
	outline: none;
}

.stfr-pl-filter__search {
	position: relative;
	display: block;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

.stfr-pl-filter__search svg {
	position: absolute;
	top: 50%;
	left: 16px;
	color: var(--stfr-pl-n500);
	transform: translateY(-50%);
	pointer-events: none;
}

.stfr-pl-wrap .stfr-pl-filter__search .stfr-pl-filter__field {
	width: 100%;
	padding-left: 46px;
}

/* Dropdown kategori (select-only combobox) */
.stfr-pl-dd {
	position: relative;
	flex: 0 0 auto;
}

.stfr-pl-dd--acc {
	display: none;
}

.stfr-pl-wrap .stfr-pl-dd--sort .stfr-pl-dd__btn {
	min-width: 150px;
}

.stfr-pl-dd__v {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.stfr-pl-wrap .stfr-pl-dd__btn {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-width: 240px;
	text-align: left;
	cursor: pointer;
}

.stfr-pl-wrap .stfr-pl-dd--sort .stfr-pl-dd__btn,
.stfr-pl-wrap .stfr-pl-dd--acc .stfr-pl-dd__btn {
	min-width: 150px;
}

.stfr-pl-wrap .stfr-pl-filter .stfr-pl-dd__btn[aria-expanded="true"] {
	border-color: var(--stfr-pl-primary);
	outline: none;
}

.stfr-pl-dd__l {
	color: var(--stfr-pl-n500);
}

.stfr-pl-dd__v {
	font-weight: 600;
	color: var(--stfr-pl-n900);
}

.stfr-pl-dd__n {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--stfr-pl-tint);
	color: var(--stfr-pl-primary);
	font-size: 12px;
	font-weight: 600;
}

.stfr-pl-dd__chev {
	margin-left: auto;
	color: var(--stfr-pl-n700);
	transition: transform .15s;
}

.stfr-pl-dd__btn[aria-expanded="true"] .stfr-pl-dd__chev {
	transform: rotate(180deg);
}

.stfr-pl-dd__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 20;
	width: max-content;
	min-width: 100%;
	max-width: calc(100vw - 32px);
	max-height: 340px;
	margin: 0;
	padding: 6px;
	overflow: auto;
	border: 1px solid var(--stfr-pl-n300);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 16px 40px rgba(26, 31, 29, .14);
	list-style: none;
}

.stfr-pl-dd__panel.is-up {
	top: auto;
	bottom: calc(100% + 6px);
}

.stfr-pl-dd__panel li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin: 0;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--stfr-pl-n700);
	font-size: 15px;
	cursor: pointer;
}

.stfr-pl-dd__panel li small {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--stfr-pl-n100);
	color: var(--stfr-pl-n500);
	font-size: 12px;
	font-weight: 600;
}

.stfr-pl-dd__panel li:hover,
.stfr-pl-dd__panel li.is-hl {
	background: var(--stfr-pl-n100);
	color: var(--stfr-pl-n900);
}

.stfr-pl-dd__panel li[aria-selected="true"] {
	background: var(--stfr-pl-tint);
	color: var(--stfr-pl-primary-dark);
	font-weight: 600;
}

.stfr-pl-dd__panel li[aria-selected="true"] small {
	background: #fff;
	color: var(--stfr-pl-primary);
}

.stfr-pl-dd__panel li.is-all {
	margin-bottom: 4px;
	border-bottom: 1px solid var(--stfr-pl-n300);
	border-radius: 8px 8px 0 0;
}

.stfr-pl-dd__panel li.is-zero {
	opacity: .45;
}

/* Pengalih akses */
.stfr-pl-seg {
	display: flex;
	gap: 2px;
	padding: 4px;
	border-radius: 10px;
	background: var(--stfr-pl-n100);
}

.stfr-pl-seg button {
	height: 40px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--stfr-pl-n700);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}

.stfr-pl-seg button[aria-pressed="true"] {
	background: #fff;
	color: var(--stfr-pl-primary);
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(26, 31, 29, .12);
}

/* ---- Baris hasil ---- */
.stfr-pl__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 24px 0 16px;
	color: var(--stfr-pl-n700);
	font-size: 14px;
}

.stfr-pl__meta b {
	color: var(--stfr-pl-n900);
}

.stfr-pl-wrap .stfr-pl__reset {
	height: auto;
	box-shadow: none;
	text-transform: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--stfr-pl-primary);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.stfr-pl__types + .stfr-pl,
.stfr-pl-filter + .stfr-pl {
	margin-top: 24px;
}

/* ---- Grid ---- */
.stfr-pl {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	transition: opacity .15s ease;
}

.stfr-pl[data-kind="official"] {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 24px;
}

.stfr-pl[aria-busy="true"] {
	opacity: .6;
}

/* ---- Kartu ---- */
.stfr-pl__card {
	--stfr-pl-pad: 16px;
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--stfr-pl-n300);
	border-radius: 14px;
	background: #fff;
	transition: transform .18s, box-shadow .18s, border-color .18s;
}

.stfr-pl[data-kind="official"] .stfr-pl__card {
	--stfr-pl-pad: 20px;
}

.stfr-pl__card:hover {
	border-color: var(--stfr-pl-n400);
	box-shadow: 0 12px 32px rgba(26, 31, 29, .10);
	transform: translateY(-3px);
}

.stfr-pl__thumb {
	/* Atas mengikuti lengkung kartu; bawah ikut melengkung hanya bila kartu diberi padding. */
	border-radius: calc(var(--stfr-pl-radius, 14px) - var(--stfr-pl-card-pad, 0px)) calc(var(--stfr-pl-radius, 14px) - var(--stfr-pl-card-pad, 0px)) calc(var(--stfr-pl-card-pad, 0px) * .5) calc(var(--stfr-pl-card-pad, 0px) * .5);
	position: relative;
	display: block;
	overflow: hidden;
	line-height: 0;
}

/* Latar abu hanya untuk placeholder tanpa gambar; kalau ada gambar, tidak ada lapisan di belakangnya. */
.stfr-pl__thumb.is-empty {
	background: var(--stfr-pl-n100);
}

.stfr-pl__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.stfr-pl__thumb.is-pos-top img {
	object-position: top;
}

.stfr-pl__thumb.is-empty,
.stfr-pl__thumb.is-generic {
	min-height: 120px;
}

.stfr-pl__ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--stfr-pl-n400);
}

.stfr-pl__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	line-height: 1.4;
}

.stfr-pl__card.is-badge-right .stfr-pl__badges {
	right: 10px;
	left: auto;
	justify-content: flex-end;
}

.stfr-pl__bd {
	white-space: nowrap;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .2px;
	line-height: 1.4;
}

.stfr-pl__bd.is-free {
	background: var(--stfr-pl-success);
	color: #fff;
}

.stfr-pl__bd.is-lic {
	background: rgba(255, 255, 255, .94);
	color: var(--stfr-pl-primary-dark);
}

.stfr-pl__bd.is-new {
	background: var(--stfr-pl-accent);
	color: var(--stfr-pl-n900);
}

.stfr-pl__body {
	display: block;
	padding: var(--stfr-pl-pad) var(--stfr-pl-pad) 4px;
}

.stfr-pl__label {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--stfr-pl-accent-dark);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .6px;
	text-transform: uppercase;
}

.stfr-pl__title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--stfr-pl-n900);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.stfr-pl__title a,
.stfr-pl__link {
	color: inherit;
	text-decoration: none;
}

/* Area klik seluruh kartu: satu tautan utama (judul), tombol Demo di atasnya. */
.stfr-pl__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.stfr-pl__excerpt {
	display: -webkit-box;
	margin: 6px 0 0;
	overflow: hidden;
	color: var(--stfr-pl-n700);
	font-size: 14px;
	line-height: 1.55;
	-webkit-line-clamp: var(--stfr-pl-lines, 2);
	-webkit-box-orient: vertical;
}

.stfr-pl__foot {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding: 12px var(--stfr-pl-pad) var(--stfr-pl-pad);
	color: var(--stfr-pl-n700);
	font-size: 13px;
}

.stfr-pl__info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin-top: 12px;
}

/* Satu item + pemisah di belakangnya tidak dipisah saat baris membungkus. */
.stfr-pl__it {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
	white-space: nowrap;
}

.stfr-pl__sep {
	display: inline-flex;
	flex: none;
	align-items: center;
	color: var(--stfr-pl-n400);
	font-size: var(--stfr-pl-sep-size, 14px);
	line-height: 1;
}

.stfr-pl__sep svg {
	width: var(--stfr-pl-sep-size, 14px);
	height: var(--stfr-pl-sep-size, 14px);
	fill: currentColor;
}

.stfr-pl__sep svg[stroke] {
	fill: none;
}

.stfr-pl__sep.is-line {
	width: 1px;
	height: var(--stfr-pl-sep-size, 12px);
	background: currentColor;
}

/* Badge akses di blok info: teks polos tanpa latar. */
.stfr-pl__info .stfr-pl__bd {
	padding: 0;
	background: none;
	border-radius: 0;
}

.stfr-pl__info .stfr-pl__bd.is-lic {
	color: var(--stfr-pl-primary-dark);
}

.stfr-pl__info .stfr-pl__bd.is-free {
	color: var(--stfr-pl-success);
}

.stfr-pl__tier {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--stfr-pl-accent-dark);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .4px;
	text-transform: uppercase;
	white-space: nowrap;
}

.stfr-pl__tier.is-free {
	color: var(--stfr-pl-success);
}

.stfr-pl__btn {
	position: relative;
	z-index: 2;
	display: inline-flex;
	flex: 1 1 auto;
	justify-content: center;
	white-space: nowrap;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--stfr-pl-n400);
	border-radius: 8px;
	background: #fff;
	color: var(--stfr-pl-primary);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s, color .15s, border-color .15s;
}

.stfr-pl__btn:hover,
.stfr-pl__btn:focus-visible {
	border-color: var(--stfr-pl-primary);
	background: var(--stfr-pl-primary);
	color: #fff;
}

.stfr-pl__btn.is-detail {
	flex-grow: 2;
}

.stfr-pl__btn-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.stfr-pl__btn-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.stfr-pl__btn-icon svg[stroke] {
	fill: none;
}

/* ---- Muat lebih banyak ---- */
.stfr-pl__more {
	display: flex;
	justify-content: center;
	margin: 40px 0 0;
}

.stfr-pl__morebtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	margin: 0;
	padding: 0 28px;
	border: 1.5px solid var(--stfr-pl-primary);
	border-radius: 10px;
	background: #fff;
	color: var(--stfr-pl-primary);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s;
}

.stfr-pl__morebtn:hover {
	background: var(--stfr-pl-tint);
}

.stfr-pl__morebtn:disabled {
	opacity: .7;
	cursor: progress;
}

/* ---- Status ---- */
.stfr-pl__empty {
	grid-column: 1 / -1;
	padding: 64px 16px;
	border: 1.5px dashed var(--stfr-pl-n300);
	border-radius: 16px;
	color: var(--stfr-pl-n700);
	text-align: center;
}

.stfr-pl__empty-title {
	margin: 0 0 8px;
	color: var(--stfr-pl-primary-dark);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.25;
}

.stfr-pl__empty p {
	margin: 0;
}

.stfr-pl__empty .stfr-pl__morebtn {
	margin-top: 20px;
}

.stfr-pl__empty-text {
	margin: 0;
	padding: 24px 0;
	color: var(--stfr-pl-n500);
	text-align: center;
}

.stfr-pl__error {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
	padding: 12px 16px;
	border: 1px solid #f1b5b5;
	border-radius: 10px;
	background: #fdf3f3;
	color: #8a2b2b;
	font-size: 14px;
}

.stfr-pl__note {
	padding: 12px 16px;
	border: 1px dashed var(--stfr-pl-n400);
	border-radius: 8px;
	color: var(--stfr-pl-n700);
	font-size: 13px;
}

.stfr-pl-dd__ic {
	display: none;
}

.stfr-pl-dd__ic svg,
.stfr-pl-dd__ic i {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

/* ---- Responsif ---- */
@media (max-width: 1100px) {
	.stfr-pl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.stfr-pl[data-kind="official"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.stfr-pl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.stfr-pl[data-kind="official"] { gap: 16px; }
}

/* Toolbar sempit: baris 1 pencarian penuh, baris 2 kontrol lain. */
@media (max-width: 980px) {
	.stfr-pl-filter { flex-wrap: wrap; }
	.stfr-pl-filter__search { flex: 1 1 100%; }
}

@media (max-width: 620px) {
	.stfr-pl[data-kind="official"] { grid-template-columns: minmax(0, 1fr); }

	/* Tab Jenis: dua kolom. */
	.stfr-pl__types { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.stfr-pl__type { gap: 8px; padding: 12px; }
	.stfr-pl__type-ic { width: 32px; height: 32px; border-radius: 8px; }
	.stfr-pl__type-ic svg,
	.stfr-pl__type-ic i { width: 18px; height: 18px; font-size: 18px; }
	.stfr-pl__type-tx { flex: 1; }
	.stfr-pl__type-title { font-size: 14px; line-height: 1.25; }
	.stfr-pl__type-desc { display: none; }
	.stfr-pl__type-count { padding: 2px 8px; font-size: 12px; }

	/* Toolbar: pencarian dan tiga dropdown (hanya ikon) dalam satu baris. */
	.stfr-pl-filter { flex-wrap: nowrap; gap: 8px; }
	.stfr-pl-filter__search { flex: 1 1 0; }
	.stfr-pl-seg { display: none; }
	.stfr-pl-dd,
	.stfr-pl-dd--acc { display: block; position: static; flex: 0 0 48px; width: 48px; }
	.stfr-pl-wrap .stfr-pl-dd__btn,
	.stfr-pl-wrap .stfr-pl-dd--sort .stfr-pl-dd__btn,
	.stfr-pl-wrap .stfr-pl-dd--acc .stfr-pl-dd__btn { position: relative; justify-content: center; width: 48px; min-width: 0; padding: 0; }
	.stfr-pl-dd__ic { display: inline-flex; align-items: center; justify-content: center; color: var(--stfr-pl-n700); }
	.stfr-pl-dd__l,
	.stfr-pl-dd__v,
	.stfr-pl-dd__n,
	.stfr-pl-dd__chev { display: none; }
	/* Titik penanda: filter di dropdown ini sedang aktif. */
	.stfr-pl-dd.is-active .stfr-pl-dd__btn::after { content: ""; position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--stfr-pl-accent); }
	.stfr-pl-dd.is-active .stfr-pl-dd__ic { color: var(--stfr-pl-primary); }
	/* Panel selebar baris filter, tepat di bawah baris. */
	.stfr-pl-dd__panel,
	.stfr-pl-dd__panel.is-up { top: calc(100% + 6px); right: 0; bottom: auto; left: 0; width: auto; min-width: 0; max-width: none; }

	.stfr-pl__title { font-size: 15px; }
	.stfr-pl__excerpt { font-size: 13px; }
	.stfr-pl__foot { flex-wrap: wrap; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.stfr-pl__card,
	.stfr-pl__card:hover,
	.stfr-pl-dd__chev,
	.stfr-pl {
		transition: none;
		transform: none;
	}
}
