/* ==========================================================================
   Royal Metal Mart — main styles
   Design system: Forest Green #0C4B3A · Ivory #FFF9F0 · Gold #D4A017 ·
   Warm Beige #F5E8D8 · Border #E5E5E5 · Playfair Display / Poppins
   ========================================================================== */

:root {
	--rmm-green: #0C4B3A;
	--rmm-green-dark: #08372a;
	--rmm-ivory: #FFF9F0;
	--rmm-gold: #D4A017;
	--rmm-gold-dark: #b88a10;
	--rmm-beige: #F5E8D8;
	--rmm-border: #E5E5E5;
	--rmm-text: #2b2b2b;
	--rmm-muted: #6b6b6b;
	--rmm-white: #ffffff;
	--rmm-heading-font: "Playfair Display", Georgia, "Times New Roman", serif;
	--rmm-body-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--rmm-container: 1300px;
	--rmm-gutter: 20px;
	--rmm-section-y: 80px;
	--rmm-radius: 8px;
	--rmm-radius-sm: 6px;
	--rmm-shadow: 0 10px 30px rgba(12, 75, 58, 0.08);
	--rmm-transition: 0.25s ease;
	--rmm-admin-bar: 0px;
}

@media (max-width: 1024px) {
	:root { --rmm-section-y: 60px; }
}

@media (max-width: 767px) {
	:root { --rmm-section-y: 48px; }
}

body.admin-bar { --rmm-admin-bar: 32px; }

@media (max-width: 782px) {
	body.admin-bar { --rmm-admin-bar: 46px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--rmm-ivory);
	color: var(--rmm-text);
	font-family: var(--rmm-body-font);
	font-size: 15px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--rmm-heading-font);
	color: var(--rmm-green);
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(30px, 4vw, 46px); }
h2 { font-size: clamp(26px, 3vw, 36px); }
h3 { font-size: clamp(20px, 2vw, 24px); }
h4 { font-size: 19px; }
h5 { font-size: 17px; }
h6 { font-size: 15px; }

p { margin: 0 0 1.1em; }

a { color: var(--rmm-green); text-decoration: none; transition: color var(--rmm-transition); }
a:hover, a:focus { color: var(--rmm-gold-dark); }

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

ul, ol { padding-left: 1.2em; }

hr { border: 0; border-top: 1px solid var(--rmm-border); margin: 2em 0; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--rmm-border); text-align: left; }

:focus-visible { outline: 2px solid var(--rmm-gold); outline-offset: 2px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 100000;
	top: 8px; left: 8px; padding: 12px 18px; background: var(--rmm-white); color: var(--rmm-green);
}

/* ---------- Layout ---------- */
.rmm-container {
	width: 100%;
	max-width: calc(var(--rmm-container) + (var(--rmm-gutter) * 2));
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--rmm-gutter);
	padding-right: var(--rmm-gutter);
}

.rmm-container--narrow { max-width: calc(860px + (var(--rmm-gutter) * 2)); }

.rmm-section { padding-top: var(--rmm-section-y); padding-bottom: var(--rmm-section-y); }

.rmm-text-center { text-align: center; }

.rmm-eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rmm-gold-dark);
	margin-bottom: 10px;
}

@media (max-width: 767px) {
	.rmm-hide-mobile { display: none !important; }
}

/* ---------- Buttons & forms ---------- */
.rmm-btn,
button.rmm-btn,
input[type="submit"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 28px;
	border: 1px solid var(--rmm-green);
	border-radius: var(--rmm-radius-sm);
	background: var(--rmm-green);
	color: var(--rmm-ivory);
	font-family: var(--rmm-body-font);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.2;
	cursor: pointer;
	transition: background var(--rmm-transition), color var(--rmm-transition), border-color var(--rmm-transition);
}

.rmm-btn:hover, .rmm-btn:focus,
input[type="submit"]:hover,
.wp-block-button__link:hover {
	background: var(--rmm-green-dark);
	border-color: var(--rmm-green-dark);
	color: var(--rmm-white);
}

.rmm-btn--gold { background: var(--rmm-gold); border-color: var(--rmm-gold); color: var(--rmm-green-dark); }
.rmm-btn--gold:hover { background: var(--rmm-gold-dark); border-color: var(--rmm-gold-dark); color: var(--rmm-white); }

.rmm-btn--outline { background: transparent; color: var(--rmm-green); }
.rmm-btn--outline:hover { background: var(--rmm-green); color: var(--rmm-ivory); }

