/* =========================================================
   Commerce polish: shop, single product, cart (Signal system).
   Scoped by body class so checkout and other pages are untouched.
   ========================================================= */

@keyframes dermyra-commerce-rise {
	from { opacity: 0; transform: translateY(22px); }
	to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   SHOP
   --------------------------------------------------------- */
body.post-type-archive-product .woocommerce-breadcrumb,
body.post-type-archive-product .woocommerce-products-header,
body.post-type-archive-product .woocommerce-result-count,
body.post-type-archive-product .woocommerce-ordering {
	display: none;
}

.shop-intro { padding: 96px 24px 88px; }
.shop-intro h1 {
	max-width: 760px;
	font-size: 40px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.05;
}
.shop-intro__sub {
	max-width: 480px;
	margin: 24px auto 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--color-gray-mid);
}
.shop-intro > * { animation: dermyra-commerce-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.shop-intro > :nth-child(2) { animation-delay: 0.12s; }
.shop-intro > :nth-child(3) { animation-delay: 0.24s; }
@media (min-width: 768px) {
	.shop-intro { padding: 128px 48px 112px; }
	.shop-intro h1 { font-size: 64px; }
}

body.post-type-archive-product ul.products {
	padding: 64px 24px 112px;
	gap: 28px;
	max-width: 1080px;
}
body.post-type-archive-product ul.products li.product {
	position: relative;
	display: flex !important;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--color-gray-light);
	border-radius: var(--radius-sm);
	text-align: left;
	transition: opacity 0.8s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s ease;
}
body.post-type-archive-product ul.products li.product.reveal.is-visible:nth-child(2) { transition-delay: 0.12s; }
@media (hover: hover) {
	body.post-type-archive-product ul.products li.product:hover {
		border-color: var(--color-accent);
		transform: translateY(-4px);
	}
}
body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex-direction: column;
	flex: 1;
}
body.post-type-archive-product ul.products li.product img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
	border-radius: 0;
	padding: 12px;
	box-sizing: border-box;
	margin: 0 !important;
}
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
	padding: 20px 24px 0;
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
}
body.post-type-archive-product ul.products li.product .price {
	display: block;
	padding: 10px 24px 0;
	font-size: 18px;
}
body.post-type-archive-product ul.products li.product .price ins {
	text-decoration: none;
	font-weight: 700;
	color: var(--color-accent);
}
body.post-type-archive-product ul.products li.product .button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	margin: 20px 24px 24px;
	padding: 0 24px;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	transition: background-color 0.15s;
}
body.post-type-archive-product ul.products li.product .button:hover { background: var(--color-accent-hover); color: #fff; }

/* Sale badge, sharp cobalt tag instead of WooCommerce's round olive circle */
.woocommerce span.onsale,
.wc-block-components-product-sale-badge {
	position: absolute;
	top: 16px !important;
	left: 16px !important;
	right: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 7px 10px !important;
	border-radius: var(--radius-sm) !important;
	background: var(--color-accent) !important;
	border: 0 !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1 !important;
	z-index: 2;
}

/* ---------------------------------------------------------
   SINGLE PRODUCT
   --------------------------------------------------------- */
body.single-product .product-hero { padding: 56px 24px 72px; }
body.single-product .product-hero__category {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
body.single-product .product-hero__category::before {
	content: "";
	width: 20px;
	height: 1px;
	background: currentColor;
	opacity: 0.7;
}
body.single-product .product-hero__title {
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.05;
}
body.single-product .product-hero__subtitle { font-size: 17px; color: rgba(245, 245, 242, 0.7); }

/* Gallery fills its column instead of WooCommerce's 48% float */
body.single-product .product-hero__media {
	aspect-ratio: auto;
	display: block;
	overflow: hidden;
	background: #fff;
	border-radius: var(--radius-sm);
	width: 100%;
	max-width: 480px;
}
body.single-product .product-hero__media .woocommerce-product-gallery {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}
body.single-product .product-hero__media .flex-viewport { background: #fff; }
body.single-product .product-hero__media .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
	object-fit: contain;
}
body.single-product .product-hero__media .flex-control-thumbs {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin: 0 !important;
	padding: 12px;
	list-style: none;
	background: #fff;
	border-top: 1px solid var(--color-gray-light);
}
body.single-product .product-hero__media .flex-control-thumbs li {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
}
body.single-product .product-hero__media .flex-control-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	opacity: 0.5;
	border: 1px solid var(--color-gray-light);
	cursor: pointer;
	transition: opacity 0.2s, border-color 0.2s;
}
body.single-product .product-hero__media .flex-control-thumbs img:hover,
body.single-product .product-hero__media .flex-control-thumbs img.flex-active {
	opacity: 1;
}
body.single-product .product-hero__media .flex-control-thumbs img.flex-active { border-color: var(--color-accent); }

@media (min-width: 768px) {
	body.single-product .product-hero { padding: 88px 48px 104px; }
	body.single-product .product-hero__inner { align-items: start; }
	body.single-product .product-hero__media { justify-self: end; }
	body.single-product .product-hero__title { font-size: 56px; }

	/* Buy box */
	body.single-product .product-hero__cta {
		margin-top: 36px;
		padding: 28px;
		border: 1px solid rgba(245, 245, 242, 0.16);
		border-radius: var(--radius-sm);
		background: var(--color-black-soft);
	}
}
body.single-product .product-hero__cta .price {
	font-family: var(--font-heading);
	font-size: 36px;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin-bottom: 24px;
}
body.single-product .product-hero__cta .price del { font-size: 18px; font-weight: 500; }

body.single-product .product-hero__cta form.cart.variations_form { display: block; }
body.single-product .product-hero__cta table.variations { width: 100%; margin: 0; border: 0; }
body.single-product .product-hero__cta table.variations tbody,
body.single-product .product-hero__cta table.variations tr { display: block; }
body.single-product .product-hero__cta table.variations th.label,
body.single-product .product-hero__cta table.variations td.value {
	display: block;
	padding: 0;
	width: 100%;
}
body.single-product .product-hero__cta table.variations th.label { padding-bottom: 10px; }
body.single-product .product-hero__cta .variations select { min-height: 52px; font-size: 15px; }
body.single-product .product-hero__cta a.reset_variations {
	display: inline-block;
	margin-top: 10px;
	font-size: 12px;
	color: var(--color-gray-mid);
	text-decoration: underline;
	text-underline-offset: 3px;
}
body.single-product .product-hero__cta .woocommerce-variation-add-to-cart {
	display: flex;
	align-items: stretch;
	gap: 12px;
	margin-top: 20px;
}
body.single-product .product-hero__cta .woocommerce-variation-add-to-cart .quantity .qty {
	min-height: 56px;
	width: 68px;
}
body.single-product .product-hero__cta .single_add_to_cart_button {
	flex: 1;
	min-height: 56px;
	padding: 0 28px;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
}
body.single-product .product-hero__cta .single_add_to_cart_button:not(.disabled):hover {
	background: var(--color-accent-hover);
}
body.single-product .product-hero__cta .woocommerce-variation-description p,
body.single-product .product-hero__cta .woocommerce-variation-availability p { margin-top: 12px; font-size: 13px; color: var(--color-gray-mid); }
body.single-product .product-hero__cta .woocommerce-variation-price { margin-top: 12px; }

/* Trust row under the buy box */
.product-hero__trust {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}
.product-hero__trust li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: rgba(245, 245, 242, 0.75);
}
.product-hero__trust svg { width: 16px; height: 16px; color: var(--color-accent); flex-shrink: 0; }
@media (max-width: 767px) {
	.product-hero__trust { display: none; }
}

