/*
 * potensic/assets/css/product.css
 *
 * Product detail page. 1:1 port of the Shopify Enterprise 1.6.1 sheets that the
 * PDP loads — product-page.css (two-column float layout), product.css (option
 * selector + info blocks), media-gallery.css, product-message.css and
 * sticky-atc-panel.css — plus the WordPress-side equivalents of the three app
 * blocks the live page injects (delivery badges, payment badges, review widget).
 *
 * Source of truth: docs/spec/05-product.md §3.
 * Depends on tokens.css (colours, --space-unit, fluid type) and components.css
 * (.btn, .disclosure, .qty-input, .price, .card, .slider, .social).
 */

/* =========================================================================
 * 1. Two-column layout (spec §3.2)
 * ====================================================================== */

.product-main .product-media {
	margin-top: calc(5 * var(--space-unit));
	margin-bottom: calc(5 * var(--space-unit));
}

.product-page .section:first-child {
	margin-top: 0;
}

@media (min-width: 769px) {
	:root {
		--product-column-padding: calc(8 * var(--space-unit));
		--product-info-width: 47%;
	}

	/*
	 * The two columns are floats that their own wrappers deliberately do NOT
	 * contain: that is what lets .product-details slide up underneath the media
	 * column while the info column is still floating. Everything after the
	 * details block clears both.
	 */
	.product-page > .section:not(.product-details),
	.product-page > .product-main + .product-details ~ * {
		clear: both;
	}

	.product-breadcrumbs .breadcrumbs {
		width: calc(100% - var(--product-info-width));
		padding-inline-end: var(--product-column-padding);
		overflow: hidden;
	}

	.product-breadcrumbs + .product-main .product-media,
	.product-breadcrumbs + .product-main .product-info {
		padding-top: 0;
	}

	.product-breadcrumbs + .product-main .product-info::before,
	.product-breadcrumbs + .product-main .product-info::after {
		top: calc(-10 * var(--space-unit) - 1em - 2px);
	}

	.product-main .product-media,
	.product-main + .product-details > .container {
		width: calc(100% - var(--product-info-width));
		float: left;
		clear: left;
	}

	/* Only the details container carries the hairline; next to the gallery the
	   line comes from .product-info::after, so #product-media keeps its full
	   647.36px of content width (spec §3.2 measurement). */
	.product-main + .product-details > .container {
		border-inline-end: 1px solid rgba(var(--text-color) / 0.15);
	}

	.product-main .product-media {
		margin-top: 0;
		margin-bottom: 0;
		padding-top: calc(10 * var(--space-unit));
		padding-bottom: calc(10 * var(--space-unit));
		padding-inline-end: var(--product-column-padding);
	}

	.product-main .product-info {
		position: relative;
		width: var(--product-info-width);
		padding: calc(10 * var(--space-unit)) 0;
		padding-inline-start: var(--product-column-padding);
		float: right;
		background-color: rgba(var(--bg-color));
	}

	.product-main .product-info::before {
		content: "";
		position: absolute;
		top: 0;
		bottom: -2px;
		left: -1px;
		width: 1px;
		background-color: rgba(var(--bg-color));
	}

	/*
	 * The source theme ships `.product-main .product-info:after` with the grey
	 * hairline, but its `content` resolves to `none` on the live store, so no
	 * column divider is painted -- verified against store.potensic.com and all
	 * four absorbed PDP screenshots. Only the white ::before renders, and its
	 * job is to mask the 1px border of the details container underneath.
	 */

	.product-main .product-info--sticky {
		min-height: var(--sticky-height, 0);
	}

	.product-info__sticky {
		position: sticky;
		top: var(--header-end-padded, 48px);
		padding-bottom: 0;
	}

	.product-details .disclosure > summary {
		padding-top: calc(5 * var(--space-unit));
		padding-bottom: calc(5 * var(--space-unit));
	}

	.product-details .disclosure__content {
		padding-bottom: calc(5 * var(--space-unit));
	}

	.product-main + .product-details {
		max-width: calc(var(--page-width, 1320px) + var(--gutter) * 2);
		margin: 0 auto;
		padding: 0 var(--gutter);
	}

	.product-main + .product-details > .container {
		max-width: none;
		margin: 0;
		padding-top: calc(2 * var(--space-unit));
		padding-bottom: calc(10 * var(--space-unit));
		padding-inline-start: 0;
		padding-inline-end: var(--product-column-padding);
	}

	.product-details + .section::before {
		content: "";
		display: block;
		position: relative;
		z-index: -1;
		width: 100%;
		height: 1px;
		background-color: rgba(var(--text-color) / 0.15);
	}
}

