/* ==========================================================================
   MDENT product page & archive card polish (inc/product-ui.php)
   Loaded after shop-enhanced.css: restyles the ported "ms-" layer with the
   MDENT tokens (ivory/ink/champagne, serif headings, pill controls).
   ========================================================================== */

/* ---------- Page chrome ---------- */
/* Hero spacing: style.css (.mdent-product-hero) — the same distance under the
   header as every other page. */
@media (max-width: 63.99rem) {
	.mdent-product-hero .breadcrumbs { font-size: 0.75rem; }
	/* The product page's primary action is the add-to-cart bar below; the
	   phone CTA lives in the summary column. */
	body.single-product .sticky-cta { display: none; }
}

/* ---------- Hero card ---------- */
.mdent-sp-hero {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-soft);
	padding: 2rem;
	gap: 2.5rem;
}
@media (max-width: 600px) {
	.mdent-sp-hero { padding: 1rem; border-radius: var(--r-md); }
}

/* ---------- Gallery: square white card, image fitted inside ---------- */
/* No slider (inc/performance.php): the main photo, the others as a row of
   thumbnails under it — laid out once, from the first paint (the slider
   rebuilt it on start and moved the text below: a large layout shift).
   Any photo opens the zoom lightbox. */
.mdent-sp-gallery .woocommerce-product-gallery__wrapper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.mdent-sp-gallery .woocommerce-product-gallery__image:first-child { grid-column: 1 / -1; }
.woocommerce div.product .mdent-sp-gallery div.images .woocommerce-product-gallery__image:nth-child(n+2),
.mdent-sp-gallery .woocommerce-product-gallery__image:nth-child(n+2) { width: auto; display: flex; padding: 0.25rem; border-radius: var(--r-sm); }
.mdent-sp-gallery .woocommerce-product-gallery__wrapper { margin: 0; }
.mdent-sp-gallery .woocommerce-product-gallery__image {
	aspect-ratio: 1 / 1;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-md);
	padding: clamp(0.75rem, 4%, 1.5rem);
	overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	position: relative;
}
.mdent-sp-gallery .woocommerce-product-gallery__image a { display: block; width: 100%; height: 100%; }
.mdent-sp-gallery .woocommerce-product-gallery__image img {
	width: 100% !important; height: 100% !important;
	object-fit: contain;
	border: 0 !important; border-radius: 0; background: transparent;
	display: block;
}
.mdent-sp-gallery .flex-viewport { border-radius: var(--r-md); }
.woocommerce-product-gallery__trigger {
	background: var(--card) !important;
	border: 1px solid var(--border);
	box-shadow: var(--shadow-soft);
	color: var(--fg);
}
.woocommerce-product-gallery__trigger:hover { background: var(--sand) !important; transform: none; }
.woocommerce-product-gallery .flex-control-thumbs li img {
	border-radius: var(--r-sm);
	background: #fff;
	border: 1px solid var(--border);
	object-fit: contain;
	padding: 0.25rem;
}
.woocommerce-product-gallery .flex-control-thumbs li img.flex-active,
.woocommerce-product-gallery .flex-control-thumbs li img:hover { border-color: var(--champagne-deep) !important; }

/* ---------- Summary ---------- */
.mdent-sp-cats, .mdent-sp-cats a {
	font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--champagne-text); text-decoration: none;
}
.mdent-sp-cats a:hover { color: var(--fg); }
.mdent-sp .mdent-sp-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; margin: 0.35rem 0 0.75rem; }

.mdent-sp-price .woocommerce-Price-amount, .mdent-sp-price bdi {
	font-family: var(--font-display) !important;
	font-size: 2.35rem !important; font-weight: 500 !important;
	color: var(--fg) !important; letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}
.mdent-sp-price .woocommerce-Price-currencySymbol { font-size: 0.8em; margin-left: 0.08em; }
.mdent-sp-price del .woocommerce-Price-amount, .mdent-sp-price del bdi {
	font-family: var(--font-sans) !important; font-size: 1rem !important; color: var(--muted-fg) !important;
	text-decoration: line-through;
}
.mdent-sp-sale-pill { background: var(--primary); color: var(--primary-fg); font-weight: 500; letter-spacing: 0.04em; }
.mdent-sp-excerpt { color: var(--muted-fg); border-color: var(--border); font-size: 0.9rem; }

