/* ==========================================================
   Edit Room — Product Page
   Restyles native WooCommerce single-product markup.
   Brand tokens match the site system (Paper/Charcoal/Sage/Cream,
   Syne/Montserrat/Inter). Scoped to body.single-product so nothing
   here touches shop, category, cart, or checkout pages.
   ========================================================== */

body.single-product {
	--erp-bg: #F4F4F4;
	--erp-text: #1A1A1A;
	--erp-accent: #8A9A8B;
	--erp-accent-deep: #6B7D6C;
	--erp-cream: #EDEBE4;
	--erp-line: rgba(26, 26, 26, 0.12);
	--erp-font-heading: 'Syne', sans-serif;
	--erp-font-sub: 'Montserrat', sans-serif;
	--erp-font-body: 'Inter', sans-serif;

	background-color: var(--erp-bg);
	color: var(--erp-text);
	font-family: var(--erp-font-body);
}

body.single-product * {
	box-sizing: border-box;
}

body.single-product .woocommerce div.product {
	max-width: 1320px;
	margin: 0 auto;
	padding: 50px 24px 0;
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 64px;
	align-items: start;
	position: relative;
}

@media (max-width: 900px) {
	body.single-product .woocommerce div.product {
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 24px 18px 0;
	}
}

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

body.single-product .woocommerce-product-gallery {
	position: sticky;
	top: 24px;
}

@media (max-width: 900px) {
	body.single-product .woocommerce-product-gallery {
		position: static;
	}
}

body.single-product .woocommerce-product-gallery__wrapper {
	margin: 0;
}

body.single-product .woocommerce-product-gallery__image {
	background: var(--erp-cream);
	overflow: hidden;
}

body.single-product .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

body.single-product .onsale {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--erp-accent-deep);
	color: var(--erp-cream);
	font-family: var(--erp-font-sub);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	padding: 6px 12px;
	border-radius: 2px;
	min-height: 0;
	min-width: 0;
	line-height: 1;
	right: auto;
	z-index: 5;
}

body.single-product a.woocommerce-product-gallery__trigger {
	background: var(--erp-cream);
	border-radius: 2px;
	top: 16px;
	right: 16px;
}

/* thumbnails */
body.single-product .flex-control-thumbs {
	display: flex;
	gap: 12px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

body.single-product .flex-control-thumbs li {
	flex: 0 0 72px;
}

body.single-product .flex-control-thumbs img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	cursor: pointer;
	opacity: 0.55;
	border: 1px solid transparent;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

body.single-product .flex-control-thumbs img.flex-active,
body.single-product .flex-control-thumbs img:hover {
	opacity: 1;
	border-color: var(--erp-text);
}

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

body.single-product .summary.entry-summary {
	padding-top: 4px;
}

.erp-eyebrow {
	font-family: var(--erp-font-sub);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--erp-accent-deep);
	margin-bottom: 14px;
}

body.single-product .product_title {
	font-family: var(--erp-font-heading);
	font-weight: 800;
	font-size: clamp(2.2rem, 3.4vw, 3.1rem);
	line-height: 1.02;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	margin: 0 0 20px;
}

body.single-product .woocommerce-product-rating {
	margin-bottom: 16px;
}

body.single-product .star-rating span::before {
	color: var(--erp-accent-deep);
}

body.single-product p.price,
body.single-product .price {
	font-family: var(--erp-font-body);
	font-size: 1.4rem;
	font-weight: 500;
	color: var(--erp-text);
	margin-bottom: 18px;
	display: block;
}

body.single-product p.price del {
	color: #999;
	font-size: 0.85em;
	font-weight: 400;
	opacity: 1;
	margin-right: 10px;
}

body.single-product p.price ins {
	text-decoration: none;
	color: var(--erp-text);
	font-weight: 600;
}

body.single-product .stock {
	font-family: var(--erp-font-sub);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--erp-accent-deep);
	margin-bottom: 26px;
	display: flex;
	align-items: center;
	gap: 8px;
}

body.single-product .stock::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--erp-accent-deep);
	display: inline-block;
}

body.single-product .stock.out-of-stock {
	color: #b3452f;
}

body.single-product .stock.out-of-stock::before {
	background: #b3452f;
}

body.single-product .woocommerce-product-details__short-description {
	font-family: var(--erp-font-body);
	font-size: 14px;
	line-height: 1.7;
	color: #444;
	margin-bottom: 26px;
	max-width: 46ch;
}

/* Variations */
body.single-product table.variations {
	width: 100%;
	margin-bottom: 20px;
	border-collapse: collapse;
}

body.single-product table.variations tr {
	display: block;
	margin-bottom: 16px;
}

