/* Global Styles */
:root {
    --primary-color: #0066cc;
    --secondary-color: #003366;
    --accent-color: #ff9900;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
}

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

body {
    font-family: 'Kanit', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Call to Action Buttons */
.btn-call {
    background-color: #28a745;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn-call:hover {
    background-color: #218838;
}

.btn-line {
    background-color: #00c300;
    margin-bottom: 10px;
}

.btn-line:hover {
    background-color: #009a00;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 15px;
}

/* Header */
header {
    background-color: var(--light-color);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--secondary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 10px;
}

nav ul li a.active,
nav ul li a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Features Section */
.features {
    padding: 80px 0;
    text-align: center;
    background-color: var(--light-color);
}

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

.feature-item {
    padding: 30px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Products Section */
.products {
    padding: 80px 0;
    text-align: center;
}

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

.product-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: white;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    text-align: center;
}

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

.product-info p {
    margin-bottom: 20px;
    color: #666;
}

/* Product Detail */
.page-header {
    padding: 60px 0;
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
}

.product-comparison {
    padding: 60px 0;
    text-align: center;
    background-color: var(--light-color);
}

.comparison-image {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-detail {
    padding: 80px 0;
}

.product-detail.alternate {
    background-color: var(--light-color);
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.product-images {
    position: relative;
}

.main-image {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
}

.product-thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: var(--primary-color);
}

.product-description h2 {
    margin-bottom: 20px;
}

.product-specs {
    margin-bottom: 30px;
}

.product-specs p {
    margin-bottom: 10px;
}

.product-specs ul {
    padding-left: 20px;
    margin-bottom: 20px;
    list-style-type: disc;
}

.product-specs ul li {
    margin-bottom: 5px;
}

.product-specs .warranty {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
}

.product-specs .warranty p {
    margin-bottom: 0;
    font-size: 1.1em;
    color: var(--secondary-color);
}

/* Testimonials */
.testimonials {
    padding: 80px 0;
    background-color: var(--light-color);
    text-align: center;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial {
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quote {
    font-style: italic;
    position: relative;
    padding: 0 20px;
}

.quote:before,
.quote:after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.5;
    position: absolute;
}

.quote:before {
    top: -10px;
    left: 0;
}

.quote:after {
    bottom: -20px;
    right: 0;
}

.customer {
    margin-top: 20px;
    font-weight: bold;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.cta h2 {
    margin-bottom: 20px;
}

.cta p {
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.cta-buttons .btn {
    min-width: 180px;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.contact-details {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
}

.contact-item {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.contact-item h4 {
    margin-bottom: 5px;
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.map {
    padding: 60px 0;
}

.map-container {
    height: 400px;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
}

.social-connect {
    padding: 60px 0;
    background-color: var(--light-color);
    text-align: center;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.social-item:hover {
    transform: translateY(-5px);
}

.social-item.facebook {
    background-color: #1877f2;
}

.social-item.line {
    background-color: #00c300;
}

.social-item.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-item i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

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

.footer-info i {
    margin-right: 10px;
    color: var(--accent-color);
}

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

.footer-links ul li a {
    color: white;
    opacity: 0.8;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* Spare Parts Page */
.spare-parts {
    padding: 60px 0;
    background-color: var(--light-color);
}

.spare-parts-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.spare-parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.spare-part-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.spare-part-item:hover {
    transform: translateY(-10px);
}

.spare-part-image {
    height: 200px;
    overflow: hidden;
}

.spare-part-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.spare-part-item:hover .spare-part-image img {
    transform: scale(1.05);
}

.spare-part-info {
    padding: 20px;
}

.spare-part-info h4 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.spare-part-info p {
    margin-bottom: 15px;
    color: #666;
    min-height: 3.2em;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

.spare-parts-cta {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.spare-parts-cta h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.spare-parts-cta p {
    margin-bottom: 20px;
}

.parts-info {
    padding: 80px 0;
}

.parts-info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.parts-info-text h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.parts-info-text ul {
    padding-left: 20px;
    list-style-type: disc;
}

.parts-info-text ul li {
    margin-bottom: 10px;
}

.parts-info-image img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Line Connect Section */
.line-connect {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.qr-code {
    flex: 0 0 200px;
    text-align: center;
}

.qr-code img {
    max-width: 200px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background-color: white;
}

.line-id {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.line-id p {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.line-id strong {
    color: #00c300;
    font-size: 1.2em;
}

/* Full-width contact details */
.contact-details-full {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.contact-details-full h3 {
    margin-bottom: 30px;
    color: var(--secondary-color);
}

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

@media (max-width: 768px) {
    .contact-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        margin-bottom: 15px;
    }

    .product-content {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .cta {
        padding: 60px 0;
    }

    .parts-info-content {
        grid-template-columns: 1fr;
    }

    .parts-info-image {
        order: -1;
    }
}

@media (max-width: 576px) {
    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav ul li {
        margin: 5px 0;
    }

    .feature-grid,
    .product-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Gallery Styles */
.gallery-section {
    padding: 60px 0;
    background-color: var(--light-color);
}

.gallery-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.gallery-filter {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gallery-filter:hover,
.gallery-filter.active {
    background-color: var(--primary-color);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 250px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    color: white;
    text-align: left;
}

.gallery-info h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.gallery-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.gallery-empty {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    margin-top: 20px;
}

.upload-section {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
}

.upload-section h3 {
    margin-bottom: 15px;
}

.upload-section p {
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Lightbox customization */
.lightbox-caption {
    font-family: 'Kanit', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 200px;
    }
}
