/*
Theme Name: ListingHive – Maschmeyer
Theme URI: https://usedequipment.maschmeyer.com
Description: Child theme that restyles ListingHive/HivePress to match maschmeyer.com (colors, Oswald type, square buttons, main-site header and footer). File-only: no database import required.
Author: Maschmeyer Concrete
Template: listinghive
Version: 1.0.0
Text Domain: listinghive-maschmeyer
*/

/* ---------- Tokens (mirrors maschmeyer.com Elementor kit #7) ---------- */
:root {
  --mm-red: #9F2024;
  --mm-red-hover: #BF0006;
  --mm-black: #000000;
  --mm-ink: #111111;
  --mm-white: #FFFFFF;
  --mm-grey: #EDEDED;
  --mm-line: #D9D9D9;
  --mm-head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --mm-body: "Open Sans", "Segoe UI", Arial, sans-serif;
}

/* ---------- Ground ---------- */
body,
body.hp-theme--listinghive,
.site-container { background: var(--mm-black) !important; color: var(--mm-ink); font-family: var(--mm-body); }
.site-loader { display: none !important; }

/* Hide the stock ListingHive header and the Header-Footer-Elementor / theme footers; we render our own */
.site-container > .site-header,
header.site-header,
.footer-width-fixer,
footer.site-footer,
.site-container > .site-footer { display: none !important; }
#mm-header-late { display: none; }

/* Inner pages get a white panel so HivePress text stays readable on the black ground */
body:not(.home) .site-content > .container {
  background: var(--mm-white);
  color: var(--mm-ink) !important; /* ListingHive's Customizer set body text to white for the old red ground */
  padding: 40px 32px 56px;
  margin-top: 32px;
  margin-bottom: 48px;
}
@media (max-width: 767px) {
  body:not(.home) .site-content > .container { padding: 24px 16px 40px; margin-top: 16px; }
}
body.home .site-content > .container { padding-top: 0; }

/* ---------- Type ---------- */
h1, h2, h3, h4,
.hp-section__title,
.hp-listing__title,
.hp-listing-category__name,
.hp-page__title,
.elementor-heading-title {
  font-family: var(--mm-head) !important;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.1;
}
body.home .elementor-heading-title { color: var(--mm-white); }

/* ---------- Buttons ---------- */
.button, button.button, input[type="submit"], .hp-form__button,
.elementor-button {
  border-radius: 0 !important;
  font-family: var(--mm-head) !important;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .02em;
  border: 3px solid var(--mm-red) !important;
  background: var(--mm-red) !important;
  color: var(--mm-white) !important;
  box-shadow: none !important;
}
.button:hover, button.button:hover, input[type="submit"]:hover, .hp-form__button:hover {
  background: var(--mm-red-hover) !important;
  border-color: var(--mm-red-hover) !important;
}
.button--secondary, .button--outline {
  background: var(--mm-white) !important;
  color: var(--mm-red) !important;
}

/* ---------- Square everything ---------- */
.hp-listing, .hp-listing-category, .hp-listing__image img, .hp-listing-category__image img,
.hp-form__field input, .hp-form__field select, .hp-form__field textarea,
.hp-listing__attributes, .hp-listing__location, .hp-listing__category a,
.hp-listing__category span, .hp-vendor, .hp-block, .hp-modal, .select2-container .select2-selection,
.hp-listing__images img, .hp-listing__image-thumb, .becookiebar { border-radius: 0 !important; }

/* ---------- Listing cards ---------- */
.hp-listing--view-block {
  border: 1px solid var(--mm-line);
  background: var(--mm-white);
  box-shadow: none;
  transition: transform .15s ease;
}
.hp-listing--view-block:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.hp-listing__category a, .hp-listing__category span {
  background: var(--mm-red) !important; color: var(--mm-white) !important;
  font-family: var(--mm-head); text-transform: uppercase; letter-spacing: .06em; font-size: 12px;
  padding: 3px 10px;
}
.hp-listing__title, .hp-listing__title a { font-size: 20px; color: var(--mm-ink) !important; }
body:not(.home) .site-content h1, body:not(.home) .site-content h2, body:not(.home) .site-content h3,
body:not(.home) .site-content p, body:not(.home) .site-content li, body:not(.home) .site-content .hp-listing__description,
body:not(.home) .site-content .hp-listing__attributes, body:not(.home) .site-content .hp-page__title { color: var(--mm-ink) !important; }
.hp-listing__title a:hover { color: var(--mm-red); }
.hp-listing__attribute--price,
.hp-listing__attribute--price span,
.hp-listing__attribute--price strong {
  color: var(--mm-red); font-family: var(--mm-head); font-weight: 600; font-size: 24px;
}
.hp-listing__location { border: 1px solid var(--mm-line); background: var(--mm-grey); }
.hp-listing__attributes--secondary { border: 1px solid var(--mm-line); }
.hp-listing__attributes a { color: var(--mm-ink); }

