/*
Theme Name:   MG Tools & Supplies Child
Theme URI:    https://mgtoolssupplies.com
Description:  Custom child theme for MG Tools & Supplies
Author:       MG Tools & Supplies
Template:     astra
Version:      5.0.0
Text Domain:  mg-astra-child
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --orange:     #c8440a;
  --orange-hov: #a8380a;
  --green:      #2d6a1f;
  --charcoal:   #1c1c1c;
  --dark:       #111111;
  --black:      #0a0a0a;
  --g700:       #444444;
  --g500:       #767676;
  --g300:       #d0d0d0;
  --g200:       #e8e8e8;
  --g100:       #f5f5f3;
  --white:      #ffffff;
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --r:          4px;
  --rlg:        8px;
}

body { font-family: var(--font); color: var(--charcoal); background: var(--white); -webkit-font-smoothing: antialiased; }
body.home .site-header, body.home #masthead { display: none; }
body.home #content, body.home .ast-container, body.home .entry-content, body.home .site-content { padding: 0 !important; margin: 0 !important; max-width: 100% !important; }

/* ─── Scroll reveal ─────────────────────────────────────────── */
.mgr { opacity: 0; transform: translateY(28px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.mgr.on { opacity: 1; transform: none; }
.d1{transition-delay:.06s}.d2{transition-delay:.12s}.d3{transition-delay:.18s}.d4{transition-delay:.24s}
.d5{transition-delay:.30s}.d6{transition-delay:.36s}.d7{transition-delay:.42s}.d8{transition-delay:.48s}.d9{transition-delay:.54s}

/* Stagger for brand cards */
.mgr-brand { opacity: 0; transform: translateY(20px) scale(0.96); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.mgr-brand.on { opacity: 1; transform: none; }
.db1{transition-delay:.04s}.db2{transition-delay:.08s}.db3{transition-delay:.12s}.db4{transition-delay:.16s}
.db5{transition-delay:.20s}.db6{transition-delay:.24s}.db7{transition-delay:.28s}.db8{transition-delay:.32s}.db9{transition-delay:.36s}

/* ─── Top bar ───────────────────────────────────────────────── */
.mg-topbar { background: var(--charcoal); padding: 7px 32px; display: flex; justify-content: space-between; align-items: center; }
.mg-topbar__left  { font-size: 11px; color: rgba(255,255,255,.45); letter-spacing: .02em; }
.mg-topbar__right { font-size: 11px; color: rgba(255,255,255,.5); }

/* ─── Header — single tight row ────────────────────────────── */
.mg-header { background: var(--white); border-bottom: 1px solid var(--g200); position: sticky; top: 0; z-index: 300; }
.mg-header__row { display: flex; align-items: center; gap: 16px; padding: 0 32px; height: 64px; }

/* Logo — actual image */
.mg-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mg-logo__img { height: 46px; width: auto; display: block; }
.mg-logo__name { font-size: 15px; font-weight: 800; color: var(--charcoal); letter-spacing: -0.03em; line-height: 1.1; display: block; }
.mg-logo__tag  { font-size: 10px; color: var(--g500); display: block; margin-top: 1px; }

/* Nav inline */
.mg-header__nav { display: flex; align-items: center; flex: 1; height: 100%; }
.mg-header__nav a { display: flex; align-items: center; height: 100%; padding: 0 13px; font-size: 13px; font-weight: 600; color: var(--g700); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; transition: color .15s, border-color .15s; }
.mg-header__nav a:hover { color: var(--charcoal); border-bottom-color: var(--orange); }

/* Search */
.mg-search { display: flex; align-items: center; gap: 7px; background: var(--g100); border: 1px solid var(--g200); border-radius: 20px; padding: 0 14px; height: 36px; flex-shrink: 0; width: 196px; transition: border-color .2s; }
.mg-search:focus-within { border-color: var(--g300); }
.mg-search svg { color: var(--g500); flex-shrink: 0; }
.mg-search input { border: none; background: transparent; outline: none; font-size: 13px; color: var(--charcoal); width: 100%; }
.mg-search input::placeholder { color: var(--g500); }

/* Phone CTA */
.mg-header__cta { background: var(--orange); color: var(--white); text-decoration: none; border-radius: var(--r); padding: 0 18px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; transition: background .2s; }
.mg-header__cta:hover { background: var(--orange-hov); color: var(--white); }
.mg-header__cta-label { font-size: 9px; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .07em; line-height: 1; }
.mg-header__cta-num   { font-size: 14px; font-weight: 800; line-height: 1.4; letter-spacing: -0.01em; }

/* ─── Hero ──────────────────────────────────────────────────── */
.mg-hero { position: relative; height: 580px; overflow: hidden; background: var(--black); display: flex; align-items: center; }
.mg-hero__bg { position: absolute; inset: 0; background-image: url('https://mgtoolssupplies.com/wp-content/uploads/2025/02/Main-Page-Background.png'); background-size: cover; background-position: center right; transform: scale(1.06); animation: hzoom 9s var(--ease) forwards; }
@keyframes hzoom { to { transform: scale(1); } }
.mg-hero__overlay { position: absolute; inset: 0; background: linear-gradient(95deg, rgba(8,8,8,.9) 0%, rgba(8,8,8,.6) 52%, rgba(8,8,8,.08) 100%); }
.mg-hero__content { position: relative; z-index: 2; padding: 0 64px; max-width: 640px; }

.mg-hero__eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; opacity: 0; animation: fup .7s var(--ease) .25s forwards; }
.mg-hero__ebar { width: 26px; height: 2px; background: var(--orange); }
.mg-hero__etxt { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }

.mg-hero h1 { font-size: clamp(34px, 4.5vw, 54px); font-weight: 800; color: var(--white); line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 16px; opacity: 0; animation: fup .8s var(--ease) .4s forwards; }
.mg-hero h1 em { font-style: normal; color: #e8c88a; }
.mg-hero__sub { font-size: 16px; color: rgba(255,255,255,.62); line-height: 1.65; max-width: 460px; margin-bottom: 30px; opacity: 0; animation: fup .8s var(--ease) .55s forwards; }
.mg-hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; opacity: 0; animation: fup .8s var(--ease) .7s forwards; }

@keyframes fup { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

/* Buttons */
.mg-btn { display: inline-flex; align-items: center; gap: 7px; padding: 13px 24px; border-radius: var(--r); font-size: 14px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; letter-spacing: .01em; transition: all .2s var(--ease); }
.mg-btn:hover { transform: translateY(-2px); }
.mg-btn--orange { background: var(--orange); color: var(--white); border-color: var(--orange); }
.mg-btn--orange:hover { background: var(--orange-hov); border-color: var(--orange-hov); color: var(--white); }
.mg-btn--ghost  { background: transparent; color: var(--white); border-color: rgba(255,255,255,.38); }
.mg-btn--ghost:hover  { border-color: var(--white); background: rgba(255,255,255,.08); color: var(--white); }

/* ─── Section shell ─────────────────────────────────────────── */
.mg-sec { padding: 36px 32px; }
.mg-sec--gray { background: var(--g100); }
.mg-sec__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.mg-sec__title { font-size: 22px; font-weight: 800; color: var(--charcoal); letter-spacing: -0.03em; }
.mg-sec__link  { font-size: 13px; font-weight: 600; color: var(--green); text-decoration: none; }
.mg-sec__link:hover { color: var(--charcoal); }

/* ─── Category grid ─────────────────────────────────────────── */
.mg-cats {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 12px 1fr 12px 1fr 12px 1fr;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.mg-cat {
  position: relative;
  border-radius: var(--rlg);
  overflow: hidden;
  background: var(--g100);
  display: block;
  text-decoration: none;
  aspect-ratio: 1 / 1;
  -webkit-aspect-ratio: 1 / 1;
}
/* Safari fallback for aspect-ratio */
@supports not (aspect-ratio: 1/1) {
  .mg-cat { padding-bottom: 0; height: 220px; }
}
@media (max-width: 768px) {
  .mg-cats { grid-template-columns: repeat(2, 1fr); }
}
.mg-cat__img { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: cover; background-position: center; -webkit-transition: -webkit-transform .55s var(--ease); transition: transform .55s var(--ease); }
.mg-cat:hover .mg-cat__img { -webkit-transform: scale(1.08); transform: scale(1.08); }
.mg-cat__over { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.05) 55%); }
.mg-cat:hover .mg-cat__over { background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.18) 55%); }
.mg-cat__info { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; }
.mg-cat__name  { font-size: 13px; font-weight: 800; color: var(--white); line-height: 1.2; }
.mg-cat__count { font-size: 10px; color: rgba(255,255,255,.55); margin-top: 2px; }
.mg-cat__chip  { position: absolute; top: 10px; right: 10px; background: var(--orange); border-radius: 3px; padding: 3px 9px; font-size: 10px; font-weight: 700; color: var(--white); opacity: 0; -webkit-transform: translateY(-6px); transform: translateY(-6px); -webkit-transition: opacity .2s, -webkit-transform .25s var(--ease); transition: opacity .2s, transform .25s var(--ease); }
.mg-cat:hover .mg-cat__chip { opacity: 1; -webkit-transform: none; transform: none; }

