/*
 * Coffee (Halaqa) base — design tokens mapped to WoodMart variables.
 * Light/dark follows the theme: any [class*="color-scheme-light"] ancestor (dark site, dark section,
 * dark card) re-resolves the tokens, exactly like the theme's own elements.
 * Logical properties only → RTL/LTR automatic.
 */
.syf-coffee {
	--syf-coffee-ink: var(--wd-title-color, #242424);
	--syf-coffee-mute: var(--wd-text-color, #767676);
	--syf-coffee-accent: var(--wd-primary-color);
	--syf-coffee-red: var(--wd-alternative-color, #e63f35);
	--syf-coffee-peach: #ffccb6;
	--syf-coffee-peach-ink: #7a3b22;
	--syf-coffee-brown: #7c5544;
	--syf-coffee-good: #1f7a4d;
	--syf-coffee-star: #e5a92a;
	--syf-coffee-wa: #1f9d57;
	--syf-coffee-deep: color-mix(in srgb, var(--wd-primary-color) 70%, #000);
	--syf-coffee-tile: var(--bgcolor-white);
	--syf-coffee-bg2: var(--bgcolor-gray-100);
	--syf-coffee-line: var(--brdcolor-gray-300);
	--syf-coffee-glass: rgba(var(--bgcolor-white-rgb), .56);
	--syf-coffee-glass-2: rgba(var(--bgcolor-white-rgb), .78);
	--syf-coffee-glass-b: rgba(var(--bgcolor-white-rgb), .85);
	--syf-coffee-shadow: color-mix(in srgb, var(--wd-primary-color) 10%, transparent);
	--syf-coffee-dash: color-mix(in srgb, var(--wd-primary-color) 28%, transparent);
	--syf-coffee-ring-bg: color-mix(in srgb, var(--wd-primary-color) 10%, transparent);
	--syf-coffee-halo: rgba(255, 204, 182, .75);
	--syf-coffee-r-xl: 40px;
	--syf-coffee-r-lg: 30px;
	--syf-coffee-r-md: 20px;
	position: relative;
	color: var(--syf-coffee-mute);
}

.syf-coffee[class*="color-scheme-light"],
[class*="color-scheme-light"] .syf-coffee,
.syf-coffee [class*="color-scheme-light"] {
	--syf-coffee-ink: var(--wd-title-color, #fff);
	--syf-coffee-mute: var(--wd-text-color, rgba(255, 255, 255, .8));
	--syf-coffee-tile: #f1e9de;
	--syf-coffee-glass-b: rgba(255, 255, 255, .12);
	--syf-coffee-shadow: rgba(0, 0, 0, .35);
	--syf-coffee-dash: rgba(255, 255, 255, .28);
	--syf-coffee-ring-bg: rgba(255, 255, 255, .1);
	--syf-coffee-halo: rgba(255, 160, 120, .16);
	--syf-coffee-good: #6fd39f;
}

/* Glass surface */
.syf-coffee-glass {
	border: 1px solid var(--syf-coffee-glass-b);
	background: var(--syf-coffee-glass);
	box-shadow: 0 18px 50px var(--syf-coffee-shadow);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	backdrop-filter: blur(18px) saturate(150%);
}

/* Icons */
.syf-coffee .syf-coffee-ic {
	flex: none;
	width: 20px;
	height: 20px;
}

body:not(.rtl) .syf-coffee .syf-coffee-arrow {
	transform: scaleX(-1);
}

/* Section heading */
.syf-coffee-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 34px;
}

.syf-coffee-head-plain {
	display: block;
	margin-bottom: 0;
}

.syf-coffee-head-center {
	justify-content: center;
	text-align: center;
}

.syf-coffee-head-center .syf-coffee-sub {
	margin-inline: auto;
}

.syf-coffee-kick {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border: 1px solid var(--syf-coffee-glass-b);
	border-radius: 999px;
	background: var(--syf-coffee-glass);
	color: var(--syf-coffee-accent);
	font-weight: 800;
	font-size: .84rem;
}

.syf-coffee-kick::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--syf-coffee-red);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--syf-coffee-red) 20%, transparent);
}