.rmm-link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.rmm-link-arrow .rmm-icon { transition: transform var(--rmm-transition); }
.rmm-link-arrow:hover .rmm-icon { transform: translateX(3px); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="password"], input[type="search"], input[type="number"], select, textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--rmm-border);
	border-radius: var(--rmm-radius-sm);
	background: var(--rmm-white);
	color: var(--rmm-text);
	font-family: var(--rmm-body-font);
	font-size: 14px;
	line-height: 1.4;
	transition: border-color var(--rmm-transition), box-shadow var(--rmm-transition);
}

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--rmm-green);
	box-shadow: 0 0 0 3px rgba(12, 75, 58, 0.1);
}

label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }

.rmm-notice { padding: 12px 16px; border-radius: var(--rmm-radius-sm); font-size: 14px; }
.rmm-notice--success { background: #e8f3ee; color: var(--rmm-green); }
.rmm-notice--error { background: #fbeaea; color: #9b2c2c; }

/* Contact form */
.rmm-contact-form p { margin-bottom: 16px; }
.rmm-form-row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rmm-form-row--half p { margin: 0 0 16px; }
.rmm-hp { position: absolute !important; left: -9999px !important; }

@media (max-width: 600px) {
	.rmm-form-row--half { grid-template-columns: 1fr; gap: 0; }
}

/* Search form */
.rmm-search-form { display: flex; gap: 8px; max-width: 640px; margin: 0 auto; }
.rmm-search-form .rmm-search-field { flex: 1; }
.rmm-search-form .rmm-btn { padding: 12px 18px; }

@media (max-width: 480px) {
	.rmm-search-form .rmm-btn span { display: none; }
}

/* ---------- Top bar ---------- */
.rmm-topbar { background: var(--rmm-green); color: var(--rmm-ivory); font-size: 13px; }
.rmm-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.rmm-topbar a { color: var(--rmm-ivory); display: inline-flex; align-items: center; gap: 6px; }
.rmm-topbar a:hover { color: var(--rmm-gold); }
.rmm-topbar__contact { display: flex; gap: 20px; }
.rmm-topbar__text { margin: 0; text-align: center; flex: 1; opacity: 0.9; }
.rmm-topbar .rmm-social a { width: 28px; height: 28px; }

/* ---------- Header ---------- */
.rmm-site-header { position: relative; z-index: 100; background: var(--rmm-ivory); }

.rmm-sticky-header .rmm-site-header { position: sticky; top: var(--rmm-admin-bar); }

@media (max-width: 600px) {
	.admin-bar.rmm-sticky-header .rmm-site-header { top: 0; }
}

.rmm-header-bar { background: var(--rmm-ivory); border-bottom: 1px solid var(--rmm-border); }

.rmm-header-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 78px;
}

.rmm-header-logo { flex-shrink: 0; }

.rmm-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--rmm-green); }
.rmm-logo:hover { color: var(--rmm-green); }
.rmm-logo--image img { max-height: 60px; width: auto; }
.rmm-logo__mark {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%;
	background: var(--rmm-green); color: var(--rmm-gold);
}
.rmm-logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.rmm-logo__name { font-family: var(--rmm-heading-font); font-size: 22px; font-weight: 700; letter-spacing: 0.01em; }
.rmm-logo__tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rmm-muted); margin-top: 3px; }

.rmm-nav { flex: 1; display: flex; justify-content: center; }

.rmm-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.rmm-menu > li { position: relative; }
.rmm-menu a {
	display: block;
	padding: 10px 14px;
	color: var(--rmm-text);
	font-size: 14px;
	font-weight: 500;
}
.rmm-menu > li > a { position: relative; }
.rmm-menu > li > a::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
	background: var(--rmm-gold); transform: scaleX(0); transition: transform var(--rmm-transition);
}
.rmm-menu > li:hover > a::after,
.rmm-menu > .current-menu-item > a::after,
.rmm-menu > .current-menu-ancestor > a::after { transform: scaleX(1); }
.rmm-menu a:hover, .rmm-menu .current-menu-item > a { color: var(--rmm-green); }

.rmm-menu .menu-item-has-children > a { padding-right: 26px; }
.rmm-menu .menu-item-has-children > a::before {
	content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
}

