/* =========================================
   1. GLOBAL STYLES & VARIABLES
   ========================================= */
:root {
    --primary-color: #2e3792; /* Xanh thương hiệu Tân Phát */
    --accent-color: #00f3ff; /* Xanh Neon (Cyan) */
    --dark-bg: #050a14;      /* Nền đen sâu */
    --card-bg: #0f172a;      /* Nền thẻ/khối */
    --text-white: #ffffff;
    --text-gray: #b0b8c4;
    --glow-shadow: 0 0 15px rgba(46, 55, 146, 0.6);
    --img-glow: drop-shadow(0 0 20px rgba(46, 55, 146, 0.8));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, .btn, .badge, .badge-solar, .price-tag, .battle-table th {
    font-family: 'Exo 2', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}
h1 { font-weight: 300; margin-bottom: 20px; line-height: 1.2; }
h2, h3 { font-weight: 400; margin-bottom: 15px; }
p { margin-bottom: 20px; color: var(--text-gray); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(90deg, var(--primary-color), #1a237e);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(46, 55, 146, 0.5);
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
}
.btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px var(--accent-color);
}
.btn-full { width: 100%; border: none; }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* =========================================
   2. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Background gradient set inline in PHP file */
}

/* Hiệu ứng lưới Grid nền */
.hero::before {
    content: '';
    position: absolute;
    width: 200%; height: 200%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    top: -50%; left: -50%; z-index: 0;
}

.hero-content { position: relative; z-index: 2; max-width: 900px; }

.badge, .badge-solar {
    background: rgba(46, 55, 146, 0.3);
    border: 1px solid var(--accent-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: inline-block;
}

.hero h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(46, 55, 146, 0.8);
}

.hero p { font-size: 1.2rem; margin-bottom: 30px; }

/* =========================================
   3. USP BAR
   ========================================= */
.usp-bar {
    background: #02040a;
    padding: 30px 0;
    border-bottom: 1px solid rgba(46, 55, 146, 0.3);
    border-top: 1px solid rgba(46, 55, 146, 0.3);
}
.usp-bar-grid {
    display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px;
}
.usp-item {
    text-align: center; color: #fff;
    flex: 1; min-width: 200px;
}
.usp-item i {
    font-style: normal; font-size: 2rem; 
    margin-bottom: 10px; display: block;
}
.usp-item h4 { margin-bottom: 5px; color: var(--accent-color); font-size: 1.1rem; }
.usp-item p { font-size: 0.9rem; margin: 0; }

/* =========================================
   4. SECTIONS & CARDS
   ========================================= */
.section { padding: 80px 0; }
.section-title { 
    text-align: center; font-size: 2.5rem; margin-bottom: 60px; color: var(--text-white); 
}
.section-title span { color: var(--accent-color); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card {
    background: var(--card-bg); padding: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; transition: transform 0.3s;
}
.card:hover { 
    transform: translateY(-10px); 
    border-color: var(--primary-color); 
    box-shadow: var(--glow-shadow); 
}
.card h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--accent-color); }

/* =========================================
   5. BATTLE CHART
   ========================================= */
