/* CSS Variables & Theme Setup */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #bd1d1d;       /* Brand Red */
    --primary-dark: #8c1010;        /* Dark Red */
    --primary-light: #f05252;       /* Light Red */
    --accent-color: #bd1d1d;        /* Brand Red Accent */
    --accent-hover: #8c1010;        /* Brand Dark Red Accent */
    --accent-light: #fde8e8;        /* Light Pink/Red Accent Box */
    --bg-light: #fafafa;            /* Warm Off-white Background */
    --bg-white: #ffffff;
    --text-dark: #1f2937;           /* Charcoal Grey */
    --text-light: #6b7280;          /* Muted Grey */
    --border-color: #e5e7eb;
    --font-heading: 'Prompt', sans-serif;
    --font-body: 'Sarabun', sans-serif;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(189, 29, 29, 0.06);
    --shadow-lg: 0 16px 32px rgba(189, 29, 29, 0.1);
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 8px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; position: relative; margin-bottom: 2.5rem; padding-bottom: 0.75rem; }
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}
h2.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

h3 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-white-section {
    background-color: var(--bg-white);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Header & Top Bar */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    font-size: 0.875rem;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info span {
    margin-right: 20px;
}

.top-bar-info i {
    color: var(--bg-white);
    margin-right: 6px;
}

.top-bar-info a {
    color: var(--bg-white);
}

.top-bar-info a:hover {
    opacity: 0.85;
}

.top-bar-social a {
    color: var(--bg-white);
    margin-left: 15px;
}

.top-bar-social a:hover {
    opacity: 0.85;
}

/* Navbar */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

header.shrink {
    padding: 5px 0;
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    transition: var(--transition-normal);
}

.logo img {
    height: 55px;
    transition: var(--transition-normal);
}

header.shrink .logo img {
    height: 45px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(189, 29, 29, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(189, 29, 29, 0.4);
}

.btn-secondary {
    background-color: #2c3e50; /* Charcoal slate blue/black for modern secondary contrast */
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.2);
}

.btn-secondary:hover {
    background-color: #1a252f;
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.btn i {
    margin-left: 8px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(189, 29, 29, 0.9) 0%, rgba(140, 16, 16, 0.95) 100%), url('../images/factory_hero.png') center/cover no-repeat;
    color: var(--bg-white);
    padding: 120px 0 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    border: 40px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: 650px;
    position: relative;
    z-index: 5;
}

.hero-tagline {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: inline-block;
    background: rgba(229, 126, 37, 0.15);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.85);
}

.hero-btns {
    display: flex;
    gap: 15px;
}

/* Features Section (Why Us) */
.features-grid {
    margin-top: 40px;
}

.feature-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent-light);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Product Teaser / Grid */
.product-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-img {
    height: 220px;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-img-corrugated {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, #dfd2be, #dfd2be 10px, #cfc1aa 10px, #cfc1aa 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.product-img-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(11, 60, 93, 0.1);
}

.product-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-tag {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-color);
    background-color: #ebf3f9;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
    align-self: flex-start;
}

.product-info h3 {
    margin-bottom: 12px;
}

.product-info p {
    color: var(--text-light);
    font-size: 0.925rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-specs {
    list-style: none;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.product-specs li {
    font-size: 0.875rem;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.product-specs li span:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.product-specs li span:last-child {
    color: var(--text-light);
}

/* Specs Table */
.specs-table-container {
    overflow-x: auto;
    margin-top: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--bg-white);
    min-width: 600px;
}

.specs-table th, .specs-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.specs-table th {
    background-color: var(--primary-color);
    color: var(--bg-white);
    font-family: var(--font-heading);
    font-weight: 500;
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table tr:nth-child(even) {
    background-color: #f7fafc;
}

/* Call to Action Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    padding: 60px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: rgba(229, 126, 37, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.cta-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.cta-text {
    max-width: 700px;
}

.cta-banner h2 {
    color: var(--bg-white);
    margin-bottom: 10px;
    padding-bottom: 0;
}

.cta-banner h2::after {
    display: none;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
}

.cta-btn {
    flex-shrink: 0;
}

/* Contact Info Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 40px;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-card {
    background-color: var(--bg-white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--accent-light);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-info-content h4 {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.contact-info-content p, .contact-info-content a {
    color: var(--text-light);
    font-size: 0.95rem;
}

.contact-info-content a:hover {
    color: var(--primary-color);
}

.contact-form-container {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-form h3 {
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(50, 140, 193, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    display: none;
}

.form-status.success {
    display: block;
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.form-status.error {
    display: block;
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* About Us Section */
.about-section-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-box {
    background-color: var(--bg-white);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.about-img {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    border: 8px solid var(--bg-white);
}

.about-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(11,60,93,0.4) 0%, transparent 60%);
    pointer-events: none;
}

.about-img-placeholder {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--bg-white);
    padding: 20px;
    text-align: center;
}

.about-img-placeholder i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.about-img-placeholder h4 {
    color: var(--bg-white);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.about-img-placeholder p {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Accordion */
.accordion {
    margin-top: 30px;
}

.accordion-item {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background-color: #f8fafc;
}

.accordion-header i {
    transition: var(--transition-normal);
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition-normal);
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.accordion-item.active .accordion-content {
    padding: 0 20px 20px 20px;
    max-height: 1000px;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 70px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    color: var(--bg-white);
    font-size: 1.25rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 1.5px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 6px;
}

.footer-contact-list {
    list-style: none;
}

.footer-contact-list li {
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
}

.footer-contact-list i {
    color: var(--accent-color);
    margin-right: 12px;
    margin-top: 5px;
    font-size: 1rem;
}

.footer-contact-list a {
    color: rgba(255, 255, 255, 0.75);
}

.footer-contact-list a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5);
    margin-left: 20px;
}

.footer-bottom-links a:hover {
    color: var(--bg-white);
}

/* Floating Widgets */
.floating-widgets {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.float-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.float-btn:hover {
    transform: scale(1.1) translateY(-3px);
}

.float-line {
    background-color: #06c755; /* LINE Official Color */
}

.float-phone {
    background-color: var(--accent-color);
}

.float-top {
    background-color: var(--primary-color);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
}

.float-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* Map Section */
.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    background-color: #eaeaea;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .nav-menu {
        position: fixed;
        top: 86px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 86px);
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 20px 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .hero {
        padding: 80px 0 60px 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero-content {
        margin: 0 auto;
    }
    
    .hero-btns {
        justify-content: center;
        flex-direction: column;
        gap: 12px;
    }
    
    .cta-flex {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    .about-section-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-img {
        order: -1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-bottom-links a {
        margin: 0 10px;
    }
}