.rmm-menu .sub-menu {
	list-style: none; margin: 0; padding: 10px 0;
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--rmm-white); border: 1px solid var(--rmm-border); border-radius: var(--rmm-radius);
	box-shadow: var(--rmm-shadow);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: all var(--rmm-transition); z-index: 20;
}
.rmm-menu li:hover > .sub-menu,
.rmm-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.rmm-menu .sub-menu a { padding: 8px 20px; font-weight: 400; }
.rmm-menu .sub-menu a:hover { background: var(--rmm-ivory); }

.rmm-header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.rmm-action {
	position: relative;
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px;
	padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: var(--rmm-green);
	cursor: pointer; transition: background var(--rmm-transition), color var(--rmm-transition);
}
.rmm-action:hover, .rmm-action[aria-expanded="true"] { background: var(--rmm-beige); color: var(--rmm-green); }

.rmm-cart-count {
	position: absolute; top: 2px; right: 0;
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--rmm-gold); color: var(--rmm-green-dark);
	font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.rmm-cart-count[data-count="0"] { display: none; }

.rmm-menu-toggle { display: none; }

.rmm-search-panel { border-top: 1px solid var(--rmm-border); background: var(--rmm-white); padding: 18px 0; }
.rmm-search-panel[hidden] { display: none; }

/* Mobile drawer */
.rmm-drawer {
	position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000;
	width: 320px; max-width: 86vw;
	background: var(--rmm-ivory);
	transform: translateX(-100%);
	transition: transform 0.3s ease;
	display: flex; flex-direction: column;
	overflow-y: auto;
	visibility: hidden;
}
.rmm-drawer.is-open { transform: translateX(0); visibility: visible; }
.rmm-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--rmm-border); }
.rmm-drawer__head .rmm-logo__tag { display: none; }
.rmm-drawer__head .rmm-logo__name { font-size: 18px; }
.rmm-drawer__nav { padding: 10px 0; flex: 1; }
.rmm-mobile-menu, .rmm-mobile-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.rmm-mobile-menu li { position: relative; border-bottom: 1px solid var(--rmm-border); }
.rmm-mobile-menu a { display: block; padding: 13px 20px; color: var(--rmm-text); font-weight: 500; }
.rmm-mobile-menu .sub-menu { display: none; background: var(--rmm-white); }
.rmm-mobile-menu .sub-menu a { padding-left: 34px; font-weight: 400; font-size: 14px; }
.rmm-mobile-menu .is-open > .sub-menu { display: block; }
.rmm-submenu-toggle {
	position: absolute; right: 8px; top: 6px; width: 36px; height: 36px;
	border: 0; background: transparent; color: var(--rmm-green); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.rmm-submenu-toggle .rmm-icon { transition: transform var(--rmm-transition); }
.is-open > .rmm-submenu-toggle .rmm-icon { transform: rotate(180deg); }
.rmm-drawer__contact { padding: 20px; display: grid; gap: 12px; font-size: 14px; border-top: 1px solid var(--rmm-border); }
.rmm-drawer__contact a { display: inline-flex; align-items: center; gap: 8px; color: var(--rmm-text); }

.rmm-drawer-overlay { position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, 0.45); }
.rmm-drawer-overlay[hidden] { display: none; }

body.rmm-no-scroll { overflow: hidden; }

@media (max-width: 1024px) {
	.rmm-nav { display: none; }
	.rmm-menu-toggle { display: inline-flex; margin-left: -10px; }
	.rmm-header-inner { gap: 8px; min-height: 66px; }
	.rmm-header-logo { flex: 1; }
	.rmm-logo__name { font-size: 19px; }
	.rmm-logo__mark { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
	.rmm-logo__tag { display: none; }
	.rmm-logo__name { font-size: 17px; }
	.rmm-action { width: 38px; height: 38px; }
	.rmm-account-link { display: none; }
}

/* ---------- Social ---------- */
.rmm-social { display: flex; gap: 8px; }
.rmm-social a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid rgba(255, 249, 240, 0.3); color: inherit;
}
.rmm-social a:hover { background: var(--rmm-gold); border-color: var(--rmm-gold); color: var(--rmm-green-dark); }

/* ---------- Page banner ---------- */
.rmm-page-banner { background: var(--rmm-beige); padding: 48px 0; text-align: center; }
.rmm-page-banner__title { margin-bottom: 8px; }
.rmm-breadcrumb { font-size: 13px; color: var(--rmm-muted); }
.rmm-breadcrumb a { color: var(--rmm-muted); }
.rmm-breadcrumb a:hover { color: var(--rmm-green); }
.rmm-breadcrumb .sep { margin: 0 8px; opacity: 0.6; }

