/**
 * Storefront — Cart widget.
 *
 * Desain "kartu tiket" — port dari spec/widget/cart/cart-widget-design.html.
 * Selector di-scope ke .stfr-cart, class di-prefix `stfr-cart`.
 */

.stfr-cart {
	--stfr-primary: #2D5A4D;
	--stfr-primary-dark: #1D3B32;
	--stfr-accent: #D4B038;
	--stfr-accent-light: #E6C665;
	--stfr-n900: #1A1F1D;
	--stfr-n700: #4A5550;
	--stfr-n500: #8A9490;
	--stfr-n300: #D8DEDB;
	--stfr-n100: #F4F6F5;
	--stfr-white: #FFFFFF;
	--stfr-cream: #F7F6F0;
	--stfr-err: #B3402F;
	--stfr-display: 'Gilda Display', Georgia, 'Times New Roman', serif;
	--stfr-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--stfr-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
	font-family: var(--stfr-body);
	color: var(--stfr-n900);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	position: relative;
}

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

.stfr-cart :where(h2) {
	font-family: var(--stfr-display);
	font-weight: 400;
	margin: 0;
}

.stfr-cart :where(p) {
	margin: 0;
}

.stfr-cart :where(button) {
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
	border: none;
	background: none;
	color: inherit;
}

.stfr-cart :where(a) {
	text-decoration: none;
	color: inherit;
}

/* ^ :where() menjaga specificity reset ini tetap 0 — supaya class komponen
   (.stfr-cart__coupon-btn, __checkout, dst, specificity (0,1,0)) SELALU
   menang atas reset elemen generik (button/a punya specificity (0,1,1) yang
   lebih tinggi tanpa :where(), meng-clobber background/color-nya). */

.stfr-cart[data-js="1"] .stfr-cart__update {
	display: none;
}

.stfr-cart.is-loading {
	opacity: .6;
	pointer-events: none;
}

.stfr-cart__notices:empty {
	display: none;
}

/*
 * Tipis — teks kecil + ikon status, TANPA border/padding/box.
 *
 * WooCommerce (versi terkini) merender wc_print_notices() sebagai
 * ".wc-block-components-notice-banner" (Notice Banner dari WC Blocks),
 * BUKAN lagi markup klasik ".woocommerce-error/-message/-info". Target
 * keduanya — banner baru sebagai yang utama, class klasik sebagai
 * fallback kalau ada notice yang lewat template lama. SVG bawaan WC
 * (besar, gaya berbeda) disembunyikan, diganti ikon sendiri via ::before
 * supaya konsisten dengan gaya garis tipis widget ini.
 */
.stfr-cart__notices {
	margin: -16px 0 0 16px;
}

.stfr-cart__notices .wc-block-components-notice-banner,
.stfr-cart__notices .woocommerce-message,
.stfr-cart__notices .woocommerce-error,
.stfr-cart__notices .woocommerce-info {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	list-style: none;
	margin: 0 0 6px;
	/* !important: WooCommerce Blocks core (store-notices / wc-blocks
	   stylesheet) set padding:16px !important pada selector yang sama —
	   tidak bisa dikalahkan tanpa !important juga di sini. */
	padding: 0 !important;
	border: none;
	border-radius: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--stfr-n700);
	background: none;
}

.stfr-cart__notices .wc-block-components-notice-banner:last-child,
.stfr-cart__notices .woocommerce-message:last-child,
.stfr-cart__notices .woocommerce-error:last-child,
.stfr-cart__notices .woocommerce-info:last-child {
	margin-bottom: 0;
}

.stfr-cart__notices .wc-block-components-notice-banner svg {
	display: none;
}

