/* ============================================================
   zzhchem.com V4 Design System
   Industrial B2B Chemical Manufacturer
   ============================================================ */

/* ============ 1. Design Tokens ============ */
:root {
    --primary: #0B2D5C;
    --primary-light: #134a8f;
    --primary-dark: #061d3a;
    --accent: #1BA6A6;
    --cta: #FF8A00;
    --cta-hover: #e67a00;
    --gray-bg: #F4F6F8;
    --border: #EAECEF;
    --text: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --radius: 8px;
    --radius-lg: 12px;
    --space: 8px;
}

/* ============ 2. Reset & Typography ============ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--gray-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: 700;
    margin: 0 0 var(--space);
}
h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 calc(var(--space) * 2); color: var(--text-muted); line-height: 1.7; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

::selection { background: var(--primary); color: #fff; }

/* ============ 3. Header & Navigation ============ */
#header {
    background: var(--white) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
#header .logo a { color: var(--primary) !important; font-weight: 800; }

/* Mega Menu */
.nav-desktop .menu-item {
    position: relative;
}
.nav-desktop .menu-item > a {
    color: var(--text) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.nav-desktop .menu-item > a:hover {
    background: var(--gray-bg);
    color: var(--primary) !important;
}
/* Dropdown */
.nav-desktop .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    padding: 8px 0;
    z-index: 100;
}
.nav-desktop .menu-item:hover .sub-menu { display: block; }
.nav-desktop .sub-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--text) !important;
    font-size: 0.9rem;
}
.nav-desktop .sub-menu a:hover { background: var(--gray-bg); }

/* Mobile nav */
@media (max-width: 768px) {
    #header .container { padding: 0 16px; }
}

/* ============ 4. Button System ============ */
.btn, button[type=submit], .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}
/* Primary - Orange CTA */
.btn-primary {
    background: var(--cta);
    color: #fff !important;
}
.btn-primary:hover { background: var(--cta-hover); }

/* Secondary - Blue border */
.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary) !important;
}
.btn-secondary:hover { background: var(--primary); color: #fff !important; }

/* Ghost - No background */
.btn-ghost {
    background: transparent;
    color: var(--primary) !important;
}
.btn-ghost:hover { background: var(--gray-bg); }

/* Sticky Get Quote */
.sticky-quote {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    background: var(--cta);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(255,138,0,0.3);
    text-decoration: none !important;
    transition: transform 0.15s;
}
.sticky-quote:hover { transform: translateY(-2px); color: #fff !important; }

/* ============ 5. Card System ============ */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, border-color 0.15s;
}
.card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}
.card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 14px;
}
.card h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
}
.card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}
.card .tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--gray-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}
.card .actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ============ 6. Hero Section ============ */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url(/user/images/factory-hero.jpg) center/cover;
    opacity: 0.15;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.05rem; max-width: 600px; margin: 0 auto 24px; }
.hero .trust-badges {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.hero .trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 500;
}
.hero .trust-badge::before { content: "\2713"; color: var(--accent); font-weight: 700; }
.hero .hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ 7. Section Styles ============ */
.section {
    padding: 60px 20px;
}
.section-light { background: var(--gray-bg); }
.section-dark { background: var(--primary-dark); color: #fff; }
.section-dark h2 { color: #fff; }

/* Section title */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 { margin-bottom: 8px; }
.section-title p { max-width: 600px; margin: 0 auto; }

/* ============ 8. Tables ============ */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
thead th {
    background: var(--primary);
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: center;
}
tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
}
tbody tr:nth-child(even) td { background: var(--gray-bg); }
tbody td:first-child {
    background: #edf2f9;
    font-weight: 600;
    color: var(--primary);
    text-align: left;
}

/* Diagonal header */
.slash-header {
    position: relative;
    min-width: 100px;
    background: var(--primary-dark) !important;
}
.slash-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(255,255,255,0.2) 50%, transparent calc(50% + 1px));
    pointer-events: none;
}
.slash-top { position: absolute; top: 10px; right: 20px; font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.8); z-index: 1; }
.slash-bottom { position: absolute; bottom: 10px; left: 20px; font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.8); z-index: 1; }

/* ============ 9. Form Styles ============ */
input, textarea, select {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    width: 100%;
    box-sizing: border-box;
    background: var(--white);
    transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(11,45,92,0.08);
}

/* Quick Quote Box */
.quote-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}
.quote-box h3 { margin-bottom: 16px; }

/* ============ 10. Footer ============ */
#footer {
    background: var(--primary-dark) !important;
    color: #889bb3 !important;
    padding: 40px 20px 30px !important;
    text-align: center;
    font-size: 0.88rem;
    line-height: 2;
    border-top: 3px solid var(--primary);
}
#footer .footer-content { max-width: 800px; margin: 0 auto; }
#footer .footer-strong { color: #c8d6e8; font-weight: 600; }
#footer a { color: #c8d6e8 !important; }
#footer a:hover { color: #fff !important; }
#footer .footer-copyright { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; }

/* ============ 11. Download Cards ============ */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.doc-card {
    display: flex;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.15s;
}
.doc-card:hover { border-color: var(--primary-light); }
.doc-card .doc-icon { font-size: 1.6rem; flex-shrink: 0; }
.doc-card .doc-body { flex: 1; }
.doc-card h4 { font-size: 0.95rem; margin: 0 0 4px; }
.doc-card p { font-size: 0.8rem; margin: 0 0 10px; }
.doc-card .doc-actions { display: flex; gap: 8px; }

/* ============ 12. Utility Classes ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden-mobile { display: none; }

/* ============ 13. Responsive ============ */
@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .hero { padding: 50px 16px 40px; }
    .section { padding: 40px 16px; }
    table { font-size: 0.78rem; }
    thead th, tbody td { padding: 8px 10px; }
    .sticky-quote { bottom: 16px; right: 16px; padding: 12px 20px; font-size: 0.9rem; }
}
@media (min-width: 769px) {
    .hidden-mobile { display: block; }
}
/* Timeline */
.tl-item { position: relative; margin-bottom: 20px; padding-left: 20px; }
.tl-item::before { content:""; position:absolute; left:-33px; top:6px; width:12px; height:12px; background:var(--primary); border:2px solid #fff; border-radius:50%; box-shadow:0 0 0 2px var(--primary); }
