/* ================================================================
   Ever Power — Premium Industrial Design System
   Navy Blue Palette: Base #0a1628, Accent #1e3a6e
   ================================================================ */

:root {
    --navy-deep: #060f1e;
    --navy: #0a1628;
    --navy-light: #0f1f3a;
    --primary: #1e3a6e;
    --primary-light: #2a5a9e;
    --primary-pale: #e8eff8;
    --white: #FFFFFF;
    --gray-50: #f7f8f9;
    --gray-100: #edf0f2;
    --gray-200: #dde1e5;
    --gray-400: #9aa3ad;
    --gray-500: #6b7680;
    --gray-700: #36404a;
    --gold: #b8953c;
    --font: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.10);
    --radius: 6px;
    --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--gray-700);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Top Bar ───────────────────────────────────────────────── */
.top-bar {
    background: var(--navy);
    color: var(--gray-400);
    font-size: 0.8rem;
    padding: 6px 0;
}
.top-bar i { color: var(--primary-light); margin-right: 4px; font-style: normal; }

/* ── Navigation ────────────────────────────────────────────── */
.navbar {
    background: var(--white) !important;
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    min-height: 62px;
}
.navbar-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy) !important;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.navbar-brand .brand-accent { color: var(--primary); }
.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--gray-700) !important;
    padding: 1.2rem 1rem !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color var(--transition);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--primary) !important; }

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 1rem;
}
.lang-switch a {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-decoration: none;
    padding: 3px 7px;
    border-radius: 3px;
    transition: all var(--transition);
}
.lang-switch a.active {
    background: var(--primary);
    color: var(--white);
}
.lang-switch a:hover:not(.active) { color: var(--primary); }

/* ── Hero Banner ────────────────────────────────────────────── */
.hero {
    background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 35%, #0c1e3d 70%, #0f2848 100%);
    color: var(--white);
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 80% 20%, rgba(30,58,110,.2) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(30,58,110,.1) 0%, transparent 40%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.hero h1 .accent {
    color: var(--primary-light);
    position: relative;
}
.hero .lead {
    font-size: 1.1rem;
    color: rgba(255,255,255,.65);
    max-width: 560px;
    margin-bottom: 2rem;
    font-weight: 400;
}
.hero .btn-primary {
    background: var(--primary);
    border: none;
    padding: 13px 32px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all var(--transition);
}
.hero .btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,48,90,.5);
}
.hero .btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.4);
    color: var(--white);
    padding: 11px 30px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all var(--transition);
    margin-left: 0.75rem;
}
.hero .btn-outline:hover {
    border-color: var(--white);
    background: rgba(255,255,255,.08);
}

/* ── Section Headers ────────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}
.section-header .overline {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
}
.section-header .divider {
    width: 40px; height: 3px;
    background: var(--primary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* ── Product Cards ──────────────────────────────────────────── */
.product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.product-card .img-wrap {
    height: 200px;
    background: var(--gray-100);
    overflow: hidden;
    position: relative;
}
.product-card .img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .img-wrap .placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: var(--gray-400); font-size: 2.5rem;
}
.product-card .badge {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
}
.product-card .card-body { padding: 1.1rem; }
.product-card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--navy);
}
.product-card .card-text {
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.product-card .btn-sm {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── Category Cards ─────────────────────────────────────────── */
.category-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.75rem 1.25rem;
    text-align: center;
    text-decoration: none;
    transition: all var(--transition);
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.category-card .icon-wrap {
    width: 56px; height: 56px;
    margin: 0 auto 0.75rem;
    background: var(--primary-pale);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
}
.category-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.2rem;
}
.category-card p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

/* ── About Section ──────────────────────────────────────────── */
.about-section {
    background: var(--gray-50);
    padding: 56px 0;
}

/* ── Video Showcase ─────────────────────────────────────────── */
.video-showcase {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
    cursor: pointer;
}
.promo-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border: none;
    outline: none;
}
/* Show native controls only when playing */
.promo-video:not(.is-playing)::-webkit-media-controls {
    display: none !important;
}
.promo-video.is-playing {
    object-fit: contain;
}