@media (min-width: 1024px) {
	.product-details .disclosure > summary {
		padding-top: calc(8 * var(--space-unit));
		padding-bottom: calc(8 * var(--space-unit));
	}

	.product-details .disclosure__content {
		padding-bottom: calc(8 * var(--space-unit));
	}
}

@media (min-width: 1280px) {
	:root {
		--product-column-padding: calc(12 * var(--space-unit));
	}

	.product-main .product-media,
	.product-main .product-info {
		padding-top: calc(12 * var(--space-unit));
	}
}

/* =========================================================================
 * 2. Media gallery (spec §3.3)
 * ====================================================================== */

.media-gallery {
	--media-gap: calc(2 * var(--space-unit));
	--media-gutter: calc(4 * var(--space-unit));

	display: block;
}

.media-gallery__viewer {
	border: 1px solid var(--gallery-border-color, #fff);
	background-color: var(--gallery-bg-color, #f4f4f4);
}

.media-viewer,
.media-thumbs {
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: scroll;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.media-viewer::-webkit-scrollbar,
.media-thumbs::-webkit-scrollbar {
	display: none;
}

.media-viewer__item,
.media-thumbs__item {
	scroll-snap-align: start;
}

.media-viewer__item:not(:last-child),
.media-thumbs__item:not(:last-child) {
	margin-inline-end: var(--media-gap);
}

.media-viewer__item {
	flex: 0 0 100%;
	text-align: center;
}

.media-gallery__thumbs {
	margin-top: var(--media-gap);
}

.media-thumbs__item {
	flex: 0 0 84px;
}

.media-thumbs__btn {
	padding: 0;
	border: 1px solid var(--gallery-border-color, #fff);
	background-color: var(--gallery-bg-color, #f4f4f4);
	cursor: pointer;
}

.media-thumbs__btn::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	transition: width 0.3s;
	background-color: rgb(var(--text-color));
}

.media-thumbs__btn.is-active::after {
	width: 100%;
}

.media-ctrl__btn,
.media-ctrl__counter {
	position: absolute;
	border: 1px solid rgba(var(--text-color) / 0.15);
	border-radius: var(--btn-border-radius, 0);
	background-color: rgba(var(--bg-color));
	color: rgb(var(--text-color));
}

.media-ctrl__btn {
	z-index: 5;
	padding: calc(2 * var(--space-unit));
	cursor: pointer;
}

.media-ctrl__btn[disabled] {
	opacity: 0.4;
	cursor: default;
}

.media-ctrl__btn[name="prev"] {
	left: var(--media-gutter);
}

.media-ctrl__btn[name="next"] {
	right: var(--media-gutter);
}

.media-ctrl__counter {
	z-index: 2;
	right: var(--media-gutter);
	bottom: var(--media-gutter);
	padding: calc(2 * var(--space-unit)) calc(4 * var(--space-unit));
	line-height: 2.4rem;
}

.media-gallery .loading-spinner {
	position: absolute;
	top: calc(50% - 10px);
	right: calc(50% - 10px);
	width: 20px;
	height: 20px;
	transition: opacity 0.4s 0.3s;
	animation: spinner 0.6s linear infinite;
	border: 2px solid rgb(var(--text-color));
	border-radius: 50%;
	border-top-color: rgba(var(--bg-color));
}

.media-gallery .loading-spinner--out {
	transition-duration: 0s;
	opacity: 0;
}

.media--zoom .zoom-image {
	display: none;
}

.media-gallery__thumbs {
	display: none;
}

@media (min-width: 769px) {
	.media-gallery {
		--media-gap: calc(3 * var(--space-unit));
	}

	.media-gallery__thumbs {
		display: block;
	}

	.product-image.img-fit--contain,
	.zoom-image--contain {
		left: 50%;
		width: auto;
		height: 100%;
		transform: translate(-50%);
	}

	.media--zoom {
		cursor: zoom-in;
	}

	.media--zoom .zoom-image {
		height: 100%;
		opacity: 0;
		object-fit: none;
		object-position: 50% 50%;
	}

	.media-viewer__item:not(:first-child) .media--zoom .zoom-image {
		display: block;
	}

	.media--zoom .product-image,
	.media--zoom .zoom-image {
		transition: opacity 0.1s;
	}

	.media--zoom:not(.media--zoom-not-loaded):hover .product-image {
		opacity: 0;
	}

	.media--zoom:not(.media--zoom-not-loaded):hover .zoom-image {
		display: block;
		opacity: 1;
	}

	.media--cover {
		top: -1px;
		right: -1px;
		bottom: -1px;
		left: -1px;
		width: auto;
		height: auto;
	}
}

@media (min-width: 1024px) {
	.media-gallery {
		--media-gutter: calc(6 * var(--space-unit));
	}

	.media-thumbs__item {
		flex: 0 0 80px;
	}
}

/* =========================================================================
 * 3. Information column blocks (spec §3.4)
 * ====================================================================== */

:root {
	--product-details-block-margin: calc(8 * var(--space-unit));
	--product-details-block-margin-sm: calc(3 * var(--space-unit));
	--product-info-block-margin: calc(6 * var(--space-unit));
}

.product-info__block,
.product-details__block {
	margin: var(--product-info-block-margin) 0;
}

.product-info__block:first-child,
.product-details__block:first-child {
	margin-top: 0;
}

.product-info__block:last-child,
.product-details__block:last-child {
	margin-bottom: 0;
}

.product-info__block:empty,
.product-details__block:empty {
	display: none;
}

.product-info__block--sm {
	margin: var(--product-details-block-margin-sm) 0;
}

.product-details__block {
	margin: var(--product-details-block-margin) 0;
}

.product-vendor-sku + .product-info__title {
	margin-top: -4px;
}

/*
 * Ported verbatim from the source theme. `.product-info__rating` is the class
 * the Shopify theme uses for its *native* rating block; the live store renders
 * the Judge.me app block instead (plain .product-info__block), which is why the
 * review summary keeps the full 32px gap below the title. Our review summary
 * uses .product-info__reviews for the same reason.
 */
.product-info__title + .product-info__rating,
.product-price + variant-label {
	margin-top: -8px;
}

.product-info__title .product-title {
	margin-bottom: 0.5em;
}

.product-info__price {
	font-size: var(--h4-font-size);
	line-height: 1.5;
}

.product-info__price .price__current {
	font-weight: 700;
}

.product-info__price .price__was {
	font-weight: 400;
}

.product-description {
	overflow: auto;
}

@media (min-width: 769px) {
	:root {
		--product-details-block-margin: calc(12 * var(--space-unit));
		--product-info-block-margin: calc(8 * var(--space-unit));
	}
}

/* -- 3.1 Variant picker ------------------------------------------------- */

variant-picker {
	display: block;
}

.option-selector {
	margin: 0;
	padding: 0;
	border: 0;
}

.option-selector:not(:last-child) {
	margin-bottom: 3rem;
}

.option-selector .label {
	margin-bottom: 0.8em;
}

.option-selector__btns {
	margin-top: -12px;
}

.opt-label {
	min-width: 64px;
	margin-top: 12px;
	margin-inline-end: 12px;
	transition: opacity 0.6s, color 0.6s, border-color 0.6s;
	border: var(--btn-border-width) solid rgba(var(--text-color) / 0.2);
	border-radius: var(--btn-border-radius, 0);
	font-weight: 700;
	cursor: pointer;
}

.opt-label--btn {
	min-width: 50px;
	padding: var(--btn-padding-y, 12px) 16px;
	background-color: rgba(var(--bg-color));
	color: rgb(var(--text-color));
}

.opt-label:hover {
	background-color: transparent;
}

.opt-label--btn:hover {
	background-color: rgba(var(--text-color) / 0.05);
}

.opt-label:not([data-swatch])::after {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: var(--btn-border-radius, 0);
}

.opt-label:not([data-swatch]):hover::after {
	box-shadow: 0 1px 3px rgba(var(--input-text-color) / 0.4);
}

.opt-btn:checked + .opt-label--btn {
	background-color: rgba(var(--bg-color));
	color: rgb(var(--text-color));
}

.opt-btn:checked + .opt-label:not(.opt-label--swatch)::after {
	border-radius: var(--btn-border-radius, 0);
	box-shadow: 0 0 0 2px rgba(var(--text-color) / 0.6);
}

.opt-btn:focus-visible + .opt-label {
	outline-offset: 3px;
}

.is-unavailable + .opt-label:not(.opt-label--image) {
	background: linear-gradient(to bottom left, transparent calc(50% - 1px), rgba(var(--text-color) / 0.2) calc(50% - 1px), rgba(var(--text-color) / 0.2) calc(50% + 1px), transparent calc(50% + 1px)) no-repeat;
}

.is-unavailable + .opt-label:not([data-swatch]) {
	overflow: hidden;
}

.is-unavailable + .opt-label:not([data-swatch])::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(var(--text-color) / 0.05);
}

.opt-btn.is-unavailable:checked + .opt-label:not(.opt-label--swatch) {
	border-color: rgba(var(--text-color) / 0.6);
}

.opt-btn.is-unavailable:checked + .opt-label:not(.opt-label--swatch)::after {
	box-shadow: none;
}

/* -- 3.2 Add-to-cart row ------------------------------------------------ */

product-form {
	display: block;
}

.product-info__add-to-cart quantity-input {
	flex: 1 1 35%;
	margin-inline-end: calc(2 * var(--space-unit));
	transition: opacity 0.6s ease;
}

.product-info__add-to-cart:has(button[disabled]) quantity-input {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

.product-info__add-button {
	flex: 0 0 100%;
}

quantity-input + .product-info__add-button {
	flex: 1 1 65%;
	margin-inline-start: calc(2 * var(--space-unit));
}

.product-info__dynamic-checkout-button .btn--primary {
	min-height: 45px;
	font-size: 0.88em;
	font-weight: 700;
	line-height: 1.2em;
}

@media (min-width: 1024px) {
	.product-info__add-to-cart quantity-input {
		flex-basis: 150px;
	}
}

/* -- 3.3 Disclosure rows ------------------------------------------------ */

.product-info__disclosure {
	font-size: calc(var(--body-font-size) * 0.1rem);
}

.product-info__disclosures details-disclosure {
	display: block;
}

.product-info__disclosures .disclosure__title > .icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin: 0;
	margin-inline-end: calc(4 * var(--space-unit));
}

.product-info__disclosures .disclosure__title > .icon--truck,
.product-info__disclosures .disclosure__title > .icon--return {
	margin-top: -2px;
}

/* -- 3.4 Related ("Goes well with") card -------------------------------- */

.card--related .price {
	font-weight: 700;
}

.card--related .card__info .h6 a {
	font-weight: 700;
}

/* -- 3.5 Trust badges (SEOAnt app replacement) -------------------------- */

.product-trust-badges {
	padding: 10px;
}

.product-trust-badges__title,
.product-pay-badges__title {
	margin-bottom: 6.5px;
	font-size: 16px;
	font-weight: 600;
	line-height: 36px;
	text-transform: none;
}

.product-trust-badges__item,
.product-pay-badges__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	margin: 0 5px;
	line-height: 0;
}

.product-trust-badges__item svg,
.product-pay-badges__item svg {
	width: 60px;
	height: auto;
	max-height: 42px;
}

/* The app renders the marks as inline-blocks inside a 24px line box, so the
   row is 6px taller than the icons (48px / 37.3px measured at 1440). */
.product-trust-badges__row,
.product-pay-badges__row {
	padding-bottom: 6px;
}

.product-trust-badges__item {
	height: 42px;
}

/* "Pay with Ease" uses the app's 45px variant on a 115x80 canvas. */
.product-pay-badges__item,
.product-pay-badges__item svg {
	width: 45px;
}

.product-pay-badges__item svg {
	max-height: none;
}

.product-pay-badges {
	padding: 10px;
}


/* -- 3.6 Message bar ---------------------------------------------------- */

.product-message {
	display: block;
	visibility: visible;
	overflow: hidden;
	transition: visibility 0.6s, opacity 0.6s, max-height 0.6s, margin-top 0.6s;
	border-radius: 4px;
	background-color: var(--bg-color);
	color: var(--text-color);
	pointer-events: auto;
}

.product-message a {
	color: currentColor;
}

.product-message p {
	margin-bottom: 0.5em;
}

.product-message p:last-child {
	margin-bottom: 0;
}

.product-message .icon {
	flex: 0 0 32px;
	align-self: flex-start;
	width: 32px;
	height: 32px;
	margin-inline-end: calc(4 * var(--space-unit));
}

.product-message__inner {
	display: inline-flex;
	align-items: center;
	margin-inline-end: 28px;
}

.product-message--out {
	visibility: hidden;
	opacity: 0;
}

.product-message__close {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	color: currentColor;
	cursor: pointer;
}

.product-message__close .icon {
	flex: none;
	width: 20px;
	height: 20px;
	margin-inline-end: 0;
}

.product-info .product-message__inner {
	padding: calc(5 * var(--space-unit)) calc(4 * var(--space-unit));
}

.product-info .product-message + .product-message {
	margin-top: calc(4 * var(--space-unit));
}

.product-info .product-message--out {
	max-height: 0 !important;
	margin-top: 0;
	margin-bottom: 0;
}

/* =========================================================================
 * 4. Sticky add-to-cart panel (spec §3.5)
 * ====================================================================== */

.sticky-atc-panel {
	visibility: visible;
	z-index: 5;
	width: calc(100% - var(--gutter-sm, 20px) * 2);
	margin: var(--gutter-sm, 20px);
	transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
	background-color: rgba(var(--drawer-bg-color));
	box-shadow: -2px 1px 10px 2px #0003;
	color: rgb(var(--drawer-text-color));
}

.scrolled-to-bottom .sticky-atc-panel,
.sticky-atc-panel--out {
	visibility: hidden;
	transform: translateY(100%);
	opacity: 0;
}

.card--sticky-atc {
	margin-top: 0;
	padding: 8px;
}

/*
 * The live panel serves a 56px thumbnail (srcset 56w/112w 2x) and the flexbox
 * `height:100%` therefore resolves to the intrinsic 56px, not the 83px content
 * box. Pin the box so the WordPress `thumbnail` size lands in the same place.
 */
.card--sticky-atc .card__media {
	flex-basis: auto;
	width: 56px;
	height: 56px;
}

.card--sticky-atc .card__media img {
	width: 56px !important;
	height: 56px;
	object-fit: fill;
}

.card--sticky-atc .card__info {
	flex: 1 1 50%;
	padding-top: 0;
	padding-inline-start: calc(4 * var(--space-unit));
}

.card--sticky-atc .card__info p {
	display: -webkit-box;
	margin-bottom: 0.1em;
	overflow: hidden;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
}

.card--sticky-atc .card__buttons {
	padding-inline-start: calc(6 * var(--space-unit));
	padding-inline-end: 4px;
}

.card--sticky-atc .price {
	margin-bottom: 0;
	font-weight: 700;
}

.card--sticky-atc .card__buttons .btn {
	white-space: nowrap;
}

.sticky-atc-panel__heading {
	line-height: 1.2em;
}

.product-options--anchor {
	display: block;
	visibility: hidden;
	position: relative;
	top: calc(var(--header-end, 100px) * -1 - 40px);
}

@media (max-width: 768.98px) {
	.sticky-atc-panel {
		left: 0;
	}
}

@media (min-width: 769px) {
	.sticky-atc-panel {
		width: auto;
		max-width: 485px;
	}

	.card--sticky-atc .card__info {
		flex: 1;
	}
}

/* =========================================================================
 * 5. Reviews widget (spec §3.8 — Judge.me look, WooCommerce data)
 * ====================================================================== */

.product-reviews .jdgm-widget {
	max-width: 1200px;
	margin: 0 auto;
}

.jdgm-rev-widg__header {
	text-align: center;
}

.jdgm-write-rev-link {
	display: none;
}

.jdgm-rev-widg__title {
	margin-bottom: 0.4em;
	font-size: 2.4rem;
	font-weight: 700;
	line-height: 1.3;
}

.jdgm-stars {
	display: inline-block;
	color: #f90;
	font-size: 1.6rem;
	line-height: 1;
	white-space: nowrap;
}

/* Judge.me draws every star — filled and empty alike — in #f90 out of its own
   icon font ('JudgemeStar'); the empty state is an outlined glyph, not a greyed
   solid one. We have no licence to that font, so the glyph carries the state:
   U+2605 filled, U+2606 outlined. Advance is 1.25em (20px at 16px, 16px at
   13px), with no trailing gap on the last star — the measured original. */
.jdgm-star {
	display: inline-block;
	padding-inline-end: 0.25em;
}

.jdgm-star:last-of-type {
	padding-inline-end: 0;
}

.jdgm-star.jdgm--half {
	background: linear-gradient(90deg, #f90 50%, rgba(255, 153, 0, 0.3) 50%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.jdgm-rev-widg__summary {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	margin-bottom: 1.6rem;
}

.jdgm-rev-widg__summary-stars {
	font-size: 1.8rem;
}

.product-info__reviews {
	display: flex;
}

/* -- 3.7 Share row (spec §3.4.15) --------------------------------------- */

/* 20px glyphs in 40px hit areas, 8px after the "Share:" label — the footer
   keeps the global 44px links. */
.product-info__block.social-share .social-share__heading {
	margin-inline-end: calc(2 * var(--space-unit));
}

.product-info__block.social-share .social__link {
	width: 40px;
	height: 40px;
}

.jdgm-prev-badge {
	display: inline-flex;
	align-items: center;
	gap: 0;
	color: rgb(var(--text-color));
	line-height: 1.4;
	text-decoration: none;
}

/* `letter-spacing` is `normal` on the source badge — the stars keep the plain
   .jdgm-star rhythm (4 x 20px + a 16px last star = 96px run, span 100.16 wide,
   the "241 reviews" text starting at x 907.53 on the absorbed 1440 capture).
   The 0.2em we used to add stretched the run to 112 and pushed the text 16px
   to the right. */
.jdgm-prev-badge__stars {
	font-size: 1.6rem;
	padding-inline-end: 4px;
}

.jdgm-prev-badge__text {
	font-size: calc(var(--body-font-size) * 0.1rem);
}

.jdgm-rev-widg__summary-average {
	font-size: 1.6rem;
}

.jdgm-rev-widg__stats {
	position: relative;
	padding-bottom: 1.6rem;
	border-bottom: 1px solid #eee;
}

.jdgm-rev-widg__based {
	margin: 0 0 1.2rem;
	font-size: 1.6rem;
	text-align: center;
}

.jdgm-rev-widg__verified {
	display: inline-block;
	vertical-align: -2px;
	color: #0da44a;
}

.jdgm-histogram {
	display: inline-block;
	/* 53px between the "x out of 5" line and the first bar row at >=769
	   (measured on the absorbed 1440 capture). */
	margin: 3rem auto 0;
	text-align: start;
}

/* Row metrics measured on the absorbed 1440 capture: 14px tall, 24px stride,
   an 80px star column, a 140x14 bar and a 24px frequency column, the three
   spaced apart by the row's own justify-content. */
.jdgm-histogram__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 298.66px;
	max-width: 100%;
	height: 14px;
}

.jdgm-histogram__row + .jdgm-histogram__row {
	margin-top: 10px;
}

/* The histogram stars do not follow the .jdgm-star em rhythm: the source
   advances them 16px each at a 13px glyph — including the fifth, which keeps
   its 3px trailing gap — so the five exactly fill the 80px column (measured
   x = 571.17 / 587.17 / 603.17 / 619.17 / 635.17, each 16 wide, in
   absorb/pages/_products_atom-2/styles/computed.json). Without this the
   `:last-of-type{padding-inline-end:0}` rule above clipped the run to 78px. */
.jdgm-histogram__star {
	width: 80px;
	font-size: 1.3rem;
}

.jdgm-histogram__star .jdgm-star,
.jdgm-histogram__star .jdgm-star:last-of-type {
	padding-inline-end: 3px;
}

.jdgm-histogram__bar {
	display: inline-block;
	flex: none;
	width: 140px;
	height: 14px;
	background-color: #eee;
}

.jdgm-histogram__bar-content {
	display: block;
	height: 100%;
	background-color: #00adef;
}

.jdgm-histogram__frequency {
	min-width: 24px;
	color: #7b7b7b;
	font-size: 1.28rem;
}

.jdgm-rev-widg__actions {
	margin-top: 1.6rem;
}

.jdgm-form-wrapper {
	max-width: 640px;
	margin: 2.4rem auto;
	padding: 2.4rem;
	background-color: var(--card-bg-color, #f1f4f9);
}

.jdgm-form-wrapper .form__field {
	margin-bottom: 1.6rem;
}

.jdgm-form-wrapper .comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin-bottom: 1.6rem;
	font-size: 1.4rem;
}

.jdgm-rev-widg__searchbar {
	padding: 1.6rem 0;
	border-bottom: 1px solid #eee;
}

.jdgm-rev-widg__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	padding: 1rem 0;
	border-bottom: 1px solid #eee;
}

.jdgm-write-rev-link {
	padding: 4px 0;
	border: 0;
	background: none;
	color: #00adef;
	font-size: 1.4rem;
	text-decoration: underline;
	text-underline-offset: 0.2rem;
	cursor: pointer;
}

.jdgm-rev-widg__search {
	position: relative;
	max-width: 568px;
	margin: 0 auto;
}

.jdgm-rev-widg__search .input {
	width: 100%;
	height: 40px;
	padding: 0 40px 0 16px;
	border-radius: 0;
	border: 1px solid #ddd;
	font-size: 1.4rem;
}

.jdgm-search__icon {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	color: #999;
	pointer-events: none;
}

.jdgm-rev-widg__sort-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: #00adef;
}

