/*
 * MA PEPS - Single Product Page Styles
 * Scoped under .mapeps-single-product — loads after WC + Elementor (see functions).
 * Version 1.2.0
 */

/* ---- Page shell ---- */
.single-product #primary,
.single-product .site-main {
	background-color: #000000;
}

.mapeps-single-product {
	--mp-bg: #000000;
	--mp-copper: #B8734E;
	--mp-plum: #2A102E;
	--mp-card: rgba(42, 16, 46, 0.72);
	--mp-card-border: rgba(184, 115, 78, 0.22);
	--mp-text: #F2EDE6;
	--mp-muted: #B8B0AC;
	--mp-font: "Ma Fonts", Manrope, sans-serif;

	background-color: var(--mp-bg);
	color: var(--mp-text);
	font-family: var(--mp-font);
	font-size: 16px;
	line-height: 1.6;
	padding: 32px 20px 80px;
	max-width: 1200px;
	margin: 0 auto;
}

.mapeps-single-product *,
.mapeps-single-product *::before,
.mapeps-single-product *::after {
	box-sizing: border-box;
}

.mapeps-single-product,
.mapeps-single-product p,
.mapeps-single-product li,
.mapeps-single-product td,
.mapeps-single-product label,
.mapeps-single-product input,
.mapeps-single-product button,
.mapeps-single-product a,
.mapeps-single-product .price {
	font-family: var(--mp-font) !important;
	font-style: normal !important;
}

.mapeps-single-product h1,
.mapeps-single-product h2,
.mapeps-single-product h3,
.mapeps-single-product .mapeps-sp-section-title {
	font-family: var(--mp-font) !important;
	font-style: normal !important;
	font-weight: 400 !important;
	color: var(--mp-text) !important;
	letter-spacing: 0.01em;
	line-height: 1.25;
	margin-top: 0;
}

/* ---- Card panels (gallery + buy box) ---- */
.mapeps-sp-panel {
	background: var(--mp-card);
	border: 1px solid var(--mp-card-border);
	border-radius: 16px;
	padding: 28px 24px;
}

.mapeps-sp-top {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	margin-bottom: 48px;
	align-items: start;
}

.mapeps-sp-gallery.mapeps-sp-panel {
	padding: 20px;
	width: 100%;
}

.mapeps-sp-gallery .woocommerce-product-gallery {
	margin: 0 auto !important;
	width: 100% !important;
	max-width: 420px !important;
	float: none !important;
}

.mapeps-sp-gallery .woocommerce-product-gallery .flex-viewport {
	max-height: 420px;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
}

.mapeps-sp-gallery .woocommerce-product-gallery__wrapper {
	width: 100% !important;
	max-width: 100% !important;
	display: block !important;
	margin: 0 !important;
}

.mapeps-sp-gallery .woocommerce-product-gallery__image {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	background: transparent;
	border-radius: 0;
	overflow: hidden;
}

.mapeps-sp-gallery .woocommerce-product-gallery__image a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 280px;
	max-height: 420px;
}

.mapeps-sp-gallery .woocommerce-product-gallery__image img,
.mapeps-sp-gallery .woocommerce-product-gallery__image .wp-post-image {
	width: auto !important;
	max-width: 100% !important;
	max-height: 400px !important;
	height: auto !important;
	display: block;
	margin: 0 auto;
	border-radius: 8px;
	object-fit: contain;
}

.mapeps-sp-gallery .zoomImg {
	max-width: 100% !important;
	max-height: 400px !important;
}

/* Gallery thumbnails (when multiple product images) */
.mapeps-sp-gallery ol.flex-control-nav.flex-control-thumbs {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	align-items: center;
	margin: 16px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
	width: 100% !important;
}