/* Play button overlay */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(0,0,0,.35);
    border: none;
    cursor: pointer;
    transition: background .3s ease;
    z-index: 2;
    font-family: var(--font);
}
.video-play-overlay:hover {
    background: rgba(0,0,0,.25);
}
.video-play-overlay svg {
    transition: transform .3s ease;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.4));
}
.video-play-overlay:hover svg {
    transform: scale(1.08);
}
.video-play-overlay .play-text {
    color: rgba(255,255,255,.85);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.video-play-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Loading spinner */
.video-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0,0,0,.6);
    color: rgba(255,255,255,.8);
    font-size: 0.85rem;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s;
}
.video-loading.show {
    opacity: 1;
    visibility: visible;
}
.video-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,.2);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Video fallback */
.video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: var(--navy);
    color: rgba(255,255,255,.7);
    font-size: 0.9rem;
    line-height: 1.6;
}
.video-fallback a {
    color: var(--primary-light);
    text-decoration: underline;
}
.video-fallback a:hover { color: #fff; }

/* YouTube container — 16:9 responsive */
.video-showcase--youtube {
    cursor: default;
    background: #000;
}
.video-showcase--youtube iframe {
    display: block;
}
/* YouTube placeholder (before video ID is configured) */
.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--navy);
    color: rgba(255,255,255,.5);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.stats-bar {
    background: var(--navy);
    padding: 32px 0;
}
.stat-item { text-align: center; padding: 0.75rem; }
.stat-item .number {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--primary-light);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.stat-item .label {
    font-size: 0.8rem;
    color: var(--gray-400);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    background: var(--navy-deep);
    color: var(--gray-400);
    padding: 56px 0 0;
}
footer h5 {
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}
footer h5::after {
    content: '';
    display: block;
    width: 26px; height: 2px;
    background: var(--primary);
    margin-top: 0.5rem;
}
footer a { color: var(--gray-400); text-decoration: none; transition: color var(--transition); }
footer a:hover { color: var(--white); }
footer .list-unstyled li { margin-bottom: 0.4rem; font-size: 0.85rem; }
footer .bottom-bar {
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 1.1rem 0;
    margin-top: 2.5rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb { font-size: 0.83rem; }
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .active { color: var(--navy); font-weight: 600; }

/* ── Product Detail ─────────────────────────────────────────── */
.product-gallery img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
}
.product-info h1 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
}
.nav-tabs .nav-link {
    font-weight: 600;
    color: var(--gray-500);
    border: none;
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
}
.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: transparent;
}
.tab-content {
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1.5rem;
    background: var(--white);
}

/* ── Spec Table ─────────────────────────────────────────────── */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td {
    padding: 9px 14px;
    border: 1px solid var(--gray-200);
    font-size: 0.88rem;
}
.spec-table th {
    background: var(--gray-50);
    font-weight: 700;
    text-align: left;
    width: 180px;
    color: var(--navy);
}