.jdgm-rev-widg__sort-wrapper .icon {
	position: absolute;
	right: 0;
	pointer-events: none;
}

.jdgm-sort__select {
	min-height: 0;
	padding: 4px 24px 4px 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: #00adef;
	font-size: 1.4rem;
	font-weight: 700;
	appearance: none;
}

.jdgm-rev-widg__body {
	position: relative;
	min-height: 120px;
	transition: opacity 0.2s;
}

.jdgm-rev-widg__body.is-loading {
	opacity: 0.4;
}

.jdgm-rev {
	padding-top: 16px;
	margin-top: 16px;
}

.jdgm-divider-top + .jdgm-divider-top {
	border-top: 1px solid #eee;
}

.jdgm-rev__header {
	position: relative;
	padding-inline-end: 90px;
}

.jdgm-rev__rating {
	display: block;
	font-size: 1.8rem;
}

.jdgm-rev__timestamp {
	position: absolute;
	top: 0;
	right: 0;
	color: #999;
	font-size: 1.2rem;
}

.jdgm-rev__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-top: 8px;
	margin-inline-end: 10px;
	background-color: #f1f4f9;
	color: #00adef;
	vertical-align: middle;
}

.jdgm-rev__author-wrapper {
	color: #00adef;
	font-size: 1.5rem;
	vertical-align: middle;
}