body.single-product table.variations th.label {
	display: block;
	font-family: var(--erp-font-sub);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--erp-text);
	padding: 0 0 10px;
	text-align: left;
}

body.single-product table.variations td.value {
	display: block;
}

body.single-product table.variations select {
	width: 100%;
	max-width: 320px;
	padding: 13px 16px;
	border: 1px solid var(--erp-text);
	border-radius: 2px;
	background-color: transparent;
	font-family: var(--erp-font-body);
	font-size: 14px;
	color: var(--erp-text);
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231A1A1A'%3E%3Cpath d='M5.5 7.5l4.5 5 4.5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

body.single-product table.variations select:focus {
	outline: none;
	border-color: var(--erp-accent-deep);
	box-shadow: 0 0 0 3px rgba(138, 154, 139, 0.25);
}

body.single-product a.reset_variations {
	font-family: var(--erp-font-sub);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #999;
	margin-top: 8px;
	display: inline-block;
}

/* Generic defensive styling for common color-swatch plugin markup —
   restyle per your swatches plugin's actual classes once confirmed. */
body.single-product .variable-items-wrapper,
body.single-product ul.variable-items-wrapper {
	display: flex;
	gap: 10px;
	margin: 12px 0 0;
	flex-wrap: wrap;
}

body.single-product .variable-item,
body.single-product .variable-items-wrapper .variable-item-span {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--erp-line);
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

body.single-product .variable-item.selected,
body.single-product .variable-item:hover {
	border-color: var(--erp-text);
	transform: scale(1.08);
}

/* Quantity + Add to cart row */
body.single-product .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--erp-text);
	border-radius: 2px;
	overflow: hidden;
	margin-right: 12px;
	vertical-align: middle;
}

body.single-product .quantity .qty {
	width: 52px;
	text-align: center;
	border: none;
	background: transparent;
	font-family: var(--erp-font-body);
	font-size: 14px;
	color: var(--erp-text);
	padding: 13px 0;
	-moz-appearance: textfield;
}

body.single-product .quantity .qty::-webkit-inner-spin-button,
body.single-product .quantity .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

body.single-product .erp-qty-btn {
	width: 38px;
	height: 46px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: var(--erp-font-body);
	font-size: 16px;
	color: var(--erp-text);
	transition: background-color 0.2s ease;
}

body.single-product .erp-qty-btn:hover {
	background: var(--erp-cream);
}

body.single-product .cart {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 22px;
}

body.single-product button.single_add_to_cart_button {
	background: var(--erp-text);
	color: var(--erp-cream);
	border: 1px solid var(--erp-text);
	border-radius: 2px;
	padding: 14px 40px;
	font-family: var(--erp-font-sub);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
	flex: 1 1 auto;
	min-width: 180px;
}

body.single-product button.single_add_to_cart_button:hover {
	background: var(--erp-accent-deep);
	border-color: var(--erp-accent-deep);
}

body.single-product button.single_add_to_cart_button.disabled {
	background: #ccc;
	border-color: #ccc;
	color: #888;
	cursor: not-allowed;
}

/* Micro trust line under add-to-cart (Secure Checkout / Easy Returns text
   WooCommerce doesn't natively output — leave to theme if present; this
   just makes sure it doesn't look out of place if it exists). */
body.single-product .wc-security-line,
body.single-product .erp-microline {
	font-family: var(--erp-font-sub);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #999;
	margin-bottom: 20px;
}

/* Trust badges row */
.erp-trust-badges {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px 24px;
	margin: 26px 0 24px;
	padding-top: 24px;
	border-top: 1px solid var(--erp-line);
}

.erp-trust-badge {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.erp-trust-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--erp-accent-deep);
	margin-top: 2px;
}

.erp-trust-icon svg {
	width: 100%;
	height: 100%;
}

.erp-trust-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.erp-trust-copy strong {
	font-family: var(--erp-font-sub);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.erp-trust-copy em {
	font-style: normal;
	font-family: var(--erp-font-body);
	font-size: 12px;
	color: #777;
}

/* Product meta (SKU / categories) */
body.single-product .product_meta {
	font-family: var(--erp-font-body);
	font-size: 12px;
	color: #888;
	padding-top: 20px;
	border-top: 1px solid var(--erp-line);
}

body.single-product .product_meta > span {
	display: block;
	margin-bottom: 4px;
}

body.single-product .product_meta a {
	color: #888;
	text-decoration: underline;
}

/* ---------------------------------------------------------
   Tabs → Accordion
   --------------------------------------------------------- */

body.single-product .woocommerce-tabs {
	grid-column: 1 / -1;
	max-width: 900px;
	margin: 60px auto 0;
	padding-top: 40px;
	border-top: 1px solid var(--erp-line);
}

body.single-product .woocommerce-tabs ul.tabs {
	display: flex;
	flex-direction: column;
	list-style: none;
	margin: 0;
	padding: 0;
	border: none;
}

body.single-product .woocommerce-tabs ul.tabs::before {
	display: none;
}

body.single-product .woocommerce-tabs ul.tabs li {
	margin: 0;
	border: none;
	background: none;
	border-bottom: 1px solid var(--erp-line);
}

body.single-product .woocommerce-tabs ul.tabs li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 4px;
	font-family: var(--erp-font-heading);
	font-weight: 700;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--erp-text);
	text-decoration: none;
}

