/* ==========================================================================
   ClickMart – global layer: tokens, header, mobile menu, footer.
   Loaded after Shopfront's stylesheet. Scoped to .cm-* classes.
   ========================================================================== */

.cm-ui {
	--cm-ink: #0f1022;
	--cm-text: #3b3d52;
	--cm-muted: #6d6f82;
	--cm-line: #e7e7ee;
	--cm-soft: #f4f4f7;
	--cm-soft-2: #ececf2;
	--cm-brand: #19147a;
	--cm-brand-hover: #110d5a;
	--cm-sale: #c4262e;
	--cm-radius: 14px;
	--cm-ease: cubic-bezier(.2, .7, .2, 1);
	--cm-font: var(--cs-font-base-family, "Plus Jakarta Sans"), system-ui, -apple-system, "Segoe UI", sans-serif;
	--cm-font-display: var(--cs-font-headings-family, "Work Sans"), var(--cm-font);
}

/* Header height drives Shopfront's smart-sticky offsets. */
html:root {
	--cs-header-initial-height: 109px;
	--cs-header-height: 109px;
}

@media (min-width: 1024px) {
	html:root {
		--cs-header-initial-height: 118px;
		--cs-header-height: 118px;
	}
}

/* Utilities ---------------------------------------------------------------- */

.cm-ui .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cm-i {
	width: 22px;
	height: 22px;
	flex: none;
}

.cm-ui :is(.cm-header, .cm-offcanvas, .cm-footer, .cm-home) :focus-visible {
	outline: 2px solid var(--cm-brand);
	outline-offset: 2px;
	border-radius: 6px;
}

.cm-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--cm-ink);
	cursor: pointer;
	transition: background-color .2s var(--cm-ease);
}

.cm-icon-btn:hover {
	background: var(--cm-soft);
}

.cm-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-chip {
	display: inline-flex;
	align-items: center;
	height: 40px;
	padding: 0 16px;
	border: 1px solid var(--cm-line);
	border-radius: 999px;
	background: #fff;
	color: var(--cm-ink);
	font-family: var(--cm-font);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: border-color .2s var(--cm-ease), background-color .2s var(--cm-ease);
}

.cm-chip:hover {
	border-color: var(--cm-ink);
	color: var(--cm-ink);
}

.cm-chips--sm .cm-chip {
	height: 36px;
	padding: 0 14px;
	font-size: 13px;
}

/* Header ------------------------------------------------------------------- */

.cm-ui .cs-header.cm-header {
	background: #fff;
	border-bottom: 1px solid var(--cm-line);
	box-shadow: none;
	font-family: var(--cm-font);
}

.cm-header__bar {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas:
		"menu logo actions"
		"search search search";
	align-items: center;
	column-gap: 4px;
	row-gap: 6px;
	padding-top: 6px;
	padding-bottom: 8px;
}

.cm-header__menu {
	grid-area: menu;
	margin-left: -10px;
}

.cm-header__logo {
	grid-area: logo;
	display: flex;
	align-items: center;
	min-width: 0;
}

.cm-header .cs-logo {
	display: flex;
	align-items: center;
	margin: 0;
}

.cm-header .cs-header__logo {
	display: inline-flex;
	align-items: center;
	padding: 0;
	margin: 0;
}

.cm-ui:not([data-scheme="dark"]) :is(.cm-header, .cm-footer) .cs-logo-dark,
.cm-ui[data-scheme="dark"] :is(.cm-header, .cm-footer) .cs-logo-default {
	display: none !important;
}

.cm-header .cs-header__logo img {
	display: block;
	width: auto;
	height: 26px;
	max-width: none;
	aspect-ratio: 161 / 33;
}

.cm-search {
	grid-area: search;
	position: relative;
	display: flex;
	align-items: center;
	height: 44px;
	margin: 0;
}

.cm-search > .cm-i {
	position: absolute;
	left: 14px;
	width: 20px;
	height: 20px;
	color: var(--cm-muted);
	pointer-events: none;
}

.cm-ui .cm-search__input {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 16px 0 44px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--cm-soft);
	color: var(--cm-ink);
	font-family: var(--cm-font);
	font-size: 16px; /* 16px avoids iOS zoom on focus */
	font-weight: 500;
	line-height: 44px;
	box-shadow: none;
	transition: border-color .2s var(--cm-ease), background-color .2s var(--cm-ease);
	-webkit-appearance: none;
	appearance: none;
}

.cm-ui .cm-search__input::placeholder {
	color: var(--cm-muted);
	opacity: 1;
}

.cm-ui .cm-search__input:focus {
	outline: none;
	border-color: var(--cm-ink);
	background: #fff;
}

.cm-search__submit {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	padding: 0;
}

.cm-header__actions {
	grid-area: actions;
	display: flex;
	align-items: center;
	gap: 2px;
	margin-right: -10px;
}