/* Story sections */
body.single-product .product-problem { padding: 96px 24px; }
body.single-product .product-problem p {
	max-width: 760px;
	font-family: var(--font-heading);
	font-size: 26px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.015em;
}
body.single-product .product-solution { padding: 96px 24px; }
body.single-product .product-solution .narrow { max-width: 680px; margin: 0 auto; }
body.single-product .product-benefits { padding: 96px 24px; }
body.single-product .product-benefits__grid { counter-reset: benefit; max-width: 1040px; gap: 40px; }
body.single-product .product-benefits__grid > div {
	counter-increment: benefit;
	padding-top: 24px;
	border-top: 1px solid var(--color-gray-light);
}
body.single-product .product-benefits__grid > div::before {
	content: "0" counter(benefit);
	display: block;
	margin-bottom: 14px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.15em;
	color: var(--color-accent);
}
body.single-product .product-benefits__grid h3 { font-size: 22px; font-family: var(--font-heading); font-weight: 800; }
body.single-product .product-benefits__grid p { font-size: 15px; }

body.single-product .product-specs { padding: 96px 24px; }
body.single-product .product-specs h2,
body.single-product .product-testimonials h2,
body.single-product .product-faq h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
body.single-product .product-specs__row { padding: 20px 0; }
body.single-product .product-specs__row dt {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--color-gray-mid);
}
body.single-product .product-specs__row dd { font-size: 16px; color: var(--color-off-white); }