/* Stock chips */
.mdent-sp-stock {
	display: inline-flex; align-items: center; gap: 0.35rem;
	font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em;
	padding: 0.3rem 0.65rem; border-radius: 999px;
	background: var(--sand); color: var(--fg); border: 1px solid var(--border);
}
.mdent-sp-stock--in { background: oklch(0.96 0.03 150); color: oklch(0.38 0.1 150); border-color: oklch(0.9 0.05 150); }
.mdent-sp-stock--low { background: var(--champagne); color: var(--ink); border-color: var(--champagne-deep); }
.mdent-sp-stock--out { background: var(--muted); color: var(--muted-fg); border-color: var(--border); }

/* ---------- Add to cart: pill stepper + pill button ---------- */
.mdent-sp-atc-wrap form.cart { gap: 0.75rem !important; }
.mdent-sp-atc-wrap form.cart div.quantity {
	border: 1px solid var(--border) !important;
	border-radius: 999px !important;
	background: var(--card);
	height: 3.25rem;
	min-width: 8.25rem;
	overflow: hidden !important;
}
.mdent-sp-atc-wrap form.cart div.quantity input.qty {
	width: 2.75rem; font-weight: 500 !important; font-size: 1rem !important; color: var(--fg) !important;
	font-variant-numeric: tabular-nums;
}
.mdent-sp .mdent-qty-btn {
	width: 2.75rem; height: 100%; color: var(--fg); font-size: 1.15rem; font-weight: 400; border: 0;
	background: transparent; transition: background-color 0.2s, color 0.2s;
}
.mdent-sp .mdent-qty-btn--minus, .mdent-sp .mdent-qty-btn--plus { border: 0; }
.mdent-sp .mdent-qty-btn:hover:not(:disabled) { background: var(--sand); color: var(--fg); }
.mdent-sp .mdent-qty-btn:active:not(:disabled) { background: var(--secondary); }
.mdent-sp .mdent-qty-btn:disabled { color: var(--border); cursor: not-allowed; }

.mdent-sp-atc-wrap .single_add_to_cart_button.button {
	height: 3.25rem !important;
	background: var(--primary) !important;
	color: var(--primary-fg) !important;
	border-radius: 999px !important;
	box-shadow: var(--shadow-elegant) !important;
	font-family: var(--font-sans);
	font-size: 0.9375rem !important; font-weight: 500 !important; letter-spacing: 0.02em !important;
	position: relative;
	transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s !important;
}
.mdent-sp-atc-wrap .single_add_to_cart_button.button:hover {
	background: var(--ink) !important; filter: none !important; transform: none !important;
	box-shadow: var(--shadow-elegant) !important;
}
.mdent-sp-atc-wrap .single_add_to_cart_button.button:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.mdent-sp-atc-wrap .single_add_to_cart_button.button::before { width: 1rem; height: 1rem; }
.mdent-sp-atc-wrap .single_add_to_cart_button.button.disabled,
.mdent-sp-atc-wrap .single_add_to_cart_button.button.wc-variation-selection-needed {
	opacity: 0.55; cursor: not-allowed; box-shadow: none !important;
}
/* Loading: hide the icon, show a spinner */
.mdent-sp-atc-wrap .single_add_to_cart_button.button.loading { opacity: 0.85 !important; color: transparent !important; }
.mdent-sp-atc-wrap .single_add_to_cart_button.button.loading::before { visibility: hidden; }
.mdent-sp-atc-wrap .single_add_to_cart_button.button.loading::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 1.25rem; height: 1.25rem; margin: -0.625rem 0 0 -0.625rem;
	border: 2px solid oklch(0.985 0.005 80 / 0.35); border-top-color: var(--primary-fg); border-radius: 999px;
	animation: mdent-spin 0.7s linear infinite;
}
.mdent-sp-atc-wrap .single_add_to_cart_button.button.is-added { background: var(--champagne-text) !important; }
.mdent-sp-atc-wrap .single_add_to_cart_button.button.is-added::before { display: none; }
.mdent-sp-atc-wrap .single_add_to_cart_button.button svg { width: 1rem; height: 1rem; }
@keyframes mdent-spin { to { transform: rotate(360deg); } }

