/* Trademaster Supply — brand, header, footer, homepage */

:root {
	--tms-navy: #0e2744;
	--tms-navy-deep: #08182c;
	--tms-blue: #4aa3d4;
	--tms-text: #2c2c2c;
	--tms-muted: #5c5c5c;
	--tms-border: #e7eaee;
	--tms-soft: #f4f7fa;
	--tms-white: #ffffff;
	--tms-header-h: 7.2rem;
	--tms-max: 1320px;
}

body.tms-site {
	background: var(--tms-white);
	color: var(--tms-text);
	letter-spacing: -0.01em;
}

body.tms-site a {
	color: var(--tms-navy);
}

body.tms-site a:hover,
body.tms-site a:focus {
	color: var(--tms-blue);
}

/* Top bar */
.tms-topbar {
	height: 4px;
	background: var(--tms-navy-deep);
}

/* Header — match brand screenshot */
body.tms-site #site-header.tms-header {
	background: var(--tms-white);
	border-bottom: 1px solid var(--tms-border);
	position: sticky;
	top: 0;
	z-index: 200;
}

body.admin-bar.tms-site #site-header.tms-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar.tms-site #site-header.tms-header {
		top: 46px;
	}
}

body.tms-site .tms-header-inner,
body.tms-site #site-header .header-inner.tms-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2.4rem;
	max-width: 1440px;
	margin: 0 auto;
	padding: 1.2rem 2.4rem;
	width: 100%;
}

body.tms-site .tms-header-brand,
body.tms-site .header-titles-wrapper.tms-header-brand {
	display: flex;
	align-items: center;
	padding: 0;
	margin: 0;
	max-width: none;
	text-align: left;
	justify-content: flex-start;
	flex: 0 0 auto;
}

body.tms-site .header-titles {
	display: block;
	margin: 0;
}

body.tms-site .tms-logo,
body.tms-site .custom-logo-link {
	display: flex;
	align-items: center;
	gap: 1rem;
	text-decoration: none;
	color: var(--tms-navy);
}

body.tms-site .tms-logo:hover,
body.tms-site .tms-logo:focus {
	text-decoration: none;
	color: var(--tms-navy);
}

body.tms-site .tms-logo-mark {
	display: flex;
	line-height: 0;
}

body.tms-site .tms-logo-mark svg {
	width: 5.2rem;
	height: 4.8rem;
}

body.tms-site .tms-logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1;
}

body.tms-site .tms-logo-name {
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: var(--tms-navy);
}

body.tms-site .tms-logo-tag {
	margin-top: 0.35rem;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	color: var(--tms-navy);
}

body.tms-site .site-logo img,
body.tms-site .custom-logo {
	max-height: 5.6rem;
	width: auto;
	margin: 0;
}

/* Primary nav */
body.tms-site .tms-primary-nav,
body.tms-site .primary-menu-wrapper {
	display: none;
	flex: 1 1 auto;
}

body.tms-site ul.primary-menu {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: 0.4rem 1.8rem;
	margin: 0;
	font-size: 1.35rem;
	font-weight: 500;
	letter-spacing: 0;
}

body.tms-site .primary-menu > li {
	margin: 0;
}

body.tms-site .primary-menu a {
	color: #3a3a3a !important;
	padding: 0.6rem 0;
	white-space: nowrap;
}

body.tms-site .primary-menu a:hover,
body.tms-site .primary-menu a:focus,
body.tms-site .primary-menu li.current-menu-item > a,
body.tms-site .primary-menu li.current-menu-ancestor > a {
	color: var(--tms-navy) !important;
	text-decoration: none;
}

body.tms-site .primary-menu ul {
	background: var(--tms-white);
	color: var(--tms-text);
	border: 1px solid var(--tms-border);
	box-shadow: 0 8px 24px rgba(8, 24, 44, 0.08);
}