body.single-product .product-testimonials { padding: 96px 24px; }
body.single-product .product-testimonials__grid > div {
	padding: 32px;
	background: #fff;
	border: 1px solid var(--color-gray-light);
	border-top: 2px solid var(--color-accent);
	border-radius: var(--radius-sm);
}
body.single-product .product-faq { padding: 96px 24px; }
@media (min-width: 768px) {
	body.single-product .product-problem p { font-size: 36px; }
	body.single-product .product-specs h2,
	body.single-product .product-testimonials h2,
	body.single-product .product-faq h2 { font-size: 40px; }
}

/* ---------------------------------------------------------
   CART
   --------------------------------------------------------- */
body.woocommerce-cart .dermyra-shop-wrap { padding: 56px 24px 112px; }
body.woocommerce-cart .dermyra-shop-wrap > h1 {
	max-width: var(--container-max);
	margin: 0 auto 36px;
	padding: 0;
	font-size: 36px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--color-black);
}
body.woocommerce-cart .wp-block-woocommerce-cart {
	max-width: var(--container-max);
	margin: 0 auto;
}
@media (min-width: 768px) {
	body.woocommerce-cart .dermyra-shop-wrap { padding: 80px 48px 128px; }
	body.woocommerce-cart .dermyra-shop-wrap > h1 { font-size: 56px; margin-bottom: 48px; }
}

/* Line items */
body.woocommerce-cart .wc-block-cart-items { border: 0; margin: 0; }
body.woocommerce-cart .wc-block-cart-items thead th {
	padding: 0 0 14px;
	border-bottom: 1px solid var(--color-black);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--color-gray-dark);
}
body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row { border-bottom: 1px solid var(--color-gray-light); }
body.woocommerce-cart .wc-block-cart-items td { padding: 28px 16px 28px 0; vertical-align: top; }
body.woocommerce-cart .wc-block-cart-item__image { width: 112px; min-width: 112px; }
body.woocommerce-cart .wc-block-cart-item__image img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--color-gray-light);
	border-radius: var(--radius-sm);
	background: #fff;
}
body.woocommerce-cart .wc-block-components-product-name {
	font-family: var(--font-heading);
	font-size: 19px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--color-black);
	text-decoration: none;
}
body.woocommerce-cart .wc-block-cart-item__total .wc-block-components-product-price {
	font-size: 18px;
	font-weight: 700;
}
body.woocommerce-cart .wc-block-components-product-badge,
body.woocommerce-cart .wc-block-components-sale-badge {
	border-radius: var(--radius-sm);
}
body.woocommerce-cart .wc-block-cart-item__remove-link {
	font-size: 12px;
	color: var(--color-gray-dark);
}

/* Totals card */
body.woocommerce-cart .wc-block-cart__sidebar {
	box-sizing: border-box;
	align-self: flex-start;
	padding: 28px !important;
	background: #fff;
	border: 1px solid var(--color-gray-light);
	border-radius: var(--radius-sm);
}
@media (min-width: 783px) {
	body.woocommerce-cart .wc-block-cart__sidebar { position: sticky; top: 96px; }
}
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 24px;
	font-weight: 800;
}
body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-cart .wc-block-cart__submit-container .wc-block-components-button {
	min-height: 56px;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
}
body.woocommerce-cart .wc-block-cart__submit-button:hover { background: var(--color-accent-hover); }

