/*
 * Landing page add to cart ([nuori_buy]) and its sticky bar.
 *
 * Not part of the PDF — it borrows the product panel's type, colours and
 * gradients so it reads as part of the page. Sizes inside the section use the
 * same container units as the rest of the landing page (1pt = 100cqw / 810).
 */

.wp-block-group.nuori-lp-buy { aspect-ratio: auto; overflow: visible; background: #fff; padding: 0 !important; }
.nuori-lp-buy .wp-block-shortcode { margin: 0; }

.nuori-buy {
	--teal: #00747a;
	--teal-ink: #056c84;
	--soft: #30888d;
	--gradient: linear-gradient(90deg, #0d6e83, #07717f 25%, #00747a 50%, #009080 75%, #00a484);
	padding: 3cqw 10cqw 10cqw;
	font-family: var(--nl-inter);
	font-variation-settings: "opsz" 18;
	color: var(--teal);
}

.nuori-buy__form { margin: 0; padding: 5.6cqw 0 0; border-top: 0.185cqw solid #e7ddd3; }

.nuori-buy__head { display: flex; align-items: baseline; justify-content: space-between; gap: 3cqw; }
.nuori-lp .nuori-buy__title,
.nuori-buy__title { margin: 0; font-family: var(--nl-sauce); font-weight: 700; font-size: 4.99cqw; line-height: 1.1; letter-spacing: 0; color: var(--teal-ink); }
.nuori-lp .nuori-buy__price,
.nuori-buy__price { margin: 0; font-family: var(--nl-sauce); font-weight: 700; font-size: 4.99cqw; line-height: 1.1; color: var(--teal); white-space: nowrap; }
.nuori-buy__price .amount, .nuori-buy__price bdi { font: inherit; }
.nuori-buy__price del { font-weight: 400; font-size: 0.62em; opacity: 0.6; margin-right: 0.3em; }
.nuori-buy__price ins { text-decoration: none; }

.nuori-buy__finishes { margin: 4.2cqw 0 0; padding: 0; border: 0; min-width: 0; }
.nuori-buy__finishes legend { padding: 0; margin: 0 0 2.2cqw; font-size: max(13px, 1.58cqw); line-height: 1.2; color: #9c744a; letter-spacing: 0.02em; }
.nuori-buy__finishes legend span { color: var(--teal); font-weight: 700; }
.nuori-buy__swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2cqw; }

.nuori-buy__swatch {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1.6cqw;
	min-height: max(44px, 6.6cqw);
	padding: 0 2cqw;
	border: 0.185cqw solid #1b6282;
	border-radius: 999px;
	background: #fff;
	font-size: max(14px, 1.91cqw);
	line-height: 1.1;
	color: var(--teal);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nuori-buy__swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.nuori-buy__dot { flex: none; width: 2.2cqw; height: 2.2cqw; min-width: 14px; min-height: 14px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 0.185cqw var(--swatch-ring); }
.nuori-buy__swatch-name small { display: block; font-size: 0.75em; opacity: 0.8; }
.nuori-buy__swatch:has(input:checked) { background: var(--gradient); border-color: transparent; color: #fff; font-weight: 700; }
.nuori-buy__swatch:has(input:checked) .nuori-buy__dot { box-shadow: 0 0 0 0.25cqw #fff; }
.nuori-buy__swatch:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 3px; }
.nuori-buy__swatch.is-sold-out { opacity: 0.45; cursor: not-allowed; }

.nuori-buy__row { display: flex; gap: 2.2cqw; margin-top: 3.6cqw; }
.nuori-buy__qty { display: flex; align-items: stretch; flex: none; border: 0.185cqw solid #1b6282; border-radius: 1.6cqw; overflow: hidden; background: #fff; }
.nuori-buy__qty button { width: max(40px, 6cqw); border: 0; background: none; color: var(--teal); font-size: max(18px, 2.6cqw); line-height: 1; cursor: pointer; }
.nuori-buy__qty input { width: max(36px, 5.4cqw); border: 0; text-align: center; font: inherit; font-size: max(16px, 2.2cqw); font-weight: 700; color: var(--teal); background: none; -moz-appearance: textfield; appearance: textfield; }
.nuori-buy__qty input::-webkit-outer-spin-button,
.nuori-buy__qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.nuori-buy__submit,
.nuori-sticky-cart__button {
	flex: 1;
	min-height: max(48px, 7.4cqw);
	padding: 0 3cqw;
	border: 0;
	border-radius: 1.6cqw;
	background: var(--gradient, linear-gradient(90deg, #0d6e83, #00747a 50%, #00a484));
	color: #fff;
	font: inherit;
	font-weight: 700;
	font-size: max(16px, 2.4cqw);
	letter-spacing: 0.01em;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 0.6cqw 1.8cqw rgba(0, 116, 122, 0.25);
	transition: filter 0.2s ease, transform 0.1s ease;
}
.nuori-buy__submit:hover,
.nuori-sticky-cart__button:hover { filter: brightness(1.06); }
.nuori-buy__submit:active,
.nuori-sticky-cart__button:active { transform: translateY(1px); }
.nuori-buy__submit:disabled,
.nuori-sticky-cart__button:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.nuori-lp .nuori-buy__note,
.nuori-buy__note { margin: 2.6cqw 0 0; font-size: max(12px, 1.58cqw); line-height: 1.35; color: var(--soft); }
.nuori-buy__status:empty { display: none; }
.nuori-buy__status { margin-top: 2.6cqw; padding: 2cqw 2.4cqw; border-radius: 1.6cqw; font-size: max(14px, 1.91cqw); line-height: 1.4; background: #f5f5f5; }
.nuori-buy__status[data-tone="success"] { background: #e7f1f2; color: var(--teal-ink); }
.nuori-buy__status[data-tone="error"] { background: #fdeceb; color: #9b2c24; }
.nuori-buy__status a { margin-left: 1.4cqw; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.nuori-buy__status a.is-primary { color: var(--teal); }

.nuori-buy__notices:empty { display: none; }
.nuori-buy__notices { margin-top: 2.6cqw; font-size: max(14px, 1.91cqw); }
.nuori-buy__notices .woocommerce-message,
.nuori-buy__notices .woocommerce-error,
.nuori-buy__notices .woocommerce-info { margin: 0; padding: 2cqw 2.4cqw; border: 0; border-radius: 1.6cqw; background: #e7f1f2; color: #056c84; list-style: none; }
.nuori-buy__notices .woocommerce-error { background: #fdeceb; color: #9b2c24; }
.nuori-buy__notices .button { float: none; margin-right: 1.4cqw; padding: 0; background: none; color: #00747a; font-weight: 700; text-decoration: underline; }
.nuori-buy--setup { padding: 20px; margin: 16px; border: 2px dashed #9c744a; border-radius: 12px; background: #fffaf2; color: #5e4a2c; font: 14px/1.5 system-ui, sans-serif; }
.nuori-buy--setup a { color: #00747a; font-weight: 600; }

/* Sticky bar: fixed to the viewport, as wide as the mobile frame. */
.nuori-sticky-cart {
	position: fixed;
	z-index: 50;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 10px;
	width: min(100%, var(--nl-frame, 480px));
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 -6px 24px rgba(3, 42, 51, 0.14);
	font-family: var(--nl-inter);
	font-variation-settings: "opsz" 18;
	color: #00747a;
	animation: nuori-sticky-in 0.25s ease;
}
.nuori-sticky-cart[hidden] { display: none; }
.nuori-sticky-cart__dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--swatch, #1d1d1f); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(3, 42, 51, 0.3); }
.nuori-sticky-cart__text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.25; }
.nuori-sticky-cart__price { font-family: var(--nl-sauce); font-weight: 700; font-size: 16px; }
.nuori-sticky-cart__bag { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: #00747a; }
.nuori-sticky-cart__bag .nuori-cart-count { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #00747a; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.nuori-sticky-cart__button { flex: 0 0 auto; min-height: 46px; padding: 0 20px; margin-left: auto; font-size: 15px; border-radius: 12px; }
.nuori-sticky-cart.is-added .nuori-sticky-cart__button { background: #003c3c; }
body.nuori-sticky-cart-open { padding-bottom: 72px; }

@keyframes nuori-sticky-in { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .nuori-sticky-cart { animation: none; } }