/* Utils: search, account, bag */
body.tms-site .tms-header-utils,
body.tms-site .header-toggles.tms-header-utils {
	display: flex !important;
	align-items: center;
	gap: 0.2rem;
	margin: 0;
	flex-shrink: 0;
}

body.tms-site .tms-header-widget {
	margin: 0;
	padding: 0;
	background: transparent;
}

body.tms-site .tms-header-widget p,
body.tms-site .tms-header-widget .widget-title {
	display: none;
}

body.tms-site .header-inner .toggle-wrapper::before {
	content: none !important;
}

body.tms-site .tms-icon-btn,
body.tms-site #site-header .tms-icon-btn.toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 4rem;
	height: 4rem;
	padding: 0;
	color: var(--tms-navy);
	background: transparent;
	border: 0;
	text-decoration: none;
	left: auto;
	right: auto;
	top: auto;
	bottom: auto;
}

body.tms-site .tms-icon-btn:hover,
body.tms-site .tms-icon-btn:focus {
	color: var(--tms-blue);
	text-decoration: none;
}

body.tms-site .tms-cart-count {
	position: absolute;
	top: 0.2rem;
	right: 0.2rem;
	min-width: 1.6rem;
	height: 1.6rem;
	padding: 0 0.4rem;
	border-radius: 999px;
	background: var(--tms-navy);
	color: var(--tms-white);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.6rem;
	text-align: center;
}

body.tms-site .search-toggle {
	position: relative;
}

body.tms-site .tms-menu-toggle.mobile-nav-toggle {
	display: inline-flex !important;
}

@media (min-width: 1200px) {
	body.tms-site .tms-primary-nav,
	body.tms-site .primary-menu-wrapper {
		display: block;
	}

	body.tms-site .tms-menu-toggle.mobile-nav-toggle {
		display: none !important;
	}
}

@media (min-width: 1400px) {
	body.tms-site ul.primary-menu {
		font-size: 1.4rem;
		gap: 0.4rem 2.2rem;
	}
}

/* Buttons */
.tms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1.1rem 2rem;
	border-radius: 2px;
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
	border: 1px solid transparent;
	line-height: 1.2;
}

.tms-btn-primary,
body.tms-site .tms-btn-primary {
	background: var(--tms-navy);
	border-color: var(--tms-navy);
	color: var(--tms-white);
}

.tms-btn-primary:hover,
.tms-btn-primary:focus,
body.tms-site .tms-btn-primary:hover,
body.tms-site .tms-btn-primary:focus {
	background: var(--tms-navy-deep);
	color: var(--tms-white);
	text-decoration: none;
}

.tms-btn-ghost {
	background: transparent;
	border-color: var(--tms-navy);
	color: var(--tms-navy);
}

.tms-btn-ghost:hover,
.tms-btn-ghost:focus {
	background: var(--tms-navy);
	color: var(--tms-white);
	text-decoration: none;
}

.tms-text-link {
	font-size: 1.5rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--tms-navy);
}

.tms-text-link:hover {
	color: var(--tms-blue);
}

/* Homepage */
.tms-hero {
	background:
		linear-gradient(90deg, rgba(8, 24, 44, 0.92) 0%, rgba(14, 39, 68, 0.78) 55%, rgba(74, 163, 212, 0.35) 100%),
		linear-gradient(180deg, #0e2744, #16375a);
	color: var(--tms-white);
	padding: 7rem 2.4rem;
}

.tms-hero-inner,
.tms-section-inner,
.tms-cta-inner,
.tms-footer-inner,
.tms-page-article,
.tms-woocommerce-inner {
	max-width: var(--tms-max);
	margin: 0 auto;
}

.tms-hero-kicker {
	margin: 0 0 1.2rem;
	font-size: 1.3rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--tms-blue);
	font-weight: 700;
}

.tms-hero h1 {
	margin: 0 0 1.6rem;
	color: var(--tms-white);
	font-size: clamp(3.2rem, 4vw, 4.8rem);
	max-width: 16ch;
}