.cm-header__action,
.cm-header .cs-header__cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	height: 44px;
	padding: 0 10px;
	margin: 0;
	border-radius: 999px;
	color: var(--cm-ink);
	font-family: var(--cm-font);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s var(--cm-ease);
}

.cm-header__action:hover,
.cm-header .cs-header__cart:hover {
	background: var(--cm-soft);
	color: var(--cm-ink);
}

.cm-header__action-label,
.cm-header .cs-header__cart-label {
	display: none;
}

.cm-header .cs-header__cart .cs-icon {
	display: none;
}

.cm-header .cs-header__cart::before {
	content: "";
	width: 22px;
	height: 22px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l-1 13H7L6 7z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 7h12l-1 13H7L6 7z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cm-header .cs-header__cart-quantity {
	position: absolute;
	top: 4px;
	right: 2px;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	margin: 0;
	border-radius: 999px;
	background: var(--cm-brand);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

/* Category nav (desktop) */
.cm-nav {
	display: none;
}

.cm-nav__list {
	display: flex;
	align-items: center;
	gap: 28px;
	height: 48px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}

.cm-nav__list::-webkit-scrollbar {
	display: none;
}

.cm-nav__list a {
	position: relative;
	display: flex;
	align-items: center;
	height: 48px;
	color: var(--cm-text);
	font-family: var(--cm-font);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
	transition: color .2s var(--cm-ease);
}

.cm-nav__list a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s var(--cm-ease);
}

.cm-nav__list a:hover,
.cm-nav__list a[aria-current="page"] {
	color: var(--cm-ink);
}

.cm-nav__list a:hover::after,
.cm-nav__list a[aria-current="page"]::after {
	transform: scaleX(1);
}

.cm-nav__list .cm-nav__deals a {
	color: var(--cm-sale);
	font-weight: 600;
}

@media (min-width: 1024px) {
	.cm-header__bar {
		grid-template-columns: auto minmax(0, 620px) 1fr;
		grid-template-areas: "logo search actions";
		column-gap: 40px;
		height: 68px;
		padding-top: 0;
		padding-bottom: 0;
	}

	.cm-header__menu {
		display: none;
	}

	.cm-header .cs-header__logo img {
		height: 28px;
	}

	.cm-header__actions {
		justify-self: end;
	}

	.cm-nav {
		display: block;
		border-top: 1px solid var(--cm-line);
	}
}

@media (min-width: 1024px) and (max-width: 1199px) {
	.cm-nav__list {
		gap: 20px;
	}

	.cm-nav__list a {
		font-size: 13.5px;
	}
}

@media (min-width: 1200px) {
	.cm-header__action-label,
	.cm-header .cs-header__cart-label {
		display: inline;
	}

	.cm-header .cs-header__cart-label span {
		font: inherit;
	}

	.cm-header__action,
	.cm-header .cs-header__cart {
		padding: 0 14px;
	}

	.cm-header .cs-header__cart-quantity {
		position: static;
	}
}

/* Mobile menu (Shopfront off-canvas container) ------------------------------ */

.cm-ui .cs-offcanvas.cm-offcanvas {
	--cs-offcanvas-width: min(88vw, 360px);
	background: #fff;
	font-family: var(--cm-font);
}

.cm-ui .cm-offcanvas__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: auto;
	min-height: 60px;
	padding: 8px 10px 8px 20px;
	border-bottom: 1px solid var(--cm-line);
	background: #fff;
}

.cm-offcanvas__heading {
	color: var(--cm-ink);
	font-size: 16px;
	font-weight: 600;
}

.cm-ui .cm-offcanvas .cs-offcanvas__nav {
	margin: 0 0 0 auto;
	padding: 0;
}

.cm-ui .cm-offcanvas .cs-offcanvas__sidebar {
	padding: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.cm-ui .cm-offcanvas__inner {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 4px 20px 40px;
}

.cm-offcanvas__label {
	margin: 20px 0 8px;
	color: var(--cm-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.cm-offcanvas__list,
.cm-offcanvas__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-offcanvas__list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
	border-bottom: 1px solid var(--cm-line);
	color: var(--cm-ink);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
}

.cm-offcanvas__list a::after {
	content: "";
	width: 7px;
	height: 7px;
	border-top: 1.6px solid var(--cm-muted);
	border-right: 1.6px solid var(--cm-muted);
	transform: rotate(45deg);
}

.cm-offcanvas__list .cm-nav__deals a {
	color: var(--cm-sale);
}

.cm-offcanvas__links a {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--cm-text);
	font-size: 15px;
	text-decoration: none;
}

.cm-offcanvas__links a:hover,
.cm-offcanvas__list a:hover {
	color: var(--cm-brand);
}

/* Footer -------------------------------------------------------------------- */

.cm-ui .cs-footer.cm-footer {
	margin: 0;
	padding: 56px 0 28px;
	border-top: 1px solid var(--cm-line);
	background: var(--cm-soft);
	color: var(--cm-text);
	font-family: var(--cm-font);
	font-size: 14px;
}

.cm-footer__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 36px 24px;
}

