/**
 * Single product - sticky add-to-cart bar (bottom dock)
 */

body.nalnad-single-product {
	--nalnad-sticky-atc-h: 72px;
	padding-bottom: calc(var(--nalnad-sticky-atc-h) + env(safe-area-inset-bottom, 0px));
}

/* Pin to bottom (overrides Astra top-bar positioning) */
body.nalnad-single-product .ast-sticky-add-to-cart {
	top: auto !important;
	bottom: 0 !important;
	transform: translate3d(0, 100%, 0) !important;
	opacity: 0;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.nalnad-single-product .ast-sticky-add-to-cart.is-active {
	transform: translate3d(0, 0, 0) !important;
	opacity: 1 !important;
}

/* Bar shell */
.ast-sticky-add-to-cart {
	background: #fff !important;
	border-top: 1px solid #e8e4df;
	box-shadow: 0 -4px 24px rgba(44, 24, 16, 0.08) !important;
	z-index: 9990;
}

.ast-sticky-add-to-cart .ast-container {
	max-width: 1200px;
	padding-left: 20px;
	padding-right: 20px;
}

.ast-sticky-add-to-cart .ast-sticky-add-to-cart-content {
	align-items: center;
	gap: 16px;
	min-height: 72px;
	padding: 12px 0;
}

/* Product info */
.ast-sticky-add-to-cart .ast-sticky-add-to-cart-title-wrap {
	min-width: 0;
	flex: 1 1 auto;
	gap: 12px;
}

.ast-sticky-add-to-cart .ast-sticky-add-to-cart-title-wrap img {
	flex-shrink: 0;
	max-height: 48px;
	width: 48px;
	object-fit: cover;
	border-radius: 6px;
}

.ast-sticky-add-to-cart .ast-sticky-add-to-cart-title {
	padding: 0 !important;
	font-size: 14px !important;
	font-weight: 600;
	line-height: 1.35 !important;
	color: var(--nalnad-coffee, #2c1810);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Actions row */
.ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-wrap {
	flex: 0 0 auto;
	gap: 12px;
	flex-wrap: nowrap;
	align-items: center !important;
}

.ast-sticky-add-to-cart .ast-quantity-add-to-cart {
	align-items: center !important;
}

.ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price {
	padding-right: 0 !important;
	font-size: 15px;
	line-height: 1.3;
	white-space: nowrap;
}

.ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price del {
	display: block;
	font-size: 12px;
}

.ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--nalnad-coffee, #2c1810);
}

/* Hide wishlist / compare in compact bar */
.ast-sticky-add-to-cart .shopengine-wishlist,
.ast-sticky-add-to-cart .shopengine-comparison {
	display: none !important;
}

/* Cart form layout */
.ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-wrap form.cart {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	flex-wrap: nowrap;
}

/* Hide ShopEngine / theme qty chrome - custom stepper injected via product.js */
.ast-sticky-add-to-cart .shopengine-qty-btn,
.ast-sticky-add-to-cart .quantity-wrap > button.minus,
.ast-sticky-add-to-cart .quantity-wrap > button.plus,
.ast-sticky-add-to-cart .quantity > .minus,
.ast-sticky-add-to-cart .quantity > .plus,
.ast-sticky-add-to-cart .quantity > .ast-qty-placeholder {
	display: none !important;
}

.ast-sticky-add-to-cart .quantity-wrap {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	margin: 0 !important;
}

.ast-sticky-add-to-cart .quantity.nalnad-sticky-qty-ready {
	display: block !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Small − qty + stepper */
.ast-sticky-add-to-cart .nalnad-sticky-qty.nalnad-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e8e4df;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	flex-shrink: 0;
}

.ast-sticky-add-to-cart .nalnad-sticky-qty .nalnad-qty__btn {
	width: 30px;
	height: 32px;
	min-width: 30px;
	padding: 0;
	border: none;
	border-radius: 0;
	background: #fafaf8;
	color: var(--nalnad-coffee, #2c1810);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.ast-sticky-add-to-cart .nalnad-sticky-qty .nalnad-qty__btn:hover {
	background: #f3efe9;
}

.ast-sticky-add-to-cart .nalnad-sticky-qty .qty {
	width: 36px !important;
	height: 32px !important;
	min-height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none;
	border-left: 1px solid #e8e4df;
	border-right: 1px solid #e8e4df;
	border-radius: 0;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--nalnad-coffee, #2c1810);
	background: #fff;
	-moz-appearance: textfield;
}

.ast-sticky-add-to-cart .nalnad-sticky-qty .qty::-webkit-outer-spin-button,
.ast-sticky-add-to-cart .nalnad-sticky-qty .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Add to cart CTA */
.ast-sticky-add-to-cart .single_add_to_cart_button {
	width: auto !important;
	min-width: 140px;
	padding: 11px 22px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	white-space: nowrap;
	border-radius: 6px !important;
	flex-shrink: 0;
}

.ast-sticky-add-to-cart .woocommerce .button.single_add_to_cart_button {
	background-color: var(--nalnad-gold, #c49a6c) !important;
	border-color: var(--nalnad-gold, #c49a6c) !important;
	color: #1a1a1a !important;
}

.ast-sticky-add-to-cart .woocommerce .button.single_add_to_cart_button:hover {
	background-color: #8b5e34 !important;
	border-color: #8b5e34 !important;
	color: #fff !important;
}

.ast-sticky-add-to-cart .nalnad-buy-now {
	min-width: 110px;
	padding: 11px 18px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	white-space: nowrap;
	border-radius: 6px !important;
	flex-shrink: 0;
	background: transparent !important;
	color: var(--nalnad-coffee, #3b1f12) !important;
	border: 2px solid var(--nalnad-coffee, #3b1f12) !important;
}

.ast-sticky-add-to-cart .nalnad-buy-now:hover,
.ast-sticky-add-to-cart .nalnad-buy-now:focus {
	background: var(--nalnad-coffee, #3b1f12) !important;
	color: #fff !important;
}

/* Tablet / mobile — price + qty + CTAs (hide product chip only) */
@media (max-width: 921px) {
	body.nalnad-single-product {
		--nalnad-sticky-atc-h: 68px;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-title-wrap {
		display: none !important;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-content {
		min-height: var(--nalnad-sticky-atc-h, 68px);
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-wrap {
		flex: 1 1 100%;
		width: 100%;
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: stretch;
		gap: 10px;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price {
		display: block !important;
		flex: 0 0 auto;
		padding-right: 0 !important;
		font-size: 14px;
		line-height: 1.2;
		min-width: 0;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price del {
		display: block;
		font-size: 11px;
		opacity: 0.7;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price ins,
	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price .amount {
		font-size: 15px;
		font-weight: 700;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-quantity-add-to-cart,
	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-wrap form.cart {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}

	.ast-sticky-add-to-cart .ast-sticky-add-to-cart-title {
		font-size: 13px !important;
		-webkit-line-clamp: 1;
	}
}

/* Desktop — compact product chip + actions */
@media (min-width: 922px) {
	body.nalnad-single-product .ast-sticky-add-to-cart .ast-container {
		padding-left: 24px;
		padding-right: 24px;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-content {
		max-width: 1200px;
		margin: 0 auto;
	}
}

/* Small phones */
@media (max-width: 544px) {
	body.nalnad-single-product {
		--nalnad-sticky-atc-h: 64px;
	}

	.ast-sticky-add-to-cart .ast-container {
		padding-left: 12px;
		padding-right: 12px;
	}

	.ast-sticky-add-to-cart .ast-sticky-add-to-cart-content {
		min-height: 64px;
		padding: 10px 0;
		gap: 8px;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-wrap {
		gap: 8px;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price {
		font-size: 13px;
		max-width: 4.75rem;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price del {
		font-size: 10px;
	}

	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price ins,
	body.nalnad-single-product .ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-price .amount {
		font-size: 14px;
	}

	.ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-wrap form.cart {
		gap: 8px;
		width: auto;
		flex: 1 1 auto;
		min-width: 0;
	}

	.ast-sticky-add-to-cart .nalnad-sticky-qty .nalnad-qty__btn {
		width: 28px;
		height: 30px;
		min-width: 28px;
		font-size: 14px;
	}

	.ast-sticky-add-to-cart .nalnad-sticky-qty .qty {
		width: 32px !important;
		height: 30px !important;
		min-height: 30px !important;
		font-size: 13px;
	}

	.ast-sticky-add-to-cart .single_add_to_cart_button,
	.ast-sticky-add-to-cart .nalnad-buy-now {
		flex: 1 1 0;
		min-width: 0;
		padding-left: 10px !important;
		padding-right: 10px !important;
		font-size: 12px !important;
	}

	.ast-sticky-add-to-cart .ast-sticky-add-to-cart-action-wrap form.cart {
		flex-wrap: nowrap;
	}
}