.tms-hero-lead {
	margin: 0 0 2.8rem;
	max-width: 56rem;
	font-size: 1.8rem;
	color: rgba(255, 255, 255, 0.86);
}

.tms-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
}

.tms-hero .tms-btn-ghost {
	border-color: var(--tms-white);
	color: var(--tms-white);
}

.tms-hero .tms-btn-ghost:hover,
.tms-hero .tms-btn-ghost:focus {
	background: var(--tms-white);
	color: var(--tms-navy);
}

.tms-section {
	padding: 6.4rem 2.4rem;
}

.tms-section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1.6rem;
	margin-bottom: 3.2rem;
}

.tms-section-head h2 {
	margin: 0;
	font-size: 2.6rem;
	color: var(--tms-navy);
}

.tms-section-head p {
	margin: 0.6rem 0 0;
	color: var(--tms-muted);
}

.tms-category-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

.tms-category-card {
	display: flex;
	flex-direction: column;
	background: var(--tms-white);
	border: 1px solid var(--tms-border);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tms-category-card:hover,
.tms-category-card:focus {
	text-decoration: none;
	color: inherit;
	box-shadow: 0 10px 24px rgba(8, 24, 44, 0.08);
	transform: translateY(-2px);
}

.tms-category-card-media {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--tms-soft);
	overflow: hidden;
}

.tms-category-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tms-category-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.8rem;
}

.tms-category-card-title {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--tms-navy);
}

.tms-category-card-text,
.tms-category-card-count {
	font-size: 1.35rem;
	color: var(--tms-muted);
}

.tms-cta {
	background: var(--tms-navy);
	color: var(--tms-white);
	padding: 5.6rem 2.4rem;
	text-align: center;
}

.tms-cta h2 {
	margin: 0 0 1.2rem;
	color: var(--tms-white);
}

.tms-cta p {
	margin: 0 auto 2.4rem;
	max-width: 64rem;
	color: rgba(255, 255, 255, 0.84);
}

.tms-cta .tms-btn-primary {
	background: var(--tms-white);
	border-color: var(--tms-white);
	color: var(--tms-navy);
}

.tms-cta .tms-btn-primary:hover,
.tms-cta .tms-btn-primary:focus {
	background: var(--tms-blue);
	border-color: var(--tms-blue);
	color: var(--tms-white);
}

/* Pages */
.tms-page {
	padding: 4.8rem 2.4rem 7rem;
}

/* Elementor full-width pages keep the theme header/footer */
body.tms-site .tms-elementor-page,
body.tms-site.elementor-page #site-content.tms-elementor-page {
	padding: 0;
	max-width: none;
	width: 100%;
}

body.tms-site .tms-elementor-page .elementor,
body.tms-site .tms-elementor-page .elementor-section-wrap,
body.tms-site .tms-elementor-page .elementor-section.elementor-section-stretched {
	max-width: none !important;
	width: 100%;
}

body.tms-site .tms-elementor-page .elementor-widget-heading .elementor-heading-title {
	margin: 0 0 1.6rem;
}

body.tms-site .tms-elementor-page .elementor-widget-text-editor {
	max-width: 78rem;
	margin-left: auto;
	margin-right: auto;
}

.tms-page-header {
	margin-bottom: 2.4rem;
}

.tms-page-header .entry-title {
	margin: 0;
	color: var(--tms-navy);
}

.tms-page .entry-content {
	font-size: 1.7rem;
}

/* Footer */
body.tms-site #site-footer.tms-footer {
	background: transparent;
	color: inherit;
	margin: 0;
	padding: 0;
	border: 0;
}

.tms-footer-inner {
	max-width: var(--tms-max);
	margin: 0 auto;
	padding: 0 2.4rem;
}

.tms-footer-newsletter {
	background: var(--tms-white);
	border-top: 1px solid var(--tms-border);
	padding: 4.8rem 0;
}