/* ─── Brands — uniform white logo cards ─────────────────────── */
.mg-brands { background: var(--g100); padding: 40px 32px; border-top: 1px solid var(--g200); border-bottom: 1px solid var(--g200); }
.mg-brands__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--g500); text-align: center; margin-bottom: 24px; }

.mg-brands__row {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Every card locked to identical size — !important to beat WP defaults */
.mg-brand-logo {
  width: 120px !important;
  height: 72px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  background: var(--white) !important;
  border: 1.5px solid var(--g200) !important;
  border-radius: var(--rlg) !important;
  display: -webkit-flex !important;
  display: flex !important;
  -webkit-align-items: center !important;
  align-items: center !important;
  -webkit-justify-content: center !important;
  justify-content: center !important;
  padding: 12px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  -webkit-transition: border-color .2s, -webkit-transform .2s;
  transition: border-color .2s, transform .2s;
  margin: 0 !important;
  float: none !important;
}
.mg-brand-logo:hover {
  border-color: var(--g300) !important;
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}

/* Force image to stay inside card — no exceptions */
.mg-brand-logo img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  float: none !important;
}

/* STIHL — same dimensions, orange border only */
.mg-brand-logo--stihl {
  border: 2px solid var(--orange) !important;
}
.mg-brand-logo--stihl:hover {
  border-color: var(--orange-hov) !important;
}

