/* =========================================================================
   Packgens — single product.
   ========================================================================= */

.pg-product__top {
	/* Clears the absolutely positioned header, which paints its own band here. */
	padding-top: calc(var(--pg-header-h) + clamp(1.5rem, 1rem + 2vw, 2.5rem));
}

.pg-product__layout {
	display: grid;
	gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
	margin-top: var(--pg-space-lg);
}

@media (min-width: 992px) {
	.pg-product__layout {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: start;
	}
}

/* -------------------------------------------------------------------------
   Gallery
   ------------------------------------------------------------------------- */

.pg-gallery {
	display: flex;
	flex-direction: column;
	gap: var(--pg-space-sm);
	position: sticky;
	top: calc(var(--pg-header-h) * 0.6);
}

@media (max-width: 991.98px) {
	.pg-gallery {
		position: static;
	}
}

.pg-gallery__stage {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: var(--pg-radius-md);
	overflow: hidden;
	background: var(--pg-gray-100);
}

.pg-gallery__stage img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pg-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
}

.pg-gallery__nav--prev { left: var(--pg-space-sm); }
.pg-gallery__nav--next { right: var(--pg-space-sm); }

.pg-gallery__zoom {
	position: absolute;
	top: var(--pg-space-sm);
	right: var(--pg-space-sm);
	z-index: 2;
}

.pg-gallery__thumbs {
	grid-auto-columns: minmax(4.5rem, 1fr);
	gap: var(--pg-space-xs);
}

.pg-gallery__thumb {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: var(--pg-radius-xs);
	border: 2px solid transparent;
	overflow: hidden;
	background: var(--pg-gray-100);
	transition: border-color var(--pg-duration) var(--pg-ease);
}

.pg-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pg-gallery__thumb.is-active,
.pg-gallery__thumb:hover {
	border-color: var(--pg-blue);
}

/* Lightbox created by product.js. */
.pg-lightbox {
	position: fixed;
	inset: 0;
	z-index: var(--pg-z-modal);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--pg-space-lg);
	background: rgba(1, 32, 47, 0.9);
}

.pg-lightbox img {
	max-width: min(100%, 60rem);
	max-height: 90vh;
	width: auto;
	border-radius: var(--pg-radius-md);
	object-fit: contain;
}

.pg-lightbox__close {
	position: absolute;
	top: var(--pg-space-lg);
	right: var(--pg-space-lg);
	width: 2.75rem;
	height: 2.75rem;
	border-radius: var(--pg-radius-circle);
	background: rgba(255, 255, 255, 0.15);
	color: var(--pg-white);
	font-size: 1.75rem;
	line-height: 1;
}

.pg-lightbox__close:hover {
	background: var(--pg-white);
	color: var(--pg-navy);
}

/* -------------------------------------------------------------------------
   Summary
   ------------------------------------------------------------------------- */

.pg-product__summary {
	display: flex;
	flex-direction: column;
	gap: var(--pg-space-md);
}

.pg-product__meta-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--pg-space-xs);
	margin: 0;
	font-size: var(--pg-text-xs);
	color: var(--pg-blue-vivid);
}

.pg-product__meta-top .pg-product__subtitle::before {
	content: "\00b7";
	margin-right: var(--pg-space-xs);
	color: var(--pg-gray-400);
}

.pg-product__title {
	margin: 0;
	font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.625rem);
}

.pg-product__excerpt {
	color: var(--pg-color-muted);
	font-size: var(--pg-text-sm);
	line-height: var(--pg-leading-normal);
}

.pg-product__excerpt p {
	margin: 0 0 var(--pg-space-xs);
}

.pg-product__rating {
	display: flex;
	align-items: center;
	gap: var(--pg-space-xs);
	font-size: var(--pg-text-xs);
	color: var(--pg-color-muted);
}

/* Buy box ---------------------------------------------------------------- */

.pg-buybox {
	padding: var(--pg-space-lg);
	border-radius: var(--pg-radius-md);
	background: var(--pg-gray-100);
}

.pg-buybox__price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--pg-space-sm);
}

.pg-buybox__amount {
	font-family: var(--pg-font-display);
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
	font-weight: var(--pg-weight-bold);
	color: var(--pg-blue-vivid);
	line-height: 1.1;
}

.pg-buybox__amount .pg-price__unit {
	font-size: 0.55em;
	font-weight: var(--pg-weight-medium);
}

.pg-buybox__amount del {
	color: var(--pg-gray-500);
	font-size: 0.6em;
	margin-right: var(--pg-space-xs);
}

.pg-buybox__saving {
	padding: 0.375rem 0.875rem;
	border-radius: var(--pg-radius-pill);
	background: rgba(30, 186, 136, 0.16);
	color: #0f7a58;
	font-size: var(--pg-text-2xs);
	font-weight: var(--pg-weight-semibold);
}