.stfr-cart__notices .wc-block-components-notice-banner::before,
.stfr-cart__notices .woocommerce-message::before,
.stfr-cart__notices .woocommerce-error::before,
.stfr-cart__notices .woocommerce-info::before {
	content: "";
	flex-shrink: 0;
	width: 13px;
	height: 13px;
	margin-top: 2px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

/* Markup klasik (`.woocommerce-error` dkk, dipakai sebagian situs/versi
   WC alih-alih Notice Banner Blocks) biasanya render ikonnya sendiri lewat
   `::before` pada <li> (bukan pada elemen pembungkusnya) — matikan supaya
   tidak dobel dengan ikon custom di atas. */
.stfr-cart__notices .woocommerce-message li::before,
.stfr-cart__notices .woocommerce-error li::before,
.stfr-cart__notices .woocommerce-info li::before {
	content: none !important;
}

.stfr-cart__notices .wc-block-components-notice-banner__content {
	margin: 0;
}

.stfr-cart__notices .woocommerce-message li,
.stfr-cart__notices .woocommerce-error li,
.stfr-cart__notices .woocommerce-info li {
	list-style: none;
	margin: 0;
}

.stfr-cart__notices .wc-block-components-notice-banner.is-success,
.stfr-cart__notices .woocommerce-message {
	color: var(--stfr-primary);
}

.stfr-cart__notices .wc-block-components-notice-banner.is-success::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D5A4D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.5 2.5L16 9.5'/%3E%3C/svg%3E");
}

.stfr-cart__notices .wc-block-components-notice-banner.is-error,
.stfr-cart__notices .woocommerce-error {
	color: #b3261e;
}

.stfr-cart__notices .wc-block-components-notice-banner.is-error::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0392b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='7.5' x2='12' y2='13'/%3E%3Ccircle cx='12' cy='16.3' r='.15' fill='%23c0392b'/%3E%3C/svg%3E");
}

.stfr-cart__notices .wc-block-components-notice-banner.is-info,
.stfr-cart__notices .woocommerce-info {
	color: var(--stfr-n700);
}

.stfr-cart__notices .wc-block-components-notice-banner.is-info::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A9490' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='10.5' x2='12' y2='16'/%3E%3Ccircle cx='12' cy='7.7' r='.15' fill='%238A9490'/%3E%3C/svg%3E");
}

/* ---- Layout: 2 kolom (tiket | ringkasan) ---- */

.stfr-cart__layout {
	display: grid;
	grid-template-columns: 1.55fr 1fr;
	gap: 22px;
	align-items: start;
}

.stfr-cart__items {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* ---- Kartu tiket ----
 * Notch (lingkaran "gigitan" di seam stub/main) SENGAJA anak langsung
 * .stfr-cart__ticket, supaya overflow:hidden milik ticket memotongnya
 * persis di tengah — menyisakan separuh lingkaran yang menggigit tepi
 * kartu (efek "potongan tiket"). Border di notch bikin separuh lingkaran
 * itu kelihatan jelas sebagai potongan, bukan cuma titik pudar.
 */

.stfr-cart__ticket {
	display: flex;
	background: var(--stfr-white);
	border-radius: 20px;
	box-shadow: 0 30px 30px -56px rgba(26, 31, 29, .28);
	overflow: hidden;
	position: relative;
}

/* !important: tanpa ini, reset tombol bawaan tema/kit Elementor bisa
   bocor masuk (lihat catatan serupa di komponen lain file ini) — default
   HARUS merah+background merah opaque, bukan ikut warna tema. */
.stfr-cart__ticket-remove {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none !important;
	background: rgba(179, 64, 47, .12) !important;
	color: var(--stfr-err) !important;
	transition: background .15s, color .15s;
	z-index: 3;
}

.stfr-cart__ticket-remove:hover {
	background: rgba(179, 64, 47, .22) !important;
	color: var(--stfr-err) !important;
}

.stfr-cart__ticket-remove svg {
	width: 13px;
	height: 13px;
}

.stfr-cart__stub {
	width: 172px;
	flex-shrink: 0;
	background: linear-gradient(165deg, var(--stfr-primary) 0%, var(--stfr-primary-dark) 100%);
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 28px 14px;
	gap: 14px;
}

.stfr-cart__stub::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: -1px;
	width: 1px;
	background-image: linear-gradient(var(--stfr-n300) 60%, transparent 0%);
	background-size: 2px 12px;
	background-repeat: repeat-y;
}

