/* ==========================================================================
   POS Qatar — Redesigned Single Product (Zebra-inspired, black & white)
   Activated via ?pq_design=test on any product URL
   ========================================================================== */

/* Hide theme default product layout when redesign is active */
body.pq-product-redesign #main > *:not(.pq-product),
body.pq-product-redesign div.product.type-product,
body.pq-product-redesign .single-product .product,
body.pq-product-redesign .woocommerce-breadcrumb,
body.pq-product-redesign .electro-wc-catalog-page-wrap,
body.pq-product-redesign section.related.products,
body.pq-product-redesign .woocommerce-tabs,
body.pq-product-redesign .up-sells,
body.pq-product-redesign .woocommerce-product-gallery,
body.pq-product-redesign .summary.entry-summary,
body.pq-product-redesign .product_meta,
body.pq-product-redesign .electro-wc-catalog-content-wrap {
	display: none !important;
}

/* Force product redesign images visible (override theme lazy/opacity tricks) */
body.pq-product-redesign .pq-product img {
	opacity: 1 !important;
	visibility: visible !important;
}

/* Container */
.pq-product {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: #111;
	line-height: 1.6;
	max-width: 1280px;
	margin: 0 auto;
	padding: 32px 0 60px;
	width: 100%;
	box-sizing: border-box;
}

.pq-product *,
.pq-product *::before,
.pq-product *::after {
	box-sizing: border-box;
}

/* ---------- BREADCRUMB ---------- */
.pq-product__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 28px;
	font-size: 13px;
	color: #666;
}

.pq-product__breadcrumb a {
	color: #444;
	text-decoration: none;
}

.pq-product__breadcrumb a:hover {
	color: #000;
	text-decoration: underline;
}

.pq-product__breadcrumb span {
	color: #999;
}

/* ---------- TOP: GALLERY + INFO ---------- */
.pq-product__top {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: 48px;
	margin-bottom: 52px;
	align-items: start;
}

/* Gallery */
.pq-product__gallery {
	position: sticky;
	top: 100px;
	align-self: start;
	min-width: 0;
	width: 100%;
}

.pq-product__main-image {
	width: 100%;
	aspect-ratio: 4 / 5;
	min-height: 0;
	background: #f6f6f6;
	border: 1px solid #ececec;
	border-radius: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	cursor: zoom-in;
	padding: 16px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	color: inherit;
	text-align: center;
}

/* PC: full width, keep current compact height */
@media (min-width: 992px) {
	.pq-product__main-image {
		width: 100%;
		max-width: 100%;
		aspect-ratio: auto;
		height: 410px;
		max-height: 410px;
	}
}

.pq-product__main-image img,
.pq-product__main-image #pq-main-img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center center !important;
	border-radius: 0 !important;
	transform: none;
	opacity: 1 !important;
	visibility: visible !important;
	transition: transform .35s ease;
}

.pq-product__main-image:hover img {
	transform: scale(1.04);
}

.pq-product__thumbs {
	display: flex;
	gap: 10px;
	margin-top: 14px;
	overflow-x: auto;
	padding-bottom: 4px;
}

.pq-product__thumb {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	border: 2px solid transparent;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 6px;
	transition: border-color .15s;
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
}

.pq-product__thumb.is-active,
.pq-product__thumb:hover {
	border-color: #000;
}

.pq-product__thumb img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: contain !important;
	object-position: center !important;
	opacity: 1 !important;
	visibility: visible !important;
}

/* Lightbox */
.pq-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, .88);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	cursor: zoom-out;
}

.pq-lightbox img {
	max-width: min(96vw, 1100px);
	max-height: 90vh;
	object-fit: contain;
	display: block;
}