.comparison-section {
    background: linear-gradient(to bottom, #050a14, #0f172a);
}
.battle-table {
    width: 100%; border-collapse: collapse; margin-top: 30px;
}
.battle-table th, .battle-table td {
    padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff; vertical-align: middle;
}
.battle-table th { font-size: 1.2rem; }
.battle-table .col-competitor { color: #888; width: 35%; }
.battle-table .col-feature { width: 30%; color: var(--accent-color); font-weight: bold; }
.battle-table .col-us { 
    width: 35%; background: rgba(46, 55, 146, 0.2); 
    border: 1px solid var(--primary-color);
    color: #fff; font-weight: bold;
}
.check-icon { color: #00ff88; font-size: 1.2rem; margin-right: 5px; }
.cross-icon { color: #ff4444; font-size: 1.2rem; margin-right: 5px; }

/* =========================================
   6. PRODUCT SHOWCASE
   ========================================= */
.product-section { background: #02040a; position: relative; }
.product-layout { display: flex; align-items: center; justify-content: space-between; gap: 50px; flex-wrap: wrap; }

.product-image-container {
    flex: 1; min-width: 350px;
    border: 2px solid var(--primary-color); 
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    position: relative; 
    box-shadow: 0 0 50px rgba(46, 55, 146, 0.3);
    padding: 30px;
    background: radial-gradient(circle at center, #1e293b 0%, #02040a 100%);
}
.product-img-actual {
    max-width: 100%; height: auto; max-height: 550px;
    object-fit: contain;
    filter: var(--img-glow);
    transition: transform 0.3s ease;
}
.product-image-container:hover .product-img-actual { transform: scale(1.02); }

.product-specs { flex: 1; min-width: 300px; }
.spec-item { margin-bottom: 30px; border-left: 3px solid var(--accent-color); padding-left: 20px; }
.spec-item h4 { font-size: 1.3rem; color: #fff; margin-bottom: 5px; }
.spec-item p { color: var(--text-gray); margin-bottom: 0; }

/* =========================================
   7. GALLERY SECTION
   ========================================= */
.gallery-section { background: #02040a; }
.gallery-container { display: flex; gap: 20px; }

.main-image {
    flex: 3;
    background: #000;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(46, 55, 146, 0.3);
}

/* Video Ratio 16:9 */
.video-container-ratio {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.video-overlay, 
.video-container-ratio iframe,
#static-img-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Overlay */
.video-overlay {
    background-size: cover; background-position: center; z-index: 30;
    cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: opacity 0.3s;
}

/* Play Button */
.play-btn-circle {
    width: 80px; height: 80px; background: rgba(46, 55, 146, 0.8);
    border: 2px solid var(--accent-color); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 0 0 0 rgba(0, 243, 255, 0.7);
    animation: pulse-blue 2s infinite;
}
.play-btn-icon {
    width: 0; height: 0; 
    border-top: 15px solid transparent; border-bottom: 15px solid transparent;
    border-left: 25px solid #fff; margin-left: 5px;
}
.video-overlay:hover .play-btn-circle { background: var(--accent-color); transform: scale(1.1); }
.video-overlay:hover .play-btn-icon { border-left-color: #000; }

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(0, 243, 255, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(0, 243, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 243, 255, 0); }
}

/* Static Image Styling */
#static-img-container { z-index: 20; background: #000; }
#main-static-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.hidden { display: none !important; }

/* Thumbnails */
.thumbnails { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.thumb {
    flex: 1; border: 1px solid #333; border-radius: 8px;
    cursor: pointer; transition: all 0.3s;
    display: flex; justify-content: center; align-items: center;
    font-size: 0.8rem; color: #fff; text-align: center; padding: 10px;
    background-size: cover; background-position: center; position: relative; overflow: hidden;
}
.thumb::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 10, 20, 0.7); z-index: 1; transition: all 0.3s;
}
.thumb:hover::before, .thumb.active::before { background: rgba(5, 10, 20, 0.4); }
.thumb.active { border-color: var(--accent-color); box-shadow: 0 0 10px rgba(0, 243, 255, 0.3); }
.thumb span { position: relative; z-index: 2; font-weight: 600; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

/* =========================================
   8. FORM SECTION
   ========================================= */
.form-section { background: #050a14; text-align: center; }
.lead-form { 
    max-width: 600px; margin: 0 auto; 
    background: #0f172a; padding: 40px; 
    border-radius: 15px; border: 1px solid var(--primary-color); 
}
.form-group { margin-bottom: 20px; text-align: left; }

.form-input {
    width: 100%; padding: 15px; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid #333; border-radius: 5px; 
    color: #fff; font-family: 'Montserrat', sans-serif;
    height: auto;
}
.form-input:focus { outline: none; border-color: var(--accent-color); }
select.form-input option { background: #0f172a; color: #fff; }

/* Footer */
footer {
    border-top: 1px solid #222;
}

/* =========================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    
    /* Stack all grids */
    .grid-3, .product-layout, .gallery-container, .usp-bar-grid, .usp-grid { 
        flex-direction: column; grid-template-columns: 1fr !important;
    }
    
    .thumbnails { flex-direction: row; height: 100px; }
    .thumb { font-size: 0.7rem; padding: 5px; }
    
    .comparison-section { overflow-x: auto; }
    .battle-table { min-width: 600px; font-size: 0.8rem; }
    .battle-table th, .battle-table td { padding: 10px 5px; }
    
    .product-image-container { min-width: auto; padding: 10px; }
}