.tms-footer-newsletter-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 3.2rem;
}

.tms-footer-newsletter-copy {
	flex: 1 1 36rem;
}

.tms-newsletter-title,
.tms-footer-newsletter-copy .widgettitle,
.tms-footer-newsletter-copy h2 {
	margin: 0 0 0.8rem;
	color: #111;
	font-size: 2.4rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	text-transform: none;
}

.tms-newsletter-text {
	margin: 0;
	color: #4a4a4a;
	font-size: 1.6rem;
}

.tms-footer-widget,
.tms-footer-bar-widget {
	margin: 0;
	background: transparent;
}

.tms-footer-newsletter-form {
	flex: 0 1 42rem;
	width: 100%;
	max-width: 46rem;
}

.tms-newsletter-form {
	display: flex;
	align-items: center;
	width: 100%;
	border: 1px solid #d7dce2;
	border-radius: 999px;
	background: var(--tms-white);
	padding: 0.4rem 0.6rem 0.4rem 1.8rem;
}

.tms-newsletter-input {
	flex: 1;
	border: 0;
	background: transparent;
	box-shadow: none;
	padding: 1.2rem 1rem;
	font-size: 1.6rem;
	color: #222;
	min-width: 0;
}

.tms-newsletter-input::placeholder {
	color: #8aa0b5;
}

.tms-newsletter-input:focus {
	outline: none;
}

.tms-newsletter-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4.4rem;
	height: 4.4rem;
	border: 0;
	background: transparent;
	color: #8aa0b5;
	cursor: pointer;
	padding: 0;
}

.tms-newsletter-submit:hover,
.tms-newsletter-submit:focus {
	color: var(--tms-navy);
}

.tms-newsletter-success,
.tms-newsletter-error {
	margin: 0 0 1rem;
	font-size: 1.4rem;
}

.tms-newsletter-success {
	color: #1b7a4a;
}

.tms-newsletter-error {
	color: #b3261e;
}

.tms-footer-bar {
	background: #1a1a1a;
	color: #c8c8c8;
	padding: 2.2rem 0;
}

.tms-footer-bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.6rem;
}

.tms-footer-copy,
.tms-footer-legal-link,
.tms-footer-bar p {
	margin: 0;
	font-size: 1.35rem;
	color: #c8c8c8;
}

.tms-footer-bar a,
.tms-footer-legal-list a {
	color: #c8c8c8;
	text-decoration: none;
}

.tms-footer-bar a:hover,
.tms-footer-legal-list a:hover {
	color: var(--tms-white);
}

.tms-footer-legal-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.6rem;
}

/* Search modal tweaks */
body.tms-site .search-modal .search-form {
	display: flex;
	gap: 1rem;
	align-items: stretch;
}

body.tms-site .search-modal .search-field {
	flex: 1;
	border: 1px solid var(--tms-border);
	padding: 1.2rem 1.6rem;
	font-size: 1.8rem;
}

body.tms-site .search-modal .search-submit {
	appearance: none;
	background: var(--tms-navy);
	color: var(--tms-white);
	border: 0;
	padding: 1.2rem 2rem;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 1100px) {
	.tms-category-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 700px) {
	body.tms-site #site-header .header-inner.tms-header-inner {
		padding: 1rem 1.6rem;
	}

	.tms-hero,
	.tms-section,
	.tms-page {
		padding-left: 1.6rem;
		padding-right: 1.6rem;
	}

	.tms-category-grid,
	.tms-section-head {
		grid-template-columns: 1fr;
		display: grid;
	}

	.tms-footer-newsletter-row,
	.tms-footer-bar-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.tms-footer-newsletter-form {
		max-width: none;
	}

	.tms-section-head {
		align-items: flex-start;
	}

	body.tms-site .tms-logo-name {
		font-size: 1.45rem;
	}

	body.tms-site .tms-logo-mark svg {
		width: 4.4rem;
		height: 4rem;
	}
}
