/* ==========================================================================
   CSS Variables & Design Tokens (Color Palette: White, Black, Gold, Dark Blue)
   ========================================================================== */
:root {
    --primary-dark: #0B132B;   /* น้ำเงินเข้ม Premium */
    --primary-black: #121212;  /* ดำ */
    --accent-gold: #D4AF37;    /* ทอง Premium Gold */
    --accent-gold-hover: #B59226;
    --bg-light: #F8F9FA;       /* ขาวนวล */
    --bg-white: #FFFFFF;       /* ขาวบริสุทธิ์ */
    --text-dark: #1F2937;
    --text-light: #F3F4F6;
    --text-muted: #6B7280;
    --border-color: rgba(212, 175, 55, 0.2);
    
    /* Glassmorphic Options */
    --glass-bg: rgba(11, 19, 43, 0.85);
    --glass-border: rgba(212, 175, 55, 0.3);
    --glass-blur: blur(12px);

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

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

body {
    font-family: 'Noto Sans Thai', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

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

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

/* Section Header Shared Component */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.title-bar {
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-dark), var(--accent-gold));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition-fast);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent-gold), #F3E5AB);
    color: var(--primary-black);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--accent-gold-hover), var(--accent-gold));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--bg-white);
    border-color: var(--accent-gold);
}

.btn-outline:hover {
    background: var(--accent-gold);
    color: var(--primary-black);
    transform: translateY(-2px);
}

.btn-card {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    width: 100%;
    border-radius: 8px;
    padding: 10px;
}

.btn-card:hover {
    background-color: var(--accent-gold);
    color: var(--primary-black);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Loading Screen
   ========================================================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(212, 175, 55, 0.1);
    border-left-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 20px;
    color: var(--accent-gold);
    font-size: 1.2rem;
    letter-spacing: 2px;
    font-weight: 600;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Mobile Top Gallery (ซ่อนเป็นค่าเริ่มต้นสำหรับ Desktop/Tablet)
   ========================================================================== */
.mobile-top-gallery {
    display: none;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-fast);
    background-color: rgba(11, 19, 43, 0.9);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
}

.header.sticky {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bg-white);
    letter-spacing: 0.5px;
}

.logo-sub {
    background: var(--accent-gold);
    color: var(--primary-black);
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.nav-list {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

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

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

.header-btn-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--bg-white);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: url('https://images.unsplash.com/photo-1441984904996-e0b6ba687e04?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    margin-top: 60px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 19, 43, 0.75) 0%, rgba(18, 18, 18, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.pg-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-gold), #F3E5AB);
    color: var(--primary-black);
    font-size: 1.2rem;
    font-weight: 800;
    padding: 6px 20px;
    border-radius: 30px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 20px;
}

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

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ==========================================================================
   เกี่ยวกับเรา (About Us)
   ========================================================================== */
.about {
    background-color: var(--bg-white);
}

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

.about-text h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.about-img-box {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.about-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.about-img-box:hover img {
    transform: scale(1.08);
}

/* ==========================================================================
   จุดเด่นของเรา (Features)
   ========================================================================== */
.features {
    background-color: var(--primary-dark);
    color: var(--bg-white);
}

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

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

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* ==========================================================================
   หมวดสินค้า (Products)
   ========================================================================== */
.products {
    background-color: var(--bg-light);
}

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

.product-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.product-img-wrap {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.1);
}

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

.product-info h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

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

/* ==========================================================================
   โปรโมชั่น (Promotions)
   ========================================================================== */
.promotions {
    background-color: var(--bg-white);
}

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

.promo-card {
    position: relative;
    background-color: var(--bg-light);
    border: 2px solid #E5E7EB;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition-fast);
}

.promo-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
}

.highlight-card {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-black) 100%);
    color: var(--bg-white);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(11, 19, 43, 0.3);
}

.promo-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-gold);
    color: var(--primary-black);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
}

.promo-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.promo-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.promo-highlight {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.promo-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.highlight-card p {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   รีวิวลูกค้า (Reviews Slider)
   ========================================================================== */
.reviews {
    background-color: var(--primary-dark);
    color: var(--bg-white);
}

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

.slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.review-card {
    min-width: 100%;
    box-sizing: border-box;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 16px;
    text-align: center;
}

.avatar-wrap {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-gold);
}

.avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-name {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.stars {
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.review-text {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.7;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.slider-btn {
    background: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.slider-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-black);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dot.active {
    background: var(--accent-gold);
    width: 25px;
    border-radius: 10px;
}

/* ==========================================================================
   คำถามที่พบบ่อย (FAQ Accordion)
   ========================================================================== */
.faq {
    background-color: var(--bg-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-white);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    text-align: left;
    background: none;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}

.faq-icon {
    color: var(--accent-gold);
    transition: var(--transition-fast);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #FAFAFA;
}

.faq-answer p {
    padding: 0 25px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* ==========================================================================
   ติดต่อเรา (Contact Us)
   ========================================================================== */
.contact {
    background-color: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h3,
.contact-form-wrap h3 {
    font-size: 1.6rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

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

.info-item i {
    font-size: 1.3rem;
    color: var(--accent-gold);
    margin-top: 3px;
}

.info-item p {
    color: var(--text-muted);
    font-size: 1rem;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    margin-top: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.footer {
    background-color: var(--primary-black);
    color: var(--bg-white);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

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

.footer-logo {
    margin-bottom: 15px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.pg-footer-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--primary-black);
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 1rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

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

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

.footer-links a:hover {
    color: var(--accent-gold);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--bg-white);
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--accent-gold);
    color: var(--primary-black);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--accent-gold);
    color: var(--primary-black);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 990;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--bg-white);
    transform: translateY(-3px);
}

/* ==========================================================================
   Scroll Animation (Fade In Up)
   ========================================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive Styles (Mobile First & Breakpoints)
   ========================================================================== */

/* มือถือ (Max-width: 767px) */
@media (max-width: 767px) {
    /* แสดง Mobile Gallery แบบไม่มีขอบมนและเห็นเต็มรูปภาพ */
    .mobile-top-gallery {
        display: block;
        background-color: var(--primary-black);
        padding: 20px 0;
    }

    .mobile-gallery-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .mobile-gallery-item {
        position: relative;
        border-radius: 0; /* เอาขอบมนออก */
        overflow: hidden;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .mobile-gallery-item a {
        display: block;
        width: 100%;
        text-decoration: none;
        color: inherit;
    }

    .mobile-gallery-item img {
        width: 100%;
        height: auto; /* แสดงขนาดสัดส่วนจริงของรูปภาพเดิม */
        object-fit: contain;
        display: block;
        border-radius: 0; /* เอาขอบมนของรูปภาพออก */
        transition: transform 0.3s ease;
    }

    .mobile-gallery-item:active img {
        transform: scale(1.02);
    }

    .gallery-caption {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 15px;
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
        color: var(--bg-white);
        font-size: 0.95rem;
        font-weight: 500;
        text-align: center;
    }

    /* Mobile Header & Menu */
    .hero {
        margin-top: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--primary-dark);
        transition: var(--transition-fast);
        padding: 40px 20px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .btn-header {
        display: none;
    }

    /* Adjust Layouts */
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .about-images {
        grid-template-columns: 1fr;
    }
}

/* Tablet (Min-width: 768px and Max-width: 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}