/*
 * Gajanayaka storefront UI refresh (2026-11).
 * Loaded after martfury.css. Presentation only: no route, form name or data
 * attribute that checkout, cart or payment scripts rely on is changed here.
 */

:root {
	--mf-yellow: #d3141c; /* brand red; the legacy token name is kept */
	--mf-orange: #b54708;
	--mf-green: #067647;
	--mf-blue: #1f4fbf;
	--mf-ink: #101418;
	--mf-text: #3f4650;
	--mf-muted: #667085;
	--mf-border: #e4e7ec;
	--mf-soft: #f5f6f8;
	--mf-font: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mf-dock-height: 62px;
	--mf-shadow: 0 10px 30px rgba(16, 24, 40, 0.1);
	--gsp-red: var(--mf-yellow);
	--gsp-red-dark: #a80f16;
	--gsp-red-tint: #fff1f1;
	--gsp-radius: 14px;
	--gsp-radius-sm: 10px;
	--gsp-control: 48px;
	--gsp-control-border: #d0d5dd;
	--gsp-focus: 0 0 0 3px rgba(211, 20, 28, 0.2);
	--gsp-card-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
	--gsp-gutter: 16px;
	--gsp-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--gsp-red);
	outline-offset: 2px;
}

/* ---------- Buttons ---------- */

.btn {
	border-radius: var(--gsp-radius-sm);
	font-weight: 600;
}

.btn-primary,
.btn-primary:not(:disabled):not(.disabled) {
	border-color: var(--gsp-red);
	background: var(--gsp-red);
	color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
	border-color: var(--gsp-red-dark);
	background: var(--gsp-red-dark);
	color: #fff;
}

:is(.btn-default, .btn-secondary, .btn-light, .btn-primary-light) {
	border: 1px solid var(--gsp-control-border);
	background: #fff;
	color: var(--mf-ink);
}

:is(.btn-default, .btn-secondary, .btn-light, .btn-primary-light):hover {
	border-color: var(--mf-ink);
	background: #fff;
	color: var(--mf-ink);
}

.gsp-checkout-submit,
.gsp-checkout-auth__actions a,
.gsp-bank-transfer-form button[type="submit"] {
	border-radius: var(--gsp-radius-sm) !important;
}

.gsp-checkout-submit {
	min-height: 52px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.gsp-checkout-submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ---------- Form fields ---------- */

:is(
	.gsp-checkout-field input,
	.gsp-checkout-field select,
	.gsp-checkout-field textarea,
	.gsp-bank-transfer-form input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
	.gsp-bank-transfer-form select,
	.gsp-bank-transfer-form textarea,
	.page-card .form-control,
	.cart-container .form-control,
	.gsp-mf-newsletter input[type="email"]
) {
	min-height: var(--gsp-control);
	padding: 12px 14px;
	border: 1px solid var(--gsp-control-border) !important;
	border-radius: var(--gsp-radius-sm) !important;
	background-color: #fff;
	color: var(--mf-ink);
	font-size: 16px !important; /* 16px stops iOS zooming into the field */
	line-height: 1.35;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

:is(
	.gsp-checkout-field input,
	.gsp-checkout-field select,
	.gsp-checkout-field textarea,
	.gsp-bank-transfer-form :is(input, select, textarea),
	.page-card .form-control,
	.cart-container .form-control,
	.gsp-mf-newsletter input[type="email"]
)::placeholder {
	color: #98a2b3;
}

:is(
	.gsp-checkout-field input,
	.gsp-checkout-field select,
	.gsp-checkout-field textarea,
	.gsp-bank-transfer-form :is(input, select, textarea),
	.page-card .form-control,
	.cart-container .form-control,
	.gsp-mf-newsletter input[type="email"]
):focus {
	border-color: var(--gsp-red) !important;
	box-shadow: var(--gsp-focus) !important;
	outline: 0;
}

:is(.gsp-checkout-field, .gsp-bank-transfer-form, .page-card, .cart-container) select {
	padding-right: 40px;
	-webkit-appearance: none;
	appearance: none;
	background-image: var(--gsp-select-chevron);
	background-position: right 15px center;
	background-repeat: no-repeat;
	background-size: 12px 8px;
}

/* The field rule above takes the specificity of its longest selector, so read-only states need !important. */
:is(.gsp-checkout-field, .gsp-bank-transfer-form) :is(input[readonly], select:disabled, input:disabled) {
	border-color: var(--mf-border) !important;
	background-color: var(--mf-soft) !important;
	color: var(--mf-muted) !important;
	box-shadow: none !important;
}

.gsp-checkout-field > span,
.gsp-checkout-field > label {
	color: var(--mf-ink);
	font-size: 14px;
	font-weight: 600;
}

.gsp-checkout-field small,
.gsp-checkout-field .gsp-checkout-field-error {
	font-size: 13px;
	line-height: 1.45;
}

.gsp-checkout-field [aria-invalid="true"] {
	border-color: #d92d20 !important;
	background-color: #fffbfa;
}

input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--gsp-red);
}