.syf-coffee .syf-coffee-h2 {
	margin: 14px 0 0;
	color: var(--syf-coffee-ink);
	font-size: clamp(1.7rem, 3.4vw, 2.6rem);
	line-height: 1.3;
}

.syf-coffee .title em,
.syf-coffee .syf-coffee-h2 em {
	color: var(--syf-coffee-accent);
	font-style: normal;
}

.syf-coffee-sub {
	max-width: 620px;
	margin: 8px 0 0;
	color: var(--syf-coffee-mute);
}

/* Tag pill (slides, promo cards) */
.syf-coffee-tag {
	display: inline-block;
	align-self: flex-start;
	padding: 5px 14px;
	border-radius: 999px;
	background: var(--syf-coffee-peach);
	color: var(--syf-coffee-peach-ink);
	font-weight: 800;
	font-size: .82rem;
}

/* Buttons: theme .btn + design pill look */
.syf-coffee .syf-coffee-btn {
	--btn-padding: 5px 24px;
	--btn-height: 48px;
	--btn-font-size: 15px;
	--btn-brd-radius: 999px;
	gap: 8px;
	font-weight: 800;
	text-transform: none;
	white-space: nowrap;
}

.syf-coffee .syf-coffee-btn.btn-size-small {
	--btn-padding: 5px 16px;
	--btn-height: 40px;
	--btn-font-size: 14px;
}

.syf-coffee .syf-coffee-btn:hover {
	transform: translateY(-2px);
}

.syf-coffee .syf-coffee-btn.btn-color-primary {
	--btn-box-shadow: 0 12px 28px color-mix(in srgb, var(--wd-primary-color) 32%, transparent);
}

.syf-coffee .syf-coffee-btn-glass {
	--btn-color: var(--syf-coffee-ink);
	--btn-color-hover: var(--syf-coffee-ink);
	--btn-bgcolor: var(--syf-coffee-glass-2);
	--btn-bgcolor-hover: var(--syf-coffee-glass-b);
	--btn-brd-width: 1px;
	--btn-brd-color: var(--syf-coffee-glass-b);
	--btn-brd-color-hover: var(--syf-coffee-glass-b);
}

.syf-coffee .syf-coffee-btn-wa {
	--btn-color: #fff;
	--btn-color-hover: #fff;
	--btn-bgcolor: var(--syf-coffee-wa);
	--btn-bgcolor-hover: var(--syf-coffee-wa);
	--btn-box-shadow-hover: inset 0 0 0 1000px rgba(0, 0, 0, .1);
}

.syf-coffee .btn-color-white.syf-coffee-btn {
	--btn-color: var(--wd-primary-color);
	--btn-color-hover: var(--wd-primary-color);
}

.syf-coffee .syf-coffee-btn-ghost {
	--btn-color: currentColor;
	--btn-color-hover: currentColor;
	--btn-bgcolor: transparent;
	--btn-bgcolor-hover: transparent;
	--btn-box-shadow: inset 0 0 0 1.5px currentColor;
	--btn-box-shadow-hover: inset 0 0 0 1.5px currentColor;
	color: var(--syf-coffee-ink);
}

/* Round add-to-cart button (product cards in every widget) */
.syf-coffee .syf-coffee-add {
	position: relative;
	z-index: 2;
	display: grid;
	flex: none;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border-radius: 50%;
	background: var(--wd-primary-color);
	color: #fff;
	transition: transform .2s;
}

.syf-coffee .syf-coffee-add:hover {
	transform: rotate(90deg) scale(1.06);
	color: #fff;
}

.syf-coffee .syf-coffee-add.loading {
	opacity: .6;
	pointer-events: none;
}

.syf-coffee .syf-coffee-add.added {
	background: var(--syf-coffee-good);
}