/* Cross-sells ("You may be interested in") as a tidy card row */
body.woocommerce-cart .wp-block-woocommerce-product-collection {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--color-gray-light);
}
body.woocommerce-cart .wp-block-woocommerce-product-collection h2 {
	font-family: var(--font-heading);
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 24px !important;
}
body.woocommerce-cart ul.wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
body.woocommerce-cart ul.wc-block-product-template > li {
	position: relative;
	width: auto !important;
	margin: 0 !important;
	padding: 0 0 18px;
	background: #fff;
	border: 1px solid var(--color-gray-light);
	border-radius: var(--radius-sm);
	text-align: left;
}
body.woocommerce-cart ul.wc-block-product-template .wc-block-components-product-image,
body.woocommerce-cart ul.wc-block-product-template .wc-block-components-product-image img {
	width: 100%;
	margin: 0;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
body.woocommerce-cart ul.wc-block-product-template .wp-block-post-title,
body.woocommerce-cart ul.wc-block-product-template .wc-block-components-product-price {
	padding: 0 16px;
	text-align: left;
}
body.woocommerce-cart ul.wc-block-product-template .wp-block-post-title {
	margin: 14px 0 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}
body.woocommerce-cart ul.wc-block-product-template .wp-block-post-title a { color: var(--color-black); text-decoration: none; }

@media (max-width: 782px) {
	body.woocommerce-cart .wc-block-cart-item__image { width: 80px; min-width: 80px; }
	body.woocommerce-cart .wc-block-cart__sidebar { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.shop-intro > * { animation: none; }
	body.post-type-archive-product ul.products li.product { transition: none; }
}

/* --- shop grid fixes: hide the duplicate h1, centre a 2-up grid --- */
body.post-type-archive-product .dermyra-shop-wrap > .page-title { display: none; }
body.post-type-archive-product ul.products {
	justify-content: center;
	max-width: 920px;
}
body.post-type-archive-product ul.products li.product { width: 100% !important; }
@media (min-width: 640px) {
	body.post-type-archive-product ul.products li.product { width: calc(50% - 16px) !important; }
}

/* WooCommerce clearfix pseudo-elements become flex items and eat the gap */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after { display: none !important; content: none !important; }

/* --- price: out-specify WooCommerce's `.woocommerce div.product p.price` (1.25em) --- */
body.single-product div.product .product-hero__cta p.price {
	font-family: var(--font-heading);
	font-size: 36px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin-bottom: 24px;
}
body.single-product div.product .product-hero__cta p.price del { font-size: 18px; font-weight: 500; }
body.single-product div.product .product-hero__cta .woocommerce-variation-price .price { font-size: 16px; }

/* --- mobile: show price + policy line in the hero; the sticky bar stays the only form --- */
@media (max-width: 767px) {
	body.single-product .product-hero__cta { display: block; margin-top: 24px; }
	body.single-product .product-hero__cta form.cart { display: none; }
	body.single-product div.product .product-hero__cta p.price { font-size: 32px; margin-bottom: 0; }
	body.single-product .product-hero__fineprint { display: block; margin-top: 14px; }
}

@media (max-width: 767px) {
	body.single-product .product-hero__cta form.cart.variations_form,
	body.single-product .product-hero__cta form.cart { display: none !important; }
}

/* --- mobile sticky add-to-cart bar: keep it to one tidy row after a size is picked --- */
@media (max-width: 767px) {
	body.single-product .mobile-add-to-cart { align-items: center; }
	body.single-product .mobile-add-to-cart form.cart { flex-wrap: nowrap; align-items: center; }
	body.single-product .mobile-add-to-cart .quantity,
	body.single-product .mobile-add-to-cart a.reset_variations,
	body.single-product .mobile-add-to-cart .woocommerce-variation { display: none !important; }
	body.single-product .mobile-add-to-cart .single_variation_wrap { flex-shrink: 0; margin: 0; }
	body.single-product .mobile-add-to-cart .woocommerce-variation-add-to-cart { display: flex; margin: 0; }
	body.single-product .mobile-add-to-cart .single_add_to_cart_button {
		min-height: 48px;
		padding: 0 20px;
		border-radius: var(--radius-sm);
		background: var(--color-accent);
		color: #fff;
		font-weight: 600;
	}
	body.single-product .mobile-add-to-cart .variations select { min-height: 48px; }
}

@media (max-width: 767px) {
	body.single-product .mobile-add-to-cart table.variations { margin: 0 !important; }
	body.single-product .mobile-add-to-cart .variations td,
	body.single-product .mobile-add-to-cart .variations th { padding: 0 !important; }
	body.single-product .mobile-add-to-cart .reset_variations_alert { display: none; }
}

/* --- cart on phones: each line item becomes a grid (thumb | details), not a table --- */
@media (max-width: 782px) {
	body.woocommerce-cart .wc-block-cart-items thead { display: none; }
	body.woocommerce-cart .wc-block-cart-items,
	body.woocommerce-cart .wc-block-cart-items tbody { display: block; width: 100%; }
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row {
		display: grid;
		grid-template-columns: 72px minmax(0, 1fr);
		column-gap: 16px;
		padding: 20px 0;
	}
	body.woocommerce-cart .wc-block-cart-items td { display: block; padding: 0; border: 0; width: auto; }
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__image {
		grid-column: 1;
		grid-row: 1 / span 2;
		width: 72px;
		min-width: 0;
	}
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__product { grid-column: 2; }
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__total {
		grid-column: 2;
		margin-top: 14px;
		text-align: left;
	}
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__total * { text-align: left; align-items: flex-start; }
	body.woocommerce-cart ul.wc-block-product-template { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	body.woocommerce-cart ul.wc-block-product-template .wp-block-post-title { font-size: 15px !important; padding: 0 12px; }
	body.woocommerce-cart ul.wc-block-product-template .wc-block-components-product-price { padding: 0 12px; font-size: 14px; }
}

@media (max-width: 782px) {
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__total {
		position: static !important;
		top: auto !important;
		right: auto !important;
		transform: none !important;
		grid-row: 2;
		width: auto !important;
		max-width: none !important;
		display: block;
	}
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__product { grid-row: 1; }
}

@media (max-width: 782px) {
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product {
		grid-column: 2 !important;
		grid-row: 1 !important;
	}
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
		grid-column: 2 !important;
		grid-row: 2 !important;
		justify-self: start !important;
		align-self: start !important;
		margin-top: 14px;
	}
	body.woocommerce-cart .wc-block-cart-items .wc-block-cart-item__total-price-and-sale-badge-wrapper {
		flex-direction: row;
		align-items: center;
		gap: 10px;
	}
}

/* ---------------------------------------------------------
   CHECKOUT (visual only: no field, gateway or logic changes)
   --------------------------------------------------------- */
body.woocommerce-checkout .dermyra-shop-wrap { padding: 56px 24px 112px; }
body.woocommerce-checkout .dermyra-shop-wrap > h1 {
	max-width: var(--container-max);
	margin: 0 auto 36px;
	padding: 0;
	font-size: 36px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--color-black);
}
body.woocommerce-checkout .wp-block-woocommerce-checkout {
	max-width: var(--container-max);
	margin: 0 auto;
}
@media (min-width: 768px) {
	body.woocommerce-checkout .dermyra-shop-wrap { padding: 80px 48px 128px; }
	body.woocommerce-checkout .dermyra-shop-wrap > h1 { font-size: 56px; margin-bottom: 48px; }
}

/* Numbered steps */
body.woocommerce-checkout .wc-block-checkout__form { counter-reset: dermyra-step; }
body.woocommerce-checkout .wc-block-components-checkout-step {
	counter-increment: dermyra-step;
	margin-top: 8px;
	padding-top: 28px;
	border-top: 1px solid var(--color-gray-light);
}
body.woocommerce-checkout .wc-block-components-checkout-step__title {
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--color-black);
}
body.woocommerce-checkout .wc-block-components-checkout-step__title::before {
	content: "0" counter(dermyra-step);
	display: block;
	margin-bottom: 8px;
	font-family: var(--font-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--color-accent);
}