/* WC's "View cart" link appended after a button — the drawer replaces it */
.mdent-sp a.added_to_cart, .mdent-product-card a.added_to_cart, .mdent-bs-card a.added_to_cart, .mdent-bundle-card a.added_to_cart { display: none !important; }

/* Inline form error (variation not chosen, stock) */
.mdent-atc-error {
	margin: 0 0 0.75rem; padding: 0.7rem 0.9rem; border-radius: var(--r-sm);
	background: oklch(0.96 0.03 25); color: var(--destructive); font-size: 0.8125rem; line-height: 1.45;
}
.mdent-atc-error[hidden] { display: none; }

/* Variation selects */
.mdent-sp-atc-wrap .variations select {
	border: 1px solid var(--border) !important; border-radius: var(--r-sm) !important;
	background-color: var(--card) !important; color: var(--fg) !important; font-family: var(--font-sans);
	height: 3rem;
}
.mdent-sp-atc-wrap .variations select:focus { border-color: var(--ring) !important; box-shadow: 0 0 0 3px oklch(0.75 0.06 70 / 0.25) !important; }
.mdent-sp-atc-wrap .variations .label label { color: var(--muted-fg); font-weight: 500; font-size: 0.8125rem; }
.mdent-sp-atc-wrap .reset_variations { color: var(--muted-fg); font-size: 0.75rem; }
.mdent-sp-atc-wrap .woocommerce-variation .woocommerce-variation-price .woocommerce-Price-amount {
	font-family: var(--font-display); font-weight: 500; color: var(--fg); font-size: 1.5rem;
}

/* Out of stock: one muted full-width button, no stepper */
.mdent-sp-oos-form { grid-template-columns: 1fr; }
.mdent-sp-oos-btn {
	height: 3.25rem; border-radius: 999px; width: 100%;
	background: var(--muted) !important; color: var(--muted-fg); border: 1px solid var(--border);
	font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.02em; opacity: 1;
}

/* ---------- Trust chips ---------- */
.mdent-sp-trust { gap: 0.5rem; }
.mdent-sp-trust__item {
	background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
	color: var(--fg); font-size: 0.75rem; font-weight: 500;
}
.mdent-sp-trust__item svg { color: var(--champagne-text); }

/* ---------- Free-shipping widget ---------- */
.mdent-sp-fsw { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); }
.mdent-sp-fsw__text { color: var(--muted-fg); font-size: 0.8125rem; }
.mdent-sp-fsw__text svg, .mdent-sp-fsw__text strong { color: var(--fg); }
.mdent-sp-fsw__text #mdentFswNeeded { color: var(--champagne-text); }
.mdent-sp-fsw__bar-wrap { background: var(--sand); border-radius: 999px; }
.mdent-sp-fsw__bar { background: var(--champagne-deep); border-radius: 999px; }
.mdent-sp-fsw__labels { color: var(--muted-fg); }

/* ---------- Consultation CTA ---------- */
.mdent-sp-cta-phone { background: var(--primary); border-radius: var(--r-md); box-shadow: var(--shadow-soft); }
.mdent-sp-cta-phone:hover { background: var(--ink); filter: none; transform: none; box-shadow: var(--shadow-soft); }
.mdent-sp-cta-phone__number { background: oklch(1 0 0 / 0.12); }
.mdent-sp-cta-phone__text strong { font-weight: 500; }

/* ---------- Details / reviews cards ---------- */
.mdent-sp-details__block, .mdent-sp-reviews-section, .woocommerce .up-sells, .woocommerce .related {
	border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-soft);
}
.mdent-sp-details__heading, .mdent-sp-section-title { font-family: var(--font-display) !important; font-weight: 400 !important; font-size: 1.35rem !important; }
.mdent-sp-details__heading svg, .mdent-sp-section-title svg { color: var(--champagne-text); }

