/* ECP sticky Add to Cart bar v1.0.1 — inc/ecp-sticky-atc.php + assets/js/ecp-sticky-atc.js.
   Fixed + transform slide (no layout shift). Stepper/button reuse the PDP classes from ecp-pdp.css. */
.ecp-sticky-atc {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 990;
	background: #fff; border-top: 1px solid #e6e1d8; box-shadow: 0 -4px 18px rgba(27, 38, 56, .08);
	transform: translateY(110%); visibility: hidden;
	transition: transform .28s ease, visibility 0s linear .28s;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ecp-sticky-atc.is-shown { transform: translateY(0); visibility: visible; transition: transform .28s ease, visibility 0s; }
/* Slide-out bag open: get out of the way. */
html.ecp-cart-open .ecp-sticky-atc { transform: translateY(110%); visibility: hidden; }
body.ecp-sticky-atc-on { padding-bottom: var(--ecp-sticky-atc-h, 80px); }
@media (prefers-reduced-motion: reduce) { .ecp-sticky-atc, .ecp-sticky-atc.is-shown { transition: none; } }

.ecp-sticky-atc__inner { max-width: 1280px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; gap: 24px; }
.ecp-sticky-atc__item { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.ecp-sticky-atc__thumb { width: 52px; height: 52px; flex: 0 0 52px; object-fit: cover; border-radius: 6px; background: #f5f3ef; }
.ecp-sticky-atc__text { min-width: 0; }
.ecp-sticky-atc .ecp-sticky-atc__name { margin: 0; font-family: 'Merriweather', Georgia, serif; font-size: 16px; line-height: 1.2; color: #2a3a52; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecp-sticky-atc .ecp-sticky-atc__glaze { margin: 1px 0 0; font-size: 13px; line-height: 1.2; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecp-sticky-atc__price { margin-left: auto; flex: 0 0 auto; font-family: 'Lato', sans-serif; font-size: 16px; font-weight: 700; color: #2a3a52; white-space: nowrap; }
.ecp-sticky-atc__price .price { font: inherit; color: inherit; }
.ecp-sticky-atc__price del { opacity: .55; margin-right: 6px; font-weight: 400; }
.ecp-sticky-atc__price ins { text-decoration: none; }
.ecp-sticky-atc__actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.ecp-sticky-atc__qty[hidden] { display: none !important; }
body.ecp-pdp-va-active .ecp-sticky-atc .ecp-sticky-atc__btn { flex: 0 0 auto; min-width: 200px; padding: 12px 28px; }
body.ecp-pdp-va-active .ecp-sticky-atc .ecp-sticky-atc__btn.is-unavailable { background: #c9c4bb; color: #fff; cursor: pointer; }

@media (max-width: 767px) {
	.ecp-sticky-atc__inner { padding: 6px 12px; gap: 8px; }
	/* thumb | name / glaze / price stacked */
	.ecp-sticky-atc__item { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 8px; row-gap: 1px; align-items: center; align-content: center; }
	.ecp-sticky-atc__thumb { grid-row: 1 / span 3; width: 44px; height: 44px; }
	.ecp-sticky-atc__text { display: contents; }
	.ecp-sticky-atc .ecp-sticky-atc__name { grid-column: 2; font-size: 13px; line-height: 1.18; }
	.ecp-sticky-atc .ecp-sticky-atc__glaze { grid-column: 2; font-size: 12px; line-height: 1.18; margin-top: 0; }
	.ecp-sticky-atc__price { grid-column: 2; margin-left: 0; font-size: 13px; line-height: 1.18; }
	.ecp-sticky-atc__actions { gap: 6px; }
	body.ecp-pdp-va-active .ecp-sticky-atc .ecp-pdp-qty-input { gap: 2px; }
	body.ecp-pdp-va-active .ecp-sticky-atc .ecp-pdp-qty-btn { width: 32px; height: 40px; font-size: 18px; }
	body.ecp-pdp-va-active .ecp-sticky-atc .ecp-pdp-qty-val { width: 22px !important; font-size: 15px !important; }
	body.ecp-pdp-va-active .ecp-sticky-atc .ecp-sticky-atc__btn { min-width: 0; padding: 0 14px; height: 40px; line-height: 40px; font-size: 13px; }
}