@media (max-width: 768px) {
  .mg-brands { padding: 28px 16px; }
  .mg-brand-logo {
    width: 95px !important;
    height: 58px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    padding: 8px !important;
  }
}

/* ─── Featured products ─────────────────────────────────────── */
.mg-prods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mg-prod { border: 1px solid var(--g200); border-radius: var(--rlg); overflow: hidden; background: var(--white); transition: box-shadow .25s, transform .25s var(--ease), border-color .25s; }
.mg-prod:hover { box-shadow: 0 8px 28px rgba(0,0,0,.09); transform: translateY(-4px); border-color: var(--g300); }
.mg-prod__img { height: 170px; background: var(--g100); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mg-prod__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.mg-prod:hover .mg-prod__img img { transform: scale(1.05); }
.mg-prod__body { padding: 14px 16px; }
.mg-prod__brand { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--green); margin-bottom: 4px; }
.mg-prod__name  { font-size: 14px; font-weight: 700; color: var(--charcoal); line-height: 1.3; margin-bottom: 3px; }
.mg-prod__sku   { font-size: 11px; color: var(--g500); margin-bottom: 12px; }
.mg-prod__foot  { display: flex; justify-content: space-between; align-items: center; padding-top: 11px; border-top: 1px solid var(--g100); }
.mg-prod__price { font-size: 17px; font-weight: 800; color: var(--charcoal); letter-spacing: -0.02em; }
.mg-prod__cta   { font-size: 12px; font-weight: 700; color: var(--orange); text-decoration: none; display: flex; align-items: center; gap: 4px; transition: gap .15s; }
.mg-prod__cta:hover { gap: 8px; }

/* ─── CTA banner ────────────────────────────────────────────── */
.mg-cta { background: var(--dark); padding: 60px 32px; text-align: center; }
.mg-cta h2 { font-size: 30px; font-weight: 800; color: var(--white); letter-spacing: -0.03em; margin-bottom: 8px; }
.mg-cta p  { font-size: 15px; color: rgba(255,255,255,.5); margin-bottom: 22px; }
.mg-cta__num { font-size: 46px; font-weight: 800; color: var(--white); display: block; text-decoration: none; letter-spacing: -0.04em; margin-bottom: 8px; transition: color .15s; }
.mg-cta__num:hover { color: #f0a070; }
.mg-cta__hrs { font-size: 11px; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: .09em; margin-bottom: 26px; }
.mg-cta__btn { display: inline-flex; align-items: center; gap: 8px; background: var(--orange); color: var(--white); padding: 13px 28px; border-radius: var(--r); font-size: 14px; font-weight: 700; text-decoration: none; transition: background .2s, transform .2s; }
.mg-cta__btn:hover { background: var(--orange-hov); transform: translateY(-2px); color: var(--white); }

/* ─── Footer ────────────────────────────────────────────────── */
.mg-footer { background: var(--dark); padding: 52px 32px 28px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }

/* Logo in footer — white pill background so logo is always visible */
.mg-footer__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mg-footer__logo img { height: 46px; width: auto; display: block; background: var(--white); border-radius: var(--r); padding: 4px 8px; }
.mg-footer__logo-name { font-size: 15px; font-weight: 800; color: var(--white); letter-spacing: -0.02em; line-height: 1.2; }
.mg-footer__logo-tag  { font-size: 11px; color: rgba(255,255,255,.4); display: block; }

.mg-footer__about { font-size: 12px; color: rgba(255,255,255,.38); line-height: 1.75; }
.mg-footer__col h4 { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.28); margin-bottom: 14px; }
.mg-footer__col a { display: block; font-size: 13px; color: rgba(255,255,255,.52); text-decoration: none; margin-bottom: 8px; transition: color .15s; }
.mg-footer__col a:hover { color: var(--white); }
.mg-footer__phone { font-size: 18px !important; font-weight: 800 !important; color: var(--orange) !important; letter-spacing: -0.02em !important; }
.mg-footer__hours { font-size: 11px; color: rgba(255,255,255,.28); margin-top: 6px; line-height: 1.7; }
.mg-fbot { background: var(--black); padding: 12px 32px; display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,.22); }