/* ---------- Sticky add-to-cart bar (phones) ---------- */
.mdent-sp-sticky {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 42;
	display: none; align-items: center; gap: 0.75rem;
	padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
	background: oklch(0.992 0.004 80 / 0.96);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-top: 1px solid var(--border);
	box-shadow: 0 -12px 32px -16px oklch(0.2 0.02 60 / 0.25);
	transform: translateY(110%); opacity: 0;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s;
	font-family: var(--font-sans);
}
@media (max-width: 63.99rem) { .mdent-sp-sticky { display: flex; } }
/* The M Cookie Consent re-open badge sits bottom-left and would cover the
   sticky bar's thumbnail on phones — lift it above the bar on product pages. */
@media (max-width: 63.99rem) { body.single-product #mcc-reopen { bottom: 5.25rem; } }
.mdent-sp-sticky.is-visible { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .mdent-sp-sticky { transition: none; } }
.mdent-sp-sticky__thumb {
	flex: none; width: 2.75rem; height: 2.75rem; border-radius: var(--r-sm);
	background: #fff; border: 1px solid var(--border); overflow: hidden; padding: 0.15rem;
}
.mdent-sp-sticky__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mdent-sp-sticky__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.mdent-sp-sticky__name {
	font-size: 0.8125rem; font-weight: 500; line-height: 1.3; color: var(--fg);
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mdent-sp-sticky__price, .mdent-sp-sticky__price .woocommerce-Price-amount, .mdent-sp-sticky__price bdi {
	font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; line-height: 1; color: var(--fg);
}
.mdent-sp-sticky__price del { display: none; }
.mdent-sp-sticky__btn {
	flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center;
	height: 2.75rem; padding: 0 1.25rem; border-radius: 999px; border: 0; cursor: pointer;
	background: var(--primary); color: var(--primary-fg); font: inherit; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.02em;
	box-shadow: var(--shadow-elegant);
}
.mdent-sp-sticky__btn.is-disabled { background: var(--muted); color: var(--muted-fg); box-shadow: none; cursor: default; }
/* In flight (mini-cart.js): the main button's spinner here too, no second tap */
.mdent-sp-sticky__btn.loading, .mdent-sp-sticky__btn:disabled { pointer-events: none; }
.mdent-sp-sticky__btn.loading { color: transparent; }
.mdent-sp-sticky__btn.loading::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 1.1rem; height: 1.1rem; margin: -0.55rem 0 0 -0.55rem;
	border: 2px solid oklch(0.985 0.005 80 / 0.35); border-top-color: var(--primary-fg); border-radius: 999px;
	animation: mdent-spin 0.7s linear infinite;
}
@media (max-width: 63.99rem) {
	/* The ASMS „Išsaugokite krepšelį“ prompt is position:fixed at the bottom edge
	   too (z-index 99999) and would cover the bar as soon as the drawer closes:
	   lift it above the bar while the bar is shown (body class, mini-cart.js).
	   Lifted, it must still end below the top edge (phones held sideways): its
	   box scrolls instead, so the title and the × stay reachable. */
	body.mdent-sp-sticky-visible .asms-wc-cart-prompt { bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)); }
	body.mdent-sp-sticky-visible .asms-wc-cart-prompt__box {
		max-height: calc(100vh - 6rem - env(safe-area-inset-bottom, 0px));
		max-height: calc(100dvh - 6rem - env(safe-area-inset-bottom, 0px));
		overflow-y: auto; overscroll-behavior: contain;
	}
}
/* The prompt covers the floating cart button (z-index 41) wherever both are
   shown: the button steps aside while the prompt is open — the header cart
   icon still opens the drawer. The cookie badge (#mcc-reopen, same z-index as
   the prompt and later in the DOM) would sit on the prompt's phone field and
   button, so it steps aside too — the footer „Sutikimo nustatymai“ link still
   opens the consent dialog. */
body:has(.asms-wc-cart-prompt:not([hidden])) .mdent-cart-fab,
body:has(.asms-wc-cart-prompt:not([hidden])) #mcc-reopen { visibility: hidden; }

/* ==========================================================================
   Buy box 1.21.1 — one column on one left and one right edge:
   stock pill → [stepper | button] → trust strip → free-shipping card.
   0.75rem inside a block, 1.25rem between blocks. Overrides the ported grid
   in shop-enhanced.css (hence !important) and WooCommerce's form clearfix.
   ========================================================================== */
.mdent-sp-summary {
	--sp-gap: 0.75rem;
	--sp-block: 1.25rem;
	--sp-ctl-h: 3.25rem;
	--sp-stepper-w: 8.25rem; /* − / qty / + at 2.75rem (44px) each */
}