.pq-lightbox__close {
	position: absolute;
	top: 16px;
	right: 20px;
	width: 44px;
	height: 44px;
	border: 0;
	background: #fff;
	color: #000;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

body.pq-lightbox-open {
	overflow: hidden;
}

/* Info / Summary */
.pq-product__info {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.pq-product__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.pq-product__cat {
	display: inline-block;
	padding: 4px 12px;
	background: #f2f2f2;
	color: #333;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-decoration: none;
}

.pq-product__cat:hover {
	background: #000;
	color: #fff;
}

.pq-product__title {
	font-size: 32px;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 14px;
	color: #000;
}

.pq-product__sku {
	font-size: 13px;
	color: #888;
	margin-bottom: 20px;
}

.pq-product__short-desc {
	font-size: 15px;
	line-height: 1.7;
	color: #444;
	margin-bottom: 28px;
}

.pq-product__short-desc p {
	margin: 0 0 10px;
}

/* Divider */
.pq-product__divider {
	border: 0;
	border-top: 1px solid #e4e4e4;
	margin: 0 0 24px;
}

/* Trust badges */
.pq-product__trust {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-bottom: 28px;
}

.pq-product__trust-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #222;
}

.pq-product__trust-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

body.pq-product-redesign {
	--ywraq_layout_button_bg_color: #000000;
	--ywraq_layout_button_color: #ffffff;
	--ywraq_layout_button_border_color: #000000;
	--ywraq_layout_button_bg_color_hover: #222222;
	--ywraq_layout_button_color_hover: #ffffff;
	--ywraq_layout_button_border_color_hover: #222222;
}
.pq-product__actions,
.pq-product__actions.yith-ywraq-add-to-quote {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: center !important;
	gap: 10px 12px;
	margin-bottom: 28px;
	width: 100%;
	min-height: 28px;
}

.pq-product__qty {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	height: 28px !important;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 0;
	gap: 0;
	flex-shrink: 0;
}

.pq-product__qty-label {
	display: none !important;
}

.pq-product__qty-btn {
	width: 28px;
	height: 28px !important;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #111;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
	transition: background .15s, color .15s;
}

.pq-product__qty-btn svg {
	width: 13px;
	height: 13px;
	display: block;
}

.pq-product__qty-btn:hover {
	background: #f2f2f2;
	color: #000;
}

.pq-product__qty-btn:active {
	background: #e8e8e8;
}

.pq-product__qty-input {
	width: 28px;
	height: 28px !important;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: #111;
	padding: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.pq-product__qty-input:focus {
	outline: none;
}

.pq-product__qty-input::-webkit-inner-spin-button,
.pq-product__qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.pq-product__btn,
a.pq-product__btn,
a.add-request-quote-button.pq-product__btn,
a.add-request-quote-button.button.pq-product__btn,
.pq-product .add-request-quote-button.button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px;
	height: 28px !important;
	min-height: 28px !important;
	max-height: 28px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	line-height: 1 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-sizing: border-box !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .2s, color .2s;
	vertical-align: middle !important;
	position: static !important;
	top: auto !important;
}

.pq-product__btn--primary,
a.pq-product__btn--primary,
a.add-request-quote-button.pq-product__btn--primary,
.pq-product a.add-request-quote-button.button.pq-product__btn--primary,
.pq-ywraq-btn-wrap a.add-request-quote-button.button,
body.pq-product-redesign .pq-product a.add-request-quote-button.button {
	background: #000 !important;
	background-color: #000 !important;
	background-image: none !important;
	color: #fff !important;
	border: 0 !important;
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
}

.pq-product__btn--primary:hover,
a.pq-product__btn--primary:hover,
a.add-request-quote-button.pq-product__btn--primary:hover,
.pq-product a.add-request-quote-button.button.pq-product__btn--primary:hover,
.pq-ywraq-btn-wrap a.add-request-quote-button.button:hover,
body.pq-product-redesign .pq-product a.add-request-quote-button.button:hover {
	background: #222 !important;
	background-color: #222 !important;
	color: #fff !important;
	border: 0 !important;
}

.pq-product__btn--outline {
	background: transparent;
	color: #000;
	border: 2px solid #000;
}

.pq-product__btn--outline:hover {
	background: #000;
	color: #fff;
}

.pq-product__btn svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* YITH Request a Quote integration — same slot for Quote / View Cart */
.pq-product__actions.yith-ywraq-add-to-quote > .pq-product__qty {
	order: 1;
	flex: 0 0 auto;
	height: 28px !important;
}

.pq-ywraq-slot {
	order: 2;
	flex: 1 1 0;
	min-width: 0;
	display: grid;
	grid-template-areas: "cta";
	align-items: stretch;
	height: 28px !important;
	min-height: 28px !important;
	max-height: 28px !important;
}

.pq-ywraq-slot > .pq-ywraq-btn-wrap,
.pq-ywraq-slot > .pq-ywraq-view {
	grid-area: cta;
	width: 100%;
	min-width: 0;
	height: 28px !important;
	min-height: 28px !important;
	max-height: 28px !important;
	margin: 0;
	align-items: stretch;
}

.pq-ywraq-btn-wrap {
	display: flex !important;
}

.pq-ywraq-btn-wrap.addedd,
.pq-ywraq-btn-wrap.hide,
.pq-ywraq-slot > .pq-ywraq-btn-wrap.addedd,
.pq-ywraq-slot > .pq-ywraq-btn-wrap.hide {
	display: none !important;
}

.pq-ywraq-btn-wrap .add-request-quote-button.pq-product__btn,
.pq-ywraq-btn-wrap .add-request-quote-button.button,
.pq-product__actions a.add-request-quote-button {
	width: 100%;
	flex: 1;
	height: 28px !important;
	min-height: 28px !important;
	max-height: 28px !important;
	margin: 0 !important;
	margin-top: 0 !important;
	padding: 0 18px !important;
	line-height: 28px !important;
	top: 0 !important;
	transform: none !important;
}

.pq-ywraq-view > a,
.pq-ywraq-view > a.pq-product__btn,
.pq-ywraq-view > a.pq-product__btn--primary,
.pq-product__actions .pq-ywraq-view a {
	width: 100%;
	flex: 1;
	height: 28px !important;
	min-height: 28px !important;
	max-height: 28px !important;
	padding: 0 18px !important;
	line-height: 28px !important;
	color: #fff !important;
	background: #000 !important;
	text-decoration: none !important;
}

.pq-ywraq-view > a:hover,
.pq-ywraq-view > a:focus,
.pq-ywraq-view > a:visited,
.pq-product__actions .pq-ywraq-view a:hover,
.pq-product__actions .pq-ywraq-view a:visited {
	color: #fff !important;
	background: #222 !important;
}

.pq-ywraq-msg {
	order: 3;
	flex: 0 0 100%;
	width: 100%;
	font-size: 13px;
	font-weight: 600;
	color: #111;
	margin: 0;
	padding: 0;
}

.pq-product__actions .yith-ywraq-add-button.hide,
.pq-product__actions .pq-ywraq-view.hide,
.pq-product__actions .pq-ywraq-msg.hide,
.pq-product__actions .hide {
	display: none !important;
}

.pq-ywraq-slot > .pq-ywraq-view:not(.hide),
.pq-product__actions .pq-ywraq-view:not(.hide) {
	display: flex !important;
}

body.pq-product-redesign .pq-product .yith-ywraq-add-to-quote .clear {
	display: none;
}

/* Meta */
.pq-product__meta {
	font-size: 13px;
	color: #666;
}

.pq-product__meta span {
	display: block;
	margin-bottom: 4px;
}

.pq-product__meta a {
	color: #000;
	text-decoration: none;
}

.pq-product__meta a:hover {
	text-decoration: underline;
}

/* ---------- TABS ---------- */
.pq-product__tabs {
	margin-bottom: 56px;
	padding-top: 8px;
	padding-right: 0;
	border-top: 1px solid #e8e8e8;
	box-sizing: border-box;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.pq-product__tab-nav {
	display: inline-flex !important;
	align-items: center;
	gap: 0;
	margin: 28px 0 28px;
	padding: 4px;
	background: #f3f3f3 !important;
	border: 0 !important;
	border-bottom: 0 !important;
}

.pq-product__tab-btn {
	padding: 10px 22px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #666 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: .01em !important;
	cursor: pointer;
	position: relative;
	line-height: 1.2;
	box-shadow: none !important;
	outline: none !important;
	transition: background .15s, color .15s;
}

.pq-product__tab-btn::after,
.pq-product__tab-btn::before {
	display: none !important;
	content: none !important;
}

.pq-product__tab-btn.is-active {
	background: #000 !important;
	color: #fff !important;
}

.pq-product__tab-btn:hover:not(.is-active) {
	color: #000 !important;
	background: #e9e9e9 !important;
}

.pq-product__tab-panel {
	display: none;
}

.pq-product__tab-panel.is-active {
	display: block;
}

.pq-product__tab-panel h2,
.pq-product__tab-panel h3,
.pq-product__tab-panel h4 {
	font-size: 20px;
	font-weight: 800;
	margin: 28px 0 12px;
	color: #000;
}

.pq-product__tab-panel p {
	font-size: 15px;
	line-height: 1.75;
	color: #333;
	margin: 0 0 14px;
}

.pq-product__tab-panel ul,
.pq-product__tab-panel ol {
	padding-left: 22px;
	margin: 0 0 16px;
}

.pq-product__tab-panel li {
	font-size: 14px;
	line-height: 1.7;
	color: #444;
	margin-bottom: 4px;
}

.pq-product__tab-panel table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 20px;
}

.pq-product__tab-panel th,
.pq-product__tab-panel td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}