.stfr-cart__ticket > .stfr-cart__notch {
	position: absolute;
	left: 172px;
	transform: translateX(-50%);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: white;
	border: 1.5px solid var(--stfr-n300);
	z-index: 4;
}

/* top/bottom -13px (bukan -14px) SENGAJA: overflow:hidden meng-clip di
   padding-edge, 1px DI DALAM border-edge (border-width ticket = 1px).
   Kalau notch dipusatkan pas di border-edge (y=0), sisa potongan
   berhenti 1px sebelum clip line — nyisain celah 1px yang menyingkap
   border kartu jadi kelihatan seperti garis di tengah notch. Geser 1px
   supaya pusat lingkaran notch pas di padding-edge (garis clip
   sesungguhnya) — potongan jadi rapat tanpa celah. */

.stfr-cart__ticket > .stfr-cart__notch--top {
	top: -13px;
}

.stfr-cart__ticket > .stfr-cart__notch--bottom {
	bottom: -13px;
}

.stfr-cart__seal {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 1.5px dashed rgba(230, 198, 101, .55);
	display: flex;
	align-items: center;
	justify-content: center;
}

.stfr-cart__seal-ring {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, var(--stfr-accent-light), var(--stfr-accent) 70%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.stfr-cart__seal-ring svg {
	width: 20px;
	height: 20px;
}

.stfr-cart__seal-ring-img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	border-radius: 50% !important;
}

.stfr-cart__stub-days {
	text-align: center;
	color: var(--stfr-white);
}

.stfr-cart__stub-days b {
	font-family: var(--stfr-display);
	font-size: 26px;
	line-height: 1;
	display: block;
}

.stfr-cart__stub-days span {
	font-size: 10px;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, .72);
	text-transform: uppercase;
}

.stfr-cart__stub-code {
	font-family: var(--stfr-mono);
	font-size: 10.5px;
	letter-spacing: 1px;
	color: var(--stfr-accent-light);
	text-align: center;
}

.stfr-cart__main {
	flex: 1;
	padding: 28px 30px 24px;
	border: 1px solid var(--stfr-n300);
	border-radius: 0 20px 20px 0;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.stfr-cart__kicker {
	font-size: 12px;
	font-weight: 600;
	color: var(--stfr-primary);
	letter-spacing: .3px;
	margin-bottom: 6px;
}

.stfr-cart__item-title {
	font-size: 26px;
	color: var(--stfr-n900);
	margin-bottom: 14px;
	padding-right: 20px;
}

.stfr-cart__item-title a {
	color: inherit;
}

.stfr-cart__item-title a:hover {
	color: var(--stfr-primary);
}

.stfr-cart__feats {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.stfr-cart__feats li {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 13.5px;
	color: var(--stfr-n700);
	line-height: 1.5;
}

.stfr-cart__feats svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--stfr-primary);
}

.stfr-cart__foot {
	margin-top: auto;
	padding-top: 18px;
	border-top: 1px dashed var(--stfr-n300);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.stfr-cart__qty {
	display: flex;
	align-items: center;
	gap: 2px;
	background: var(--stfr-n100);
	border-radius: 100px;
	padding: 4px;
}

.stfr-cart__qty--fixed {
	padding: 6px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--stfr-n700);
}

.stfr-cart__qty-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--stfr-n700);
	font-size: 16px;
	transition: background .15s, color .15s;
}

.stfr-cart__qty-btn:hover {
	background: var(--stfr-white);
	color: var(--stfr-primary);
}

.stfr-cart__qty-val {
	/* !important: beberapa page builder/tema (mis. style global "Form
	   Fields" Elementor) memaksa border/lebar/padding sendiri ke semua
	   <input> situs — stylesheet ini kebetulan jadi dependency Elementor
	   (`get_style_depends()`), jadi SELALU dimuat SEBELUM CSS halaman
	   & kit global-nya, walau specificity sama persis kita kalah lewat
	   urutan muat. !important di sini mengunci tampilan komponen ini. */
	width: 32px !important;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	padding: 0 !important;
	box-shadow: none !important;
	color: var(--stfr-n900);
	-moz-appearance: textfield;
}