/* The hairline belongs to the buy box — present with or without a short description. */
.mdent-sp-summary .mdent-sp-excerpt { margin-bottom: var(--sp-block); padding-bottom: 0; border-bottom: 0; }
.mdent-sp-summary .mdent-sp-excerpt > :last-child { margin-bottom: 0; }

.mdent-sp .mdent-sp-atc-wrap {
	display: flex; flex-direction: column; gap: var(--sp-gap);
	margin: 0 0 var(--sp-block);
	padding-top: var(--sp-block);
	border-top: 1px solid var(--border);
}
.mdent-sp .mdent-sp-atc-wrap > .mdent-sp-availability { margin: 0; gap: 0.5rem; }
.mdent-sp .mdent-sp-atc-wrap > .mdent-atc-error,
.mdent-sp .mdent-sp-atc-wrap > .mdent-alert { margin: 0; }

/* WooCommerce's float clearfix (woocommerce.scss:369-372) turns ::before/::after
   into empty grid items: ::before took column 1 and pushed the stepper and the
   button one gap (12px) in from the edge. */
.mdent-sp .mdent-sp-atc-wrap form.cart::before,
.mdent-sp .mdent-sp-atc-wrap form.cart::after { content: none !important; display: none !important; }

/* [stepper | button] — simple products and the variation row alike. With less
   than ~7.5rem left the button wraps under the stepper and spans the column;
   with the stepper hidden it spans the row on its own. */
.mdent-sp .mdent-sp-atc-wrap form.cart:not(.variations_form),
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation-add-to-cart {
	display: flex !important; flex-wrap: wrap;
	align-items: stretch !important;
	gap: var(--sp-gap) !important;
	margin: 0 !important; width: 100% !important;
}
/* Anything a plugin prints into the form gets a line of its own. */
.mdent-sp .mdent-sp-atc-wrap form.cart:not(.variations_form) > :not(.quantity):not(.single_add_to_cart_button) { flex: 1 0 100%; min-width: 0; }

.mdent-sp .mdent-sp-atc-wrap form.cart div.quantity {
	flex: 0 0 var(--sp-stepper-w);
	width: var(--sp-stepper-w) !important; min-width: 0 !important;
	height: var(--sp-ctl-h);
	margin: 0 !important; float: none !important; /* WooCommerce: float + 4px right margin */
}
/* Quantity that cannot change: WooCommerce hides the stepper inline (sold-
   individually option) or prints a hidden input (last unit, sold individually);
   shop-enhanced.css:2338 forces display:flex !important over both. */
.mdent-sp .mdent-sp-atc-wrap div.quantity[style*="display: none"] { display: none !important; }
.mdent-sp .mdent-sp-atc-wrap div.quantity:has(> input.qty[type="hidden"]) { display: none !important; }

.mdent-sp .mdent-sp-atc-wrap form.cart .single_add_to_cart_button.button {
	flex: 1 1 7.5rem;
	width: auto !important;
	height: var(--sp-ctl-h) !important;
	margin: 0 !important; padding: 0 1rem !important; float: none !important;
	white-space: nowrap;
}

