/* ============================================
   Commerzy Static Website - Main Stylesheet
   Shared styles for all pages
   ============================================ */

/* ========== CSS VARIABLES (Customize colors here) ========== */
:root {
    /* Primary Colors */
    --color-primary: #99cd3c;
    --color-primary-dark: #77a12e;
    --color-primary-light: #afe84e;
    --color-primary-gradient: linear-gradient(135deg, var(--color-primary), #29c37f);
    --color-primary-gradient-hover: linear-gradient(135deg, var(--color-primary-dark), #1fa86a);

    /* Secondary Colors */
    --color-secondary: #29c37f;
    --color-accent: #1fbfb0;

    /* Text Colors */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;

    /* Background Colors */
    --color-bg: #ffffff;
    --color-bg-gray: #f8f9fa;
    --color-bg-dark: #1a1a2a;

    /* Border Colors */
    --color-border: #e0e0e0;
    --color-border-light: #eeeeee;

    /* Slider Gradient Colors */
    --gradient-1: linear-gradient(135deg, #8cd45f 0%, #52c553 100%);
    --gradient-2: linear-gradient(135deg, #52c553 0%, #29c37f 100%);
    --gradient-3: linear-gradient(135deg, #29c37f 0%, #1fbfb0 100%);
    --gradient-4: linear-gradient(135deg, #1fbfb0 0%, #0fa9ba 100%);
    --gradient-5: linear-gradient(135deg, #0fa9ba 0%, #0091ac 100%);
}

/* ========== CSS RESET ========== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }
p { margin: 0 0 1rem; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }

/* ========== TYPOGRAPHY ========== */
h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.4; }
h4 { font-size: 1.25rem; line-height: 1.4; }
h5 { font-size: 1rem; line-height: 1.5; }
h6 { font-size: 0.875rem; line-height: 1.5; }

/* ========== LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}
.section-gray { background: #f8f9fa; }
.section-dark { background: #2d3436; color: #fff; }

/* ========== TOP BAR ========== */
.top-bar {
    background: #f5f5f5;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #e0e0e0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left {
    display: flex;
    gap: 20px;
}
.top-bar-left span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text-light);
}
.top-bar-left i { color: var(--color-primary); }
.top-bar-right {
    display: flex;
    gap: 15px;
}
.top-bar-right a {
    color: var(--color-text-light);
    transition: color 0.3s;
}
.top-bar-right a:hover { color: var(--color-primary); }

/* ========== HEADER ========== */
.header {
    background: var(--color-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo */
.logo img {
    height: 40px;
    width: auto;
}

/* Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-menu > li {
    position: relative;
}
.nav-menu > li > a {
    padding: 10px 12px;
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text);
    transition: color 0.3s;
    display: block;
}
.nav-menu > li > a:hover { color: var(--color-primary); }

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg);
    min-width: 280px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 100;
    padding: 10px 0;
}
.nav-menu > li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    color: var(--color-text-light);
    font-size: 14px;
    transition: all 0.3s;
}
.dropdown-menu li a:hover {
    background: var(--color-bg-gray);
    color: var(--color-primary);
    padding-left: 25px;
}

/* Header Buttons */
.header-buttons {
    display: flex;
    gap: 10px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 10px 20px 8px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-align: center;
    border: 2px solid transparent;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(82, 197, 83, 0.3);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}
.btn-white {
    background: #fff;
    color: var(--color-primary);
}
.btn-white:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}
.btn-outline-white {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}
.btn-outline-white:hover {
    background: #fff;
    color: var(--color-primary);
}
.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

/* ========== FOOTER ========== */
.footer {
    background: #1a1a2a;
    color: #fff;
    padding: 30px 0 10px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    height: 40px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}
.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: #fff;
}
.footer-col ul li {
    margin: 0 0 5px 10px;
}
.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color 0.3s;
}
.footer-col ul li a:hover {
    color: var(--color-primary);
}
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
}
.footer-social a:hover {
    background: var(--color-primary);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: rgba(255,255,255,0.6);
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--color-primary);
}
.footer-contact {
    font-size: 14px;
}
.footer-contact i {
    margin-right: 5px;
}

/* ========== MOBILE STYLES ========== */
@media (max-width: 992px) {
    .top-bar { display: none; }

    .header .container { height: 60px; }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transform: translateX(-100%);
        transition: transform 0.3s;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    .nav-menu.active { transform: translateX(0); }
    .nav-menu > li { width: 100%; }
    .nav-menu > li > a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        font-size: 15px;
    }
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        border-radius: 0;
    }
    .nav-menu > li:hover .dropdown-menu,
    .nav-menu > li.open .dropdown-menu { display: block; }
    .dropdown-menu li a { padding: 12px 15px; }

    .header-buttons { display: none; }
    .mobile-menu-toggle { display: block; }

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

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

/* ========== COLORS ========== */
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-light); }
.text-white { color: #fff; }
.bg-primary { background-color: var(--color-primary); }
.bg-gray { background-color: #f8f9fa; }
.bg-dark { background-color: #2d3436; }

/* ========== PRINT STYLES ========== */
@media print {
    .top-bar, .header { display: none !important; }
}
