/* ========================================
   B2B Single Product — Tienda Zacarias
   ======================================== */

/* --- Brand subtitle (above title) --- */
.b2b-single-brand {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--b2b-gold, #C5A059);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.125rem;
}

/* --- Category/concentration badge --- */
.b2b-single-category-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-bottom: 0.5rem;
}

.b2b-single-category-badge {
	display: inline-block;
	padding: 0.2rem 0.625rem;
	background: var(--b2b-gray-50, #F8F9FA);
	border: 1px solid var(--b2b-gray-100, #E0E0E0);
	border-radius: 9999px;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--b2b-text, #333);
}

/* --- EAN code --- */
.b2b-single-ean {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8125rem;
	color: var(--b2b-gray-600, #757575);
	margin-bottom: 0.75rem;
}

.b2b-single-ean-label {
	font-weight: 600;
	color: var(--b2b-text, #333);
}

.b2b-single-ean-code {
	font-family: 'Courier New', Courier, monospace;
	letter-spacing: 0.02em;
}

/* --- Stock badge --- */
.b2b-single-stock {
	margin: 0.5rem 0;
}

.b2b-single-stock .stock-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8125rem;
	font-weight: 600;
}

.b2b-single-stock .stock-badge.stock-high {
	background: #DCFCE7;
	color: #166534;
}

.b2b-single-stock .stock-badge.stock-low {
	background: #FEF9C3;
	color: #854D0E;
}

.b2b-single-stock .stock-badge.stock-out {
	background: #FEE2E2;
	color: #991B1B;
}

/* --- Especificación tab table --- */
.b2b-specs-table {
	width: 100%;
	border-collapse: collapse;
}

.b2b-specs-table tr {
	border-bottom: 1px solid var(--b2b-gray-100, #E0E0E0);
}

.b2b-specs-table tr:last-child {
	border-bottom: none;
}

.b2b-specs-table td {
	padding: 0.875rem 0;
	font-size: 0.9rem;
	vertical-align: top;
	line-height: 1.5;
}

.b2b-specs-table td:first-child {
	color: var(--b2b-gray-600, #757575);
	font-weight: 400;
	width: 35%;
	padding-right: 1.5rem;
}

.b2b-specs-table td:last-child {
	font-weight: 700;
	color: var(--b2b-navy, #1C1C1C);
}

/* --- Product actions (Favorito + Lista buttons) --- */
.single-product .product_meta {
	border-top: none !important;
	border-bottom: none !important;
}

.b2b-product-actions {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	padding: 0.75rem 0;
	margin-top: 0.5rem;
	border-top: 1px solid var(--b2b-gray-100, #E0E0E0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
	.b2b-specs-list {
		grid-template-columns: 1fr;
		gap: 0.25rem;
	}

	.b2b-specs-list dt {
		margin-top: 0.375rem;
	}

	.b2b-specs-list dd {
		padding-left: 0;
	}
}

/* --- SALE Badge --- */
body.b2b.single-product .b2b-sp-gallery {
	position: relative;
}

body.b2b.single-product.woocommerce span.onsale,
body.b2b.single-product .woocommerce span.onsale {
	position: absolute !important;
	top: 1rem !important;
	left: 1rem !important;
	right: auto !important;
	z-index: 5 !important;
	min-height: 0 !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0.5rem 0.875rem 0.5rem 1rem !important;
	background: var(--b2b-navy, #1C1C1C) !important;
	background-color: var(--b2b-navy, #1C1C1C) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 4px !important;
	font-family: 'DM Sans', sans-serif !important;
	font-weight: 600 !important;
	font-size: 0.75rem !important;
	line-height: 1 !important;
	text-align: left !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	box-shadow: 0 4px 12px rgba(28, 28, 28, 0.18);
	overflow: visible;
}

body.b2b.single-product.woocommerce span.onsale::before,
body.b2b.single-product .woocommerce span.onsale::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 3px;
	background: var(--b2b-gold, #C5A059);
	border-radius: 4px 0 0 4px;
}

@media (max-width: 768px) {
	body.b2b.single-product.woocommerce span.onsale,
	body.b2b.single-product .woocommerce span.onsale {
		top: 0.625rem !important;
		left: 0.625rem !important;
		font-size: 0.6875rem !important;
		padding: 0.4375rem 0.75rem 0.4375rem 0.875rem !important;
	}
}

/* --- Price --- */
.single-product .entry-summary .price {
	color: var(--b2b-navy, #1C1C1C);
	font-size: 1.5rem;
	font-weight: 700;
	font-family: 'DM Sans', sans-serif;
}

.single-product .entry-summary .price del {
	color: var(--b2b-gray-400, #999);
	font-weight: 400;
	font-size: 1.1rem;
}

.single-product .entry-summary .price ins {
	color: var(--b2b-gold, #C5A059);
	text-decoration: none;
	font-weight: 700;
}

/* --- Stock text --- */
.single-product .entry-summary .stock {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
}

.single-product .entry-summary .stock.in-stock {
	color: var(--b2b-success, #28a745);
}


/* --- Add to Cart button --- */
.single-product .entry-summary .single_add_to_cart_button,
.single-product .entry-summary button[name="add-to-cart"] {
	background: var(--b2b-gold, #C5A059) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	font-family: 'DM Sans', sans-serif;
	font-weight: 600;
	font-size: 0.9375rem;
	padding: 0.75rem 2rem !important;
	text-transform: none;
	letter-spacing: 0;
	transition: background 0.2s, box-shadow 0.2s;
}

.single-product .entry-summary .single_add_to_cart_button:hover,
.single-product .entry-summary button[name="add-to-cart"]:hover {
	background: var(--b2b-gold-light, #B08D4B) !important;
	box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3);
}

/* --- Quantity input --- */
.single-product .entry-summary .quantity input.qty {
	border: 1px solid var(--b2b-gray-200, #e2e8f0);
	border-radius: 6px;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9375rem;
	color: var(--b2b-navy, #1C1C1C);
	text-align: center;
	padding: 0.5rem;
}

/* --- Lista button: handled in the full-width stacked section below --- */

/* --- Product title --- */
.single-product .entry-summary .product_title {
	font-family: 'DM Sans', sans-serif;
	color: var(--b2b-navy, #1C1C1C);
	font-weight: 700;
}

/* --- Product tabs --- */
body.b2b .woocommerce-tabs ul.tabs {
	display: flex !important;
	flex-wrap: nowrap;
	gap: 0;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	border-bottom: 2px solid var(--b2b-gray-100, #E0E0E0);
}

body.b2b .woocommerce-tabs ul.tabs li {
	margin: 0 5px !important;
	padding: 0 0.8em !important;
	border: none !important;
	background: none;
	border-radius: 0 !important;
}

body.b2b .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.6rem 1.25rem;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--b2b-gray-600, #757575);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.15s, border-color 0.15s;
}

body.b2b .woocommerce-tabs ul.tabs li a:hover {
	color: var(--b2b-navy, #1C1C1C);
}

body.b2b .woocommerce-tabs ul.tabs li.active {
	background: none;
	border: none;
}

body.b2b .woocommerce-tabs ul.tabs li.active a {
	color: var(--b2b-gold, #C5A059);
	border-bottom-color: var(--b2b-gold, #C5A059);
	font-weight: 600;
}

body.b2b .woocommerce-tabs ul.tabs li::before,
body.b2b .woocommerce-tabs ul.tabs li::after {
	display: none !important;
}

/* --- Related / Upsells titles --- */
.single-product .related > h2,
.single-product .upsells > h2 {
	font-family: 'DM Sans', sans-serif;
	color: var(--b2b-navy, #1C1C1C);
}

/* --- Breadcrumb --- */
.single-product .woocommerce-breadcrumb {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8125rem;
	color: var(--b2b-gray-600, #666);
}

.single-product .woocommerce-breadcrumb a {
	color: var(--b2b-gold, #C5A059);
	text-decoration: none;
}

.single-product .woocommerce-breadcrumb a:hover {
	text-decoration: underline;
}

/* ========================================
   Two-column layout: gallery+tabs (left) + summary (right, sticky)
   ======================================== */

body.b2b .b2b-single-product-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	grid-template-rows: auto auto;
	gap: 2.5rem 2.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1rem;
	align-items: start;
}

/* Gallery: top-left */
body.b2b .b2b-sp-gallery {
	grid-column: 1;
	grid-row: 1;
}

/* Summary: right, spans both rows, sticky */
body.b2b .b2b-sp-right {
	grid-column: 2;
	grid-row: 1 / 3;
	position: sticky;
	top: calc(75px + 1.5rem);
}

/* Tabs: bottom-left */
body.b2b .b2b-sp-tabs {
	grid-column: 1;
	grid-row: 2;
}

/* Gallery */
body.b2b .b2b-sp-gallery .woocommerce-product-gallery {
	width: 100% !important;
	float: none !important;
}

/* Summary */
body.b2b .b2b-sp-right .entry-summary {
	width: 100% !important;
	float: none !important;
}

/* Tabs */
body.b2b .b2b-sp-tabs .woocommerce-tabs {
	width: 100%;
}

/* Related/upsells full-width below layout */
body.b2b .single-product div.product > .related,
body.b2b .single-product div.product > .upsells {
	max-width: 1200px;
	margin: 2rem auto;
	padding: 0 1rem;
}

/* Override buttons inside summary */
body.b2b .single-product .entry-summary .single_add_to_cart_button {
	background: var(--b2b-gold) !important;
	color: #fff !important;
	border: none !important;
}

body.b2b .single-product .b2b-product-actions {
	border-top: 1px solid var(--b2b-gray-100);
}

/* ========================================
   DM Sans: force on ALL single product text
   ======================================== */

body.b2b.single-product,
body.b2b.single-product p,
body.b2b.single-product span,
body.b2b.single-product a,
body.b2b.single-product li,
body.b2b.single-product td,
body.b2b.single-product th,
body.b2b.single-product h1,
body.b2b.single-product h2,
body.b2b.single-product h3,
body.b2b.single-product h4,
body.b2b.single-product label,
body.b2b.single-product input,
body.b2b.single-product button,
body.b2b.single-product .woocommerce-tabs .panel {
	font-family: 'DM Sans', sans-serif;
}

/* Product description content */
body.b2b .b2b-product-description {
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--b2b-text, #333);
}

body.b2b .b2b-product-description p {
	margin-bottom: 1rem;
}

body.b2b .b2b-product-description ul,
body.b2b .b2b-product-description ol {
	margin: 0.75rem 0 1rem 1.5rem;
}

body.b2b .b2b-product-description li {
	margin-bottom: 0.375rem;
}

body.b2b .b2b-product-description strong {
	color: var(--b2b-navy, #1C1C1C);
}

/* ========================================
   Gallery: border-radius, borders, gaps, sizes
   ======================================== */

/* Main gallery — smaller and centered without breaking Flexslider */
body.b2b .b2b-sp-gallery .woocommerce-product-gallery {
	max-width: 480px;
	margin: 0 auto 2rem;
}

body.b2b .woocommerce-product-gallery .woocommerce-product-gallery__image a {
	display: block;
	background: #fff;
	border: 1px solid var(--b2b-gray-100, #E0E0E0);
	border-radius: 10px;
	padding: 32px;
	box-sizing: border-box;
}

body.b2b .woocommerce-product-gallery .woocommerce-product-gallery__image img {
	border-radius: 0;
	border: none;
	margin-bottom: 0;
	width: 100%;
	height: auto;
	display: block;
	object-fit: contain;
}

body.b2b .woocommerce-product-gallery .flex-viewport {
	margin-bottom: 0.75rem;
}

/* Thumbnails — 40% smaller + rounded + gaps */
body.b2b .woocommerce-product-gallery .flex-control-thumbs {
	gap: 8px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: 0.75rem;
}

body.b2b .woocommerce-product-gallery .flex-control-thumbs li {
	width: 60px !important;
	flex: 0 0 60px;
	margin: 0 !important;
	padding: 0;
}

body.b2b .woocommerce-product-gallery .flex-control-thumbs img {
	width: 60px !important;
	height: 60px !important;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--b2b-gray-100, #E0E0E0);
	transition: border-color 0.15s;
}

body.b2b .woocommerce-product-gallery .flex-control-thumbs img:hover,
body.b2b .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
	border-color: var(--b2b-gold, #C5A059);
}

/* ========================================
   Login CTA for guests
   ======================================== */

.b2b-login-cta {
	margin: 1rem 0 0.5rem;
}

body.b2b .b2b-login-cta-btn {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--b2b-gold, #C5A059);
	color: var(--b2b-navy, #1C1C1C) !important;
	font-family: 'DM Sans', sans-serif;
	font-weight: 700;
	font-size: 0.9375rem;
	padding: 0.875rem 1.5rem;
	border-radius: 6px;
	border: none;
	text-decoration: none;
	transition: background 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

body.b2b .b2b-login-cta-btn:hover {
	background: var(--b2b-gold-light, #B08D4B);
	box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3);
	color: var(--b2b-navy, #1C1C1C) !important;
	text-decoration: none;
}

/* ========================================
   Trust signals
   ======================================== */

.b2b-trust-signals {
	border-top: 1px solid var(--b2b-gray-100, #E0E0E0);
	padding-top: 1rem;
	margin-top: 1rem;
}

.b2b-trust-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--b2b-gray-600, #757575);
}

.b2b-trust-item svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--b2b-gold, #C5A059);
}

.b2b-trust-item span {
	color: var(--b2b-text, #333);
}

/* ========================================
   Favorito + Lista: full-width stacked
   ======================================== */

body.b2b .b2b-product-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.75rem 0;
	margin-top: 0.5rem;
	border-top: 1px solid var(--b2b-gray-100, #E0E0E0);
}

/* Lista button: full-width */
body.b2b.single-product .product .b2b-product-actions .b2b-sl-add-to-list-btn,
body.b2b.single-product .product .b2b-product-actions button.b2b-sl-add-to-list-btn {
	display: block !important;
	width: 100% !important;
	text-align: center !important;
	margin: 0 !important;
	padding: 0.7rem 1rem !important;
	border-radius: 6px !important;
	font-family: 'DM Sans', sans-serif !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	box-sizing: border-box !important;
	cursor: pointer !important;
	transition: background 0.15s, border-color 0.15s, color 0.15s !important;
	line-height: 1.4 !important;
}

/* Lista button — navy solid */
body.b2b.single-product .product .b2b-product-actions .b2b-sl-add-to-list-btn {
	background: var(--b2b-navy, #1C1C1C) !important;
	color: #fff !important;
	border: 1px solid var(--b2b-navy, #1C1C1C) !important;
}

body.b2b.single-product .product .b2b-product-actions .b2b-sl-add-to-list-btn:hover,
body.b2b.single-product .product .b2b-product-actions .b2b-sl-add-to-list-btn:focus {
	background: var(--b2b-navy-light, #444444) !important;
	border-color: var(--b2b-navy-light, #444444) !important;
}


/* ========================================
   Hello Elementor reset.css overrides
   ======================================== */

body.b2b .b2b-specs-table td {
	border: none;
	background: transparent;
}

/* Hide old "Inicia sesión para ver precios" text on single product — replaced by CTA button */
body.b2b.single-product .entry-summary .b2b-login-prompt {
	display: none !important;
}

/* ========================================
   Related Products — Card Grid
   ======================================== */

.b2b-related-products {
	max-width: 1200px;
	margin: 3rem auto 2rem;
	padding: 0 1rem;
}

.b2b-related-heading {
	font-family: 'DM Sans', sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--b2b-navy, #1C1C1C);
	margin: 0 0 1.5rem 0;
}

.b2b-related-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
}

.b2b-related-card {
	display: flex;
	flex-direction: column;
}

.b2b-related-card-link {
	text-decoration: none;
	color: inherit;
}

.b2b-related-card-link:hover {
	text-decoration: none;
}

.b2b-related-img {
	background: #fff;
	border: 1px solid var(--b2b-gray-100, #E0E0E0);
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	box-sizing: border-box;
	margin-bottom: 0.75rem;
	transition: border-color 0.2s;
}

.b2b-related-card:hover .b2b-related-img {
	border-color: var(--b2b-gold, #C5A059);
}

.b2b-related-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 0;
}

.b2b-related-info {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: 0.5rem;
}

.b2b-related-ean {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8rem;
	color: var(--b2b-gray-600, #757575);
}

.b2b-related-ean::after {
	content: none;
}

.b2b-related-title {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--b2b-navy, #1C1C1C);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.4;
}

body.b2b .b2b-related-details {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	background: none;
	border: none;
	padding: 0;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--b2b-gold, #C5A059);
	text-decoration: none;
	cursor: pointer;
	transition: color 0.15s;
	margin-top: auto;
}

body.b2b .b2b-related-details:hover {
	color: var(--b2b-gold-light, #B08D4B);
	text-decoration: none;
}

body.b2b .b2b-related-details svg {
	transition: transform 0.15s;
}

body.b2b .b2b-related-details:hover svg {
	transform: translateX(3px);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1023px) {
	.b2b-related-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.25rem;
	}
}

@media (max-width: 768px) {
	.single-product .entry-summary .product_title {
		font-size: 1.4rem;
	}

	body.b2b .b2b-single-product-layout {
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
		padding: 1rem 0.75rem;
	}

	/* Order: gallery (1) → summary (2) → tabs (3) */
	body.b2b .b2b-sp-gallery {
		order: 1;
	}

	body.b2b .b2b-sp-right {
		order: 2;
		width: 100%;
		position: static;
	}

	body.b2b .b2b-sp-tabs {
		order: 3;
	}

	body.b2b .b2b-sp-gallery .woocommerce-product-gallery {
		margin-bottom: 0;
		max-width: 100%;
		width: 100%;
	}

	body.b2b .b2b-sp-gallery .woocommerce-product-gallery .flex-viewport {
		width: 100%;
		max-width: 100%;
		overflow: hidden;
	}

	body.b2b .b2b-sp-gallery .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
		width: 100%;
	}
}

@media (max-width: 768px) {
	body.b2b .woocommerce-product-gallery .woocommerce-product-gallery__image {
		padding: 20px;
	}

	.b2b-related-img {
		padding: 20px;
	}
}

@media (max-width: 480px) {
	.single-product .entry-summary .product_title {
		font-size: 1.2rem;
	}

	.b2b-related-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.b2b-related-products {
		margin-top: 2rem;
	}
}
