/* PRODUCT DETAIL PAGE STYLES */

.product {
	padding: 3.5rem 2rem 5rem;
}

/* Product image (real uploads) */
.product-main-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

/* WooCommerce add-to-cart form, styled to match the design */
.product-add {
	padding: 1.5rem 0;
	border-top: 1px solid var(--brand-off-white);
	border-bottom: 1px solid var(--brand-off-white);
}

.product-add form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin: 0;
}

.product-add .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
	overflow: hidden;
}

.product-add .quantity input.qty {
	width: 64px;
	height: 44px;
	border: none;
	text-align: center;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--brand-dark-gray);
	-moz-appearance: textfield;
}

.product-add .quantity input.qty::-webkit-outer-spin-button,
.product-add .quantity input.qty::-webkit-inner-spin-button {
	opacity: 1;
	height: 44px;
}

.product-add .single_add_to_cart_button {
	flex: 1;
	min-width: 200px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 2rem;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--brand-white);
	background-color: var(--brand-primary-red);
	border: 1px solid var(--brand-primary-red);
	border-radius: 2px;
	cursor: pointer;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease;
}

.product-add .single_add_to_cart_button:hover {
	background-color: var(--brand-black);
	border-color: var(--brand-black);
}

/* Variable product variation table + reset link */
.product-add table.variations {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1rem;
}

.product-add table.variations th,
.product-add table.variations td {
	padding: 0.5rem 0;
	text-align: left;
	vertical-align: middle;
}

.product-add table.variations th.label label {
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--brand-dark-gray);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.product-add table.variations select {
	width: 100%;
	max-width: 280px;
	height: 42px;
	padding: 0 0.75rem;
	font-family: inherit;
	font-size: 0.85rem;
	color: var(--brand-dark-gray);
	background-color: var(--brand-white);
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
}

.product-add .single_variation_wrap .price {
	display: block;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--brand-dark-gray);
	margin-bottom: 1rem;
}

.product-add .reset_variations {
	display: inline-block;
	margin-left: 0.5rem;
	font-size: 0.75rem;
	color: var(--brand-medium-gray);
}

.product-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: flex-start;
}

/* Gallery */
.product-gallery {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.product-main-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
	border: 1px solid #ebebeb;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-main-image svg {
	width: 140px;
	height: 140px;
	stroke: var(--brand-light-gray);
	stroke-width: 1.1;
	fill: none;
}

.product-thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}

.product-thumb {
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
	border: 1px solid #ebebeb;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.product-thumb:hover,
.product-thumb.active {
	border-color: var(--brand-primary-red);
}

.product-thumb svg {
	width: 40px;
	height: 40px;
	stroke: var(--brand-light-gray);
	stroke-width: 1.2;
	fill: none;
}

/* Details */
.product-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.product-category {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--brand-primary-red);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin: 0;
}

.product-title {
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--brand-black);
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	margin: 0;
}

.product-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.product-tag {
	display: inline-flex;
	align-items: center;
	background-color: #f5f5f5;
	border: 1px solid #ebebeb;
	padding: 0.4rem 0.8rem;
	font-size: 0.65rem;
	font-weight: 600;
	color: var(--brand-medium-gray);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 2px;
}

.product-price {
	font-size: 2rem;
	font-weight: 700;
	color: var(--brand-dark-gray);
}

.product-price small {
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--brand-light-gray);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.product-description {
	font-size: 0.95rem;
	line-height: 1.8;
	color: var(--brand-medium-gray);
	margin: 0;
}

/* Variant / quantity selectors */
.product-options {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--brand-off-white);
	border-bottom: 1px solid var(--brand-off-white);
}

.option-group {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.option-label {
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--brand-dark-gray);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.option-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.option-chip {
	padding: 0.5rem 1rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--brand-dark-gray);
	background-color: var(--brand-white);
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.option-chip:hover,
.option-chip.active {
	border-color: var(--brand-primary-red);
	color: var(--brand-primary-red);
}

.quantity-selector {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--brand-off-white);
	border-radius: 2px;
	width: fit-content;
}

.quantity-selector button {
	width: 42px;
	height: 42px;
	background: none;
	border: none;
	font-size: 1.1rem;
	color: var(--brand-dark-gray);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.quantity-selector button:hover {
	background-color: var(--brand-off-white);
}

.quantity-selector input {
	width: 56px;
	height: 42px;
	border: none;
	border-left: 1px solid var(--brand-off-white);
	border-right: 1px solid var(--brand-off-white);
	text-align: center;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--brand-dark-gray);
}

.product-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.product-actions .btn-primary {
	flex: 1;
	min-width: 200px;
}

/* Product long description */
.product-overview {
	margin-top: 4rem;
	max-width: 820px;
}

.product-overview-body {
	margin-top: 1.5rem;
	font-size: 1rem;
	line-height: 1.9;
	color: var(--brand-medium-gray);
	overflow-wrap: break-word;
}

.product-overview-body > * + * {
	margin-top: 1.25rem;
}

.product-overview-body h2,
.product-overview-body h3 {
	color: var(--brand-black);
	font-weight: 700;
	margin-top: 2rem;
}

.product-overview-body h3 {
	font-size: 1.15rem;
	font-weight: 600;
}

.product-overview-body a {
	color: var(--brand-primary-red);
	text-decoration: underline;
}

.product-overview-body ul,
.product-overview-body ol {
	padding-left: 1.5rem;
}

.product-overview-body li + li {
	margin-top: 0.5rem;
}

.product-overview-body img {
	max-width: 100%;
	border-radius: 2px;
}

.product-overview-body table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
}

.product-overview-body th,
.product-overview-body td {
	word-break: break-word;
}

/* Specs table */
.product-specs {
	margin-top: 4rem;
}

.specs-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1.5rem;
}

.specs-table th,
.specs-table td {
	text-align: left;
	padding: 0.9rem 1rem;
	font-size: 0.85rem;
	border-bottom: 1px solid var(--brand-off-white);
}

.specs-table th {
	width: 30%;
	font-weight: 600;
	color: var(--brand-dark-gray);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 0.72rem;
	background-color: #fafafa;
}

.specs-table td {
	color: var(--brand-medium-gray);
}

/* Responsive */
@media (max-width: 992px) {
	.product-layout {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.product-main-image {
		max-width: 480px;
	}
}

@media (max-width: 768px) {
	.product {
		padding: 2.5rem 1rem 3.5rem;
	}

	.product-title {
		font-size: 1.75rem;
	}

	.product-actions .btn-primary {
		min-width: 100%;
	}

	/* Wide rich-text tables scroll inside their container instead of off-screen. */
	.product-overview-body table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}