.pg-buybox__note {
	margin: var(--pg-space-sm) 0 0;
	font-size: var(--pg-text-2xs);
	color: var(--pg-color-muted);
}

.pg-tiers {
	margin-top: var(--pg-space-md);
}

.pg-tiers__label {
	display: block;
	margin-bottom: var(--pg-space-xs);
	font-size: var(--pg-text-xs);
	color: var(--pg-color-heading);
}

.pg-tiers__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
	gap: var(--pg-space-xs);
}

.pg-tier {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.125rem;
	padding: var(--pg-space-xs) var(--pg-space-2xs);
	border: 1px solid var(--pg-color-border);
	border-radius: var(--pg-radius-sm);
	background: var(--pg-white);
	transition: background-color var(--pg-duration) var(--pg-ease), border-color var(--pg-duration) var(--pg-ease), color var(--pg-duration) var(--pg-ease);
}

.pg-tier__qty {
	font-size: var(--pg-text-base);
	font-weight: var(--pg-weight-semibold);
	color: var(--pg-color-heading);
}

.pg-tier__price {
	font-size: var(--pg-text-2xs);
	color: var(--pg-color-muted);
}

.pg-tier:hover {
	border-color: var(--pg-blue);
}

.pg-tier.is-active {
	background: var(--pg-blue);
	border-color: var(--pg-blue);
}

.pg-tier.is-active .pg-tier__qty,
.pg-tier.is-active .pg-tier__price {
	color: var(--pg-white);
}

/* Actions ---------------------------------------------------------------- */

.pg-product__actions {
	display: grid;
	gap: var(--pg-space-sm);
}

@media (min-width: 520px) {
	.pg-product__actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}
}

.pg-product__actions .pg-btn {
	width: 100%;
}

/* WooCommerce's add-to-cart form, restyled in place. */
.pg-product__actions form.cart {
	display: flex;
	gap: var(--pg-space-xs);
	margin: 0;
}

.pg-product__actions form.cart .quantity {
	flex: 0 0 6rem;
	max-width: 6rem;
}

.pg-product__actions form.cart .quantity input,
.pg-product__actions form.cart input.qty {
	width: 100%;
	min-width: 5rem;
	min-height: 3rem;
	padding-inline: 0.75rem;
	text-align: center;
	border-radius: var(--pg-radius-pill);
}

.pg-product__actions form.cart button[type="submit"],
.pg-product__actions .single_add_to_cart_button {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--pg-space-xs);
	min-height: 3rem;
	padding: 0.75rem 1.75rem;
	border: 0;
	border-radius: var(--pg-radius-pill);
	background: var(--pg-blue);
	color: var(--pg-white);
	font-family: var(--pg-font-body);
	font-size: var(--pg-text-base);
	font-weight: var(--pg-weight-medium);
	cursor: pointer;
	transition: background-color var(--pg-duration) var(--pg-ease);
}

.pg-product__actions .single_add_to_cart_button:hover {
	background: var(--pg-blue-deep);
}

.pg-secure-strip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--pg-space-sm);
	padding: var(--pg-space-sm) var(--pg-space-md);
	border: 1px solid var(--pg-color-border);
	border-radius: var(--pg-radius-md);
}

.pg-secure-strip__label {
	display: inline-flex;
	align-items: center;
	gap: var(--pg-space-2xs);
	font-size: var(--pg-text-xs);
	font-weight: var(--pg-weight-medium);
	color: var(--pg-color-heading);
}

.pg-secure-strip__label svg {
	width: 1rem;
	height: 1rem;
	color: var(--pg-green-dark);
}

.pg-secure-strip .pg-logo-row img {
	height: 20px;
}

/* -------------------------------------------------------------------------
   Tabs and specification table
   ------------------------------------------------------------------------- */

.pg-product-tabs .pg-tabs__panel {
	padding-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.pg-spec__title {
	margin-bottom: var(--pg-space-lg);
	font-size: var(--pg-text-h3);
}

.pg-spec-table {
	width: 100%;
	min-width: 30rem;
	border-collapse: collapse;
}

.pg-spec-table th,
.pg-spec-table td {
	padding: var(--pg-space-md) var(--pg-space-lg);
	font-size: var(--pg-text-sm);
}

.pg-spec-table th {
	text-align: left;
	font-weight: var(--pg-weight-regular);
	color: var(--pg-color-text);
}

.pg-spec-table td {
	text-align: right;
	font-weight: var(--pg-weight-semibold);
	color: var(--pg-color-heading);
}

.pg-spec-table tbody tr:nth-child(even) {
	background: var(--pg-gray-100);
}

/* -------------------------------------------------------------------------
   Reviews block
   ------------------------------------------------------------------------- */

.pg-product #reviews .comment-form-rating .stars a {
	color: var(--pg-amber);
}