@media (max-width: 767px) {
	.rmm-page-banner { padding: 32px 0; }
}

/* ---------- Footer ---------- */
.rmm-footer { background: var(--rmm-green); color: rgba(255, 249, 240, 0.82); font-size: 14px; }
.rmm-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
	gap: 40px;
	padding-top: 64px; padding-bottom: 48px;
}
.rmm-footer .rmm-logo, .rmm-footer .rmm-logo:hover { color: var(--rmm-ivory); margin-bottom: 16px; }
.rmm-footer .rmm-logo__mark { background: var(--rmm-gold); color: var(--rmm-green); }
.rmm-footer .rmm-logo__tag { color: rgba(255, 249, 240, 0.6); }
.rmm-footer__title { color: var(--rmm-ivory); font-size: 18px; margin-bottom: 18px; }
.rmm-footer a { color: rgba(255, 249, 240, 0.82); }
.rmm-footer a:hover { color: var(--rmm-gold); }
.rmm-footer-menu, .rmm-footer-contact { list-style: none; margin: 0; padding: 0; }
.rmm-footer-menu li { margin-bottom: 10px; }
.rmm-footer-contact li { display: flex; gap: 10px; margin-bottom: 14px; align-items: flex-start; }
.rmm-footer-contact .rmm-icon { flex-shrink: 0; color: var(--rmm-gold); margin-top: 3px; }
.rmm-footer__bottom { border-top: 1px solid rgba(255, 249, 240, 0.12); padding: 18px 0; font-size: 13px; text-align: center; }
.rmm-footer__bottom p { margin: 0; }

@media (max-width: 1024px) {
	.rmm-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
	.rmm-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; padding-bottom: 32px; }
}

/* ---------- Content ---------- */
.rmm-entry-content > *:last-child { margin-bottom: 0; }
.rmm-entry-content img { border-radius: var(--rmm-radius); }
.rmm-entry-meta { font-size: 13px; color: var(--rmm-muted); margin-bottom: 8px; }
.rmm-entry-thumb { margin-bottom: 24px; }
.rmm-entry-thumb img { border-radius: var(--rmm-radius); width: 100%; }

.rmm-blog-layout.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
.rmm-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.rmm-post-card { background: var(--rmm-white); border: 1px solid var(--rmm-border); border-radius: var(--rmm-radius); overflow: hidden; }
.rmm-post-card__thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.rmm-post-card__body { padding: 22px; }
.rmm-post-card__title { font-size: 20px; }
.rmm-post-card__title a { color: var(--rmm-green); }

.nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.nav-links .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--rmm-border);
	border-radius: var(--rmm-radius-sm); background: var(--rmm-white); color: var(--rmm-text);
}
.nav-links .page-numbers.current, .nav-links .page-numbers:hover { background: var(--rmm-green); border-color: var(--rmm-green); color: var(--rmm-ivory); }

.post-navigation .nav-links { justify-content: space-between; }

.rmm-404 h1 { margin-bottom: 12px; }
.rmm-404 .rmm-search-form { margin: 28px auto; }

.rmm-comments { margin-top: 48px; }

@media (max-width: 1024px) {
	.rmm-blog-layout.has-sidebar { grid-template-columns: 1fr; }
}

/* ---------- Elementor helpers ---------- */
.rmm-elementor-page { display: block; }

/* Demo Elementor sections use a 1320px boxed width + 10px side padding + 10px column gap,
   which lines their content up exactly with the theme's 1300px container and 20px gutter. */

.rmm-template-canvas { background: var(--rmm-white); }
.rmm-template-preview { min-height: 200px; }

/* Section heading pattern used by the demo layout */
.elementor-widget-heading.rmm-eyebrow-heading .elementor-heading-title { letter-spacing: 0.14em; text-transform: uppercase; }

/* WordPress core alignment classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 13px; color: var(--rmm-muted); }
.sticky, .bypostauthor, .gallery-caption { display: block; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Header widget inside an Elementor header template: the section supplies the background. */
.rmm-elementor-header .rmm-header-bar { background: transparent; border-bottom: 0; }
.rmm-elementor-header .rmm-search-panel { background: transparent; border-top-color: var(--rmm-border); }
.elementor-widget-rmm-site-header .rmm-drawer { text-align: left; }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }
.elementor-widget-text-editor .rmm-contact-form p:last-child { margin-bottom: 0; }
