/* Visaro – mobile polish (home, contact, covers, product, footer) */

/* Remove theme mobile bottom bar; search lives in the header instead */
#ts-mobile-button-bottom {
	display: none !important;
}

@media (max-width: 767px) {
	body:not(.ts_desktop),
	body {
		padding-bottom: 0 !important;
	}

	body:not(.ts_desktop) #to-top {
		bottom: 16px;
	}

	.header-middle div.header-right {
		gap: 2px;
		flex: 0 0 auto;
	}

	.header-middle div.header-right > * {
		margin: 0 !important;
		float: none !important;
	}

	.header-middle div.header-right > .search-button,
	.header-middle div.header-right > .visaro-quote-header-wrapper,
	.header-middle div.header-right > .shopping-cart-wrapper {
		width: 34px;
		display: inline-block;
		flex: 0 0 34px;
	}

	.header-right .visaro-quote-header-wrapper {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.ts-header .search-button > span {
		width: 34px;
		height: 34px;
		line-height: 32px;
	}

	.visaro-mobile-account {
		margin-top: auto;
		padding: 16px 20px 28px;
		border-top: 1px solid rgba(22, 22, 22, 0.08);
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.visaro-mobile-account__link {
		display: block;
		padding: 12px 0;
		font-size: 1rem;
		font-weight: 600;
		color: #161616;
		text-decoration: none;
	}

	.visaro-mobile-account__link--muted {
		font-weight: 400;
		color: #6f6a64;
	}

	.visaro-mobile-account__link:hover {
		color: #a20401;
	}
}

@media (max-width: 767px) {
	/* Shared CTA buttons: full width, comfortable tap targets */
	.visaro-cover-hero-cta,
	.visaro-cover-footer-cta,
	.visaro-cover-empty__actions,
	.visaro-k-cta-row {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 10px !important;
	}

	/* Footer CTA: side-by-side on phone to keep the band short */
	.visaro-el-cta-actions {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: wrap !important;
		align-items: stretch !important;
		gap: 8px !important;
	}

	.visaro-cover-btn,
	.visaro-k-cta-row .elementor-button,
	.visaro-cases-card__cta,
	body.single-product .single_add_to_cart_button,
	body.woocommerce-cart .checkout-button,
	body.woocommerce-checkout #place_order {
		width: 100% !important;
		min-height: 48px;
		justify-content: center;
		text-align: center;
	}

	.visaro-el-cta-actions .visaro-el-btn {
		flex: 1 1 calc(50% - 4px) !important;
		min-width: 0 !important;
	}

	.visaro-el-cta-actions .visaro-el-btn .elementor-button {
		width: 100% !important;
		min-height: 42px !important;
		justify-content: center;
		text-align: center;
	}

	/* Cover / hub */
	.visaro-cover-title,
	.visaro-branche-title {
		font-size: clamp(1.7rem, 7vw, 2.2rem) !important;
		line-height: 1.15 !important;
	}

	.visaro-cover-lead,
	.visaro-branche-lead {
		font-size: 1rem !important;
		max-width: none !important;
	}

	.visaro-cover-bullets {
		padding-left: 1.1rem;
	}

	.visaro-cover-products-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.visaro-cover-empty {
		padding: 28px 18px;
		text-align: center;
	}

	.visaro-cover-empty__actions {
		margin-top: 16px;
	}

	/* Cases */
	.visaro-cases-grid,
	.visaro-cases-grid > .e-con-inner {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}

	.visaro-cases-hero {
		padding-bottom: 8px !important;
	}

	/* Kontakt */
	.visaro-k-columns,
	.visaro-k-columns > .e-con-inner {
		flex-direction: column !important;
		gap: 24px !important;
	}

	.visaro-k-columns > .e-con-inner > .e-con,
	.visaro-k-columns > .e-con {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Footer */
	.visaro-el-main,
	.visaro-el-main > .e-con-inner,
	.visaro-el-cta,
	.visaro-el-cta > .e-con-inner,
	.visaro-el-bottom,
	.visaro-el-bottom > .e-con-inner {
		flex-direction: column !important;
		align-items: stretch !important;
	}

	.visaro-el-col,
	.visaro-el-cta-copy,
	.visaro-el-cta-actions {
		width: 100% !important;
		max-width: 100% !important;
	}

	.visaro-el-cta-actions {
		justify-content: stretch !important;
	}

	.visaro-el-main {
		padding-top: 40px !important;
		padding-bottom: 28px !important;
		row-gap: 28px !important;
	}

	.visaro-el-cta {
		padding-top: 36px !important;
		padding-bottom: 36px !important;
	}

	/* Product page */
	body.single-product .product .summary,
	body.single-product div.product {
		padding-left: 0;
		padding-right: 0;
	}

	body.single-product .quantity {
		margin-bottom: 10px;
	}

	body.single-product .woocommerce-tabs {
		margin-top: 24px;
	}

	/* Homepage Elementor: avoid cramped stacked sections */
	.home .elementor-widget-heading .elementor-heading-title {
		overflow-wrap: anywhere;
	}

	.home .elementor-button-wrapper {
		width: 100%;
	}

	.home .elementor-button {
		width: 100%;
		justify-content: center;
	}

	.visaro-cover-hub--compact {
		grid-template-columns: 1fr !important;
	}

	.visaro-cover-related {
		padding-bottom: 36px;
	}
}

/* Only tuck the shop header away while the customer is typing,
   so the product photo and text field stay visible above the keyboard. */
@media (max-width: 767px) {
	body.single-product.visaro-print-product.visaro-print-field-focus:not(.menu-mobile-active) header.ts-header,
	body.single-product.visaro-sign-woo-product.visaro-sign-field-focus:not(.menu-mobile-active) header.ts-header,
	body.single-product.visaro-sign-shop-product.visaro-sign-field-focus:not(.menu-mobile-active) header.ts-header,
	body.single-product.visaro-has-designer.visaro-sign-field-focus:not(.menu-mobile-active) header.ts-header {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 10050;
		width: 100%;
		transform: translate3d(0, -110%, 0);
		pointer-events: none;
	}

	body.admin-bar.single-product.visaro-print-product.visaro-print-field-focus:not(.menu-mobile-active) header.ts-header,
	body.admin-bar.single-product.visaro-sign-woo-product.visaro-sign-field-focus:not(.menu-mobile-active) header.ts-header,
	body.admin-bar.single-product.visaro-sign-shop-product.visaro-sign-field-focus:not(.menu-mobile-active) header.ts-header,
	body.admin-bar.single-product.visaro-has-designer.visaro-sign-field-focus:not(.menu-mobile-active) header.ts-header {
		top: 46px;
	}
}

/* Hide duplicate theme titles on Elementor pages */
body.visaro-el-page .page-title,
body.visaro-el-page .entry-header,
body.visaro-el-page .entry-title,
body.visaro-el-page .breadcrumb + .page-title,
body.page-id-19389 .page-title,
body.page-id-19389 .entry-header .entry-title {
	display: none !important;
}