/* Category tiles */
.hp-listing-category--view-block { border-radius: 0 !important; overflow: hidden; }
.hp-listing-category__name { font-size: 22px; color: var(--mm-white); }
.hp-listing-category__count {
  background: var(--mm-red); color: var(--mm-white);
  font-family: var(--mm-head); text-transform: uppercase; letter-spacing: .06em;
  border-radius: 0 !important;
}

/* Search form (home) */
.hp-form--listing-search { border-radius: 0 !important; box-shadow: none; border: 4px solid var(--mm-red); }

/* ---------- Hide marketplace chrome that doesn't apply to a single seller ---------- */
.hp-listing__action--favorite,
.hp-listing__actions--secondary,
.hp-menu--site-header,
.header-navbar__actions,
.hp-listing__vendor,
.hp-vendor--view-block,
.hp-modal--user-login, .hp-modal--user-register, .hp-modal--user-password-request,
.hp-listing__action--report,
.hp-listing__map, .hp-map, /* every unit sits at the Lakeland yard; the map adds nothing and its API key is currently failing */
.hp-listing__action--favorite + .hp-listing__action { display: none !important; }
a[href*="hp_listing_submit"], a[href*="submit-listing"], .header-navbar__action--add-listing { display: none !important; }

/* Single listing */
.hp-listing--view-page .hp-listing__title { font-size: 40px; }
.hp-listing--view-page .hp-listing__attributes--primary { border: 3px solid var(--mm-red); }
.hp-listing__description a { color: var(--mm-red); text-decoration: underline; }
.hp-listing__images img { border: 1px solid var(--mm-line); }

/* Links */
a { color: var(--mm-red); }
a:hover { color: var(--mm-red-hover); }

/* ---------- Homepage (Elementor page 211) ---------- */
body.home .elementor-211 .elementor-top-section { background: transparent !important; }
body.home .elementor-211 .elementor-widget-image img { opacity: 1 !important; filter: none !important; border-radius: 0 !important; }
/* short red bar above the first hero heading, like the main site */
body.home .elementor-211 .elementor-top-section:first-child .elementor-widget-heading:first-of-type .elementor-heading-title::before {
  content: ""; display: block; width: 150px; height: 10px; background: var(--mm-red); margin: 0 auto 18px;
}
/* eyebrow + headline sizes for the two hero headings */
body.home .elementor-211 .elementor-top-section:first-child .elementor-widget-heading:first-of-type .elementor-heading-title { font-size: 26px !important; font-weight: 500; letter-spacing: .06em; }
body.home .elementor-211 .elementor-top-section:first-child .elementor-widget-heading:nth-of-type(2) .elementor-heading-title { font-size: 64px !important; }
body.home .elementor-211 .elementor-widget-heading .elementor-heading-title { color: var(--mm-white) !important; }
@media (max-width: 767px) {
  body.home .elementor-211 .elementor-top-section:first-child .elementor-widget-heading:nth-of-type(2) .elementor-heading-title { font-size: 40px !important; }
}

