/*
Theme Name: DAYUAN Turbo High-Fidelity Manager
Theme URI: https://example.com/
Author: Site Migration
Description: High-fidelity DAYUAN WordPress theme based on the captured source layout, with editable company details and Elementor-ready product documents.
Version: 4.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: turbomax-static-editor
*/

/* All public devices use the complete desktop canvas. Mobile browsers scale
   this 1200px layout down as one page, keeping the same composition as PC. */
html,
body,
#page,
.site {
	min-width: 1200px;
}

/* A phone using a 1200px layout viewport can report a virtual height above
   2500px. Use the desktop page height so flexbox does not insert a large blank
   area before the footer. */
#page {
	min-height: 900px !important;
}

.turbomax-wordpress-content {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1200px;
    padding: 32px 24px;
}

.turbomax-fallback {
    margin: 60px auto;
    max-width: 960px;
    padding: 0 24px;
}

/* Standard document used by Elementor's editor and the optional no-snapshot
   page template. Elementor controls the inner layout and spacing. */
body.turbomax-elementor-document {
    margin: 0;
}

.turbomax-elementor-site-header,
.turbomax-elementor-site-footer,
.turbomax-elementor-body {
    position: relative;
    width: 100%;
    z-index: 2;
}

.turbomax-elementor-site-header .elementor,
.turbomax-elementor-site-footer .elementor,
.turbomax-elementor-body .elementor {
    width: 100%;
}

.turbomax-elementor-document .site-main,
.turbomax-elementor-document .turbomax-elementor-content {
    margin: 0;
    max-width: none;
    padding: 0;
    width: 100%;
}

/* Keep captured Elementor layouts inside small screens. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img {
    height: auto;
    max-width: 100%;
}

/* WordPress-managed pages and catalogue. */
.turbomax-managed-page,
.turbomax-catalog-page,
.turbomax-product-single {
    background: #fff;
    color: #222;
    padding: 48px 20px 64px;
}

.turbomax-managed-inner {
    margin: 0 auto;
    max-width: 1180px;
}

.turbomax-managed-inner > h1,
.turbomax-catalog-header h1,
.turbomax-product-summary h1 {
    color: #930000;
    line-height: 1.2;
    margin: 0 0 24px;
}

.turbomax-page-hero {
    display: block;
    margin: 0 0 28px;
    max-height: 520px;
    object-fit: cover;
    width: 100%;
}

.turbomax-page-intro {
    font-size: 20px;
    line-height: 1.6;
}

.turbomax-rich-content {
    line-height: 1.75;
}

.turbomax-managed-gallery,
.turbomax-category-grid,
.turbomax-product-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 32px;
}

.turbomax-managed-gallery img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.turbomax-catalog-header {
    margin-bottom: 32px;
    text-align: center;
}

.turbomax-catalog-header > img {
    margin: 0 auto 20px;
    max-height: 110px;
    object-fit: contain;
}

.turbomax-category-card,
.turbomax-product-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .07);
    color: #222;
    overflow: hidden;
    text-decoration: none !important;
}

.turbomax-category-card {
    align-items: center;
    display: flex;
    flex-direction: column;
    font-size: 18px;
    gap: 14px;
    justify-content: center;
    min-height: 190px;
    padding: 24px;
}

.turbomax-category-card img {
    height: 90px;
    object-fit: contain;
    width: 100%;
}

.turbomax-product-image {
    align-items: center;
    background: #f7f7f7;
    display: flex;
    height: 240px;
    justify-content: center;
    padding: 16px;
}

.turbomax-product-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.turbomax-product-card-body {
    padding: 20px;
}

.turbomax-product-card-body h2 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 14px;
}

.turbomax-product-card-body p {
    margin: 7px 0;
}

.turbomax-button {
    background: #9d0000;
    border-radius: 3px;
    color: #fff !important;
    display: inline-block;
    margin-top: 12px;
    padding: 9px 16px;
    text-decoration: none !important;
}

.turbomax-breadcrumb {
    margin: 0 0 24px;
}

.turbomax-product-layout {
    display: grid;
    gap: 48px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
}