.stfr-cart__qty-val::-webkit-outer-spin-button,
.stfr-cart__qty-val::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.stfr-cart__price {
	text-align: right;
}

.stfr-cart__price-unit {
	font-size: 12px;
	color: var(--stfr-n500);
	margin-bottom: 2px;
}

.stfr-cart__price-amt {
	font-family: var(--stfr-display);
	font-size: 24px;
	color: var(--stfr-n900);
}

/* ---- Ringkasan ---- */

.stfr-cart__summary {
	background: var(--stfr-white);
	border: 1px solid var(--stfr-n300);
	border-radius: 20px;
	padding: 26px 26px 24px;
	box-shadow: 0 30px 60px -36px rgba(26, 31, 29, .2);
	position: sticky;
	top: 24px;
}

.stfr-cart__summary h3 {
	font-size: 20px;
	margin-bottom: 20px;
}

.stfr-cart__coupon {
	display: flex;
	gap: 8px;
	margin-bottom: 22px;
}

.stfr-cart__coupon-input {
	/* !important — lihat catatan di `.stfr-cart__qty-val` soal kenapa CSS
	   widget ini bisa kalah cascade oleh style global page builder. */
	flex: 1;
	min-width: 0;
	height: 44px !important;
	border: 1px solid var(--stfr-n300) !important;
	border-radius: 100px !important;
	padding: 0 16px !important;
	font-family: inherit;
	font-size: 13.5px;
	color: var(--stfr-n900);
	background: var(--stfr-n100) !important;
	box-shadow: none !important;
}

.stfr-cart__coupon-input:focus {
	outline: none;
	border-color: var(--stfr-primary) !important;
	background: var(--stfr-white) !important;
	box-shadow: none !important;
}

.stfr-cart__coupon-btn {
	background: var(--stfr-n900) !important;
	color: var(--stfr-white) !important;
	font-size: 13.5px;
	font-weight: 600;
	padding: 0 20px;
	height: 44px;
	border: none !important;
	border-radius: 100px;
	white-space: nowrap;
	flex-shrink: 0;
}

.stfr-cart__coupon-btn:hover {
	background: var(--stfr-primary-dark) !important;
}

.stfr-cart__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 13px 0;
	border-top: 1px solid var(--stfr-n100);
	font-size: 14px;
	color: var(--stfr-n700);
}

.stfr-cart__row:first-child {
	border-top: none;
}

.stfr-cart__row--coupon {
	color: var(--stfr-primary);
}

.stfr-cart__coupon-percent {
	color: var(--stfr-n500);
	font-size: 12px;
	font-weight: 500;
}

.stfr-cart__remove-coupon {
	color: var(--stfr-n500);
	text-decoration: none;
	margin-left: 6px;
}

.stfr-cart__remove-coupon:hover {
	color: #b3261e;
}

.stfr-cart__row--total {
	border-top: 1px solid var(--stfr-n300);
	padding-top: 16px;
	margin-top: 2px;
}

.stfr-cart__row--total .lbl {
	font-size: 15px;
	font-weight: 600;
	color: var(--stfr-n900);
}

.stfr-cart__row--total .val {
	font-family: var(--stfr-display);
	font-size: 26px;
	color: var(--stfr-n900);
}

.stfr-cart__checkout {
	margin-top: 20px;
	width: 100%;
	background: var(--stfr-primary) !important;
	color: var(--stfr-white) !important;
	font-size: 15px;
	font-weight: 600;
	padding: 16px;
	border-radius: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: background .15s, transform .15s;
}

.stfr-cart__checkout:hover {
	background: var(--stfr-primary-dark) !important;
	transform: translateY(-1px);
}

.stfr-cart__checkout svg {
	width: 15px;
	height: 15px;
	transition: transform .15s;
}

.stfr-cart__checkout:hover svg {
	transform: translateX(3px);
}

.stfr-cart__update {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 11px;
	border: 1px solid var(--stfr-n300);
	border-radius: 100px;
	background: var(--stfr-white);
	font-size: 13px;
	font-weight: 600;
	color: var(--stfr-n700);
}

.stfr-cart__trust {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin-top: 16px;
	font-size: 11.5px;
	color: var(--stfr-n500);
}