/* ─── Mobile ────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .mg-header__nav { display: none; }
  .mg-brands__grid { grid-template-columns: repeat(3, 1fr); }
  .mg-brand-card--stihl { grid-column: span 3; }
}
@media (max-width: 768px) {
  .mg-topbar { padding: 7px 16px; flex-direction: column; gap: 2px; text-align: center; }
  .mg-header__row { padding: 0 16px; gap: 10px; }
  .mg-search { display: none; }
  .mg-hero { height: auto; min-height: 500px; }
  .mg-hero__content { padding: 60px 20px; max-width: 100%; }
  .mg-hero h1 { font-size: 30px; }
  .mg-sec { padding: 28px 16px; }
  .mg-cats { grid-template-columns: repeat(2, 1fr) !important; }
  .mg-cats .mg-cat:last-child { grid-column: span 1 !important; }
  .mg-prods { grid-template-columns: 1fr; }
  .mg-brands { padding: 36px 16px; }
  .mg-brands__grid { grid-template-columns: repeat(2, 1fr); }
  .mg-brand-card--stihl { grid-column: span 2; }
  .mg-footer { grid-template-columns: 1fr 1fr; padding: 36px 16px 20px; gap: 24px; }
  .mg-fbot { padding: 12px 16px; flex-direction: column; gap: 4px; text-align: center; }
  .mg-cta__num { font-size: 32px; }
}

/* ═══════════════════════════════════════════════════════════════
   WOOCOMMERCE PAGES
═══════════════════════════════════════════════════════════════ */

/* Hide Astra header/footer on all WooCommerce pages */
body.woocommerce .site-header,
body.woocommerce-page .site-header,
body.woocommerce #masthead,
body.woocommerce-page #masthead { display: none !important; }

body.woocommerce #content,
body.woocommerce-page #content,
body.woocommerce .site-content,
body.woocommerce-page .site-content { padding: 0 !important; margin: 0 !important; max-width: 100% !important; }

/* WooCommerce breadcrumb */
.woocommerce-breadcrumb {
  font-size: 12px;
  color: var(--g500);
  padding: 14px 0;
  margin: 0;
  background: none;
}
.woocommerce-breadcrumb a { color: var(--g500); text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--orange); }

/* ─── Category hero ───────────────────────────────────────── */
.mg-cat-hero {
  position: relative;
  height: 240px;
  background: var(--charcoal);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.mg-cat-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.28) 100%);
}
.mg-cat-hero__content {
  position: relative;
  z-index: 2;
  padding: 28px 32px;
  width: 100%;
}
.mg-cat-hero .woocommerce-breadcrumb { color: rgba(255,255,255,.55); padding: 0 0 8px; }
.mg-cat-hero .woocommerce-breadcrumb a { color: rgba(255,255,255,.55); }
.mg-cat-hero__title {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}
.mg-cat-hero__desc { font-size: 14px; color: rgba(255,255,255,.65); margin: 0 0 6px; }
.mg-cat-hero__count {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Shop page header */
.mg-shop-header {
  background: var(--g100);
  border-bottom: 1px solid var(--g200);
  padding: 24px 32px;
}
.mg-shop-header__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.03em;
  margin: 0 0 4px;
}
.mg-shop-header .woocommerce-breadcrumb { padding: 0; }

/* ─── Shop body layout ────────────────────────────────────── */
.mg-shop-body {
  display: flex;
  gap: 0;
  min-height: 600px;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.mg-shop-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--g200);
  padding: 24px 20px;
  background: var(--white);
}
.mg-sidebar-block { margin-bottom: 28px; }
.mg-sidebar-block__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--g500);
  margin: 0 0 14px;
}

