/* Southern Meter Box — Modern Stylesheet */

/* ── Reset & Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #0789ff;
  --blue-dark: #044865;
  --blue-darker: #022f44;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --font: 'Inter', 'Raleway', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue-dark); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo img {
  height: 40px;
  width: auto;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: .3s;
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 15px;
  color: var(--gray-700);
  transition: background .2s, color .2s;
  text-transform: capitalize;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--blue);
  color: var(--white);
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.45);
}
.hero-content {
  position: relative;
  text-align: center;
  color: var(--white);
  padding: 60px 16px;
  max-width: 700px;
}
.hero-content h1 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-content p {
  font-size: 18px;
  margin-bottom: 28px;
  opacity: .9;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
  border: 2px solid transparent;
  text-align: center;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.7);
  margin-left: 12px;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border-color: var(--white);
}

/* ── Category Cards ──────────────────────────────────────────────── */
.categories-section {
  padding: 60px 0;
  background: var(--gray-50);
}
.categories-section h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 32px;
  color: var(--gray-800);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.cat-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 15px;
  transition: transform .2s, box-shadow .2s, background .2s;
  border: 2px solid transparent;
  min-height: 100px;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Welcome Section ─────────────────────────────────────────────── */
.welcome-section {
  padding: 60px 0;
}
.welcome-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.welcome-img img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
}
.welcome-text h2 {
  font-size: 28px;
  margin-bottom: 16px;
  color: var(--gray-800);
}
.welcome-text p {
  margin-bottom: 16px;
  color: var(--gray-600);
}

/* ── Product Grid ────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  background: var(--white);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card-img {
  height: 200px;
  overflow: hidden;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-title {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.3;
}

/* ── Catalog Sections ────────────────────────────────────────────── */
.main-content {
  padding: 40px 0 60px;
}
.main-content > .container > h1 {
  font-size: 32px;
  margin-bottom: 32px;
  color: var(--gray-800);
  border-bottom: 3px solid var(--blue);
  padding-bottom: 12px;
}
.catalog-section {
  margin-bottom: 48px;
}
.catalog-section h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--blue-dark);
}
.catalog-section h2 a {
  color: var(--blue-dark);
}
.catalog-section h2 a:hover {
  color: var(--blue);
}

/* Category filter */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.filter-link {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-600);
  transition: all .2s;
}
.filter-link:hover, .filter-link.active {
  background: var(--blue);
  color: var(--white);
}

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--gray-500);
}
.breadcrumb a:hover {
  color: var(--blue);
}

/* ── Product Detail ──────────────────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.product-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.product-img-main,
.product-img-photo {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
}
.product-info {
  padding-top: 8px;
}
.product-desc {
  margin-bottom: 24px;
  color: var(--gray-600);
  line-height: 1.7;
}
.product-desc p { margin-bottom: 12px; }
.product-spec {
  margin-bottom: 20px;
}
.product-spec strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gray-700);
}
.product-spec ul {
  list-style: none;
  padding: 0;
}
.product-spec li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
  color: var(--gray-600);
}
.product-spec li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--blue);
}
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.product-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.product-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}
.pager-prev, .pager-next {
  padding: 10px 20px;
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14px;
}
.pager-prev:hover, .pager-next:hover {
  background: var(--blue-dark);
  color: var(--white);
}

/* ── About Page ──────────────────────────────────────────────────── */
.about-content {
  max-width: 100%;
}
.about-content p {
  margin-bottom: 20px;
  color: var(--gray-600);
  line-height: 1.8;
}
.float-left {
  float: left;
  margin: 0 24px 16px 0;
  border-radius: var(--radius);
  width: 320px;
}
.float-right {
  float: right;
  margin: 0 0 16px 24px;
  border-radius: var(--radius);
  width: 320px;
}

/* ── Text Content Pages ──────────────────────────────────────────── */
.text-content {
  max-width: 100%;
}
.text-content h3 {
  font-size: 18px;
  margin: 28px 0 8px;
  color: var(--blue-dark);
}
.text-content h3:first-child { margin-top: 0; }
.text-content p {
  margin-bottom: 12px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* American Made */
.am-content { max-width: 100%; }
.am-letter {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  border-left: 4px solid var(--blue);
}
.am-letter h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--blue-dark);
}
.am-date {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.am-letter p { margin-bottom: 12px; color: var(--gray-600); }

/* ── Contact Page ────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-card {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.contact-card img {
  height: 32px;
  width: auto;
  margin-bottom: 12px;
}
.contact-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--blue-dark);
}
.contact-card p {
  margin-bottom: 8px;
  color: var(--gray-600);
  font-size: 15px;
}
.contact-form-wrapper h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--gray-800);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 4px;
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7,137,255,.15);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
}
.footer-locations {
  background: var(--blue);
  color: var(--white);
  padding: 40px 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.loc-card { }
.footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 12px;
  filter: brightness(10);
}
.loc-card p {
  margin-bottom: 4px;
  font-size: 15px;
  opacity: .9;
}
.loc-card a {
  color: var(--white);
  font-weight: 600;
}
.loc-card a:hover { opacity: .8; }
.footer-bottom {
  background: var(--blue-darker);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 16px;
  font-size: 14px;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--gray-200);
  }
  .site-header.nav-open .main-nav {
    display: block;
  }
  .nav-links {
    flex-direction: column;
    padding: 8px;
  }
  .nav-links a {
    padding: 12px 16px;
    border-radius: 0;
    font-size: 16px;
  }

  .welcome-content {
    grid-template-columns: 1fr;
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero { min-height: 320px; }
  .hero-content h1 { font-size: 28px; }
  .btn-outline-light { margin-left: 0; margin-top: 10px; }

  .float-left, .float-right {
    float: none;
    margin: 0 0 16px 0;
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card-img { height: 150px; }
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Print ───────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .cat-filter, .product-actions,
  .product-links, .product-pager, .breadcrumb, .nav-toggle { display: none; }
  .product-detail { grid-template-columns: 1fr 1fr; }
  body { font-size: 12px; }
}