.mapeps-sp-gallery .flex-control-thumbs li {
	width: 68px !important;
	height: 68px !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.mapeps-sp-gallery .flex-control-thumbs li img {
	width: 100% !important;
	height: 68px !important;
	max-width: 100% !important;
	object-fit: cover;
	border-radius: 8px;
	border: 2px solid transparent;
	opacity: 0.55;
	cursor: pointer;
	transition: opacity 0.2s, border-color 0.2s;
}

.mapeps-sp-gallery .flex-control-thumbs li img.flex-active,
.mapeps-sp-gallery .flex-control-thumbs li img:hover {
	opacity: 1;
	border-color: var(--mp-copper);
}

.mapeps-sp-gallery .woocommerce-product-gallery__trigger {
	top: 10px;
	right: 10px;
}

.mapeps-sp-buybox.mapeps-sp-panel {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.mapeps-sp-brand {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 11px;
	color: var(--mp-copper) !important;
	margin: 0 0 8px;
}

.mapeps-single-product h1.mapeps-sp-title {
	font-size: clamp(1.75rem, 3vw, 2.125rem) !important;
	margin: 0 0 16px !important;
}

.mapeps-sp-summary .price,
.mapeps-sp-summary .woocommerce-variation-price .price {
	font-size: 1.375rem !important;
	color: var(--mp-copper) !important;
	margin: 0 0 20px !important;
	font-weight: 400 !important;
}

.mapeps-sp-summary .price del {
	color: var(--mp-muted) !important;
	opacity: 0.8;
}

.mapeps-sp-short-desc {
	margin: 0 0 20px;
	font-size: 17px;
	line-height: 1.65;
	color: var(--mp-muted) !important;
}

.mapeps-sp-short-desc p {
	margin: 0 0 10px;
	color: var(--mp-muted) !important;
	font-size: 17px;
}

.mapeps-sp-short-desc p:last-child {
	margin-bottom: 0;
}

.mapeps-sp-short-desc strong {
	color: var(--mp-text) !important;
}

/* ---- Add-to-cart form layout ---- */
.mapeps-single-product form.cart,
.mapeps-single-product .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-direction: column !important;
	gap: 14px !important;
	align-items: stretch !important;
	margin: 0 !important;
}

.mapeps-single-product form.cart .quantity {
	display: none !important;
}

.mapeps-sp-qty-stepper {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: fit-content;
	border: 1px solid var(--mp-card-border);
	border-radius: 8px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.35);
	margin: 4px 0 8px;
}

.mapeps-sp-qty-stepper button {
	background: var(--mp-plum) !important;
	color: var(--mp-text) !important;
	border: none !important;
	width: 40px;
	height: 40px;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 0;
}

.mapeps-sp-qty-stepper .mapeps-qty-display {
	min-width: 44px;
	text-align: center;
	font-size: 15px;
	color: var(--mp-text);
	padding: 0 8px;
}

/* ---- Variation pills ---- */
.mapeps-sp-variations .variations {
	margin: 0 0 16px !important;
	border: none !important;
	width: 100%;
}

.mapeps-sp-variations .variations td.label {
	display: none;
}

.mapeps-sp-variations .variations td.value {
	padding: 0 !important;
}

.mapeps-sp-variations .variations select {
	display: none !important;
}

.mapeps-sp-variation-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.mapeps-sp-variation-btn {
	background: transparent !important;
	border: 1px solid var(--mp-copper) !important;
	color: var(--mp-text) !important;
	padding: 10px 20px !important;
	border-radius: 8px !important;
	cursor: pointer;
	font-size: 14px !important;
	transition: background 0.2s, color 0.2s;
}

.mapeps-sp-variation-btn.is-selected,
.mapeps-sp-variation-btn:hover {
	background: var(--mp-copper) !important;
	color: #000 !important;
}

.mapeps-sp-variations .woocommerce-variation-price {
	margin: 0 0 8px;
	color: var(--mp-copper) !important;
}

/* ---- Tiered pricing ---- */
.mapeps-sp-tiers {
	margin: 8px 0 16px;
	border: 1px solid var(--mp-card-border);
	border-radius: 12px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.25);
}

.mapeps-sp-tiers-label {
	text-align: center;
	background: var(--mp-plum);
	padding: 12px;
	margin: 0;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--mp-text) !important;
}

.mapeps-sp-tier {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-top: 1px solid var(--mp-card-border);
	cursor: pointer;
	position: relative;
}

.mapeps-sp-tier.is-best {
	background: rgba(184, 115, 78, 0.1);
}

.mapeps-sp-tier-left {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
}

.mapeps-sp-tier input[type="radio"] {
	accent-color: var(--mp-copper);
	flex-shrink: 0;
}

.mapeps-sp-tier-price {
	font-size: 14px;
	text-align: right;
}

.mapeps-sp-tier-price del {
	color: var(--mp-muted) !important;
	margin-left: 6px;
	font-size: 13px;
}

.mapeps-sp-tier-off {
	color: var(--mp-copper) !important;
	font-size: 12px;
	margin-left: 6px;
}