.jdgm-rev__buyer-badge {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-inline-start: 6px;
	border-radius: 50%;
	background-color: #00adef;
	vertical-align: middle;
}

.jdgm-rev__content {
	margin-top: 10px;
}

.jdgm-rev__title {
	display: block;
	margin-bottom: 2px;
	font-size: 1.6rem;
}

.jdgm-rev__body p {
	margin-bottom: 8px;
}

.jdgm-rev__body p:last-child {
	margin-bottom: 0;
}

.jdgm-rev__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 8px;
}

.jdgm-rev__vote-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-inline-start: 16px;
	padding: 4px;
	border: 0;
	background: none;
	color: #00adef;
	font-size: 1.4rem;
	cursor: pointer;
}

.jdgm-paginate {
	padding-top: 16px;
	text-align: center;
}

.jdgm-paginate__page {
	min-width: 36px;
	margin: 2px 4px;
	padding: 4px 8px;
	border: 0;
	background: none;
	color: #00adef;
	font-size: 1.5rem;
	cursor: pointer;
}

.jdgm-paginate__page.jdgm-curt {
	color: rgb(var(--text-color));
	font-size: 150%;
	font-weight: 700;
}

@media (min-width: 769px) {
	/* Judge.me renders the heading at 24px/1.4 with a 24px gap to the summary. */
	.jdgm-rev-widg__title {
		font-size: 2.4rem;
		margin-bottom: 1rem;
	}

	/*
	 * "Based on N reviews" is pinned to the left gutter and sits on the line
	 * just under the "x out of 5" summary, 19px above the stats box top
	 * (measured on the absorbed 1440 capture).
	 */
	.jdgm-rev-widg__based {
		position: absolute;
		top: -1.9rem;
		left: 0;
		margin: 0;
	}

	.jdgm-rev-widg__searchbar {
		padding: 2rem 0;
	}
}

/* =========================================================================
 * 6. "You may also like" grid (spec §3.9)
 * ====================================================================== */

.cc-product-recommendations .slider__grid {
	margin: 0;
	padding: 0;
	list-style: none;
}

product-card {
	display: flex;
}

/* .card--product card title + price sizing live in components.css — the PDP
   recommendation grid uses the same product card component as the collection
   page (spec 05 §3.9 / 04 §2.6). */

@media (min-width: 769px) {
	.md\:auto-cols-3 {
		grid-auto-columns: calc((100% - var(--column-gap) * 2) / 3);
	}
}

@media (min-width: 1024px) {
	.lg\:auto-cols-4 {
		grid-auto-columns: calc((100% - var(--column-gap) * 3) / 4);
	}
}

@media (min-width: 1280px) {
	.xl\:auto-cols-5 {
		grid-auto-columns: calc((100% - var(--column-gap) * 4) / 5);
	}
}