/* Inputs: crisp 2px corners, quieter border, clear cobalt focus ring */
body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-textarea,
body.woocommerce-checkout .wc-blocks-components-select__select,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input {
	border-color: #bdbdb8;
	border-radius: var(--radius-sm);
	background-color: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}
body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-textarea:focus,
body.woocommerce-checkout .wc-blocks-components-select__select:focus,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input:focus {
	border-color: var(--color-accent);
	box-shadow: 0 0 0 1px var(--color-accent);
	outline: none;
}
body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-blocks-components-select__label { color: var(--color-gray-dark); }

/* Shipping + payment option rows */
body.woocommerce-checkout .wc-block-components-radio-control__option,
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option {
	border-radius: var(--radius-sm);
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--color-gray-light);
}
body.woocommerce-checkout .wc-block-components-radio-control__option-checked,
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option:has(.wc-block-components-radio-control__input:checked) {
	box-shadow: inset 0 0 0 2px var(--color-accent) !important;
}
body.woocommerce-checkout .wc-block-components-radio-control__input:checked { border-color: var(--color-accent); }
body.woocommerce-checkout .wc-block-components-radio-control__input:checked::before { background: var(--color-accent); }

/* Order summary as a card matching the cart totals */
body.woocommerce-checkout .wc-block-checkout__sidebar {
	box-sizing: border-box;
	align-self: flex-start;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--color-gray-light);
	border-radius: var(--radius-sm);
}
body.woocommerce-checkout .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
	border: 0;
	padding: 0;
	background: transparent;
}
body.woocommerce-checkout .wc-block-components-order-summary .wc-block-components-product-name {
	font-family: var(--font-heading);
	font-weight: 800;
	color: var(--color-black);
}
body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 24px;
	font-weight: 800;
}

