/*
Theme Name: Mid-States Industrial Sales
Theme URI: https://mid-statesgroup.com/
Author: Mid-States Industrial Sales
Description: Custom theme reproducing the approved Mid-States Industrial Sales design (v01.08 · 07.16.26). Warm, clean, family-owned industrial supply look. Styling is served from the site's approved stylesheets; template markup mirrors the approved static build.
Version: 1.2.2
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
*/

/* The visual design lives in the approved stylesheets (styles.css, logo.css,
   features.css) enqueued in functions.php. This file only carries the theme
   header WordPress requires plus a couple of small WordPress-admin niceties. */

/* Sticky top bar: the green "since 1982" utility bar and the white header
   float together at the top of the viewport when the page scrolls. */
.site-topbar { position: sticky; top: 0; z-index: 100; }
.site-header { position: static; top: auto; }
.admin-bar .site-topbar { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-topbar { top: 46px; }
}

/* ---- Readability: nudge base + small text up a notch (v1.2.0) ---- */
body { font-size: 16px; }
.utility, .utility .shell { font-size: 13px; }
.brand-hero__copy p, .home-v2-products p, .customer-tool p { font-size: 15px; }
.footer a, .footer span, .footer address, .footer p { font-size: 14.5px; }
.stage__crumbs, .bh__stat span { font-size: 13px; }
.bh__desc { font-size: 16px; }
.catalog-dl__label { font-size: 13px; }
.bh__cat small, .catalog-more { font-size: 13px; }