/* ── Contact Page ───────────────────────────────────────────── */
.contact-info-card {
    background: var(--navy);
    color: var(--white);
    padding: 1.75rem;
    border-radius: var(--radius);
}
.contact-info-card .ci-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-light);
    font-size: 1.1rem;
    margin-right: 0.75rem;
}
.contact-form-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.75rem;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 4px;
    transition: all var(--transition);
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ── Page Header (about/contact) ────────────────────────────── */
.page-header {
    background: linear-gradient(160deg, var(--navy) 0%, #0c1e3d 100%);
    color: var(--white);
    padding: 56px 0;
    text-align: center;
}
.page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.page-header .breadcrumb {
    justify-content: center;
    margin-top: 0.5rem;
}
.page-header .breadcrumb a { color: rgba(255,255,255,.6); }
.page-header .breadcrumb a:hover { color: var(--white); }
.page-header .breadcrumb .active { color: rgba(255,255,255,.9); }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination .page-link {
    color: var(--primary);
    border-color: var(--gray-200);
    font-weight: 500;
}
.pagination .active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ── Responsive ─────────────────────────────────────────────── */

/* Tablet (≤ 991px) */
@media (max-width: 991px) {
    .hero { padding: 64px 0; min-height: auto; }
    .hero h1 { font-size: 2.2rem; }
    .hero .lead { font-size: 1rem; max-width: 100%; }
    .navbar-nav .nav-link { padding: .7rem 1rem !important; font-size: .8rem; }
    .lang-switch { margin-left: .5rem; }
    .about-section { padding: 56px 0; }
    .about-section .row { flex-direction: column-reverse; }
    .video-showcase { margin-bottom: 1.5rem; }
    .section-header h2 { font-size: 1.7rem; }
    .page-header { padding: 44px 0; }
    .page-header h1 { font-size: 1.8rem; }
    .product-card .img-wrap { height: 180px; }
    footer { padding: 44px 0 0; }
}

/* Phone (≤ 767px) */
@media (max-width: 767px) {
    /* Top bar */
    .top-bar { font-size: .72rem; padding: 4px 0; }
    .top-bar .container { flex-direction: column; align-items: center; gap: 2px; }

    /* Nav */
    .navbar { min-height: 52px; }
    .navbar-brand { font-size: 1.1rem; }
    .navbar-toggler { padding: 4px 8px; font-size: .9rem; }
    .navbar-toggler:focus { box-shadow: none; }
    .navbar-nav { padding: .75rem 0; }
    .navbar-nav .nav-link { padding: .55rem 0 !important; font-size: .82rem; border-bottom: 1px solid var(--gray-100); }
    .lang-switch { margin: .5rem 0 0; justify-content: center; }

    /* Hero */
    .hero { padding: 40px 0; text-align: center; }
    .hero h1 { font-size: 1.7rem; }
    .hero .lead { font-size: .9rem; margin-bottom: 1.25rem; }
    .hero .d-flex { flex-direction: column; gap: .6rem; }
    .hero .btn-primary,
    .hero .btn-outline { display: block; width: 100%; margin: 0; padding: 11px 20px; font-size: .82rem; }

    /* Stats */
    .stats-bar { padding: 28px 0; }
    .stat-item .number { font-size: 1.8rem; }
    .stat-item .label { font-size: .7rem; }

    /* Sections */
    .section-header { margin-bottom: 2rem; }
    .section-header h2 { font-size: 1.4rem; }
    .about-section { padding: 40px 0; }
    .about-section .row { flex-direction: column-reverse; }
    .video-showcase { margin-bottom: 1.5rem; }

    /* Cards */
    .product-card .img-wrap { height: 200px; }
    .product-card .card-body { padding: .9rem; }
    .product-card .card-title { font-size: .88rem; }
    .category-card { padding: 1.25rem 1rem; }

    /* Page header */
    .page-header { padding: 36px 0; }
    .page-header h1 { font-size: 1.5rem; }

    /* Product detail */
    .product-info h1 { font-size: 1.3rem; margin-top: 1rem; }
    .nav-tabs .nav-link { padding: .5rem .75rem; font-size: .8rem; }
    .tab-content { padding: 1rem; }
    .spec-table th, .spec-table td { padding: 6px 10px; font-size: .78rem; }
    .spec-table th { width: 110px; }

    /* Contact */
    .contact-info-card { margin-bottom: 1rem; }
    .contact-form-card { padding: 1.25rem; }

    /* Footer */
    footer { padding: 36px 0 0; }
    footer h5 { font-size: .82rem; }
    footer .bottom-bar { margin-top: 1.5rem; }

    /* Loader */
    .loader-brand { font-size: 1.5rem; }
    .loader-sub { font-size: .7rem; }
}

/* Small phone (≤ 400px) */
@media (max-width: 400px) {
    .hero h1 { font-size: 1.4rem; }
    .hero .lead { font-size: .82rem; }
    .section-header h2 { font-size: 1.2rem; }
    .section-header .overline { font-size: .68rem; }
    .product-card .img-wrap { height: 170px; }
    footer .row > div { margin-bottom: 1rem; }
}

/* ── Email Validation ──────────────────────────────────────── */
.email-input-wrap {
    position: relative;
}
.email-input-wrap .form-control {
    padding-right: 38px;
}
.email-check-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    transition: all .2s;
}
/* Valid */
.email-input-wrap.valid .email-check-icon {
    background: #28a745;
    color: #fff;
}
.email-input-wrap.valid .email-check-icon::after {
    content: '✓';
}
.email-input-wrap.valid .form-control {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40,167,69,.12);
}
/* Invalid */
.email-input-wrap.invalid .email-check-icon {
    background: #dc3545;
    color: #fff;
}
.email-input-wrap.invalid .email-check-icon::after {
    content: '✗';
}
.email-input-wrap.invalid .form-control {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220,53,69,.12);
}
.email-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    min-height: 18px;
}
.email-hint.error {
    color: #dc3545;
}
.email-hint.ok {
    color: #28a745;
}
/* Submit button disabled state */
#contact-form button[type="submit"]:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Hero Visual (right-side image) ───────────────────────── */
.hero-visual {
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255,255,255,.06);
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.12);
}
.hero-visual img {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: cover;
}

/* ── Article List ─────────────────────────────────────────── */
.article-list {
    border-top: 1px solid var(--gray-100);
}
.article-item {
    border-bottom: 1px solid var(--gray-100);
}
.article-link {
    display: block;
    padding: 1.5rem 0.5rem;
    color: inherit;
    text-decoration: none;
    transition: background .2s ease, padding-left .2s ease;
}
.article-link:hover {
    background: var(--gray-50);
    padding-left: 1rem;
}
.article-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--navy);
    margin: 0 0 0.4rem;
}
.article-link:hover .article-title {
    color: var(--primary);
}
.article-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}
.article-summary {
    color: var(--gray-700);
    margin: 0 0 0.6rem;
    line-height: 1.65;
}
.article-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}
