/* Anakko Shop Kit — front-end styles. Colours follow the theme where possible. */

/* Order via WhatsApp */
.ansk-wa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 12px 0 0;
	padding: 12px 20px;
	background: #25d366;
	color: #fff !important;
	border-radius: var(--wp--custom--button-radius, 4px);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background .15s;
}
.ansk-wa-btn:hover,
.ansk-wa-btn:focus-visible { background: #1da851; }
.wc-proceed-to-checkout .ansk-wa-btn { display: flex; width: 100%; }
.ansk-wa-cart-wrap { max-width: 1200px; margin: 0 auto 32px; padding: 0 16px; text-align: right; }

/* Back in stock */
.ansk-bis { margin: 12px 0 16px; max-width: 460px; }
.ansk-bis-label { display: block; font-weight: 600; margin-bottom: 6px; }
.ansk-bis-row { display: flex; gap: 8px; }
.ansk-bis-email { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--wp--preset--color--line-strong, currentColor); border-radius: var(--wp--custom--button-radius, 4px); background: var(--wp--preset--color--tile, #fff); font: inherit; }
.ansk-bis-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.ansk-bis-btn {
	padding: 10px 18px;
	border: 0;
	border-radius: var(--wp--custom--button-radius, 4px);
	background: var(--wp--preset--color--primary, #111);
	color: var(--wp--preset--color--on-primary, #fff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.ansk-bis-btn[disabled] { opacity: .6; cursor: wait; }
.ansk-bis-msg { margin: 6px 0 0; font-size: .9em; min-height: 1.2em; }
.ansk-bis.is-done .ansk-bis-row { display: none; }

/* Live search */
.ansk-search-results {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	min-width: 280px;
	max-height: 70vh;
	overflow-y: auto;
	z-index: 9999;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #111);
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: var(--wp--custom--radius, 6px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	text-align: left;
}
.ansk-search-results[hidden] { display: none; }
.ansk-sr-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: inherit !important; text-decoration: none !important; }
.ansk-sr-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex: none; }
.ansk-sr-text { display: flex; flex-direction: column; min-width: 0; }
.ansk-sr-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ansk-sr-price { font-size: .9em; opacity: .8; }
.ansk-sr-price del { opacity: .6; }
.ansk-sr-item:hover, .ansk-sr-item.is-active, .ansk-sr-all:hover, .ansk-sr-all.is-active { background: rgba(0, 0, 0, .05); }
.ansk-sr-all { display: block; padding: 10px 12px; border-top: 1px solid rgba(0, 0, 0, .08); font-weight: 600; color: inherit !important; text-decoration: underline; }
.ansk-sr-empty { padding: 12px; opacity: .7; }

/* Swatches */
.ansk-swatch-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	padding: 0 !important;
}
.ansk-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.ansk-swatch {
	min-width: 48px;
	padding: 9px 14px;
	border: 1px solid var(--wp--preset--color--line-strong, rgba(0, 0, 0, .25));
	border-radius: var(--wp--custom--button-radius, 4px);
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
}
.ansk-swatch:hover { border-color: currentColor; }
.ansk-swatch.is-selected {
	border-color: var(--wp--preset--color--contrast, #111);
	background: var(--wp--preset--color--contrast, #111);
	color: var(--wp--preset--color--base, #fff);
}
.ansk-swatch.is-disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.variations_form .reset_variations { display: inline-block; margin-top: 6px; }

/* Loyalty points */
.ansk-lp-panel {
	margin: 0 0 24px;
	padding: 14px 18px;
	border: 1px solid var(--wp--preset--color--line, rgba(0, 0, 0, .12));
	border-radius: var(--wp--custom--radius, 6px);
	background: var(--wp--preset--color--surface, rgba(0, 0, 0, .025));
}
.ansk-lp-panel[hidden] { display: none; }
.ansk-lp-line { margin: 0 0 8px; }
.ansk-lp-line:last-child, .ansk-lp-small:last-child { margin-bottom: 0; }
.ansk-lp-small { margin: 0 0 8px; font-size: .9em; opacity: .8; }
.ansk-lp-btn {
	padding: 9px 16px;
	border: 0;
	border-radius: var(--wp--custom--button-radius, 4px);
	background: var(--wp--preset--color--primary, #111);
	color: var(--wp--preset--color--on-primary, #fff);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.ansk-lp-btn[disabled] { opacity: .6; cursor: wait; }
.ansk-lp-btn--link { padding: 0; background: none; color: inherit; text-decoration: underline; font-weight: 400; }
.ansk-lp-earn { margin: 0 0 12px; font-size: .95em; }
.ansk-lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.ansk-lp-card { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 1px solid var(--wp--preset--color--line, rgba(0, 0, 0, .12)); border-radius: var(--wp--custom--radius, 6px); background: var(--wp--preset--color--tile, transparent); }
.ansk-lp-card__label { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.ansk-lp-card__value { font-size: 1.6em; font-weight: 700; line-height: 1.2; }
.ansk-lp-card__sub { font-size: .85em; opacity: .75; }
.ansk-lp-rules ul { margin-top: 0; }
.ansk-lp-ref { width: 100%; max-width: 480px; padding: 8px 10px; font: inherit; }
.ansk-lp-history td:last-child, .ansk-lp-history th:last-child { text-align: right; white-space: nowrap; }
.ansk-lp-pos { color: #1a7f37; }
.ansk-lp-neg { color: #b42318; }
.ansk-lp-birthday { margin: 1em 0; }
.ansk-lp-birthday select { width: auto; margin-right: 8px; }

.ansk-bis-similar { display: inline-block; margin-top: 8px; font-size: .9em; text-decoration: underline; }

/* Same-day dispatch countdown */
.ansk-dispatch { display: inline-flex; align-items: center; gap: 0.5rem; }
.ansk-dispatch__icon { display: inline-flex; color: var(--wp--preset--color--accent, currentColor); }
.ansk-dispatch-product { margin: 12px 0 0; }
.ansk-dispatch-product .ansk-dispatch {
	display: flex;
	padding: 0.6rem 1rem;
	border-radius: var(--wp--custom--radius, 8px);
	font-weight: 600;
	font-size: 0.9375rem;
	background: color-mix(in srgb, var(--wp--preset--color--accent, #111) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--accent, #111) 40%, transparent);
}

/* Free delivery bar, sticky Add to basket bar, newsletter form */
.ansk-fdb {
	--ansk-fdb-fill: var(--wp--preset--color--accent, #111111);
	--ansk-fdb-done: var(--wp--preset--color--muted, #666666);
	margin: 0 0 var(--wp--preset--spacing--30, 1rem);
	padding: 1rem 1.15rem 1.15rem;
	background: var(--wp--preset--color--surface, #f4f4f5);
	color: var(--wp--preset--color--contrast, #111111);
	border-inline-start: 4px solid var(--ansk-fdb-fill);
	transition: border-color .3s ease;
}
.ansk-fdb[hidden] { display: none; }
.ansk-fdb.is-done { border-inline-start-color: var(--ansk-fdb-done); }
.ansk-fdb.is-done .ansk-fdb__fill { background: var(--ansk-fdb-done); }
.ansk-fdb--checkout { margin-bottom: var(--wp--preset--spacing--40, 1.5rem); }
.ansk-fdb--mini-cart { margin: 1.75rem 1rem 0.5rem; padding: 0.85rem 1rem; border-radius: var(--wp--custom--radius, 8px); }
.ansk-fdb--mini-cart .ansk-fdb__icon { display: none; }
.ansk-gfdb {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows .45s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
	background: var(--wp--preset--color--surface, #f4f4f5);
}
.ansk-gfdb.is-open { grid-template-rows: 1fr; opacity: 1; box-shadow: inset 0 -1px 0 var(--wp--preset--color--line, #e5e5e5); }
.ansk-gfdb.no-anim { transition: none; }
.ansk-gfdb:not(.is-open) .ansk-gfdb__inner { visibility: hidden; }
.ansk-fdb--global {
	display: flex;
	align-items: center;
	gap: 0.6rem 1.5rem;
	max-width: 1320px;
	margin: 0 auto;
	padding: 0.55rem var(--wp--style--root--padding-right, 1.5rem) 0.6rem var(--wp--style--root--padding-left, 1.5rem);
	background: transparent;
	border: 0;
}
.ansk-fdb--global .ansk-fdb__head { flex: 0 1 auto; flex-wrap: nowrap; gap: 0.6rem 1rem; }
.ansk-fdb--global .ansk-fdb__msg { flex: 0 1 auto; font-size: 0.85rem; }
.ansk-fdb--global .ansk-fdb__icon svg { width: 20px; height: 20px; }
.ansk-fdb--global .ansk-fdb__track { flex: 1 1 40%; margin-top: 0; height: 6px; min-width: 120px; }
@media (max-width: 781px) {
	.ansk-fdb--global { flex-direction: column; align-items: stretch; gap: 0.4rem; padding-top: 0.5rem; padding-bottom: 0.55rem; }
	.ansk-fdb--global .ansk-fdb__icon,
	.ansk-fdb--global .ansk-fdb__cta { display: none; }
	.ansk-fdb--global .ansk-fdb__msg { font-size: 0.8rem; text-align: center; }
	.ansk-fdb--global .ansk-fdb__track { flex: 0 0 auto; width: 100%; height: 4px; }
}
.ansk-satc {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 90;
	background: var(--wp--preset--color--base, #ffffff);
	color: var(--wp--preset--color--contrast, #111111);
	border-top: 1px solid var(--wp--preset--color--line, #e5e5e5);
	box-shadow: 0 -10px 30px rgb(9 8 13 / 0.10);
	padding: 0.6rem clamp(0.75rem, 4vw, 1.25rem) calc(0.6rem + env(safe-area-inset-bottom, 0px));
	transform: translateY(110%);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1);
	display: none;
}
.ansk-satc.is-visible { transform: translateY(0); }
@media (max-width: 781px) {
	.ansk-satc { display: block; }
}
@media (min-width: 782px) {
	.ansk-satc--desktop { display: block; }
	.ansk-satc--desktop .ansk-satc__img { width: 60px !important; height: 60px !important; }
	body.has-ds-satc:has(.ansk-satc--desktop) { padding-bottom: 84px; }
}
.ansk-newsletter { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ansk-newsletter input[type="email"] {
	flex: 1 1 14rem;
	min-height: 50px;
	padding: 0 1.25rem;
	border: 1px solid var(--wp--preset--color--line-strong, #cccccc);
	border-radius: var(--wp--custom--button-radius, 6px);
	background: var(--wp--preset--color--tile, #ffffff);
	color: inherit;
	font: inherit;
}
.ansk-newsletter .wp-element-button { min-height: 50px; cursor: pointer; }
.ansk-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.ansk-fdb__head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.ansk-fdb__icon { display: inline-flex; color: var(--wp--preset--color--contrast, #111111); flex: 0 0 auto; }
.ansk-fdb__msg { margin: 0; flex: 1 1 14rem; font-size: var(--wp--preset--font-size--small, 0.875rem); line-height: 1.45; }
.ansk-fdb__msg [hidden] { display: none !important; }
.ansk-fdb__amount { font-weight: 700; color: var(--wp--preset--color--contrast, #111111); white-space: nowrap; }
.ansk-fdb__done { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; color: var(--wp--preset--color--contrast, #111111); }
.ansk-fdb__cta {
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 2px solid var(--ansk-fdb-fill);
	white-space: nowrap;
}
.ansk-fdb__cta[hidden] { display: none; }
.ansk-fdb__track {
	position: relative;
	height: 8px;
	margin-top: 0.8rem;
	border-radius: var(--wp--custom--button-radius, 6px);
	background: var(--wp--preset--color--line, #e5e5e5);
	overflow: hidden;
}
.ansk-fdb__fill {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	border-radius: inherit;
	background: var(--ansk-fdb-fill);
	transition: width .6s cubic-bezier(.2, .8, .2, 1), background-color .3s ease;
}
.ansk-gfdb__inner { min-height: 0; overflow: hidden; }
.ansk-satc__inner { display: flex; align-items: center; gap: 0.75rem; max-width: 1320px; margin: 0 auto; }
.ansk-satc__img { width: 52px !important; height: 52px !important; object-fit: contain; background: var(--wp--preset--color--tile, #ffffff); outline: 1px solid var(--wp--preset--color--line, #e5e5e5); outline-offset: -1px; flex: 0 0 auto; padding: 3px; box-sizing: border-box; }
.ansk-satc__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.ansk-satc__designer { color: var(--wp--preset--color--muted, #666666); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.ansk-satc__title { font-size: 0.82rem; color: var(--wp--preset--color--muted, #666666); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ansk-satc__price { font-size: 0.95rem; font-weight: 700; }
.ansk-satc__price del { font-weight: 400; color: var(--wp--preset--color--muted, #666666); }
.ansk-satc__button.wp-element-button {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 0.8rem 1.2rem;
	font-size: 0.8rem;
	white-space: nowrap;
	cursor: pointer;
	position: relative;
}
.ansk-satc__button.is-loading { color: transparent !important; pointer-events: none; }
.ansk-satc__button.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 18px;
	height: 18px;
	border: 2px solid var(--wp--preset--color--on-primary, #ffffff);
	border-inline-end-color: transparent;
	border-radius: 50%;
	animation: ansk-spin .7s linear infinite;
}
.ansk-newsletter__msg { flex-basis: 100%; font-size: var(--wp--preset--font-size--small, 0.875rem); margin: 0.25rem 0 0; }
@media (prefers-reduced-motion: reduce) {
	.ansk-satc__button.is-loading::after { animation-duration: 2s; }
}

/* Colour / image swatches (Anakko Shop Kit Pro supplies the colours and images) */
.ansk-swatch.ansk-swatch--visual { width: 40px; height: 40px; min-width: 0; padding: 3px; border-radius: 999px; }
.ansk-swatch--visual .ansk-swatch__fill { display: block; width: 100%; height: 100%; border-radius: inherit; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.ansk-swatch.ansk-swatch--visual.is-selected { background: transparent; color: inherit; border-color: transparent; box-shadow: 0 0 0 2px var(--wp--preset--color--contrast, #111); }
.ansk-swatch--visual.is-disabled .ansk-swatch__fill { opacity: .35; }
.ansk-swatch--visual .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