:is(.gsp-checkout, .cart-container, .page-card) :is(input[type="checkbox"], input[type="radio"]) {
	width: 18px;
	height: 18px;
}

/* ---------- Checkout ---------- */

.gsp-checkout-card,
.gsp-checkout-auth__card,
.gsp-bank-transfer-card,
.gsp-bank-transfer-summary {
	border-color: var(--mf-border);
	border-radius: var(--gsp-radius);
	box-shadow: var(--gsp-card-shadow);
}

.gsp-checkout-card__title h2 {
	font-size: 19px;
	letter-spacing: -0.01em;
}

.gsp-checkout__head p,
.gsp-checkout-card__eyebrow {
	font-size: 11px;
}

.gsp-checkout__head > a,
.gsp-checkout-card__title > a {
	font-size: 14px;
}

.gsp-checkout-payment--choice {
	border-radius: var(--gsp-radius-sm);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.gsp-checkout-payment--choice:has(input:checked) {
	border-color: var(--gsp-red) !important;
	background: var(--gsp-red-tint);
}

.gsp-checkout-payment--choice strong {
	font-size: 15px;
}

.gsp-checkout-payment--choice small {
	font-size: 13px;
	line-height: 1.45;
}

.gsp-checkout-assurance span {
	border-radius: var(--gsp-radius-sm);
	font-size: 12px;
}

/* ---------- Product cards ---------- */

.gsp-product-card,
.gsp-feature-card {
	overflow: hidden;
	border: 1px solid var(--mf-border) !important;
	border-radius: var(--gsp-radius);
	background: #fff;
	box-shadow: var(--gsp-card-shadow);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.gsp-product-card:hover,
.gsp-feature-card:hover {
	border-color: #d0d5dd !important;
	box-shadow: var(--mf-shadow);
}

.gsp-product-card > .list-image,
.gsp-feature-card__image {
	background: #fff;
}

.gsp-product-card__title,
.gsp-feature-card__title {
	color: var(--mf-ink) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	letter-spacing: -0.005em;
}

.gsp-product-card__title:hover,
.gsp-feature-card__title:hover {
	color: var(--gsp-red) !important;
}

.gsp-product-card__meta,
.gsp-feature-card__category {
	color: var(--mf-muted) !important;
	font-size: 12px !important;
	letter-spacing: 0.01em;
}

.gsp-product-card > .col-10 > .mt-2,
.gsp-feature-card__description {
	color: var(--mf-text) !important;
	font-size: 12.5px !important;
}

.gsp-product-card .product-price,
.gsp-feature-card__bottom strong {
	color: var(--mf-ink) !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	letter-spacing: -0.01em;
}

.gsp-product-card__stock,
.gsp-feature-card__bottom span {
	display: inline-flex;
	width: fit-content;
	align-items: center;
	gap: 6px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 12px !important;
	font-weight: 600;
}

.gsp-product-card__stock::before,
.gsp-feature-card__bottom span::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

.gsp-product-card .in-stock,
.gsp-product-card .has-stock,
.gsp-feature-card__bottom .is-in-stock {
	background: #ecfdf3;
	color: var(--mf-green) !important;
}

.gsp-product-card .out-of-stock,
.gsp-feature-card__bottom .is-out-of-stock {
	background: #fff6ed;
	color: var(--mf-orange) !important;
}

.gsp-card-link,
.gsp-card-enquiry {
	font-size: 13px !important;
	font-weight: 600 !important;
}

.gsp-card-link {
	color: var(--gsp-red) !important;
}

.gsp-card-enquiry {
	color: var(--mf-text) !important;
}

/* Card actions: the inverted (white) icons were invisible on the white tray. */
.gsp-product-card__actions .like-action-list,
.gsp-product-card__actions .gsp-quick-view-trigger {
	border: 1px solid var(--mf-border) !important;
	border-radius: 50% !important;
	background: var(--mf-soft) !important;
	box-shadow: none !important;
}

.gsp-product-card__actions .like-action-list > img,
.gsp-product-card__actions .gsp-quick-view-trigger img {
	filter: brightness(0) !important;
	opacity: 0.72;
}

.gsp-product-card__actions .like-action-list.is-wished > img {
	filter: none !important;
	opacity: 1;
}

.gsp-product-card__actions .like-action-list.is-wished {
	border-color: var(--gsp-red) !important;
	background: var(--gsp-red-tint) !important;
}

.gsp-product-card__cart-action :is(.btn-add-to-cart-list, .btn-explore-variants, .gsp-go-to-cart) {
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--gsp-red) !important;
	box-shadow: 0 2px 6px rgba(211, 20, 28, 0.25) !important;
}

.gsp-product-card__cart-action .gsp-go-to-cart {
	background: var(--mf-ink) !important;
	box-shadow: none !important;
}

.gsp-product-card__cart-action :is(.btn-add-to-cart-list, .btn-explore-variants, .gsp-go-to-cart) img {
	filter: brightness(0) invert(1) !important;
	opacity: 1;
}

/* ---------- PayHere instalment offers ---------- */

.gsp-instalment-offer,
.gsp-instalment-note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 8px 0 0;
	padding: 9px 12px;
	border: 1px solid #b9e6cc;
	border-radius: var(--gsp-radius-sm);
	background: #effaf3;
	color: #05603a !important;
	font-size: 13px !important;
	font-weight: 600;
	line-height: 1.4;
}