/* ---------- Header (rendered by template-parts/header.php) ---------- */
.mm-header { background: var(--mm-white); border-bottom: 6px solid var(--mm-red); position: relative; z-index: 50; }
.mm-header__inner {
  max-width: 1400px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
}
.mm-header__logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.mm-header__logo img { height: 60px; width: auto; display: block; }
.mm-header__tag {
  font-family: var(--mm-head); font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--mm-red); font-size: 18px; line-height: 1; border-left: 3px solid var(--mm-red); padding-left: 14px;
}
.mm-nav { margin-left: auto; display: flex; gap: 22px; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.mm-nav a {
  font-family: var(--mm-head); font-weight: 600; text-transform: uppercase; font-size: 18px;
  color: var(--mm-black); text-decoration: none;
}
.mm-nav a:hover, .mm-nav .current a { color: var(--mm-red); }
.mm-header__cta { display: flex; gap: 12px; }
.mm-btn {
  font-family: var(--mm-head); font-weight: 700; text-transform: uppercase; font-size: 17px;
  padding: 11px 22px; border: 3px solid var(--mm-red); text-decoration: none; white-space: nowrap; line-height: 1;
}
.mm-btn--outline { background: var(--mm-white); color: var(--mm-red); }
.mm-btn--solid { background: var(--mm-red); color: var(--mm-white); }
.mm-btn--solid:hover { background: var(--mm-red-hover); border-color: var(--mm-red-hover); color: var(--mm-white); }
.mm-btn--outline:hover { background: var(--mm-red); color: var(--mm-white); }
.mm-burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.mm-burger span { display: block; width: 26px; height: 3px; background: var(--mm-black); margin: 5px 0; }
@media (max-width: 1100px) {
  .mm-header__tag { display: none; }
  .mm-nav a { font-size: 16px; }
  .mm-btn { font-size: 15px; padding: 10px 16px; }
}
@media (max-width: 900px) {
  .mm-burger { display: block; }
  .mm-nav, .mm-header__cta { display: none; }
  .mm-header.is-open .mm-nav, .mm-header.is-open .mm-header__cta {
    display: flex; flex-direction: column; width: 100%; gap: 14px; margin-left: 0;
  }
  .mm-header.is-open .mm-header__inner { flex-wrap: wrap; }
  .mm-header.is-open .mm-header__cta a { text-align: center; }
}

/* Red contact band under the header (home only) */
.mm-band { background: var(--mm-red); color: var(--mm-white); text-align: center; padding: 14px 16px; }
.mm-band__inner { display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.mm-band strong { font-family: var(--mm-head); font-weight: 600; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; }
.mm-band .mm-btn { border-color: var(--mm-white); background: var(--mm-white); color: var(--mm-red); font-size: 15px; padding: 9px 18px; }
.mm-band .mm-btn:hover { background: var(--mm-black); border-color: var(--mm-black); color: var(--mm-white); }

/* ---------- Footer (rendered by template-parts/footer.php) ---------- */
.mm-footer { background: #1D1D1D; color: var(--mm-white); padding: 56px 24px 32px; font-family: var(--mm-body); }
.mm-footer__grid { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 900px) { .mm-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mm-footer__grid { grid-template-columns: 1fr; } }
.mm-footer h4 {
  font-family: var(--mm-head); font-weight: 600; text-transform: uppercase; font-size: 20px; color: var(--mm-white);
  margin: 0 0 14px; padding-top: 12px; border-top: 4px solid var(--mm-red); display: inline-block;
}
.mm-footer ul { list-style: none; margin: 0; padding: 0; }
.mm-footer li { margin: 0 0 8px; font-family: var(--mm-head); font-weight: 400; font-size: 17px; }
.mm-footer a { color: #BFBFBF; text-decoration: none; }
.mm-footer a:hover { color: var(--mm-white); }
.mm-footer__contact li { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.mm-footer__contact b { font-weight: 600; color: var(--mm-white); }
.mm-footer__bottom {
  max-width: 1140px; margin: 40px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid #333; padding-top: 24px;
}
.mm-footer__bottom img { height: 64px; width: auto; }
.mm-social { display: flex; gap: 18px; }
.mm-social a { color: var(--mm-white); display: inline-flex; }
.mm-social svg { width: 24px; height: 24px; fill: currentColor; }
.mm-social a:hover { color: var(--mm-red-hover); }
.mm-footer__legal { width: 100%; font-size: 13px; color: #8A8A8A; margin-top: 12px; }

/* Cookie bar: keep it in the palette */
#becookiebarid, .becookiebar { background: var(--mm-red) !important; border-radius: 0 !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) { .hp-listing--view-block { transition: none; } }
