/*
Theme Name: Sumax Engineering Corporate
Theme URI: https://sumaxboilers.com
Author: Sumax Corporate Digital Team
Author URI: https://sumaxboilers.com
Description: Premium light-themed corporate WordPress theme for Sumax Boilers and HP Oils Super Stockist. Built with native Gutenberg blocks, Advanced Custom Fields (ACF), and full product catalogue management.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: sumax-theme
Tags: engineering, industrial, boilers, gutenberg-compatible, acf, responsive, custom-post-types, light-theme
*/

/* ── GLOBAL RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: #ffffff;
  color: #1f2937;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── BRAND TOKENS ─────────────────────────────────────────────────── */
:root {
  --brand-red:    #E63946;
  --brand-dark:   #1A1A2E;
  --brand-yellow: #FFB703;
  --brand-cyan:   #00B4D8;
  --surface:      #F8F9FA;
  --surface-2:    #F1F3F5;
  --border:       #e5e7eb;
  --text-muted:   #6b7280;
}

/* ── SCROLLBAR ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f3f5; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-red); }

/* ── TYPOGRAPHY ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.15;
}

p { color: #374151; line-height: 1.75; }
a { color: var(--brand-red); text-decoration: none; transition: color .2s; }
a:hover { color: #C92A37; }

/* ── BUTTONS ──────────────────────────────────────────────────────── */
.sumax-btn, .wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.75rem;
  background: var(--brand-red);
  color: #fff !important;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700; font-size: .9rem;
  border-radius: .75rem; border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(230,57,70,.3);
  transition: all .25s ease; text-decoration: none;
}
.sumax-btn:hover, .wp-block-button .wp-block-button__link:hover {
  background: #C92A37 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(230,57,70,.45);
  color: #fff !important;
}

/* ── CARDS ────────────────────────────────────────────────────────── */
.sumax-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: all .3s ease;
  overflow: hidden;
}
.sumax-card:hover {
  border-color: var(--brand-red);
  box-shadow: 0 16px 40px -12px rgba(230,57,70,.15), 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-4px);
}

/* ── PRODUCT CARDS (CPT Archive) ──────────────────────────────────── */
.sumax-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.sumax-product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  transition: all .3s ease;
  display: flex; flex-direction: column;
}
.sumax-product-card:hover {
  border-color: var(--brand-red);
  box-shadow: 0 20px 40px -15px rgba(230,57,70,.2);
  transform: translateY(-5px);
}
.sumax-product-card img {
  width: 100%; height: 220px; object-fit: cover;
}
.sumax-product-card .card-body {
  padding: 1.5rem; flex: 1; display: flex; flex-direction: column;
}
.sumax-product-card .card-category {
  font-family: "JetBrains Mono", monospace;
  font-size: .7rem; font-weight: 700;
  color: var(--brand-red);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: .5rem;
}
.sumax-product-card h3 {
  font-size: 1.15rem; margin-bottom: .75rem;
  font-family: "Syne", sans-serif;
}
.sumax-product-card p {
  font-size: .875rem; color: #6b7280;
  flex: 1; margin-bottom: 1rem;
}
.sumax-product-card .card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.sumax-product-card .spec-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: .7rem; font-weight: 600;
  background: rgba(230,57,70,.08);
  color: var(--brand-red);
  padding: .25rem .625rem; border-radius: 9999px;
  border: 1px solid rgba(230,57,70,.2);
}

/* ── PRODUCT FILTERS (Catalogue) ──────────────────────────────────── */
.sumax-filter-bar {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 2rem;
}
.sumax-filter-btn {
  padding: .45rem 1rem;
  background: #f3f4f6;
  color: #374151;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: .8rem; font-weight: 600;
  border-radius: .5rem; border: 1px solid var(--border);
  cursor: pointer; transition: all .2s;
}
.sumax-filter-btn:hover, .sumax-filter-btn.active {
  background: var(--brand-red);
  color: #fff; border-color: var(--brand-red);
}

