/* Global Styles */
:root {
    --primary-gold: #D4AF37;
    --secondary-gold: #C5A028;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --off-white: #F9F9F9;
    --border-color: #E5E5E5;
    --spacing-unit: 8px;
    --header-height: 100px;
    /* Adjust as needed */
}

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

body {
    font-family: 'Bai Jamjuree', 'Sarabun', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

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

/* Header */
/* Header & Contact Bar */
header {
    background-color: var(--white);
    /* padding-top: 40px;  <-- Removed padding, matching original look */
    /* padding-bottom: 20px; */
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header-top {
    /* Main wrapper for the top section */
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
    /* For ribbon absolute positioning */
    width: 100%;
}

/* 🎗️ Mourning Ribbon */
.mourning-ribbon {
    position: absolute;
    /* Reverted to absolute for white header placement */
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    z-index: 100;
    /* Standard z-index */
    pointer-events: none;
    display: block;
    /* Change to 'none' to remove */
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0H40L0 40V0Z' fill='%23000000'/%3E%3Ctext x='5' y='18' font-family='Arial' font-size='10' fill='white' font-weight='bold' transform='rotate(-45 15 15)'%3Eไว้อาลัย%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* Original Contact Bar Layout */
.contact-bar-container {
    width: 100%;
    max-width: 1200px;
    /* Enforcing the Standardized Width */
    margin: 0 auto;
    padding: 10px 20px;
    /* Reduced vertical padding */
    position: relative;
}

.contact-inner {
    /* ... unchanged ... */
}

/* ... */
/* Card Buttons Alignment */
.card .btn-primary,
.card .btn-gold,
.product-card .btn-primary {
    margin-top: auto !important;
}

.card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-gold);
}

.contact-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.contact-actions {
    /* ... No changes needed here, just fixing previous context ... */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    z-index: 10;
}

/* Fix for giant images in flex containers & Standardize LINE button size */
.contact-actions img {
    max-width: none !important;
    width: auto !important;
    height: 44px !important;
    /* Force height to match other buttons */
    display: block;
    object-fit: contain;
    /* Ensure it doesn't stretch weirdly */
}

/* ... */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-gold);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.15rem;
    /* Increased font size */
}

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

/* Base Contact Bar Button Style */
.btn-contact {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.btn-contact:hover {
    background-color: #fff;
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Mobile Responsiveness for Header */
/* Mobile Responsiveness for Header */
@media (min-width: 768px) {

    /* Ensure content stays centered and stacked on larger screens too, matching the reference */
    .contact-inner {
        flex-direction: column;
        justify-content: center;
    }

    .contact-actions {
        justify-content: center;
    }
}

/* Hero Section */
.hero,
.hero-content {
    color: white !important;
}

.hero-content h1,
.hero-content h2,
.hero-content p {
    color: white !important;
}

.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
    width: 100%;
}

.hero h1 {
    color: #FFD700;
    margin-bottom: 20px;
}

.hero p,
.hero .tagline {
    font-size: 1.2rem;
    color: #eee !important;
    /* Force readable text on dark bg */
    max-width: 800px;
    margin: 0 auto 40px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-gold);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.15rem;
    /* Increased font size */
}

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

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-gold);
    margin: 15px auto 0;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
    /* Explicitly ensure stretching */
}

.card,
.product-card {
    /* Added .product-card */
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Ensure content formatting */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card .btn-primary,
.card .btn {
    margin-top: auto !important;
}

.card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-gold);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 30px 0 15px;
    /* Compact padding */
    margin-top: auto;
    font-size: 0.95rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    /* Reduced gap */
}

.footer-info h3 {
    color: var(--primary-gold);
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.address-block p {
    margin: 0;
    line-height: 1.4;
}

.address-block .th {
    font-size: 1rem;
    margin-bottom: 4px;
}

.address-block .en {
    font-size: 0.8rem;
    color: #bbb;
    margin-bottom: 8px;
}

.footer-info .tel {
    margin-top: 5px;
    font-size: 1.1rem;
    color: var(--white);
}

.footer-info .tel a {
    color: var(--primary-gold);
    font-weight: 500;
}

.footer-social {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}

.social-icon {
    color: var(--white);
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-gold);
}

.copyright {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #444;
    padding-top: 15px;
    width: 100%;
    text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-bar {
        justify-content: center;
        gap: 15px;
    }
}

