/* SPM — Special Powder Materials
   Isolated from index.html <style> block
   Current live tokens (light theme)
*/
:root {
    --primary-color: #26272B;
    --accent-color: #C06020;
    --accent-dark: #8C4010;
    --bg-color: #F8F9FA;
    --text-color: #333333;
    --white: #FFFFFF;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

/* Scalable Language Toggle System */
body:not(.en) .lang-en {
    display: none !important;
}

body:not(.ko) .lang-ko {
    display: none !important;
}

body:not(.vi) .lang-vi {
    display: none !important;
}

body:not(.zh-CN) .lang-zh-CN {
    display: none !important;
}

body:not(.zh-TW) .lang-zh-TW {
    display: none !important;
}

body:not(.ja) .lang-ja {
    display: none !important;
}

body:not(.id) .lang-id {
    display: none !important;
}

body:not(.ms) .lang-ms {
    display: none !important;
}

body:not(.th) .lang-th {
    display: none !important;
}

h1,
h2,
h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo img {
    height: 55px;
    width: auto;
    display: block;
}

.logo-text {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav li {
    min-width: 0;
}

nav a {
    position: relative;
    display: block;
    max-width: 125px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
    transition: color 0.3s ease;
    padding-bottom: 5px;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: width 0.3s ease, left 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

nav a:hover,
nav a.active {
    color: var(--text-color);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.lang-selector-wrapper {
    position: relative;
}

#lang-selector {
    appearance: none;
    background-color: var(--bg-color);
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    padding: 6px 30px 6px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

#lang-selector:focus,
#lang-selector:hover {
    border-color: var(--accent-color);
}

.lang-selector-wrapper::after {
    content: '▼';
    font-size: 0.6rem;
    color: var(--primary-color);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 110px 0;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #EAECEF;
}

.hero h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-name {
    font-weight: 900;
}

.title-pipe {
    color: var(--accent-color);
    margin: 0 12px;
    font-weight: 700;
    position: relative;
    top: -0.09em;   /* lift it — try -0.08em to -0.18em */
}

.mobile-divider {
    display: none;
}

.motto-highlight {
    font-size: 2rem;
    color: var(--white);
    margin: 40px auto;
    padding: 25px 45px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    border-radius: 8px;
    display: inline-block;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(192, 96, 32, 0.35);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
    line-height: 1.4;
}

.hero .sub-text {
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.sub-line-primary {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.sub-line-secondary {
    display: block;
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-color);
    margin-top: 4px;
}

section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border-top: 4px solid var(--accent-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* --- Process Card Flex Styles --- */
.process-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.step-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1.2;
    flex-shrink: 0;
    margin-top: -2px;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin-bottom: 10px;
    line-height: 1.2;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-item {
    background: var(--white);
    border: 1px solid #EAECEF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

/* Edge-to-edge product images */
.product-item img {
    width: 100%;
    aspect-ratio: 4 / 1;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #EAECEF;
}

/* Inner container for text */
.product-content {
    padding: 25px;
    flex-grow: 1;
}

.product-content h3 {
    color: var(--primary-color);
    border-bottom: 2px solid #F1F3F5;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 45px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #EAECEF;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

input,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(192, 96, 32, 0.15);
}

button.submit-btn {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

button.submit-btn:hover {
    background-color: var(--accent-dark);
}

.form-note {
    font-size: 0.85rem;
    color: #6B7280;
    margin-top: 15px;
    text-align: center;
}

/* --- Footer Styles --- */
footer {
    background-color: var(--primary-color);
    color: #9CA3AF;
    text-align: center;
    padding: 40px 0 25px 0;
    font-size: 0.9rem;
}

.footer-info {
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-info p {
    margin-bottom: 4px;
}

.footer-info strong {
    color: #D1D5DB;
}

.footer-copyright {
    border-top: 1px solid #374151;
    padding-top: 20px;
    font-size: 0.8rem;
}

.catalog-download-wrapper {
    text-align: center;
    margin-top: 50px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    padding: 14px 30px;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 6px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-download:hover {
    background-color: var(--text-color);
    transform: translateY(-2px);
}

.btn-download svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

nav a:hover,
nav a.active {
    color: var(--text-color);
}

/* --- ZERO-SCRIPT MOBILE MENU CORE --- */
.mobile-menu-checkbox {
    display: none;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding-bottom: 5px;
}

.mobile-menu-btn .hamburger {
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.mobile-menu-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: width 0.3s ease, left 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.mobile-menu-btn:hover .hamburger,
.mobile-menu-checkbox:checked~.mobile-menu-btn .hamburger {
    color: var(--accent-color);
}

.mobile-menu-btn:hover::after,
.mobile-menu-checkbox:checked~.mobile-menu-btn::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.header-actions .btn-download {
    justify-content: center;
}

@media (max-width: 900px) {
    .nav-right {
        flex-direction: row;
        gap: 15px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-controls {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: calc(100% + 14px);
        right: 0;
        left: auto;
        width: min(320px, calc(100vw - 40px));
        padding: 20px;
        background-color: var(--white);
        border: 1px solid #EAECEF;
        border-radius: 8px;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
        gap: 18px;
        z-index: 200;
    }

    .mobile-menu-checkbox:checked~.nav-controls {
        display: flex;
    }

    .nav-controls nav ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 14px;
        padding-top: 16px;
        border-top: 1px solid #EAECEF;
    }

    .lang-selector-wrapper,
    #lang-selector,
    .header-actions .btn-download {
        width: 100%;
    }

    .header-actions .btn-download {
        justify-content: center;
    }

    .motto-highlight {
        font-size: 1.4rem;
        padding: 20px 25px;
    }

    .hero h1 {
        flex-direction: column;
        font-size: 1.8rem;
    }

    .title-pipe {
        display: none;
    }

    .mobile-divider {
        display: block;
        width: 45px;
        height: 4px;
        background-color: var(--accent-color);
        border-radius: 2px;
        margin: 8px 0 12px 0;
    }

    .title-text {
        font-size: 1.4rem;
        text-align: center;
    }
}

/* --- leftover inline styles still in index.html (not moved) ---
   .btn-download a { padding: 8px 16px; font-size: 0.9rem; }
   svg { width: 16px; height: 16px; }
   h3 { margin-bottom: 15px; }
   #formStatus div { margin-top: 15px; text-align: center; font-weight: bold; }
*/


/* ============================================================
   Copper Foundry — Night Mode
   Driven by data-theme on <html> (dark is default via JS/HTML).
   ============================================================ */
html[data-theme="dark"] {
    --primary-color: #E8EAED;   /* readable body / headings */
        --accent-color: #D4722E;    /* lifted copper */
        --accent-dark: #A34B14;     /* deeper copper */
        --bg-color: #12141A;        /* page background */
        --text-color: #E8EAED;      /* body text */
        --white: #1C1F27;           /* surface / cards (not literal white) */
}

    

    /* denser header so the logo sits in its native atmosphere */
    
    html[data-theme="dark"] header {
        background-color: #111216 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    }

    /* Header chrome must match header bg — not surface #1C1F27 */
    
    html[data-theme="dark"] .nav-right,
    html[data-theme="dark"] .nav-right > nav,
    html[data-theme="dark"] .nav-controls,
    html[data-theme="dark"] .header-actions {
        background-color: #111216;
        border-color: #111216;
        box-shadow: none;
    }

    /* logo tagline */
    
    html[data-theme="dark"] .logo-text {
        color: #C8C4BC;             /* soft metallic, slightly warm */
    }

    /* navigation links */
    
    html[data-theme="dark"] nav a {
        color: #E8EAED !important;
    }
    
    html[data-theme="dark"] nav a:hover,
    html[data-theme="dark"] nav a.active {
        color: #FFFFFF !important;
    }

    /* Language selector — same dense graphite as header */
    
    html[data-theme="dark"] #lang-selector {
        background-color: #111216 !important;
        border: 1px solid #3A3F4B !important;
        color: #E8EAED !important;
    }
    
    html[data-theme="dark"] #lang-selector:focus,
    html[data-theme="dark"] #lang-selector:hover {
        border-color: var(--accent-color);
    }
    
    html[data-theme="dark"] .lang-selector-wrapper::after {
        color: #9AA0A8;
    }

    /* hero */
    
    html[data-theme="dark"] .hero {
        background-color: #12141A;
        color: #E8EAED;
        border-bottom-color: #2E3340;
    }
    
    html[data-theme="dark"] .hero h1 {
        color: #E8EAED;
    }
    
    html[data-theme="dark"] .sub-line-primary {
        color: #E8EAED;
    }
    
    html[data-theme="dark"] .sub-line-secondary {
        color: #9AA0A8;
    }

    /* sections */
    
    html[data-theme="dark"] section:nth-child(even) {
        background-color: #1C1F27;
    }

    /* cards */
    
    html[data-theme="dark"] .card {
        background: #1C1F27;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
        border-top-color: var(--accent-color);
    }
    
    html[data-theme="dark"] .card:hover {
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    }

    /* product items */
    
    html[data-theme="dark"] .product-item {
        background: #1C1F27;
        border-color: #2E3340;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    }
    
    html[data-theme="dark"] .product-item img {
        border-bottom-color: #2E3340;
    }
    
    html[data-theme="dark"] .product-content h3 {
        color: #E8EAED;
        border-bottom-color: #2E3340;
    }

    /* contact form */
    
    html[data-theme="dark"] .contact-wrapper {
        background: #1C1F27;
        border-color: #2E3340;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }
    
    html[data-theme="dark"] label {
        color: #E8EAED;
    }
    
    html[data-theme="dark"] input,
    html[data-theme="dark"] textarea {
        background-color: #12141A;
        border-color: #2E3340;
        color: #E8EAED;
    }
    
    html[data-theme="dark"] input:focus,
    html[data-theme="dark"] textarea:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(212, 114, 46, 0.25);
    }
    
    html[data-theme="dark"] .form-note {
        color: #9AA0A8;
    }

    /* footer — deepest bar */
    
    html[data-theme="dark"] footer {
        background-color: #0C0E12;
        color: #9AA0A8;
    }
    
    html[data-theme="dark"] .footer-info strong {
        color: #D1D5DB;
    }
    
    html[data-theme="dark"] .footer-copyright {
        border-top-color: #2E3340;
    }

    /* Catalog button — defaults for page; header redefines the environment */
    
    html[data-theme="dark"] .btn-download {
        background-color: var(--btn-bg, #2A2E38);
        color: #E8EAED;
        box-shadow: var(--btn-shadow, 0 4px 12px rgba(0, 0, 0, 0.35));
        border: 1px solid var(--btn-border, #3A3F4B);
    }
    
    html[data-theme="dark"] .btn-download:hover {
        background-color: #343945;
        color: #FFFFFF;
        border-color: var(--accent-color);
    }

    /* Header Catalog — same plane as header, no elevation */
    
    html[data-theme="dark"] header .btn-download {
        --btn-bg: #111216;
        --btn-shadow: none;
        --btn-border: #3A3F4B;
    }
    
    html[data-theme="dark"] header .btn-download:hover {
        --btn-bg: #1C1F27;
        --btn-border: #D4722E;
    }

    
    html[data-theme="dark"] .header-actions {
        border-top-color: #2E3340;
    }

    /* Mobile dropdown only — same header color, no elevation */
    @media (max-width: 900px) {
        
    html[data-theme="dark"] .nav-controls {
            background-color: #111216;
            border-color: #2E3340;
            box-shadow: none;
        }
    }

    /* mobile menu button */
    
    html[data-theme="dark"] .mobile-menu-btn {
        color: #E8EAED;
    }

    /* Motto — copper box stays, text = dense header black */
    
    html[data-theme="dark"] .motto-highlight {
        color: #111216;
        text-shadow: none;
    }


/* ============================================================
   Theme Switch — Copper Foundry (MS style)
   Dark default = thumb LEFT
   ============================================================ */
.ms-switch {
    position: relative;
    width: 28px;
    height: 14px;
    background-color: var(--accent-color, #D4722E); /* dark default track */
    border-radius: 7px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease;
    padding: 0;
    outline: none;
    flex-shrink: 0;
}

.ms-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background-color: #111216;          /* graphite — dark default, LEFT */
    border-radius: 50%;
    transition: transform 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transform: translateX(0);           /* left = dark */
}

/* Light only — track cools, thumb slides RIGHT */
[data-theme="light"] .ms-switch {
    background-color: #9AA0A8;
}

[data-theme="light"] .ms-switch-thumb {
    background-color: #E8EAED;
    transform: translateX(14px);
}

.ms-switch:focus-visible {
    box-shadow: 0 0 0 2px rgba(212, 114, 46, 0.45);
}