/* Express checkout box + place order */
body.woocommerce-checkout .wc-block-components-express-payment--checkout .wc-block-components-express-payment__content {
	border-radius: var(--radius-sm);
	background: #fff;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	min-height: 56px;
	border-radius: var(--radius-sm);
	background: var(--color-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover { background: var(--color-accent-hover); }
body.woocommerce-checkout .wc-block-checkout__terms { font-size: 13px; color: var(--color-gray-dark); }
body.woocommerce-checkout .wc-block-components-checkout-return-to-cart-button { font-size: 13px; color: var(--color-gray-dark); }

@media (max-width: 782px) {
	body.woocommerce-checkout .wc-block-checkout__sidebar { padding: 20px; margin-bottom: 24px; }
	body.woocommerce-checkout .wc-block-components-checkout-step__title { font-size: 20px; }
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	min-height: 56px !important;
	font-size: 15px !important;
}

@media (max-width: 782px) {
	body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title {
		border: 0 !important;
		padding: 0 !important;
	}
}

/* --- product gallery: swipeable on phones --- */
body.single-product .product-hero__media .flex-viewport { position: relative; }
.gallery-counter {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 3;
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	background: rgba(10, 10, 12, 0.78);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}
@media (max-width: 767px) {
	/* 15 thumbnails used to stack into a ~330px block that pushed the buy box off screen */
	body.single-product .product-hero__media .flex-control-thumbs {
		display: flex !important;
		flex-wrap: nowrap;
		gap: 8px;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 10px 12px;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	body.single-product .product-hero__media .flex-control-thumbs::-webkit-scrollbar { display: none; }
	body.single-product .product-hero__media .flex-control-thumbs li {
		flex: 0 0 64px;
		width: 64px !important;
		scroll-snap-align: center;
	}
	body.single-product .product-hero__media .flex-control-thumbs img {
		aspect-ratio: 1 / 1;
		object-fit: cover;
	}
}

/* Terms checkbox: make the legal links read as links */
.wc-block-checkout__terms a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.wc-block-checkout__terms a:hover { color: var(--color-accent); }

/* ---------------------------------------------------------
   REVIEWS (product page)
   --------------------------------------------------------- */
body.single-product .product-reviews {
	background: var(--color-off-white);
	color: var(--color-black);
	padding: 96px 24px;
}
body.single-product .product-reviews__inner { max-width: 800px; margin: 0 auto; }
body.single-product .product-reviews .woocommerce-Reviews-title {
	margin: 0 0 28px;
	font-family: var(--font-heading);
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-align: center;
	color: var(--color-black);
}
body.single-product .product-reviews .woocommerce-Reviews-title span { font-weight: inherit; }
body.single-product .product-reviews .woocommerce-noreviews {
	margin: 0;
	padding: 28px;
	text-align: center;
	font-size: 16px;
	line-height: 1.6;
	background: #fff;
	border: 1px solid var(--color-gray-light);
	border-top: 2px solid var(--color-accent);
	border-radius: var(--radius-sm);
	color: var(--color-gray-dark);
}
body.single-product .product-reviews #reviews #comments ol.commentlist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 16px;
}
body.single-product .product-reviews #reviews #comments ol.commentlist li {
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}
body.single-product .product-reviews #reviews #comments ol.commentlist li .comment_container { padding: 0; }
body.single-product .product-reviews #reviews #comments ol.commentlist li .comment-text {
	margin: 0;
	padding: 24px 28px;
	background: #fff;
	border: 1px solid var(--color-gray-light);
	border-top: 2px solid var(--color-accent);
	border-radius: var(--radius-sm);
}
body.single-product .product-reviews .star-rating {
	float: none;
	margin: 0 0 10px;
	font-size: 15px;
	color: var(--color-accent);
}
body.single-product .product-reviews .star-rating::before { color: #d3d3cf; }
body.single-product .product-reviews #reviews #comments ol.commentlist li .comment-text p.meta {
	margin: 0 0 10px;
	font-size: 14px;
	color: var(--color-gray-dark);
}
body.single-product .product-reviews .woocommerce-review__author { font-weight: 700; color: var(--color-black); }
body.single-product .product-reviews .woocommerce-review__verified {
	font-style: normal;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-accent);
}
body.single-product .product-reviews #reviews #comments ol.commentlist li .comment-text .description p {
	margin: 0;
	font-size: 16px;
	line-height: 1.65;
	color: var(--color-black);
}

