/* --- Global Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;600;700&display=swap');

:root {
    --primary-blue: #1d4ed8;
    --dark-blue: #1e3a8a;
    --success-green: #16a34a;
    --cta-orange: #f97316;
}

body {
    font-family: 'Prompt', sans-serif;
    scroll-behavior: smooth;
}

/* --- Header & Nav --- */
.logo-box {
    background-color: var(--white);
    padding: 0.5rem;
    border-radius: 0.25rem;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
}
/* --- UI Components & Utilities --- */
.nav-link {
    @apply text-gray-600 transition-all duration-300 relative;
}
.nav-link:hover { @apply text-blue-600; }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -4px; left: 0; background-color: #2563eb;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ปรับปรุง Dropdown Menu ให้กดง่ายขึ้น */
.dropdown-menu {
    @apply absolute hidden bg-white shadow-xl border border-gray-100 rounded-lg py-2 w-48 transition-all duration-300;
    /* เพิ่มดีเลย์ตอนเมาส์ออกเพื่อให้ลากเมาส์ลงไปกดทัน */
    top: 100%;
    margin-top: 0; /* เปลี่ยนจาก mt-2 เป็น 0 เพื่อลดช่องว่าง */
    padding-top: 10px; /* เพิ่มพื้นที่ด้านบนข้างในแทน */
}

/* สร้างสะพานล่องหนเพื่อให้เมาส์เลื่อนผ่านช่องว่างได้โดยเมนูไม่หาย */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.group:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    @apply block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors;
}

/* --- Hero Slider --- */
.slider-container {
    min-height: 500px;
}
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 0.8s ease-in-out;
    display: flex; align-items: center;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.slide.active { opacity: 1; z-index: 10; }

/* ใส่ URL รูปพื้นหลังของคุณที่นี่ */
.slide-1 { background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&w=1920&q=80'); }
.slide-2 { background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?auto=format&fit=crop&w=1920&q=80'); }
.slide-3 { background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1537462715879-360eeb61a0ad?auto=format&fit=crop&w=1920&q=80'); }

.slide-content { @apply w-full md:w-1/2 p-4 md:p-0; }
.slide-title { @apply text-4xl md:text-5xl font-bold leading-tight mb-6; }
.slide-description { @apply text-lg text-blue-100 mb-8 max-w-lg; }
.btn-primary { @apply bg-white text-blue-900 px-8 py-3 rounded-lg font-bold hover:bg-blue-100 transition-all shadow-lg inline-block; }

/* คลาสใหม่สำหรับปุ่มในส่วน Product */
.btn-product {
    @apply block text-center border-2 border-blue-600 bg-blue-600 text-white py-2 rounded-lg font-bold hover:bg-blue-700 hover:border-blue-700 transition-all shadow-md;
}

.tag-orange { @apply bg-orange-500 text-white px-3 py-1 rounded text-sm font-bold mb-4 inline-block uppercase; }
.tag-green { @apply bg-green-500 text-white px-3 py-1 rounded text-sm font-bold mb-4 inline-block uppercase; }
.tag-red { @apply bg-red-500 text-white px-3 py-1 rounded text-sm font-bold mb-4 inline-block uppercase; }

.slider-controls { @apply absolute bottom-10 left-4 right-4 z-20 flex justify-between items-center pointer-events-none; }
.control-btn { @apply p-2 bg-white/10 hover:bg-white/20 rounded-full text-white pointer-events-auto transition-colors; }
.dots-container { @apply flex gap-2 pointer-events-auto; }
.dot { @apply w-3 h-3 rounded-full bg-white/50 cursor-pointer transition-all; }
.dot.active { @apply bg-white scale-125; }

/* Mobile Menu */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
}
#mobile-menu.open { transform: translateX(0); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.phone-link {
    display: none;
    align-items: center;
    color: var(--dark-blue);
    font-weight: bold;
}

@media (min-width: 768px) {
    .phone-link {
        display: flex;
    }
}

.btn-line {
    background-color: var(--success-green);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.btn-line:hover {
    background-color: #15803d;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    background-color: var(--dark-blue);
    color: white;
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 6rem 0;
    }
}

.hero-title {
    font-size: 1.875rem;
    font-weight: bold;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #d1d5db;
    margin-bottom: 2rem;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.125rem;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #1e40af;
}

.btn-secondary {
    background-color: white;
    color: var(--dark-blue);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.125rem;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

.hero-image-placeholder {
    background-color: #374151;
    width: 100%;
    height: 16rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--dark-blue);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .hero-image-placeholder {
        height: 24rem;
    }
}

/* --- Brand Cards --- */
.section-title {
    font-size: 1.875rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.section-desc {
    color: #4b5563;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.brand-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.brand-logo-placeholder {
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: #9ca3af;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-align: center;
}

.brand-desc {
    color: #4b5563;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.brand-features {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.brand-features li {
    display: flex;
    align-items: center;
    color: #374151;
    margin-bottom: 0.5rem;
}

.brand-features i {
    width: 1rem;
    height: 1rem;
    color: var(--success-green);
    margin-right: 0.5rem;
}

.btn-outline {
    display: block;
    text-align: center;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    font-weight: bold;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* --- Contact Form --- */
.contact-container {
    background-color: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .contact-container {
        flex-direction: row;
    }
}

.contact-info {
    background-color: var(--primary-blue);
    color: white;
    padding: 3rem;
}

@media (min-width: 768px) {
    .contact-info {
        width: 50%;
    }
}

.contact-form-side {
    padding: 3rem;
    background-color: white;
}

@media (min-width: 768px) {
    .contact-form-side {
        width: 50%;
    }
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    border: 1px solid #d1d5db;
    padding: 0.75rem;
    border-radius: 0.5rem;
    outline: none;
    transition: ring 0.2s;
}

.form-input:focus {
    ring: 2px solid var(--primary-blue);
}

.btn-submit {
    width: 100%;
    background-color: var(--cta-orange);
    color: white;
    font-weight: bold;
    padding: 1rem 0;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #ea580c;
}

/* --- Mobile Sticky Bar --- */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem;
    display: flex;
    justify-content: space-around;
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-link i {
    width: 1.5rem;
    height: 1.5rem;
}

.mobile-link span {
    font-size: 0.75rem;
}
/* Custom Styles for Nav Interactions */
        .nav-link {
            @apply text-gray-600 transition-all duration-300 relative;
        }
        .nav-link:hover {
            @apply text-blue-600;
        }
        .nav-link::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -4px;
            left: 0;
            background-color: #2563eb;
            transition: width 0.3s ease;
        }
        .nav-link:hover::after {
            width: 100%;
        }
        
        .dropdown-menu {
            @apply absolute hidden group-hover:block bg-white shadow-xl border border-gray-100 rounded-lg py-2 w-48 mt-2 transition-all duration-300;
        }
        .dropdown-item {
            @apply block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors;
        }

        /* Hero Slider Styles */
        .slider-container {
            position: relative;
            overflow: hidden;
            height: 100%;
            min-height: 500px;
        }
        .slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 0.8s ease-in-out;
            display: flex;
            align-items: center;
        }
        .slide.active {
            opacity: 1;
            z-index: 10;
        }

        /* Mobile Menu Animation */
        #mobile-menu {
            transition: transform 0.3s ease-in-out;
            transform: translateX(100%);
        }
        #mobile-menu.open {
            transform: translateX(0);
        }
    </style>