/**
 * Gromach dynamic seller sidebar – single product page.
 */

:root {
	--gromach-seller-accent: #1f9d73;
	--gromach-seller-accent-dark: #17825f;
	--gromach-seller-text: #1a1a1a;
	--gromach-seller-muted: #5f6368;
	--gromach-seller-border: #e8eaed;
	--gromach-seller-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	--gromach-seller-radius: 12px;
	--gromach-seller-sticky-top: 100px;
}

.gromach-seller-sidebar {
	width: 100%;
	max-width: 360px;
	margin: 0 0 1.5rem;
}

.gromach-seller-sidebar__card {
	background: #fff;
	border: 1px solid var(--gromach-seller-border);
	border-radius: var(--gromach-seller-radius);
	box-shadow: var(--gromach-seller-shadow);
	padding: 1.5rem;
}

.gromach-seller-sidebar__heading {
	margin: 0 0 1.25rem;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gromach-seller-text);
}

.gromach-seller-sidebar__profile {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1rem;
}

.gromach-seller-sidebar__avatar {
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f4f6;
}

.gromach-seller-sidebar__avatar-img,
.gromach-seller-sidebar__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gromach-seller-sidebar__identity {
	flex: 1 1 auto;
	min-width: 0;
}

.gromach-seller-sidebar__name {
	margin: 0 0 0.4rem;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gromach-seller-text);
}

.gromach-seller-sidebar__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: rgba(31, 157, 115, 0.12);
	color: var(--gromach-seller-accent-dark);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.2;
}

.gromach-seller-sidebar__badge-icon {
	flex: 0 0 auto;
}

.gromach-seller-sidebar__company {
	margin: 0.55rem 0 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--gromach-seller-muted);
}

.gromach-seller-sidebar__bio {
	margin: 0 0 1.25rem;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--gromach-seller-muted);
}

.gromach-seller-sidebar__actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.gromach-seller-sidebar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	width: 100%;
	min-height: 44px;
	padding: 0.7rem 1rem;
	border: 1px solid var(--gromach-seller-border);
	border-radius: 10px;
	background: #fff;
	color: var(--gromach-seller-text);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.gromach-seller-sidebar__btn span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gromach-seller-sidebar__btn:hover,
.gromach-seller-sidebar__btn:focus-visible {
	border-color: var(--gromach-seller-accent);
	color: var(--gromach-seller-accent-dark);
	background: rgba(31, 157, 115, 0.06);
	outline: none;
}

.gromach-seller-sidebar__btn--phone,
.gromach-seller-sidebar__btn--email,
.gromach-seller-sidebar__btn--whatsapp {
	justify-content: flex-start;
}

.gromach-seller-sidebar__btn--whatsapp {
	border-color: rgba(37, 211, 102, 0.35);
}

.gromach-seller-sidebar__btn--whatsapp:hover,
.gromach-seller-sidebar__btn--whatsapp:focus-visible {
	border-color: #25d366;
	color: #128c7e;
	background: rgba(37, 211, 102, 0.08);
}

.gromach-seller-sidebar__btn--products {
	margin-top: 0.35rem;
	border-color: var(--gromach-seller-accent);
	background: var(--gromach-seller-accent);
	color: #fff;
}

.gromach-seller-sidebar__btn--products:hover,
.gromach-seller-sidebar__btn--products:focus-visible {
	background: var(--gromach-seller-accent-dark);
	border-color: var(--gromach-seller-accent-dark);
	color: #fff;
}

/* Elementor single product layout */
.single-product .gromach-seller-sidebar--placed {
	max-width: none;
	margin: 1.25rem 0 0;
}

.single-product .gromach-seller-sidebar--sticky .gromach-seller-sidebar__card {
	position: sticky;
	top: var(--gromach-seller-sticky-top);
}

/* Classic WooCommerce two-column layout */
.single-product .product.gromach-seller-sidebar-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
	gap: 2rem;
	align-items: start;
}

.single-product .product.gromach-seller-sidebar-layout > .gromach-seller-sidebar {
	grid-column: 2;
	grid-row: 1 / span 20;
	margin: 0;
}

.single-product .product.gromach-seller-sidebar-layout > :not(.gromach-seller-sidebar) {
	grid-column: 1;
}

/* Hide legacy static Elementor contact block when dynamic sidebar is active */
.single-product.gromach-has-seller-sidebar [data-elementor-type="product"] [data-id="27169b60"] {
	display: none !important;
}

@media (max-width: 1024px) {
	.gromach-seller-sidebar {
		max-width: none;
	}

	.single-product .product.gromach-seller-sidebar-layout {
		display: block;
	}

	.single-product .gromach-seller-sidebar--sticky .gromach-seller-sidebar__card {
		position: static;
		top: auto;
	}
}

@media (max-width: 767px) {
	.gromach-seller-sidebar__card {
		padding: 1.15rem;
	}

	.gromach-seller-sidebar__avatar {
		flex-basis: 72px;
		width: 72px;
		height: 72px;
	}

	.gromach-seller-sidebar__heading {
		font-size: 1rem;
	}
}