/* Override WooCommerce price filter widget */
.mg-shop-sidebar .price_slider_wrapper .ui-slider { background: var(--g200) !important; height: 4px !important; border: none !important; border-radius: 2px !important; }
.mg-shop-sidebar .price_slider_wrapper .ui-slider-range { background: var(--orange) !important; }
.mg-shop-sidebar .price_slider_wrapper .ui-slider-handle { background: var(--orange) !important; border: none !important; width: 14px !important; height: 14px !important; top: -5px !important; border-radius: 50% !important; cursor: pointer !important; }
.mg-shop-sidebar .price_slider_amount .button {
  background: var(--charcoal) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: var(--r) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 7px 14px !important;
  cursor: pointer !important;
}
.mg-shop-sidebar .price_slider_amount { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mg-shop-sidebar .price_slider_amount .price_label { font-size: 12px; color: var(--g500); }

/* Category list */
.mg-sidebar-cats { list-style: none; margin: 0; padding: 0; }
.mg-sidebar-cats li { border-bottom: 1px solid var(--g100); }
.mg-sidebar-cats__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 13px;
  color: var(--g700);
  text-decoration: none;
  transition: color .15s;
}
.mg-sidebar-cats__link:hover { color: var(--orange); }
.mg-sidebar-cats__link--active { color: var(--orange) !important; font-weight: 700; }
.mg-sidebar-cats__count {
  font-size: 11px;
  color: var(--g500);
  background: var(--g100);
  padding: 2px 7px;
  border-radius: 10px;
}

/* ─── Main shop area ──────────────────────────────────────── */
.mg-shop-main { flex: 1; padding: 24px 28px; min-width: 0; }

/* Toolbar */
.mg-shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--g200);
}
.mg-shop-toolbar .woocommerce-result-count {
  font-size: 13px;
  color: var(--g500);
  margin: 0;
}
.mg-shop-toolbar .woocommerce-ordering select {
  font-size: 13px;
  color: var(--charcoal);
  border: 1px solid var(--g200);
  border-radius: var(--r);
  padding: 6px 10px;
  background: var(--white);
  outline: none;
  cursor: pointer;
}

/* ─── Product grid ────────────────────────────────────────── */
.mg-prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* On category pages with sidebar, use 3 cols */
.mg-shop-main .mg-prod-grid { grid-template-columns: repeat(3, 1fr); }

.mg-prod-card {
  border: 1px solid var(--g200);
  border-radius: var(--rlg);
  overflow: hidden;
  background: var(--white);
  text-decoration: none;
  display: block;
  transition: box-shadow .25s, transform .25s var(--ease), border-color .25s;
}
.mg-prod-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.09);
  transform: translateY(-3px);
  border-color: var(--g300);
}
.mg-prod-card__img {
  height: 180px;
  background: var(--g100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mg-prod-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.mg-prod-card:hover .mg-prod-card__img img { transform: scale(1.04); }
.mg-prod-card__img-placeholder {
  width: 56px; height: 56px;
  background: var(--g300);
  border-radius: var(--r);
}
.mg-prod-card__body { padding: 12px 14px; }
.mg-prod-card__sku  { font-size: 10px; color: var(--g500); margin-bottom: 4px; letter-spacing: .02em; }
.mg-prod-card__name { font-size: 13px; font-weight: 700; color: var(--charcoal); line-height: 1.35; margin-bottom: 10px; }
.mg-prod-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--g100);
  padding-top: 10px;
}
.mg-prod-card__price { font-size: 16px; font-weight: 800; color: var(--charcoal); letter-spacing: -0.02em; }
.mg-prod-card__price .woocommerce-Price-amount { color: var(--charcoal); }
.mg-prod-card__action { font-size: 11px; font-weight: 700; color: var(--orange); }

/* ─── Pagination ──────────────────────────────────────────── */
.mg-pagination { margin-top: 32px; display: flex; justify-content: center; }
.mg-pagination .woocommerce-pagination ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.mg-pagination .woocommerce-pagination ul li a,
.mg-pagination .woocommerce-pagination ul li span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--g200);
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  color: var(--g700);
  text-decoration: none;
  transition: all .15s;
}
.mg-pagination .woocommerce-pagination ul li a:hover { border-color: var(--orange); color: var(--orange); }
.mg-pagination .woocommerce-pagination ul li span.current { background: var(--orange); border-color: var(--orange); color: var(--white); }

/* ─── No products ─────────────────────────────────────────── */
.mg-no-products {
  text-align: center;
  padding: 60px 20px;
  color: var(--g500);
}
.mg-no-products p { margin-bottom: 20px; font-size: 15px; }
.mg-btn-outline {
  display: inline-block;
  padding: 11px 24px;
  border: 2px solid var(--orange);
  border-radius: var(--r);
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
}
.mg-btn-outline:hover { background: var(--orange); color: var(--white); }

/* ─── Single product page ─────────────────────────────────── */
.mg-product-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 48px;
}
.mg-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 8px;
}

/* Product gallery */
.mg-product-gallery .woocommerce-product-gallery { margin: 0 !important; }
.mg-product-gallery .woocommerce-product-gallery__wrapper img { border-radius: var(--rlg); }
.mg-product-gallery .flex-viewport { border-radius: var(--rlg); overflow: hidden; }

/* Product info */
.mg-product-info .product_title {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: var(--charcoal) !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
  margin: 0 0 12px !important;
}
.mg-product-info .woocommerce-Price-amount {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--charcoal) !important;
}
.mg-product-info .price { margin-bottom: 16px !important; }