.pq-product__tab-panel th {
	font-weight: 700;
	background: #f7f7f7;
	color: #000;
}

.pq-product__tab-panel img {
	max-width: 100%;
	height: auto;
}

/* ---------- RELATED ---------- */
.pq-product__related {
	margin-bottom: 40px;
}

.pq-product__related-title {
	font-size: 24px;
	font-weight: 800;
	margin: 0 0 28px;
	color: #000;
}

.pq-product__related-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.pq-related-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e8e8e8;
	text-decoration: none;
	color: #111;
	transition: box-shadow .2s, border-color .2s;
}

.pq-related-card:hover {
	border-color: #000;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
	color: #000;
}

.pq-related-card__img {
	aspect-ratio: 4 / 5;
	background: #f6f6f6;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	overflow: hidden;
}

.pq-related-card__img img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center center !important;
	transform: none;
	opacity: 1 !important;
	visibility: visible !important;
	transition: transform .3s ease;
}

.pq-related-card:hover .pq-related-card__img img {
	transform: scale(1.05);
}

.pq-related-card__body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.pq-related-card__cat {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #888;
	margin-bottom: 6px;
}

.pq-related-card__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 auto;
	color: #000;
}

.pq-related-card__cta {
	display: inline-block;
	margin-top: 14px;
	font-size: 13px;
	font-weight: 700;
	color: #000;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
	.pq-product__top {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.pq-product__gallery {
		position: static;
	}

	.pq-product__main-image {
		aspect-ratio: 4 / 5;
		padding: 12px;
	}

	.pq-product__main-image img,
	.pq-product__main-image #pq-main-img {
		max-height: 100% !important;
	}

	.pq-product__title {
		font-size: 26px;
	}

	.pq-product__related-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.pq-product {
		padding: 16px 0 40px;
	}

	.pq-product__tabs {
		padding-right: 0;
	}

	.pq-product__top {
		gap: 24px;
	}

	.pq-product__title {
		font-size: 22px;
	}

	.pq-product__actions,
	.pq-product__actions.yith-ywraq-add-to-quote {
		flex-direction: row !important;
		flex-wrap: wrap;
		align-items: center !important;
		gap: 10px;
	}

	.pq-product__actions.yith-ywraq-add-to-quote > .pq-product__qty {
		order: 1;
		height: 28px !important;
	}

	.pq-ywraq-slot {
		order: 2;
		flex: 1 1 0;
		min-width: 0;
		height: 28px !important;
	}

	.pq-product__qty {
		padding: 0;
		margin: 0;
	}

	.pq-product__btn,
	a.pq-product__btn,
	a.add-request-quote-button.button.pq-product__btn,
	.pq-product .add-request-quote-button.button {
		height: 28px !important;
		min-height: 28px !important;
		max-height: 28px !important;
		padding: 0 14px !important;
		font-size: 11px !important;
		gap: 6px;
		white-space: nowrap;
		line-height: 28px !important;
	}

	.pq-product__btn--primary,
	a.pq-product__btn--primary {
		width: auto;
		flex: 1 1 auto;
		min-width: 0;
	}

	.pq-ywraq-slot,
	.pq-ywraq-btn-wrap,
	.pq-ywraq-view:not(.hide) {
		height: 28px !important;
	}

	.pq-product__btn svg {
		width: 16px;
		height: 16px;
	}

	.pq-product__tab-nav {
		display: flex;
		width: 100%;
		overflow-x: auto;
	}

	.pq-product__tab-btn {
		flex: 1;
		padding: 10px 14px;
		font-size: 13px;
		text-align: center;
	}

	.pq-product__related-grid {
		grid-template-columns: 1fr 1fr;
		gap: 14px;
	}

	.pq-related-card__body {
		padding: 12px;
	}

	.pq-product__trust {
		flex-direction: column;
		gap: 10px;
	}

	.pq-product__thumb {
		width: 60px;
		height: 60px;
	}

	.pq-product__tab-panel table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.pq-product__tab-panel th,
	.pq-product__tab-panel td {
		padding: 10px 12px;
		font-size: 13px;
	}
}

/* Hide sidebar / category listing */
body.pq-product-redesign #secondary,
body.pq-product-redesign #sidebar,
body.pq-product-redesign .electro-wc-catalog-content-wrap aside,
body.pq-product-redesign .shop-archive-header {
	display: none !important;
}

/* Make primary full width, keep safe side padding */
body.pq-product-redesign #primary {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	flex: 0 0 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.pq-product-redesign .site-content-inner.row,
body.pq-product-redesign .site-content-inner {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	flex: 0 0 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.pq-product-redesign #content {
	width: 100% !important;
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box !important;
	overflow-x: clip;
}

body.pq-product-redesign #content > .container {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	flex: 0 0 100% !important;
	padding-left: 20px !important;
	padding-right: 20px !important;
	box-sizing: border-box !important;
}

body.pq-product-redesign .woocommerce-breadcrumb {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

@media (min-width: 768px) {
	body.pq-product-redesign #content > .container {
		padding-left: 24px !important;
		padding-right: 24px !important;
	}
}

@media (min-width: 1200px) {
	body.pq-product-redesign #content > .container {
		padding-left: 32px !important;
		padding-right: 32px !important;
	}
}