.turbomax-product-gallery {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.turbomax-product-gallery a:first-child {
    grid-column: 1 / -1;
}

.turbomax-product-gallery img {
    background: #f7f7f7;
    height: 220px;
    object-fit: contain;
    padding: 12px;
    width: 100%;
}

.turbomax-product-gallery a:first-child img {
    height: 420px;
}

/* Version 4.2 deliberately disables the former independently reflowed mobile
   layout. The rules remain here for reference but cannot match a viewport. */
@media (max-width: 0px) {
	html,
	body,
	#page,
	.site {
		max-width: 100% !important;
		overflow-x: hidden !important;
		width: 100% !important;
	}

	/* Keep the complete desktop content, but reflow it into a single readable
	   mobile column. This intentionally changes no typography or colours. */
	#content .elementor-section.elementor-section-boxed > .elementor-container,
	#content .elementor-container,
	#content .elementor-column,
	#content .elementor-widget-wrap,
	#content .elementor-widget,
	#content .elementor-widget-container {
		box-sizing: border-box;
		max-width: 100% !important;
		min-width: 0 !important;
	}

	#content .elementor-column {
		width: 100% !important;
	}

	#content p,
	#content li,
	#content a,
	#colophon p,
	#colophon a {
		overflow-wrap: anywhere;
		word-break: normal;
	}

	/* The captured contact text widget carries a fixed 10px line-height on
	   phones. Restore readable wrapping for the Facebook URL and other details. */
	#content .elementor-element-25d8b3f p {
		line-height: 1.4 !important;
		margin-bottom: 14px !important;
	}

	#content iframe,
	#content video,
	#content table {
		max-width: 100% !important;
	}

	#content table {
		display: block;
		overflow-x: auto;
		width: 100%;
	}

	#content .elementor-image-gallery .gallery-item,
	#content .gallery .gallery-item {
		box-sizing: border-box;
		max-width: 100% !important;
		width: 100% !important;
	}

	/* Compact header: logo and menu control share one row instead of producing
	   the large stacked gap created by the captured desktop columns. */
	#masthead .elementor-element.elementor-element-c789978 {
		padding: 10px 14px !important;
		position: relative !important;
	}

	/* The captured dropdown is absolutely positioned from the narrow menu
	   column. Make the full header row its containing block so the open menu
	   cannot render off the right side of a phone screen. */
	#masthead .elementor-element-c789978 .elementor-column,
	#masthead .elementor-element-c789978 .elementor-widget-wrap,
	#masthead .elementor-element-c789978 .elementor-widget-navigation-menu {
		position: static !important;
	}

	#masthead .elementor-element-c789978 > .elementor-container {
		align-items: center !important;
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) 52px !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	#masthead .elementor-element-df1654d,
	#masthead .elementor-element-5e4cf72 {
		max-width: 100% !important;
		min-width: 0 !important;
		width: 100% !important;
	}

	#masthead .elementor-element-7204518 .hfe-site-logo-container {
		text-align: left !important;
	}

	#masthead .hfe-site-logo-img {
		display: block !important;
		height: auto !important;
		max-width: min(220px, 72vw) !important;
		width: auto !important;
	}

	#masthead .elementor-element-5cfb70f > .elementor-widget-container {
		margin: 0 !important;
	}

	#masthead .hfe-nav-menu__toggle {
		align-items: center !important;
		display: flex !important;
		justify-content: center !important;
		margin: 0 0 0 auto !important;
		min-height: 44px;
		min-width: 44px;
	}

	#masthead nav.hfe-dropdown,
	#masthead nav.hfe-dropdown-expandible,
	#masthead .hfe-nav-menu__layout-horizontal {
		box-sizing: border-box;
		left: 0 !important;
		max-height: calc(100vh - 76px);
		overflow-y: auto;
		right: 0 !important;
		top: 100% !important;
		width: 100% !important;
		z-index: 99999;
	}

	#masthead nav.hfe-dropdown .hfe-menu-item,
	#masthead nav.hfe-dropdown .hfe-sub-menu-item,
	#masthead nav.hfe-dropdown-expandible .hfe-menu-item,
	#masthead nav.hfe-dropdown-expandible .hfe-sub-menu-item {
		box-sizing: border-box;
		line-height: 1.35 !important;
		min-height: 44px;
		padding-bottom: 12px !important;
		padding-top: 12px !important;
		white-space: normal;
	}

	/* Reflow the captured four-column footer into a clean single column while
	   retaining all text, icons, typefaces, colours and wording. */
	#colophon .elementor-top-section {
		box-sizing: border-box;
		margin-bottom: 0 !important;
		margin-top: 0 !important;
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	#colophon .elementor-container {
		align-items: center !important;
		display: flex !important;
		flex-wrap: wrap !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	#colophon .elementor-column,
	#colophon .elementor-widget,
	#colophon .elementor-widget-container {
		box-sizing: border-box;
		max-width: 100% !important;
		min-width: 0 !important;
		width: 100% !important;
	}

	#colophon .elementor-element-d86de62,
	#colophon .elementor-element-d047641,
	#colophon .elementor-element-a56a0ce {
		margin-bottom: 0 !important;
		margin-top: 0 !important;
		padding-bottom: 8px !important;
		padding-top: 8px !important;
	}

	#colophon .elementor-widget-icon,
	#colophon .elementor-icon-wrapper,
	#colophon .elementor-widget-text-editor,
	#colophon .elementor-widget-text-editor .elementor-widget-container {
		text-align: center !important;
	}

	#colophon .elementor-widget-icon {
		margin: 10px auto 2px !important;
	}

	#colophon .elementor-element-ef4ab70 img {
		height: auto !important;
		max-width: min(220px, 65vw) !important;
		width: auto !important;
	}

	.turbomax-managed-page,
	.turbomax-catalog-page,
	.turbomax-product-single {
		padding: 32px 16px 44px;
	}

	.turbomax-managed-gallery,
	.turbomax-category-grid,
	.turbomax-product-grid,
	.turbomax-product-layout {
		grid-template-columns: 1fr;
	}

	.turbomax-product-gallery img,
	.turbomax-product-gallery a:first-child img {
		height: 280px;
	}

    .elementor-2288 .elementor-element.elementor-element-4ccc403 .elementor-heading-title {
        font-size: clamp(36px, 11vw, 44px) !important;
        line-height: 1.08 !important;
        overflow-wrap: anywhere;
    }

    .elementor-2288 .elementor-element.elementor-element-c83cc98,
    .elementor-2288 .elementor-element.elementor-element-c83cc98 p {
        font-size: clamp(24px, 8vw, 30px) !important;
        line-height: 1.2 !important;
    }

    .elementor-image-gallery .gallery {
        max-width: 100%;
    }
}