/* Variations / sizes */
.mg-product-info .variations { width: 100% !important; border: none !important; margin-bottom: 16px !important; }
.mg-product-info .variations td, .mg-product-info .variations th { padding: 4px 0 !important; border: none !important; }
.mg-product-info .variations label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--g500); }
.mg-product-info .variable-items-wrapper { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mg-product-info .variable-item {
  padding: 7px 14px !important;
  border: 1.5px solid var(--g200) !important;
  border-radius: var(--r) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--charcoal) !important;
  background: var(--white) !important;
  cursor: pointer;
  transition: border-color .15s;
}
.mg-product-info .variable-item:hover,
.mg-product-info .variable-item.selected { border-color: var(--orange) !important; color: var(--orange) !important; }

/* Product meta (SKU, category) */
.mg-product-info .product_meta { font-size: 12px; color: var(--g500); margin-top: 12px; }
.mg-product-info .product_meta a { color: var(--g500); text-decoration: none; }
.mg-product-info .product_meta a:hover { color: var(--orange); }

/* Hide default add to cart — we use our own CTA box */
.mg-product-info .cart { display: none; }

/* CTA Box */
.mg-product-cta-box {
  margin-top: 20px;
}
.mg-product-cta-box__inner {
  background: var(--charcoal);
  border-radius: var(--rlg);
  padding: 24px;
  text-align: center;
}
.mg-product-cta-box__label {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 14px;
  font-weight: 600;
}
.mg-product-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  color: var(--white);
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: var(--r);
  letter-spacing: -0.01em;
  transition: background .2s, transform .2s;
  margin-bottom: 12px;
  width: 100%;
  justify-content: center;
}
.mg-product-cta-btn:hover { background: var(--orange-hov); transform: translateY(-1px); color: var(--white); }
.mg-product-cta-box__sku { font-size: 12px; color: rgba(255,255,255,.4); margin: 0 0 4px; }
.mg-product-cta-box__hours { font-size: 11px; color: rgba(255,255,255,.3); margin: 0; }

/* Related products */
.mg-related { margin-top: 52px; padding-top: 32px; border-top: 1px solid var(--g200); }
.mg-related__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

/* ─── Mobile WooCommerce ──────────────────────────────────── */
@media (max-width: 900px) {
  .mg-shop-sidebar { display: none; }
  .mg-shop-main .mg-prod-grid { grid-template-columns: repeat(2, 1fr); }
  .mg-product-layout { grid-template-columns: 1fr; gap: 24px; }
  .mg-product-page { padding: 0 16px 36px; }
  .mg-cat-hero { height: 180px; }
  .mg-cat-hero__title { font-size: 24px; }
}
@media (max-width: 480px) {
  .mg-shop-main .mg-prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mg-shop-main { padding: 16px; }
}

/* ── Logo size fix — force constrained on ALL pages ─────────── */
.mg-logo__img {
  height: 46px !important;
  width: auto !important;
  max-height: 46px !important;
  max-width: 160px !important;
  display: block !important;
  object-fit: contain !important;
}

/* ── Sidebar widget title fix — kill huge heading styles ─────── */
.mg-shop-sidebar .widget-title,
.mg-shop-sidebar .widgettitle,
.mg-shop-sidebar h2,
.mg-shop-sidebar h3,
.mg-sidebar-block h2,
.mg-sidebar-block h3 {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .1em !important;
  color: var(--g500) !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  line-height: 1.4 !important;
}

/* Also target the WooCommerce widget title specifically */
.mg-shop-sidebar .woocommerce-widget-layered-nav-list,
.mg-shop-sidebar .price_slider_wrapper { margin-top: 0 !important; }

/* ── Related products mobile fix ─────────────────────────── */
@media (max-width: 600px) {
  .mg-related .mg-prod-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .mg-prod-card__img { height: 130px !important; }

  /* Logo mobile — constrain the whole header */
  .mg-header__row { padding: 0 12px !important; gap: 8px !important; height: 56px !important; }
  .mg-logo__name { font-size: 13px !important; }
  .mg-logo__tag { display: none !important; }
  .mg-logo__img { height: 36px !important; max-height: 36px !important; }
  .mg-header__nav { display: none !important; }
  .mg-search { display: none !important; }
  .mg-header__cta { padding: 0 12px !important; }
  .mg-header__cta-num { font-size: 12px !important; }
}