.mapeps-sp-badge {
	position: absolute;
	right: 16px;
	top: -11px;
	background: var(--mp-copper) !important;
	color: #000 !important;
	font-size: 10px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ---- Buttons (override WC purple .button.alt) ---- */
.mapeps-single-product .single_add_to_cart_button,
.mapeps-single-product button.single_add_to_cart_button,
.mapeps-single-product .button.single_add_to_cart_button,
.mapeps-single-product button.button.alt.single_add_to_cart_button {
	display: block !important;
	width: 100% !important;
	padding: 15px 20px !important;
	border-radius: 10px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-align: center !important;
	cursor: pointer !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	line-height: 1.3 !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 1px solid var(--mp-copper) !important;
	color: var(--mp-text) !important;
	box-shadow: none !important;
}

.mapeps-single-product .single_add_to_cart_button:hover,
.mapeps-single-product button.single_add_to_cart_button:hover {
	background: rgba(184, 115, 78, 0.12) !important;
	background-color: rgba(184, 115, 78, 0.12) !important;
	color: var(--mp-text) !important;
	border-color: var(--mp-copper) !important;
}

.mapeps-single-product .mapeps-sp-buy-now,
.mapeps-single-product a.mapeps-sp-buy-now,
.mapeps-single-product button.mapeps-sp-buy-now {
	display: block !important;
	width: 100% !important;
	padding: 15px 20px !important;
	border-radius: 10px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-align: center !important;
	text-decoration: none !important;
	cursor: pointer !important;
	text-transform: none !important;
	line-height: 1.3 !important;
	background: var(--mp-copper) !important;
	background-color: var(--mp-copper) !important;
	border: 1px solid var(--mp-copper) !important;
	color: #000 !important;
	box-shadow: none !important;
}

.mapeps-single-product .mapeps-sp-buy-now:hover,
.mapeps-single-product a.mapeps-sp-buy-now:hover,
.mapeps-single-product button.mapeps-sp-buy-now:hover {
	background: #c9845d !important;
	background-color: #c9845d !important;
	color: #000 !important;
	border-color: #c9845d !important;
}

/* ---- Disclaimer ---- */
.mapeps-sp-disclaimer {
	display: flex;
	gap: 12px;
	background: rgba(42, 16, 46, 0.85);
	border: 1px solid var(--mp-card-border);
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 13px;
	color: var(--mp-muted) !important;
	margin-top: 4px;
}

.mapeps-sp-disclaimer-icon {
	color: var(--mp-copper);
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1.2;
}

.mapeps-sp-disclaimer-text p {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--mp-muted) !important;
}

.mapeps-sp-disclaimer-text p:last-child {
	margin-bottom: 0;
}

/* ---- Section rhythm ---- */
.mapeps-sp-section {
	margin-bottom: 0;
}

.mapeps-sp-section-title {
	text-align: center;
	font-size: 1.375rem !important;
	margin: 0 0 28px !important;
}

.mapeps-sp-related-carousel {
	padding-bottom: 56px;
	margin-bottom: 56px;
	border-bottom: 1px solid var(--mp-card-border);
}

.mapeps-sp-details {
	max-width: 780px;
	margin: 0 auto;
	padding: 8px 0 72px;
}

.mapeps-sp-section--bottom {
	margin-top: 0;
	padding-top: 64px;
	border-top: 1px solid var(--mp-card-border);
}

/* ---- Carousel ---- */
.mapeps-sp-carousel-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 12px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.mapeps-sp-carousel-item {
	flex: 0 0 210px;
	background: var(--mp-card);
	border: 1px solid var(--mp-card-border);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
	scroll-snap-align: start;
}

.mapeps-sp-carousel-item img {
	width: 100%;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
}

.mapeps-sp-carousel-name {
	font-size: 14px;
	margin: 12px 0 4px;
}

.mapeps-sp-carousel-name a {
	color: var(--mp-text) !important;
	text-decoration: none !important;
}

.mapeps-sp-carousel-price {
	color: var(--mp-copper) !important;
	margin-bottom: 12px;
	font-size: 14px;
}

.mapeps-sp-carousel-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--mp-card-border);
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 12px;
}

.mapeps-sp-carousel-qty button {
	background: var(--mp-plum) !important;
	color: var(--mp-text) !important;
	border: none !important;
	width: 28px;
	height: 28px;
	cursor: pointer;
	font-size: 16px;
	padding: 0;
}

.mapeps-sp-carousel-qty input {
	width: 36px;
	text-align: center;
	background: transparent !important;
	border: none !important;
	border-left: 1px solid var(--mp-card-border) !important;
	border-right: 1px solid var(--mp-card-border) !important;
	color: var(--mp-text) !important;
	font-size: 13px;
	padding: 4px 0;
	-moz-appearance: textfield;
}

.mapeps-sp-carousel-qty input::-webkit-outer-spin-button,
.mapeps-sp-carousel-qty input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.mapeps-single-product .mapeps-sp-carousel-add,
.mapeps-single-product a.mapeps-sp-carousel-add.button {
	width: 100% !important;
	background: var(--mp-copper) !important;
	background-color: var(--mp-copper) !important;
	color: #000 !important;
	border: none !important;
	padding: 10px 12px !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	cursor: pointer;
	display: inline-block;
	text-decoration: none !important;
	box-shadow: none !important;
}

.mapeps-single-product .mapeps-sp-carousel-add:hover {
	background: #c9845d !important;
	color: #000 !important;
}

/* ---- Details content ---- */
.mapeps-sp-block {
	margin-bottom: 48px;
}

