/* Color Variables */
:root {
    --primary-brown: #3D2314;
    --dark-brown: #25160C;
    --light-brown: #6F4E37;
    --gold: #D4AF37;
    --light-gold: #F3E5AB;
    --cream: #FAF6F0;
    --white: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-muted: #666666;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

body {
    font-family: 'Prompt', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.gold-text {
    color: var(--gold);
}

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

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

.text-center {
    text-align: center;
}

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

.section-title {
    font-size: 2.2rem;
    color: var(--primary-brown);
    margin-bottom: 40px;
    position: relative;
    font-weight: 600;
}

.section-title span {
    color: var(--gold);
}

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

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

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

/* Mobile Top Images (เฉพาะมือถือเท่านั้น) */
.mobile-top-images {
    display: block;
    width: 100%;
}

.mobile-top-images img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (min-width: 768px) {
    .mobile-top-images {
        display: none !important;
    }
}

/* Sticky Header */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-brown);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.nav-menu ul {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 400;
    padding: 5px 0;
    position: relative;
}

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

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

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

.hamburger {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Banner */
.hero {
    position: relative;
    height: 85vh;
    background: url('https://images.unsplash.com/photo-1501339847302-ac426a4a7cbb?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 22, 12, 0.65);
}

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

.hero h1 {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero .tagline {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.hero .sub-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--cream);
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--gold);
    color: var(--dark-brown);
}

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

.btn-secondary {
    border: 2px solid var(--gold);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--gold);
    color: var(--dark-brown);
    transform: translateY(-2px);
}

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

/* เกี่ยวกับเรา */
.about-img img {
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-content p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

/* จุดเด่นของเรา */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: var(--transition);
}

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

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

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--primary-brown);
}

/* หมวดสินค้า Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    text-align: center;
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    padding: 15px;
    font-size: 1.1rem;
    color: var(--primary-brown);
}

/* Galleries (เครื่องดื่ม & เบเกอรี่) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

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

.gallery-item h4 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(transparent, rgba(37, 22, 12, 0.8));
    color: var(--white);
    text-align: center;
    font-weight: 500;
}

/* โปรโมชั่น */
.promo-banner {
    background: linear-gradient(rgba(37, 22, 12, 0.85), rgba(37, 22, 12, 0.85)), url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?auto=format&fit=crop&w=1200&q=80') center/cover;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    color: var(--white);
    border: 1px solid var(--gold);
}

.promo-content h2 {
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 2.2rem;
}

.promo-content .highlight {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.btn-gold {
    background-color: var(--gold);
    color: var(--dark-brown);
    margin-top: 20px;
}

.btn-gold:hover {
    background-color: var(--light-gold);
}

/* บทความ Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-info {
    padding: 20px;
}

.blog-info h3 {
    font-size: 1.1rem;
    color: var(--primary-brown);
    margin-bottom: 10px;
}

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

/* รีวิวลูกค้า Slider */
.slider-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background: var(--cream);
    padding: 40px;
    border-radius: 10px;
}

.testimonial-slide {
    display: none;
}

.testimonial-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.testimonial-slide img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 2px solid var(--gold);
}

.review-text {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.client-name {
    color: var(--primary-brown);
    font-weight: 600;
}

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

.slider-controls button {
    background: var(--primary-brown);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.slider-controls button:hover {
    background: var(--gold);
    color: var(--dark-brown);
}

/* Masonry Gallery */
.masonry-grid {
    column-count: 4;
    column-gap: 15px;
}

.masonry-item {
    margin-bottom: 15px;
    break-inside: avoid;
    border-radius: 8px;
    overflow: hidden;
}

.masonry-item img {
    width: 100%;
    display: block;
    border-radius: 8px;
    transition: var(--transition);
}

.masonry-item img:hover {
    transform: scale(1.03);
}

/* ติดต่อเรา */
.contact-info .company-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-brown);
    margin-bottom: 20px;
}

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

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

.map-container iframe {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    background-color: var(--dark-brown);
    color: var(--cream);
    padding: 30px 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    display: inline-block;
    margin-bottom: 10px;
}

/* Back To Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--gold);
    color: var(--dark-brown);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 99;
    transition: var(--transition);
}

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

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .masonry-grid {
        column-count: 3;
    }
}

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

    .hamburger {
        display: block;
    }

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

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

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

    .hero h1 {
        font-size: 2.2rem;
    }

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

    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }

    .hero-btns {
        flex-direction: column;
    }
}