/* ── Mobile header complete overhaul ────────────────────────── */
@media (max-width: 768px) {
  /* Top bar — single line, smaller */
  .mg-topbar {
    padding: 6px 16px !important;
    flex-direction: row !important;
    gap: 0 !important;
  }
  .mg-topbar__left {
    font-size: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }
  .mg-topbar__right { font-size: 10px !important; }

  /* Header row — tight single row */
  .mg-header__row {
    height: 58px !important;
    padding: 0 16px !important;
    gap: 10px !important;
  }

  /* Logo — small and tight */
  .mg-logo { gap: 8px !important; }
  .mg-logo__img {
    height: 34px !important;
    max-height: 34px !important;
    width: auto !important;
    max-width: 34px !important;
  }
  .mg-logo__name { font-size: 13px !important; letter-spacing: -0.02em !important; }
  .mg-logo__tag  { display: none !important; }

  /* Hide nav and search on mobile */
  .mg-header__nav { display: none !important; }
  .mg-search      { display: none !important; }

  /* CTA button — compact */
  .mg-header__cta {
    padding: 0 14px !important;
    height: 38px !important;
    border-radius: 6px !important;
    margin-left: auto !important;
  }
  .mg-header__cta-label { font-size: 8px !important; }
  .mg-header__cta-num   { font-size: 13px !important; }

  /* Hero — tighter on mobile */
  .mg-hero { min-height: 420px !important; }
  .mg-hero__content { padding: 40px 20px !important; }
  .mg-hero h1 { font-size: 28px !important; }
  .mg-hero__sub { font-size: 14px !important; }

  /* Remove scroll reveal delay on mobile — just show content */
  .mgr { transition-delay: 0s !important; }

  /* View all link — make it more visible */
  .mg-sec__link { color: var(--orange) !important; font-size: 14px !important; }

  /* Section padding tighter */
  .mg-sec { padding: 28px 16px !important; }
  .mg-sec__head { margin-bottom: 14px !important; }
  .mg-sec__title { font-size: 20px !important; }
}

/* ── Top bar mobile — single line, hide if no room ─────────── */
@media (max-width: 768px) {
  .mg-topbar {
    flex-direction: row !important;
    justify-content: center !important;
    padding: 5px 12px !important;
    gap: 6px !important;
  }
  .mg-topbar__left { display: none !important; }
  .mg-topbar__right {
    font-size: 11px !important;
    color: rgba(255,255,255,.75) !important;
    text-align: center !important;
  }

  /* WooCommerce logo match */
  body.woocommerce .mg-logo__img,
  body.woocommerce-page .mg-logo__img {
    height: 34px !important;
    max-height: 34px !important;
    width: auto !important;
    max-width: 34px !important;
  }

  /* All products header — remove excess whitespace */
  .mg-shop-header { padding: 16px !important; }
  .mg-shop-header__title { font-size: 18px !important; margin-bottom: 2px !important; }
}

/* ── All Products page — dark hero banner ───────────────────── */
.mg-shop-header {
  background: var(--charcoal);
  border-bottom: none;
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}
.mg-shop-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,68,10,.08) 0%, transparent 60%);
  pointer-events: none;
}
.mg-shop-header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.mg-shop-header__title {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--white) !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 4px !important;
}
.mg-shop-header .woocommerce-breadcrumb {
  color: rgba(255,255,255,.45) !important;
  padding: 0 !important;
}
.mg-shop-header .woocommerce-breadcrumb a {
  color: rgba(255,255,255,.45) !important;
}
.mg-shop-header .woocommerce-breadcrumb a:hover {
  color: var(--orange) !important;
}

/* ── All products page whitespace fix ───────────────────────── */
.mg-shop-body { margin-top: 0 !important; }
.mg-shop-main { padding-top: 20px !important; }

/* ── Uniform product image height — lock all cards ──────────── */
.mg-prod-card__img {
  height: 200px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  overflow: hidden !important;
  background: #f5f5f3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.mg-prod-card__img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* ── Breadcrumb white on dark shop header ───────────────────── */
.mg-shop-header .woocommerce-breadcrumb,
.mg-shop-header .woocommerce-breadcrumb a { color: rgba(255,255,255,.4) !important; }

/* ── Remove gap between woo pages header and body ───────────── */
.mg-woo { padding: 0 !important; }

/* ═══════════════════════════════════════════════════════════════
   ABOUT PAGE
═══════════════════════════════════════════════════════════════ */

/* Hide Astra on about page */
.page-template-page-about .site-header,
.page-template-page-about #masthead,
.page-template-page-about .ast-hfb-header { display: none !important; }
.page-template-page-about #content,
.page-template-page-about .site-content,
.page-template-page-about .ast-container,
.page-template-page-about .entry-content,
.page-template-page-about .elementor { padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
.page-template-page-about .elementor-section-wrap { display: none !important; }

/* Hero */
.mg-about-hero {
  position: relative;
  height: 420px;
  background: url('https://mgtoolssupplies.com/wp-content/uploads/2025/02/Main-Page-Background.png') center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.mg-about-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.1) 100%);
}
.mg-about-hero__content {
  position: relative;
  z-index: 2;
  padding: 48px 64px;
  max-width: 760px;
}
.mg-about-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--orange);
  margin-bottom: 16px;
}
.mg-about-hero__bar { width: 24px; height: 2px; background: var(--orange); flex-shrink: 0; }
.mg-about-hero__content h1 {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0;
}