/* Variable products: label above its select, select across the whole column. */
.mdent-sp .mdent-sp-atc-wrap form.variations_form { display: block !important; margin: 0 !important; }
.mdent-sp .mdent-sp-atc-wrap .variations { margin: 0 0 var(--sp-gap) !important; }
.mdent-sp .mdent-sp-atc-wrap .variations tr {
	display: grid !important; grid-template-columns: minmax(0, 1fr);
	gap: 0.375rem !important; margin: 0 0 var(--sp-gap) !important;
}
.mdent-sp .mdent-sp-atc-wrap .variations tr:last-child { margin-bottom: 0 !important; }
.mdent-sp .mdent-sp-atc-wrap .variations .label { display: block !important; white-space: normal; line-height: 1.3; text-align: left !important; padding: 0 !important; width: auto !important; }
.mdent-sp .mdent-sp-atc-wrap .variations .label label { display: block; margin: 0; text-align: left; }
.mdent-sp .mdent-sp-atc-wrap .variations .value { display: block !important; padding: 0 !important; width: auto !important; }
.mdent-sp .mdent-sp-atc-wrap .variations select {
	width: 100% !important; min-width: 0 !important; max-width: none;
	height: 3rem !important;
	margin: 0 !important;      /* WooCommerce: margin-right 1em — 14px short of the edge */
	font-size: 1rem !important; /* under 16px iOS Safari zooms the page on focus */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c6158' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation { margin: 0 !important; }
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation-availability { display: none !important; } /* the pill says it */
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation-description:not(:empty),
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation-price:not(:empty),
.mdent-sp .mdent-sp-atc-wrap .single_variation > p { margin: 0 0 var(--sp-gap); }
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation-description p { margin: 0; font-size: 0.875rem; line-height: 1.55; color: var(--muted-fg); }
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation-description p + p { margin-top: 0.5em; }
.mdent-sp .mdent-sp-atc-wrap .woocommerce-variation-price { line-height: 1; }
.mdent-sp .mdent-sp-atc-wrap .single_variation > p { font-size: 0.8125rem; line-height: 1.45; color: var(--destructive); }
.mdent-sp .mdent-sp-atc-wrap .wc-no-matching-variations { margin: 0 0 var(--sp-gap) !important; }

/* Trust: one strip of three instead of three stacked pills. */
.mdent-sp-summary .mdent-sp-trust {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
	margin: 0 0 var(--sp-block);
	border: 1px solid var(--border); border-radius: var(--r-md);
	background: var(--bg); overflow: hidden;
}
.mdent-sp-summary .mdent-sp-trust__item {
	flex-direction: column; justify-content: center; gap: 0.35rem;
	min-width: 0; padding: 0.75rem 0.375rem;
	border: 0; border-radius: 0; background: none;
	font-size: 0.75rem; font-weight: 500; line-height: 1.3; text-align: center; color: var(--fg);
}
.mdent-sp-summary .mdent-sp-trust__item + .mdent-sp-trust__item { border-left: 1px solid var(--border); }
@media (max-width: 22.49rem) { /* < 360px: „pristatymas“ no longer fits a third */
	.mdent-sp-summary .mdent-sp-trust { grid-template-columns: 1fr; }
	.mdent-sp-summary .mdent-sp-trust__item { flex-direction: row; justify-content: flex-start; text-align: left; padding: 0.6rem 0.85rem; }
	.mdent-sp-summary .mdent-sp-trust__item + .mdent-sp-trust__item { border-left: 0; border-top: 1px solid var(--border); }
}
.mdent-sp-summary .mdent-sp-fsw,
.mdent-sp-summary .mdent-sp-cta-phone { margin: 0 0 var(--sp-block); }

@media (prefers-reduced-motion: reduce) { .mdent-sp-stock--low { animation: none; } }

/* Phones/tablets: no floating cart button on product pages — the fixed header
   shows the cart with its count, the drawer opens itself after „Į krepšelį“,
   and the bottom edge belongs to the sticky bar. */
@media (max-width: 63.99rem) {
	body.single-product .mdent-floating-actions { display: none; }
}

/* ==========================================================================
   Archive cards (content-product.php, best sellers, bundle)
   ========================================================================== */
.mdent-product-card { border-radius: var(--r-lg); border-color: var(--border); }
.mdent-product-card:hover { box-shadow: var(--shadow-elegant); border-color: var(--border); }
.mdent-product-card__img-wrap { background: #fff; }
.mdent-product-card__img { object-fit: contain; padding: 6%; }
.mdent-product-card__price { color: var(--fg); font-weight: 500; }
.mdent-product-card__price ins { color: var(--fg); }
.mdent-product-card__footer { border-color: var(--border); }

.woocommerce a.button.mdent-product-card__atc-btn,
.woocommerce a.button.mdent-product-card__atc-btn-lg,
.woocommerce a.button.mdent-product-card__footer-atc,
.woocommerce a.button.mdent-bs-card__atc,
.woocommerce a.button.mdent-bundle-card__atc {
	position: relative; transition: background-color 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.woocommerce a.button.mdent-product-card__footer-atc { box-shadow: var(--shadow-soft); }
.woocommerce a.button.mdent-product-card__footer-atc:hover { transform: scale(1.06); }

/* Loading: spinner replaces the content */
.woocommerce a.button.add_to_cart_button.loading { color: transparent !important; pointer-events: none; opacity: 1 !important; }
.woocommerce a.button.add_to_cart_button.loading svg { visibility: hidden; }
.woocommerce a.button.add_to_cart_button.loading::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 1rem; height: 1rem; margin: -0.5rem 0 0 -0.5rem;
	border: 2px solid oklch(0.985 0.005 80 / 0.35); border-top-color: var(--primary-fg); border-radius: 999px;
	animation: mdent-spin 0.7s linear infinite; background: none;
}
/* Added: champagne check state (text set by mini-cart.js) */
.woocommerce a.button.add_to_cart_button.is-added,
.woocommerce a.button.add_to_cart_button.is-added:hover { background: var(--champagne-text) !important; color: #fff !important; }
.woocommerce a.button.add_to_cart_button.is-added svg { visibility: visible; }

/* Variable products: the card button leads to the option picker */
.mdent-product-card__footer-atc.mdent-atc--choose svg,
.mdent-product-card__atc-btn.mdent-atc--choose svg { stroke-width: 2; }

/* ---------- „Pranešti, kai atsiras“ (inc/stock-alerts.php, assets/js/stock-alert.js) ---------- */
.mdent-alert[hidden] { display: none; }
.mdent-alert[data-mdent-alert="variation"] { margin-top: 0.75rem; }
.mdent-alert__open {
	display: flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 3.25rem; padding: 0.5rem 1.5rem;
	border-radius: 999px; background: var(--primary); color: var(--primary-fg); cursor: pointer; list-style: none;
	font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.02em; text-align: center;
	transition: background-color 0.2s, color 0.2s;
}
.mdent-alert__open::-webkit-details-marker { display: none; }
.mdent-alert__open:hover { background: var(--ink); }
.mdent-alert__open:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.mdent-alert.is-done .mdent-alert__open { background: var(--sand); color: var(--champagne-text); }
.mdent-alert__form {
	display: grid; gap: 0.6rem; margin: 0.75rem 0 0; padding: 1rem;
	border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card);
}
.mdent-alert__lead { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--fg); }
.mdent-alert__field { display: grid; gap: 0.3rem; font-size: 0.8125rem; color: var(--muted-fg); }
.mdent-alert__field select {
	height: 3rem; padding: 0 0.75rem; border: 1px solid var(--border); border-radius: var(--r-sm);
	background: var(--card); color: var(--fg); font: inherit; font-size: 16px;
}
.mdent-alert__choices { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-size: 0.9rem; color: var(--fg); }
.mdent-alert__choice { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.mdent-alert__choice input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--ink); }
.mdent-alert__input, .mdent-alert__qty input {
	box-sizing: border-box; padding: 0.75rem 0.85rem; border: 1px solid var(--input); border-radius: var(--r-sm);
	background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; /* 16px: no zoom-in on iPhones */
}
.mdent-alert__input { width: 100%; }
.mdent-alert__input:focus, .mdent-alert__qty input:focus { outline: 2px solid var(--ring); outline-offset: 1px; border-color: transparent; }
.mdent-alert__input[hidden], .mdent-alert__msg[hidden] { display: none; }
.mdent-alert__qty { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-size: 0.8125rem; color: var(--muted-fg); }
.mdent-alert__qty input { width: 5rem; text-align: center; }
.mdent-alert__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mdent-alert .btn.mdent-alert__submit { width: 100%; min-height: 3rem; }
.mdent-alert__note { margin: 0; font-size: 0.72rem; line-height: 1.5; color: var(--muted-fg); }
.mdent-alert__note a { color: inherit; }
.mdent-alert__msg { margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--champagne-text); }
.mdent-alert__msg.is-error { color: var(--destructive); }
.mdent-alert.is-busy .mdent-alert__form { opacity: 0.6; pointer-events: none; }
/* Shop cards: the sold-out label is the way to be told */
.mdent-product-card__notify {
	display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; white-space: nowrap;
	color: var(--champagne-text); text-decoration: underline; text-underline-offset: 2px;
}
.mdent-product-card__notify:hover { color: var(--fg); }