/* Contact Form */
.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.required {
    color: #dc3545;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    background-color: #fafafa;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

/* Mobile Responsiveness for Form */
@media (max-width: 600px) {
    .contact-form-wrapper {
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Form Messages */
.form-message {
    padding: 15px;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Header Alignment - Centered Variant */
.header-centered {
    flex-direction: column !important;
    justify-content: center !important;
    gap: 25px !important;
}

.header-centered .contact-bar {
    width: 100%;
    justify-content: center;
}

/* Button Outline Style (for Header) */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 16px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    height: 40px;
    /* Match Line button height */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-outline i {
    margin-right: 8px;
}

/* Standardized Hero Buttons (Global) */
.hero .btn,
.hero-content .btn {
    display: inline-flex !important;
    /* Force flex for centering */
    justify-content: center !important;
    align-items: center !important;
    padding: 12px 20px !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    margin: 5px !important;
    transition: all 0.3s !important;
    min-width: 250px !important;
    /* Enforce Equal Width for Symmetry */
    text-align: center !important;
    box-sizing: border-box !important;
    font-family: 'Bai Jamjuree', sans-serif !important;
    height: 50px !important;
    /* Force fixed height */
}

/* Gold Button Style */
.hero .btn-gold,
.hero-content .btn-gold,
.hero-content .btn-primary {
    background-color: var(--primary-gold) !important;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    border: 2px solid transparent !important;
    /* Invisible border to match outline height */
}

.hero .btn-gold:hover,
.hero-content .btn-gold:hover,
.hero-content .btn-primary:hover {
    background-color: var(--primary-gold-hover) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

/* Outline Button Style */
.hero .btn-outline,
.hero-content .btn-outline {
    border: 2px solid #fff !important;
    background-color: transparent !important;
    color: #fff !important;
}

.hero .btn-outline:hover,
.hero-content .btn-outline:hover {
    background-color: #fff !important;
    color: #333 !important;
}

/* --- FIXES FOR LAYOUT --- */

/* 1. Header Centering Fix */
.header-centered {
    align-items: center !important;
    /* Critical for centering in column mode */
    text-align: center;
}

/* 2. Map Section Grid Layout */
.grid-2-map {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.map-container {
    width: 100%;
    height: 400px;
    /* Fixed height for consistency */
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    /* Flexbox for the placeholder text centering */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Standardize Product Card Buttons */
.btn-catalog,
.btn-order,
.product-card .btn-catalog,
.product-card .btn-order {
    display: block !important;
    /* Force full width block */
    background-color: var(--primary-gold) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 20px !important;
    /* Slightly taller for better clickability */
    border-radius: 5px !important;
    font-weight: bold !important;
    text-align: center !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
    width: 100% !important;
    /* Fill the entire available width */
    min-width: unset !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-family: 'Bai Jamjuree', sans-serif !important;
    font-size: 16px !important;
    /* Force Standard Font Size (overriding 0.9em) */
    line-height: 1.5 !important;
    margin-top: auto !important;
    /* Push button to bottom */
    box-sizing: border-box !important;
}

.product-info {
    padding: 20px;
    flex: 1;
    /* Fill remaining space in card */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Ensure content distribution */
}

.btn-catalog:hover,
.btn-order:hover,
.product-card .btn-catalog:hover,
.product-card .btn-order:hover {
    background-color: var(--primary-gold-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #fff !important;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .grid-2-map {
        grid-template-columns: 1fr;
        /* Stack vertically on tablet/mobile */
        gap: 30px;
    }

    .map-container {
        height: 300px;
        /* Slightly shorter on mobile */
    }
}

/* --- FONT FIX --- */
/* Force Bai Jamjuree on all elements to prevent inheritance issues */
html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
button,
input,
select,
textarea,
label,
li,
.btn-primary,
.btn-outline {
    font-family: 'Bai Jamjuree', 'Sarabun', sans-serif !important;
}

/* 🛡️ Global PDPA & Sticky CTA Styles */
.sticky-cta {
    position: fixed;
    left: 0;
    bottom: 0;
    background: #1f2937;
    color: white;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

.sticky-cta-text {
    flex: 1;
}

.sticky-cta-text p {
    font-size: 0.75rem;
    opacity: 0.8;
    margin: 0;
}

.sticky-cta-text strong {
    font-size: 0.875rem;
    display: block;
    color: #fbbf24;
}

.sticky-cta-btn {
    background: #f59e0b;
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

.sticky-cta-btn:hover {
    background: #fbbf24;
    transform: scale(1.05);
}

#pdpa-consent-banner {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 320px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 24px;
    z-index: 10001;
    display: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#pdpa-consent-banner.show {
    display: block;
    animation: slideInUp 0.6s both;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pdpa-title {
    font-weight: 700;
    font-size: 1.1em;
    color: #111;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdpa-text {
    font-size: 0.9em;
    color: #444;
    line-height: 1.5;
    margin-bottom: 20px;
}

.pdpa-text a {
    color: #b8860b;
    text-decoration: underline;
}

.pdpa-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pdpa-btn {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.pdpa-btn-accept {
    background: #b8860b;
    color: #fff;
}

.pdpa-btn-reject {
    background: rgba(0, 0, 0, 0.05);
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.pdpa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#pdpa-revisit-btn {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    opacity: 0.6;
}

#pdpa-revisit-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Modern Footer Styles */
/* Footer Styles */
footer {
    background-color: #000;
    color: #fff;
    padding: 50px 0 100px;
    /* Space for Sticky CTA on Desktop */
    font-size: 0.95em;
    margin-top: 50px;
}

.footer-main {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    text-align: center;
    align-items: center;
    /* Changed from start to center */
}

.footer-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 0.9em;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #FFD700;
}

.footer-logo {
    color: #FFD700;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-align: center;
}

.footer-tagline {
    color: #ccc;
    font-size: 0.9em;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo-img {
    height: 60px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Added utility class for logo centering */
.footer-contact-title {
    color: #FFD700;
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-contact-info {
    color: #ccc;
    font-size: 0.85em;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #333;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

.footer-social a:hover {
    background: #FFD700;
    color: #000;
}

.footer-divider {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto 0;
    border: none;
    border-top: 1px solid #333;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.8em;
}

.footer-bottom span {
    color: #FFD700;
}

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

    .sticky-cta-btn {
        width: 100%;
        text-align: center;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    footer {
        padding-bottom: 150px;
        /* Enhanced space for stacked Sticky CTA on Mobile */
    }
}

@media (max-width: 480px) {
    #pdpa-consent-banner {
        width: calc(100% - 40px);
        bottom: 80px;
    }
}