.mapeps-sp-block h2 {
	font-size: 1.25rem !important;
	margin-bottom: 16px !important;
}

.mapeps-sp-description,
.mapeps-sp-description p,
.mapeps-sp-description li,
.mapeps-sp-quality,
.mapeps-sp-quality p {
	color: var(--mp-muted) !important;
	font-size: 17px;
	line-height: 1.75;
}

.mapeps-sp-description strong,
.mapeps-sp-quality strong {
	color: var(--mp-text) !important;
}

.mapeps-sp-research-list {
	padding-left: 1.25rem;
	margin: 0;
}

.mapeps-sp-research-list li {
	margin-bottom: 10px;
	color: var(--mp-muted) !important;
}

.mapeps-sp-link-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.mapeps-sp-link-list li {
	margin-bottom: 10px;
	padding-left: 18px;
	position: relative;
}

.mapeps-sp-link-list li::before {
	content: "→";
	position: absolute;
	left: 0;
	color: var(--mp-copper);
}

.mapeps-sp-link-list a {
	color: var(--mp-text) !important;
	text-decoration: none !important;
}

.mapeps-sp-link-list a:hover {
	color: var(--mp-copper) !important;
}

.mapeps-sp-specs-table {
	width: 100%;
	border-collapse: collapse;
}

.mapeps-sp-specs-table tr {
	border-bottom: 1px solid var(--mp-card-border);
}

.mapeps-sp-specs-table td {
	padding: 12px 0;
	font-size: 14px;
	color: var(--mp-muted) !important;
}

.mapeps-sp-spec-key {
	color: var(--mp-copper) !important;
	width: 42%;
	font-weight: 600 !important;
}

/* ---- FAQ ---- */
.mapeps-sp-faq-item {
	border-bottom: 1px solid var(--mp-card-border);
}

.mapeps-sp-faq-question {
	width: 100%;
	background: none !important;
	border: none !important;
	color: var(--mp-text) !important;
	text-align: left;
	padding: 18px 0;
	font-size: 15px !important;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	cursor: pointer;
}

.mapeps-sp-faq-icon {
	color: var(--mp-copper);
	font-size: 20px;
	flex-shrink: 0;
	transition: transform 0.2s;
}

.mapeps-sp-faq-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
	color: var(--mp-muted) !important;
	font-size: 14px;
}

.mapeps-sp-faq-item.is-open .mapeps-sp-faq-answer {
	max-height: 600px;
	padding-bottom: 18px;
}

.mapeps-sp-faq-item.is-open .mapeps-sp-faq-icon {
	transform: rotate(45deg);
}

/* ---- Bottom grid ---- */
.mapeps-sp-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.mapeps-sp-grid-item {
	text-decoration: none !important;
	color: var(--mp-text) !important;
	text-align: center;
	background: var(--mp-card);
	border: 1px solid var(--mp-card-border);
	border-radius: 12px;
	padding: 16px;
	transition: border-color 0.2s;
}

.mapeps-sp-grid-item:hover {
	border-color: var(--mp-copper);
}

.mapeps-sp-grid-item img {
	width: 100%;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
}

.mapeps-sp-grid-name {
	margin: 12px 0 4px;
	font-size: 14px;
	color: var(--mp-text) !important;
}

.mapeps-sp-grid-price {
	color: var(--mp-copper) !important;
	font-size: 14px;
	margin: 0;
}

/* ---- WooCommerce misc overrides inside wrapper ---- */
.mapeps-single-product .woocommerce-breadcrumb {
	display: none;
}

.mapeps-single-product .reset_variations {
	display: none !important;
}

.mapeps-single-product .stock {
	color: var(--mp-muted) !important;
	font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.mapeps-sp-top {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.mapeps-sp-gallery .woocommerce-product-gallery {
		max-width: 360px !important;
	}

	.mapeps-sp-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.mapeps-sp-carousel-item {
		flex: 0 0 180px;
	}
}

@media (max-width: 480px) {
	.mapeps-single-product {
		padding: 20px 16px 60px;
	}

	.mapeps-sp-panel {
		padding: 20px 16px;
	}

	.mapeps-sp-gallery .woocommerce-product-gallery {
		max-width: 100% !important;
	}

	.mapeps-sp-gallery .woocommerce-product-gallery__image a {
		min-height: 220px;
		max-height: 320px;
	}

	.mapeps-sp-gallery .woocommerce-product-gallery__image img,
	.mapeps-sp-gallery .woocommerce-product-gallery__image .wp-post-image {
		max-height: 300px !important;
	}

	.mapeps-sp-gallery .flex-control-thumbs li {
		width: 56px !important;
		height: 56px !important;
	}

	.mapeps-sp-gallery .flex-control-thumbs li img {
		height: 56px !important;
	}

	.mapeps-sp-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
}