/* ── SINGLE PRODUCT PAGE ──────────────────────────────────────────── */
.sumax-single-product {
  max-width: 1100px; margin: 3rem auto; padding: 0 1.5rem;
}
.sumax-product-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: start; margin-bottom: 3rem;
}
@media (max-width: 768px) {
  .sumax-product-hero { grid-template-columns: 1fr; }
}
.sumax-product-hero img {
  border-radius: 1rem; width: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}
.sumax-spec-table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-size: .875rem;
}
.sumax-spec-table th {
  background: var(--surface);
  font-family: "JetBrains Mono", monospace;
  font-size: .75rem; font-weight: 700;
  color: var(--brand-red); text-transform: uppercase;
  letter-spacing: .05em; padding: .75rem 1rem;
  text-align: left; border-bottom: 2px solid var(--border);
}
.sumax-spec-table td {
  padding: .75rem 1rem; border-bottom: 1px solid var(--border);
  color: #374151;
}
.sumax-spec-table tr:hover td { background: #fef2f2; }

/* ── SECTION UTILITIES ────────────────────────────────────────────── */
.section-badge {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .3rem .875rem;
  background: rgba(230,57,70,.08);
  border: 1px solid rgba(230,57,70,.25);
  color: var(--brand-red);
  font-family: "JetBrains Mono", monospace;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 9999px;
}
.section-line {
  width: 3rem; height: 3px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
  border-radius: 9999px; margin: 1rem 0;
}
.stat-number {
  font-family: "Syne", sans-serif; font-weight: 900;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-red) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── HEADER & NAV (WP) ────────────────────────────────────────────── */
#site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.nav-container {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 68px;
}
.nav-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.nav-logo .logo-icon {
  width: 40px; height: 40px; background: var(--brand-red);
  border-radius: .75rem; display: flex; align-items: center; justify-content: center;
}
.nav-logo .logo-text { font-family: "Syne", sans-serif; font-weight: 900; font-size: 1.25rem; color: var(--brand-dark); letter-spacing: .1em; }
.nav-logo .logo-sub { font-family: "JetBrains Mono", monospace; font-size: .65rem; color: var(--brand-red); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* WP Nav Menu */
#primary-menu {
  display: flex; align-items: center; list-style: none; gap: .25rem;
  font-family: "Plus Jakarta Sans", sans-serif; font-size: .875rem; font-weight: 600;
}
#primary-menu > li > a {
  padding: .5rem .75rem; border-radius: .5rem; color: #374151;
  text-decoration: none; transition: all .2s; display: block;
}
#primary-menu > li > a:hover, #primary-menu > li.current-menu-item > a {
  background: #fef2f2; color: var(--brand-red);
}
#primary-menu .sub-menu {
  position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 1rem; box-shadow: 0 20px 40px rgba(0,0,0,.12);
  min-width: 220px; list-style: none; padding: .5rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px); transition: all .2s;
}
#primary-menu li:hover > .sub-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
#primary-menu .sub-menu a {
  display: block; padding: .6rem .875rem; border-radius: .5rem;
  color: #374151; font-weight: 500; font-size: .8rem;
  transition: all .2s;
}
#primary-menu .sub-menu a:hover { background: #fef2f2; color: var(--brand-red); }

/* ── FOOTER ───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand-dark); color: #9ca3af;
  padding: 4rem 0 2rem;
}
.site-footer h4 { color: #fff; font-family: "Syne", sans-serif; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #9ca3af; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #fff; }

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sumax-product-grid { grid-template-columns: repeat(2, 1fr); }
  #primary-menu { display: none; }
}
@media (max-width: 640px) {
  .sumax-product-grid { grid-template-columns: 1fr; }
}

/* ── ADMIN BAR FIX ────────────────────────────────────────────────── */
.admin-bar #site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #site-header { top: 46px; } }