/* Who We Are section */
.mg-about-section { padding: 72px 64px; background: var(--white); }
.mg-about-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.mg-about-section__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--orange);
  margin-bottom: 12px;
}
.mg-about-section__text h2 {
  font-size: 30px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  line-height: 1.15;
}
.mg-about-section__text p {
  font-size: 15px;
  color: var(--g700);
  line-height: 1.75;
  margin-bottom: 16px;
}
.mg-about-section__text p:last-of-type { margin-bottom: 28px; }
.mg-about-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  transition: gap .15s;
}
.mg-about-cta-link:hover { gap: 12px; }

/* Image with stat badge */
.mg-about-section__image { position: relative; }
.mg-about-section__image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--rlg);
  display: block;
}
.mg-about-section__image-stat {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--charcoal);
  border-radius: var(--rlg);
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.mg-about-section__image-stat-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.04em;
  line-height: 1;
}
.mg-about-section__image-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

/* Pillars */
.mg-about-pillars { background: var(--g100); padding: 64px; border-top: 1px solid var(--g200); }
.mg-about-pillars__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.mg-about-pillar { text-align: left; }
.mg-about-pillar__icon {
  width: 48px;
  height: 48px;
  background: #fff4f0;
  border: 2px solid #f5c4a8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--orange);
}
.mg-about-pillar h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.mg-about-pillar p {
  font-size: 13px;
  color: var(--g500);
  line-height: 1.7;
  margin: 0;
}

/* Stats strip */
.mg-about-stats {
  background: var(--charcoal);
  display: flex;
}
.mg-about-stat {
  flex: 1;
  padding: 32px 24px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.08);
}
.mg-about-stat:last-child { border-right: none; }
.mg-about-stat__num {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.mg-about-stat__label {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

/* Mobile */
@media (max-width: 900px) {
  .mg-about-hero { height: 320px; }
  .mg-about-hero__content { padding: 32px 20px; }
  .mg-about-section { padding: 40px 20px; }
  .mg-about-section__inner { grid-template-columns: 1fr; gap: 32px; }
  .mg-about-section__image img { height: 280px; }
  .mg-about-section__image-stat { bottom: 12px; left: 12px; }
  .mg-about-pillars { padding: 36px 20px; }
  .mg-about-pillars__inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .mg-about-stats { flex-wrap: wrap; }
  .mg-about-stat { flex: 0 0 50%; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ── About page Elementor + Astra overrides ─────────────────── */
.page-template-page-about .ast-above-header-bar,
.page-template-page-about .ast-primary-header-bar,
.page-template-page-about #ast-fixed-header,
.page-template-page-about .ast-hfb-header,
.page-template-page-about .elementor-section-wrap,
.page-template-page-about .elementor-inner,
.page-template-page-about > #page > #content > .ast-container { display: none !important; }

/* Make our #mg-site the only visible content */
.page-template-page-about #mg-site { display: block !important; }
.page-template-page-about #page { padding: 0 !important; margin: 0 !important; }
.page-template-page-about body { padding-top: 0 !important; }

/* Fix h1 on about page — Elementor may be making it huge */
.mg-about-hero__content h1 {
  font-size: clamp(22px, 3vw, 38px) !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.12 !important;
  letter-spacing: -0.03em !important;
  margin: 0 !important;
  padding: 0 !important;
}
.mg-about-section__text h2 {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #1c1c1c !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 18px !important;
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT PAGE — Elementor reskin (works WITH Elementor)
═══════════════════════════════════════════════════════════════ */

/* Inject our header on about page via CSS positioning */
.page-template-page-about #mg-site {
  position: relative;
  z-index: 999;
}

/* Hide the old Astra header on about page */
.page-template-page-about .site-header,
.page-template-page-about #masthead,
.page-template-page-about .ast-hfb-header { display: none !important; }

/* Reskin Elementor headings to match our design */
.page-template-page-about .elementor-heading-title {
  font-family: var(--font) !important;
  letter-spacing: -0.03em !important;
}

/* Reskin blue accent lines to orange */
.page-template-page-about .elementor-widget-divider .elementor-divider-separator {
  border-color: var(--orange) !important;
}

/* Body text styling */
.page-template-page-about .elementor-widget-text-editor {
  font-size: 15px !important;
  line-height: 1.75 !important;
  color: var(--g700) !important;
}

/* Remove padding-top that Astra adds for transparent header */
.page-template-page-about #page,
.page-template-page-about .ast-page-builder-template {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