body.single-product .woocommerce-tabs ul.tabs li a::after {
	content: '+';
	font-family: var(--erp-font-body);
	font-size: 20px;
	font-weight: 300;
	transition: transform 0.25s ease;
}

body.single-product .woocommerce-tabs ul.tabs li.erp-open a::after {
	content: '\2212';
}

body.single-product .woocommerce-tabs .woocommerce-Tabs-panel {
	display: none;
	padding: 4px 4px 28px;
	font-family: var(--erp-font-body);
	font-size: 14px;
	line-height: 1.75;
	color: #444;
}

body.single-product .woocommerce-tabs .woocommerce-Tabs-panel.erp-open {
	display: block;
}

body.single-product .woocommerce-tabs .woocommerce-Tabs-panel h2 {
	font-family: var(--erp-font-heading);
	font-size: 15px;
	text-transform: uppercase;
	margin-bottom: 12px;
}

/* Reviews */
body.single-product #reviews .comment-form-rating select,
body.single-product #reviews input[type="text"],
body.single-product #reviews input[type="email"],
body.single-product #reviews textarea {
	width: 100%;
	max-width: 480px;
	padding: 12px 14px;
	border: 1px solid var(--erp-text);
	border-radius: 2px;
	font-family: var(--erp-font-body);
	font-size: 14px;
	margin-top: 6px;
}

body.single-product #reviews textarea {
	max-width: 100%;
}

body.single-product #reviews #submit,
body.single-product #reviews input#submit {
	background: var(--erp-text);
	color: var(--erp-cream);
	border: 1px solid var(--erp-text);
	border-radius: 2px;
	padding: 13px 32px;
	font-family: var(--erp-font-sub);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
}

body.single-product #reviews .star-rating span::before {
	color: var(--erp-accent-deep);
}

/* ---------------------------------------------------------
   Related products ("You May Also Like")
   --------------------------------------------------------- */

body.single-product .related.products,
body.single-product .upsells.products {
	grid-column: 1 / -1;
	max-width: 1320px;
	margin: 70px auto 0;
	padding: 0 0 60px;
	position: relative;
}

body.single-product .related.products > h2,
body.single-product .upsells.products > h2 {
	font-family: var(--erp-font-heading);
	font-weight: 800;
	font-size: 22px;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	margin: 0 0 28px;
}

body.single-product ul.products {
	display: flex;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 4px 0 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

body.single-product ul.products::-webkit-scrollbar {
	display: none;
}

body.single-product ul.products li.product {
	flex: 0 0 calc(25% - 18px);
	scroll-snap-align: start;
	text-align: left;
	position: relative;
}

@media (max-width: 900px) {
	body.single-product ul.products li.product {
		flex: 0 0 65%;
	}
}

body.single-product ul.products li.product img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	margin-bottom: 12px;
}

body.single-product ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--erp-font-sub);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin: 0 0 6px;
	color: var(--erp-text);
}

body.single-product ul.products li.product .price {
	font-size: 12px;
	margin-bottom: 0;
}

body.single-product ul.products li.product .button {
	display: block;
	margin-top: 12px;
	text-align: center;
	background: var(--erp-text);
	color: var(--erp-cream) !important;
	border-radius: 2px;
	padding: 11px 0;
	font-family: var(--erp-font-sub);
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	transition: background-color 0.25s ease;
}

body.single-product ul.products li.product .button:hover {
	background: var(--erp-accent-deep);
}

/* JS-injected slider arrows */
.erp-related-arrow {
	position: absolute;
	top: -58px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--erp-text);
	background: var(--erp-bg);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.erp-related-arrow:hover {
	background: var(--erp-text);
	color: var(--erp-cream);
}

.erp-related-arrow.erp-prev {
	right: 52px;
}

.erp-related-arrow.erp-next {
	right: 4px;
}

@media (max-width: 600px) {
	.erp-related-arrow {
		display: none;
	}
}