/* Sale badges (control "Sale badge"); parent must be positioned with overflow hidden for the ribbon */
.syf-coffee-sale {
	position: absolute;
	z-index: 3;
	color: #fff;
	font-weight: 900;
	font-size: .78rem;
	line-height: 1.4;
	pointer-events: none;
}

.syf-coffee-sale-ribbon {
	top: 18px;
	inset-inline-end: -36px;
	width: 140px;
	padding-block: 4px;
	background: var(--syf-coffee-red);
	box-shadow: 0 6px 14px color-mix(in srgb, var(--syf-coffee-red) 35%, transparent);
	text-align: center;
	rotate: 45deg;
}

.rtl .syf-coffee-sale-ribbon {
	rotate: -45deg;
}

.syf-coffee-sale-stamp {
	top: 12px;
	inset-inline-end: 12px;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--syf-coffee-red);
	box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 8px 20px color-mix(in srgb, var(--syf-coffee-red) 40%, transparent);
	font-size: .95rem;
	line-height: 1.05;
	text-align: center;
}

.syf-coffee-sale-stamp small {
	display: block;
	font-weight: 700;
	font-size: .62rem;
}

.syf-coffee-sale-save {
	top: 12px;
	inset-inline-end: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding-block: 4px;
	padding-inline: 5px 12px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
	color: var(--syf-coffee-red);
}

.syf-coffee-sale-save i {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--syf-coffee-red);
	color: #fff;
	font-style: normal;
	font-size: .7rem;
}

.syf-coffee-sale-strip {
	top: 0;
	inset-inline: 0;
	padding: 5px 12px;
	background: linear-gradient(90deg, var(--syf-coffee-red), color-mix(in srgb, var(--syf-coffee-red) 60%, #ffb347));
	text-align: center;
}

.syf-coffee-sale-tag {
	top: 14px;
	inset-inline-start: 0;
	padding-block: 4px;
	padding-inline: 10px 14px;
	border-start-end-radius: 999px;
	border-end-end-radius: 999px;
	background: var(--syf-coffee-peach);
	color: var(--syf-coffee-peach-ink);
	font-size: .82rem;
}

/* Whole card clickable while inner buttons stay usable */
.syf-coffee .syf-coffee-stretch::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Product price in cards: sale price first, old price small */
.syf-coffee .syf-coffee-price {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	font-weight: 900;
}

.syf-coffee .syf-coffee-price del {
	order: 2;
	opacity: .7;
	font-weight: 400;
	font-size: .8em;
}

.syf-coffee .syf-coffee-price ins {
	text-decoration: none;
}

/* WooCommerce / theme color .amount with the primary color; the card decides instead */
.syf-coffee .syf-coffee-price .amount {
	color: inherit;
}

/* Round icon button (footer social) */
.syf-coffee-ib {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--syf-coffee-glass-b);
	border-radius: 50%;
	background: var(--syf-coffee-glass-2);
	color: var(--syf-coffee-ink);
	transition: transform .2s;
}

.syf-coffee-ib:hover {
	transform: scale(1.06);
	color: var(--syf-coffee-accent);
}

.syf-coffee-ib svg,
.syf-coffee-ib i {
	width: 19px;
	height: 19px;
	font-size: 18px;
	fill: currentColor;
}

/* Pills list (payments) */
.syf-coffee-cl {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.syf-coffee-cl span {
	padding: 7px 14px;
	border: 1px solid var(--syf-coffee-glass-b);
	border-radius: 999px;
	background: var(--syf-coffee-glass-2);
	color: var(--syf-coffee-ink);
	font-weight: 700;
	font-size: .86rem;
}

.syf-coffee-editor-note {
	padding: 20px;
	border: 1px dashed var(--syf-coffee-dash);
	border-radius: var(--syf-coffee-r-md);
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.syf-coffee *,
	.syf-coffee *::before,
	.syf-coffee *::after {
		transition-duration: .001ms !important;
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
	}
}