/* review form */
body.single-product .product-reviews #review_form_wrapper { margin-top: 48px; }
body.single-product .product-reviews #reply-title {
	display: block;
	margin: 0 0 8px;
	font-family: var(--font-heading);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--color-black);
}
body.single-product .product-reviews .comment-notes {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--color-gray-dark);
}
body.single-product .product-reviews .comment-form p,
body.single-product .product-reviews .comment-form-rating { margin: 0 0 18px; }
body.single-product .product-reviews .comment-form label {
	display: block;
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--color-black);
}
body.single-product .product-reviews .comment-form .required { color: var(--color-accent); }
body.single-product .product-reviews .comment-form input[type="text"],
body.single-product .product-reviews .comment-form input[type="email"],
body.single-product .product-reviews .comment-form select,
body.single-product .product-reviews .comment-form textarea {
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	font-size: 16px;
	color: var(--color-black);
	background: #fff;
	border: 1px solid #bdbdb9;
	border-radius: var(--radius-sm);
}
body.single-product .product-reviews .comment-form textarea { min-height: 140px; resize: vertical; }
body.single-product .product-reviews .comment-form input:focus,
body.single-product .product-reviews .comment-form select:focus,
body.single-product .product-reviews .comment-form textarea:focus {
	outline: 2px solid var(--color-accent);
	outline-offset: 1px;
	border-color: var(--color-accent);
}
body.single-product .product-reviews .comment-form p.stars a { color: var(--color-accent); }
body.single-product .product-reviews .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}
body.single-product .product-reviews .comment-form-cookies-consent label {
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}
body.single-product .product-reviews .comment-form-cookies-consent input { margin-top: 3px; }
body.single-product .product-reviews .form-submit { margin: 8px 0 0; }
body.single-product .product-reviews .form-submit .submit {
	min-height: 48px;
	padding: 0 28px;
	background: var(--color-accent);
	color: #fff;
	border: 0;
	border-radius: var(--radius-sm);
	font: 700 13px/1 var(--font-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease;
}
body.single-product .product-reviews .form-submit .submit:hover { background: var(--color-accent-hover); }
body.single-product .product-reviews .woocommerce-verification-required {
	margin-top: 24px;
	font-size: 14px;
	text-align: center;
	color: var(--color-gray-dark);
}

/* rating summary in the product hero (only printed once reviews exist) */
body.single-product .product-hero__rating {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font-size: 14px;
	color: var(--color-off-white);
	text-decoration: none;
}
body.single-product .product-hero__rating .star-rating {
	float: none;
	margin: 0;
	font-size: 14px;
	color: var(--color-accent);
}
body.single-product .product-hero__rating:hover span { text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 768px) {
	body.single-product .product-reviews .woocommerce-Reviews-title { font-size: 40px; }
}
/* WooCommerce styles #respond input#submit with an id selector; match it */
body.single-product .product-reviews #respond input#submit {
	min-height: 48px;
	padding: 0 28px;
	background: var(--color-accent);
	color: #fff;
	border: 0;
	border-radius: var(--radius-sm);
	font: 700 13px/1 var(--font-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
body.single-product .product-reviews #respond input#submit:hover { background: var(--color-accent-hover); color: #fff; }

/* Bundle offer line on Align / Lumbar Stretch */
body.single-product .product-hero__bundle {
	margin: 14px 0 0;
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--color-off-white);
	border: 1px solid var(--color-gray-dark);
	border-left: 2px solid var(--color-accent);
	border-radius: var(--radius-sm);
}

/* Add-to-cart confirmation and errors on the product page */
body.single-product .product-notices { max-width: var(--container-max); margin: 0 auto; padding: 24px 24px 0; }
body.single-product .product-notices .woocommerce-message,
body.single-product .product-notices .woocommerce-error,
body.single-product .product-notices .woocommerce-info { margin: 0; border-radius: var(--radius-sm); }
body.single-product .product-notices .woocommerce-message + *,
body.single-product .product-notices .woocommerce-error + * { margin-top: 12px; }