.cm-footer__brand {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.cm-footer .cs-logo {
	margin: 0;
}

.cm-footer .cs-footer__logo img {
	display: block;
	width: auto;
	height: 26px;
	aspect-ratio: 161 / 33;
}

.cm-footer__tagline {
	margin: 0;
	color: var(--cm-ink);
	font-weight: 600;
}

.cm-footer .cs-footer__address {
	margin: 0;
	color: var(--cm-muted);
	font-size: 14px;
	line-height: 1.5;
}

.cm-footer__wa {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	color: var(--cm-ink);
	font-weight: 600;
	text-decoration: none;
}

.cm-footer__wa .cm-i {
	width: 20px;
	height: 20px;
	color: var(--cm-brand);
}

.cm-footer__social {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-footer__social a,
.cm-footer__list a {
	color: var(--cm-text);
	text-decoration: none;
	transition: color .2s var(--cm-ease);
}

.cm-footer__social a:hover,
.cm-footer__list a:hover,
.cm-footer__wa:hover {
	color: var(--cm-brand);
}

.cm-footer__title {
	margin: 0 0 12px;
	color: var(--cm-ink);
	font-size: 14px;
	font-weight: 700;
}

.cm-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-footer__list li {
	margin: 0;
}

.cm-footer__list a {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
}

.cm-footer__pay {
	grid-column: 1 / -1;
}

.cm-footer__note {
	margin: 0 0 14px;
	color: var(--cm-muted);
	line-height: 1.5;
}

.cm-footer .cs-footer__info-promo img {
	display: block;
	width: auto;
	max-width: 240px;
	height: auto;
}

.cm-footer__bottom {
	margin-top: 44px;
	padding-top: 20px;
	border-top: 1px solid var(--cm-line);
	color: var(--cm-muted);
	font-size: 13px;
}

.cm-footer__bottom .cs-footer__copyright {
	margin: 0;
	color: inherit;
	font-size: inherit;
}

.cm-footer__bottom a {
	color: inherit;
}

@media (min-width: 768px) {
	.cm-footer__grid {
		grid-template-columns: 1.4fr 1fr 1fr;
	}

	.cm-footer__brand {
		grid-column: auto;
	}

	.cm-footer__pay {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.cm-ui .cs-footer.cm-footer {
		padding-top: 72px;
	}

	.cm-footer__grid {
		grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
		gap: 40px;
	}

	.cm-footer__pay {
		grid-column: auto;
	}
}

/* Live search suggestions -------------------------------------------------- */

.cm-search {
	z-index: 20;
}

.cm-suggest {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 30;
	max-height: min(70vh, 520px);
	overflow-y: auto;
	padding: 6px;
	border: 1px solid var(--cm-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(15, 16, 34, .12);
	font-family: var(--cm-font);
}

.cm-suggest__item {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: 10px;
	color: var(--cm-ink);
	text-decoration: none;
}

.cm-suggest__item:hover,
.cm-suggest__item.is-active {
	background: var(--cm-soft);
	color: var(--cm-ink);
}

.cm-suggest__img {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border-radius: 10px;
	background: var(--cm-soft);
}

.cm-suggest__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.cm-suggest__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.cm-suggest__name {
	overflow: hidden;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.cm-suggest__price {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	color: var(--cm-ink);
	font-size: 13px;
	font-weight: 600;
}

.cm-suggest__oos {
	color: var(--cm-muted);
	font-weight: 500;
}

.cm-suggest__empty {
	margin: 0;
	padding: 12px 10px;
	color: var(--cm-muted);
	font-size: 14px;
}

.cm-suggest__all {
	display: block;
	margin-top: 4px;
	padding: 12px 10px;
	border-top: 1px solid var(--cm-line);
	color: var(--cm-brand);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

/* Footer payment methods (only those enabled at checkout) */
.cm-pay-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-pay-chips li {
	padding: 6px 12px;
	border: 1px solid var(--cm-line);
	border-radius: 999px;
	background: #fff;
	color: var(--cm-ink);
	font-size: 13px;
	font-weight: 600;
}

/* WhatsApp chat button: compact on phones, never covering checkout. */
@media (max-width: 767px) {
	.cm-ui .wa__btn_popup .wa__btn_popup_txt {
		display: none !important;
	}

	.cm-ui .wa__btn_popup {
		right: 12px !important;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
		transform: scale(.86);
		transform-origin: bottom right;
		transition: bottom .2s var(--cm-ease);
	}

	.cm-ui.cm-has-sticky-cart .wa__btn_popup {
		bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

.cm-ui.woocommerce-checkout .wa__btn_popup,
.cm-ui.woocommerce-checkout .wa__popup_chat_box {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.cm-ui *,
	.cm-ui *::before,
	.cm-ui *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