.gsp-instalment-offer.is-free::before,
.gsp-instalment-note.is-free::before {
	content: "0%";
	flex: none;
	padding: 1px 6px;
	border-radius: 999px;
	background: #067647;
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	line-height: 1.6;
}

.gsp-instalment-offer[hidden],
.gsp-instalment-note[hidden] {
	display: none;
}

/* ---------- Product detail ---------- */

.gsp-detail-card .product-title {
	color: var(--mf-ink);
	font-weight: 650;
	letter-spacing: -0.015em;
}

.gsp-detail-card .item-cart {
	border-radius: var(--gsp-radius-sm);
}

.gsp-detail-purchase-actions .btn,
.gsp-detail-card .btn-add-to-cart,
.gsp-detail-card .gsp-contact-button {
	min-height: 48px;
	border-radius: var(--gsp-radius-sm) !important;
}

/* Touch screens have no hover: keep the wishlist, quick view and cart actions reachable. */
@media (hover: none) {
	.gsp-product-card__actions {
		visibility: visible;
		transform: none;
		opacity: 1;
		background: rgba(255, 255, 255, 0.92);
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	:root {
		--gsp-gutter: 14px;
	}

	.gsp-checkout,
	.gsp-bank-transfer {
		padding-right: var(--gsp-gutter);
		padding-left: var(--gsp-gutter);
	}

	.gsp-checkout__head {
		align-items: flex-start;
		flex-direction: column;
		gap: 6px;
		padding: 18px 0 14px;
	}

	.gsp-checkout__head h1 {
		font-size: 30px;
		letter-spacing: -0.03em;
	}

	.gsp-checkout__layout {
		gap: 16px;
		margin-top: 16px;
	}

	.gsp-checkout__form {
		gap: 16px;
	}

	.gsp-checkout-card {
		padding: 18px 16px;
	}

	.gsp-checkout-fields {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.gsp-checkout-auth__card {
		margin: 20px auto 40px;
		padding: 24px 18px;
	}

	.gsp-checkout-auth__actions {
		grid-template-columns: 1fr;
	}

	.gsp-checkout-auth__card ul {
		grid-template-columns: 1fr;
		text-align: left;
	}

	.gsp-checkout-auth__card li {
		display: flex;
		gap: 8px;
		font-size: 13px;
	}

	.gsp-checkout-auth__card li::before {
		margin: 0;
	}

	.gsp-product-card {
		min-height: 0;
	}

	/* A capped, clipped image box cut off the action row on portrait and square photos. */
	.gsp-product-card > .list-image {
		height: auto !important;
		max-height: none !important;
		padding: 10px 10px 0;
	}

	.gsp-product-card .product-list-link {
		height: auto !important;
		aspect-ratio: 1 / 1 !important;
	}

	.gsp-product-card > .col-10 {
		padding: 12px !important;
	}

	/* The catalogue description repeats the item name on small screens. */
	.gsp-product-card > .col-10 > .mt-2 {
		display: none !important;
	}

	.gsp-product-card__title,
	.gsp-feature-card__title {
		font-size: 13.5px !important;
	}

	.gsp-product-card .product-price,
	.gsp-feature-card__bottom strong {
		font-size: 16px !important;
	}

	.gsp-product-card__footer {
		padding-top: 10px;
	}

	.gsp-card-enquiry,
	.gsp-feature-card__description {
		display: none;
	}

	/* Product detail: Bootstrap's 90% column and row gutters pushed the text past the card edge. */
	.gsp-detail-card .product-page-content > .row {
		margin-right: 0;
		margin-left: 0;
	}

	.gsp-detail-card .product-details {
		width: 100%;
		max-width: 100% !important;
		padding-right: 0;
		padding-left: 0;
	}

	.gsp-detail-card .product-title {
		max-width: calc(100% - 44px);
		font-size: 20px;
		line-height: 1.3;
	}

	.gsp-detail-card .item-cart {
		margin-right: 0;
		margin-left: 0;
	}

	/* Cart page */
	body.gsp-cart-page main.container {
		width: auto;
		padding: 18px var(--gsp-gutter) 40px;
	}

	.cart-container :is(.frappe-card, .cart-items, .payment-summary, .cart-addresses) {
		border-radius: var(--gsp-radius);
	}

	.cart-container :is(.btn-light, .btn-default, .btn-secondary, .btn-primary, .btn-primary-light) {
		min-height: 46px;
		white-space: nowrap;
	}
}

/* Bottom quick-action dock: martfury.css shows it below 821px. */
@media (max-width: 820px) {
	body.gsp-has-mobile-dock {
		padding-bottom: calc(var(--mf-dock-height) + env(safe-area-inset-bottom, 0px));
	}

	.gsp-mobile-dock {
		height: calc(var(--mf-dock-height) + env(safe-area-inset-bottom, 0px)) !important;
		padding-bottom: env(safe-area-inset-bottom, 0px) !important;
		border-top: 1px solid var(--mf-border) !important;
		background: rgba(255, 255, 255, 0.97) !important;
		box-shadow: 0 -6px 20px rgba(16, 24, 40, 0.08) !important;
		-webkit-backdrop-filter: saturate(1.4) blur(10px);
		backdrop-filter: saturate(1.4) blur(10px);
	}

	.gsp-mobile-dock a {
		position: relative;
		display: flex !important;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		gap: 4px;
		background: transparent !important;
		color: var(--mf-text) !important;
		font-size: 11px !important;
		font-weight: 600 !important;
		text-decoration: none !important;
	}

	.gsp-mobile-dock a[aria-current="page"] {
		color: var(--gsp-red) !important;
	}

	.gsp-mobile-dock a[aria-current="page"]::before {
		content: "";
		position: absolute;
		top: 0;
		width: 28px;
		height: 3px;
		border-radius: 0 0 3px 3px;
		background: var(--gsp-red);
	}

	.gsp-mobile-dock .gsp-dock-icon {
		display: block;
		width: 22px;
		height: 22px;
		font-size: 0 !important;
	}

	.gsp-mobile-dock .gsp-dock-icon svg {
		width: 22px;
		height: 22px;
		fill: none;
		stroke: currentColor;
		stroke-linecap: round;
		stroke-linejoin: round;
		stroke-width: 1.8;
	}

	.gsp-mobile-dock a.gsp-dock-whatsapp {
		background: transparent !important;
		color: #128c4a !important;
	}

	.gsp-mobile-dock .gsp-dock-badge {
		position: absolute;
		top: 6px;
		left: calc(50% + 6px);
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		border-radius: 999px;
		background: var(--gsp-red);
		color: #fff;
		font-size: 10px;
		font-weight: 700;
		line-height: 17px;
		text-align: center;
	}
}

@media (max-width: 359px) {
	:root {
		--gsp-gutter: 12px;
	}

	.gsp-checkout__head h1 {
		font-size: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gsp-product-card,
	.gsp-feature-card,
	.gsp-product-card__actions {
		transition: none !important;
	}
}