.stfr-cart__trust svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

/* ---- Empty state ---- */

.stfr-cart__empty {
	background: var(--stfr-white);
	border: 1px solid var(--stfr-n300);
	border-radius: 24px;
	padding: 80px 40px;
	text-align: center;
	box-shadow: 0 30px 60px -36px rgba(26, 31, 29, .22);
}

.stfr-cart__empty-art {
	width: 96px;
	height: 96px;
	margin: 0 auto 30px;
	position: relative;
}

.stfr-cart__empty-stub {
	position: absolute;
	inset: 0;
	border: 1.5px dashed var(--stfr-n300);
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.stfr-cart__empty-stub svg {
	width: 38px;
	height: 38px;
	color: var(--stfr-n300);
}

.stfr-cart__empty-art .stfr-cart__notch {
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--stfr-white);
	border: 1.5px dashed var(--stfr-n300);
	left: auto;
	transform: none;
}

.stfr-cart__notch--l {
	left: -9px;
	top: 50%;
	margin-top: -8px;
	border-right: none;
}

.stfr-cart__notch--r {
	right: -9px;
	top: 50%;
	margin-top: -8px;
	border-left: none;
}

.stfr-cart__empty h2 {
	font-size: 28px;
	color: var(--stfr-n900);
	margin-bottom: 10px;
}

.stfr-cart__empty p {
	font-size: 14.5px;
	color: var(--stfr-n700);
	max-width: 380px;
	margin: 0 auto 32px;
	line-height: 1.6;
}

/* !important: ini <a>, bukan <button> — warna link tema/kit Elementor
   (biasanya ikut warna primary hijau juga) bisa menimpa `color` di sini
   kalau tidak dikunci, bikin teks nyaris tak kebaca di atas bg hijau. */
.stfr-cart__empty-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--stfr-primary);
	color: var(--stfr-white) !important;
	font-size: 14.5px;
	font-weight: 600;
	padding: 14px 28px;
	border-radius: 100px;
	text-decoration: none !important;
	transition: all .15s;
}

.stfr-cart__empty-cta:hover {
	background: var(--stfr-primary-dark);
	color: var(--stfr-white) !important;
	transform: translateY(-1px);
}

.stfr-cart__empty-cta svg {
	width: 14px;
	height: 14px;
}

.stfr-cart__empty-back {
	display: block;
	margin-top: 18px;
	font-size: 13px;
	color: var(--stfr-n500);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.stfr-cart__empty-back:hover {
	color: var(--stfr-primary);
}

/* ---- Responsive (breakpoint 760px, sesuai spec) ---- */

@media (max-width: 760px) {
	.stfr-cart__layout {
		grid-template-columns: 1fr;
	}
	.stfr-cart__ticket {
		flex-direction: column;
	}
	.stfr-cart__stub {
		width: 100%;
		flex-direction: row;
		padding: 18px 22px;
		gap: 16px;
		justify-content: flex-start;
	}
	.stfr-cart__stub::after {
		display: none;
	}
	.stfr-cart__ticket > .stfr-cart__notch {
		display: none;
	}
	.stfr-cart__seal {
		width: 48px;
		height: 48px;
		flex-shrink: 0;
	}
	.stfr-cart__seal-ring {
		width: 36px;
		height: 36px;
	}
	.stfr-cart__stub-days,
	.stfr-cart__stub-code {
		text-align: left;
	}
	.stfr-cart__main {
		padding: 22px 22px 20px;
	}
	.stfr-cart__summary {
		position: static;
	}
	.stfr-cart__empty {
		padding: 56px 24px;
	}
	.stfr-cart__empty h2 {
		font-size: 23px;
	}
}

/* Target sentuh minimal ~40px di mobile (spec §7) */

@media (max-width: 480px) {
	.stfr-cart__qty-btn {
		width: 40px;
		height: 40px;
	}
	.stfr-cart__ticket-remove {
		width: 36px;
		height: 36px;
	}
	.stfr-cart__coupon-btn {
		height: 44px;
		padding: 0 18px;
	}
}