/* ---- Request-a-Quote pop-up modal ---- */
body.rfq-modal-open { overflow: hidden; }
.rfq-modal[hidden] { display: none; }
.rfq-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 24px; overflow-y: auto;
}
.rfq-modal__overlay {
  position: fixed; inset: 0; background: rgba(8, 47, 42, .55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.rfq-modal__dialog {
  position: relative; z-index: 1; width: 100%; max-width: 620px;
  background: #fffef8; border-radius: 18px; padding: 34px 34px 30px;
  box-shadow: 0 30px 80px rgba(8, 47, 42, .35);
}
.rfq-modal__close {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px;
  border: 1px solid #d8e0dc; background: #fff; border-radius: 10px;
  font-size: 22px; line-height: 1; color: #153d36; cursor: pointer;
}
.rfq-modal__close:hover { background: #f1f4f2; }
.rfq-modal__title { margin: 0 0 6px; font-size: 30px; color: #104a42; }
.rfq-modal__sub { margin: 0 0 22px; color: #597069; font-size: 15px; line-height: 1.55; max-width: 46ch; }
.rfq-modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rfq-modal__field {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #153d36;
}
.rfq-modal__field--full { grid-column: 1 / -1; margin-top: 16px; }
.rfq-modal__field span { color: #ef6c32; }
.rfq-modal__field input,
.rfq-modal__field textarea {
  font: inherit; font-weight: 400; letter-spacing: 0; text-transform: none;
  padding: 12px 14px; border: 1px solid #cdd7d2; border-radius: 10px;
  background: #fff; color: #153d36; width: 100%; box-sizing: border-box;
}
.rfq-modal__field textarea { resize: vertical; min-height: 120px; }
.rfq-modal__field input:focus,
.rfq-modal__field textarea:focus {
  outline: none; border-color: #104a42; box-shadow: 0 0 0 3px rgba(16, 74, 66, .15);
}
.rfq-modal__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.rfq-modal__submit { width: 100%; margin-top: 22px; justify-content: center; font-size: 16px; }
.rfq-modal__status { margin: 14px 0 0; font-size: 14px; min-height: 1px; color: #597069; }
.rfq-modal__status.is-error { color: #b3341f; }
.rfq-modal__success { text-align: center; padding: 24px 0 8px; }
.rfq-modal__success-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: #e7f1ec; color: #104a42; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
}
.rfq-modal__success h3 { margin: 0 0 8px; color: #104a42; font-size: 22px; }
.rfq-modal__success p { margin: 0 0 20px; color: #597069; }
@media (max-width: 560px) {
  .rfq-modal__grid { grid-template-columns: 1fr; }
  .rfq-modal__dialog { padding: 28px 20px 24px; }
  .rfq-modal__title { font-size: 25px; }
}

/* ---- Compact brand-page hero (v1.1.1) ---- */
.brand-hero{background:linear-gradient(180deg,#f2f6f3,#fffef8);border-bottom:1px solid #e2e7e4}
.brand-hero .shell{max-width:1180px;margin:0 auto;padding:16px 22px 20px}
.brand-hero__crumbs{font-size:12.5px;color:#5f7168;margin:0 0 10px}
.brand-hero__crumbs a{color:#5f7168;text-decoration:none}
.brand-hero__crumbs a:hover{color:#104a42}
.brand-hero__crumbs b{color:#104a42;font-weight:700}
.brand-hero__row{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.brand-hero__copy{flex:1;min-width:280px}
.brand-hero__copy .eyebrow{font-size:11.5px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:#ef6c32;margin:0 0 4px}
.brand-hero__copy h1{font-size:30px;line-height:1.1;margin:0 0 5px;color:#104a42;letter-spacing:.3px}
.brand-hero__copy p{margin:0;color:#5f7168;font-size:14.5px;max-width:56ch;line-height:1.5}
.brand-hero__actions{display:flex;flex-direction:column;gap:7px;align-items:flex-end}
.brand-hero__actions small{font-size:11.5px;color:#5f7168}
@media(max-width:640px){
  .brand-hero__row{flex-direction:column;align-items:flex-start}
  .brand-hero__actions{align-items:stretch;width:100%}
  .brand-hero__actions .button{justify-content:center;width:100%}
  .brand-hero__copy h1{font-size:25px}
}

/* ---- Homepage "Build a full quote" callout (v1.1.4) ---- */
.fullquote-callout{background:linear-gradient(180deg,#f6efe2,#efe7d8);border-top:1px solid #e4dccd;border-bottom:1px solid #e4dccd}
.fullquote-callout__inner{display:flex;align-items:center;justify-content:space-between;gap:26px;flex-wrap:wrap;padding:22px 0}
.fullquote-callout__copy{flex:1;min-width:280px}
.fullquote-callout__copy .eyebrow{color:#ef6c32;font-size:11.5px;font-weight:800;letter-spacing:1.3px;text-transform:uppercase;margin:0 0 4px}
.fullquote-callout__copy h2{margin:0 0 5px;color:#104a42;font-size:23px;line-height:1.15}
.fullquote-callout__copy p{margin:0;color:#5f7168;font-size:14px;max-width:74ch;line-height:1.5}
.fullquote-callout__btn{flex:0 0 auto;font-size:15px;padding:13px 24px}
@media(max-width:640px){.fullquote-callout__btn{width:100%;justify-content:center}}

/* ===== v3 brand page: one merged brand + quote frame ===== */
.stage{background:radial-gradient(120% 130% at 15% 0%,#f7f1e5 0%,#ece3d2 100%)}
.stage .shell{max-width:1200px;margin:0 auto;padding:16px 24px 32px}
.stage__crumbs{font-size:12.5px;color:#63736b;margin:0 0 14px}
.stage__crumbs a{color:#63736b;text-decoration:none}
.stage__crumbs a:hover{color:#124b42}
.stage__crumbs b{color:#124b42;font-weight:700}
.brandline{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:14px}
.brandline__logo{width:94px;height:94px;flex:0 0 auto;background:#fff;border:1px solid #e4dccd;border-radius:18px;padding:12px;box-shadow:0 2px 6px rgba(11,58,50,.06)}
.brandline__logo img{width:100%;height:100%;object-fit:contain;display:block}
.brandline__txt{flex:1;min-width:250px}
.brandline__txt .eyebrow{font-size:11px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;color:#ef6c32;margin:0 0 3px}
.brandline__txt h1{font-size:30px;line-height:1.1;margin:0 0 4px;color:#124b42;letter-spacing:.2px}
.brandline__txt p{margin:0;color:#63736b;font-size:14.5px;max-width:56ch;line-height:1.5}
.brandline__pdf{display:flex;flex-direction:column;gap:8px;align-items:center;width:138px;flex:0 0 auto}
.brandline__pdf .button{width:100%;justify-content:center;padding-left:12px;padding-right:12px}
.brandline__pdf .button+.button{margin-top:0}
.brandline__pdf small{font-size:11px;color:#63736b;text-align:center}
/* catalog cover thumbnail (top of the catalog cover, pre-cropped to 3:4) */
.catalog-cover{display:block;width:100%;border:1px solid #d9cdb4;border-radius:11px;overflow:hidden;background:#fff;line-height:0;box-shadow:0 5px 16px rgba(11,58,50,.16);transition:transform .12s ease,box-shadow .12s ease}
.catalog-cover:hover{transform:translateY(-2px);box-shadow:0 9px 22px rgba(11,58,50,.24)}
.catalog-cover img{width:100%;height:auto;display:block}
.button--ghost{background:transparent;color:#124b42;border:1.6px solid #cdd8cf}
.button--ghost:hover{border-color:#124b42;background:#fff}
.quick-hint{font-size:12.5px;color:#7a6a4a;margin:2px 0 16px;padding:9px 14px;background:rgba(255,255,255,.55);border:1px solid #e4dccd;border-radius:9px;display:inline-block}
.quick-hint b{color:#124b42}
.mss-catalog-frame{border:1px solid #e4dccd !important;border-radius:16px !important;box-shadow:0 6px 22px rgba(11,58,50,.07) !important;background:#fffdf8 !important}
@media(max-width:660px){
  .brandline__pdf{align-items:center;width:100%;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:12px}
  .catalog-cover{width:120px;flex:0 0 auto}
  .brandline__pdf .button{width:auto;flex:1 1 160px;min-width:160px}
  .brandline__txt h1{font-size:25px}
  .brandline__logo{width:80px;height:80px}
  .stage .shell{padding:14px 16px 22px}
}

/* ===== v4 brand hero: two-column identity + facts + catalog visual ===== */
.bh{display:grid;grid-template-columns:1fr 190px;gap:36px;align-items:center;margin:2px 0 6px}
.bh__main{display:flex;flex-direction:column;justify-content:center}
.bh__id{display:flex;align-items:center;gap:18px;margin-bottom:14px}
.bh__id h1{font-size:34px;line-height:1;margin:3px 0 0;color:#124b42;letter-spacing:.2px}
.bh__id .eyebrow{font-size:11px;font-weight:800;letter-spacing:1.4px;text-transform:uppercase;color:#ef6c32;margin:0}
.bh__desc{margin:0 0 20px;color:#425349;font-size:15.5px;max-width:56ch;line-height:1.55}
.bh__stats{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 22px}
.bh__stat{background:rgba(255,255,255,.66);border:1px solid #e4dccd;border-radius:13px;padding:11px 16px 10px;min-width:132px}
.bh__stat b{display:block;font-size:18.5px;color:#124b42;line-height:1.15}
.bh__stat span{font-size:12px;color:#63736b}
.bh__cta{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:2px}
.bh__main > .bh__stats:last-child{margin-bottom:0}
.bh__cat{display:flex;flex-direction:column;align-items:center;gap:10px}
/* catalog download card: framed cover image + label, the whole card is the PDF link */
.catalog-dl{display:flex;flex-direction:column;width:184px;text-decoration:none;border:1px solid #d9cdb4;border-radius:13px;overflow:hidden;background:#fff;box-shadow:0 6px 20px rgba(11,58,50,.16);transition:transform .12s ease,box-shadow .12s ease}
.catalog-dl:hover{transform:translateY(-2px);box-shadow:0 11px 26px rgba(11,58,50,.26)}
.catalog-dl .catalog-cover{width:100%;border:none;border-radius:0;box-shadow:none;transform:none}
.catalog-dl:hover .catalog-cover{transform:none}
.catalog-dl .catalog-cover img{width:100%;height:auto;display:block}
.catalog-dl__label{display:flex;align-items:center;justify-content:center;gap:8px;background:#0b3a32;color:#fff;font-weight:800;font-size:12.5px;letter-spacing:.2px;padding:11px 12px;text-align:center;line-height:1.2}
.catalog-dl:hover .catalog-dl__label{background:#12564a}
.catalog-more{font-size:12.5px;font-weight:700;color:#124b42;text-decoration:none;border-bottom:1px solid #cdd8cf;padding-bottom:1px}
.catalog-more:hover{border-color:#124b42}
.bh--nocat{grid-template-columns:1fr}
@media(max-width:760px){
  .bh{grid-template-columns:1fr;gap:22px}
  .bh__cat{flex-direction:column;align-items:flex-start;gap:12px}
  .catalog-dl{width:170px}
  .bh__id h1{font-size:26px}
  .bh__id .brandline__logo{width:76px;height:76px}
  .bh__cta .button{flex:1 1 auto;justify-content:center}
}
