/* ============================
   1. CSS Variables & Reset
   ============================ */
:root {
    --primary: #0056b3; 
    --secondary: #00a8cc;
    --accent: #ffc107;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --white: #ffffff;
    --success: #28a745;
    --danger: #dc3545;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Sarabun', sans-serif; }
html { scroll-behavior: smooth; }
body { color: #333; line-height: 1.6; background-color: #f9f9f9; padding-top: 70px; }

/* ============================
   2. Navigation Bar
   ============================ */
nav { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: fixed; width: 100%; top: 0; z-index: 1000; }
.nav-container { max-width: 1300px; margin: 0 auto; padding: 0 15px; }
.nav-content { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); text-decoration: none; display: flex; align-items: center; }

.nav-links { display: flex; list-style: none; gap: 20px; align-items: center; }
.nav-links a { 
    padding: 8px 12px;
    text-decoration: none; 
    color: #333; 
    font-size: 0.95rem; 
    font-weight: 500; 
    transition: 0.3s; 
    border-radius: 4px; 
    white-space: nowrap;
}
.nav-links a:hover { color: var(--primary); background: var(--light); }

/* Dropdown Menu */
.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    border-radius: 5px;
    padding: 10px 0;
    z-index: 1100;
}
.dropdown:hover .dropdown-menu { display: block; animation: fadeIn 0.3s; }
.dropdown-menu li { display: block; }
.dropdown-menu a { 
    display: block; 
    padding: 10px 20px; 
    border-radius: 0; 
    border-bottom: 1px solid #f1f1f1;
}
.dropdown-menu a:hover { background: var(--light); padding-left: 25px; }

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

.mobile-menu-btn { display: none; background: transparent; border: none; font-size: 1.5rem; color: var(--primary); cursor: pointer; }

/* Mobile Responsive */
@media (max-width: 1200px) {
    .nav-links { display: none; position: absolute; top: 70px; left: 0; width: 100%; background: white; flex-direction: column; padding: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.1); gap: 0; align-items: flex-start; }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { padding: 15px; width: 100%; display: block; border-bottom: 1px solid #eee; }
    .mobile-menu-btn { display: block; }
    .dropdown-menu { position: static; display: none; box-shadow: none; padding-left: 20px; background: #f8f9fa; }
    .dropdown:hover .dropdown-menu { display: block; }
}

/* ============================
   3. Layout & Sections
   ============================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 70px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.2rem; color: var(--primary); margin-bottom: 10px; }
.underline { width: 80px; height: 4px; background: var(--secondary); margin: 0 auto; }

/* Hero Section */
.hero {
    background-size: cover; background-position: center; height: 50vh;
    display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white);
}
.hero h1 { font-size: 2.8rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }

/* ============================
   4. Web Service & Pricing Box
   ============================ */
.web-highlight {
    background: white; border: 2px solid var(--secondary); border-radius: 15px; overflow: hidden;
    display: flex; flex-wrap: wrap; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 50px;
}
.highlight-left {
    flex: 1; background: var(--primary); color: white; padding: 40px; text-align: center;
    display: flex; flex-direction: column; justify-content: center; min-width: 300px;
}
.price-tag { font-size: 3.5rem; font-weight: bold; color: var(--accent); line-height: 1; margin: 15px 0; }
.highlight-right { flex: 2; padding: 40px; min-width: 300px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; margin-top: 20px; }
.feature-item { display: flex; align-items: center; font-size: 0.95rem; }
.feature-item i { color: var(--success); margin-right: 10px; font-size: 1.2rem; }

/* Pricing Table */
.pricing-table { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 50px; }
.pricing-card {
    background: white; border-radius: 10px; width: 300px; padding: 30px; text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #eee; position: relative;
}
.pricing-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.pricing-card.popular { border: 2px solid var(--primary); transform: scale(1.05); z-index: 2; }
.badge-popular { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--accent); padding: 5px 15px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.pricing-price { font-size: 2rem; color: var(--primary); font-weight: bold; margin: 15px 0; }
.pricing-features { list-style: none; margin: 20px 0; text-align: left; }
.pricing-features li { padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 0.9rem; }
.pricing-features li i { color: var(--success); margin-right: 8px; }

/* ============================
   5. Grid & Cards
   ============================ */
.grid-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,0.08); transition: 0.3s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); }
.card-img { height: 180px; background-position: center; background-size: cover; }
.card-body { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }

.template-img { height: 220px; background-position: top; background-size: cover; transition: 2s ease-in-out; position: relative; }
.card:hover .template-img { background-position: bottom; }

/* ============================
   6. Contact Section
   ============================ */
.contact-wrapper { display: flex; flex-wrap: wrap; gap: 30px; }
.map-box { flex: 1; min-width: 300px; }
.form-box { flex: 1; min-width: 300px; background: white; padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* ============================
   7. UI Elements
   ============================ */
.btn { padding: 10px 20px; border-radius: 5px; text-decoration: none; font-weight: bold; cursor: pointer; display: inline-block; border: none; transition: 0.3s; width: 100%; text-align: center; }
.btn-primary { background: var(--primary); color: white !important; }
.btn-primary:hover { background: #004494 !important; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-line { background: #00B900; color: white; }

/* Modals & Cart */
.floating-cart { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2); cursor: pointer; z-index: 999; }
.cart-badge { position: absolute; top: -5px; right: -5px; background: var(--danger); color: white; width: 25px; height: 25px; border-radius: 50%; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; font-weight: bold; }

.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); }
.modal-box { background: white; margin: 5% auto; width: 90%; max-width: 500px; border-radius: 10px; position: relative; display: flex; flex-direction: column; max-height: 85vh; }
.modal-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; overflow-y: auto; }
.preview-modal { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; flex-direction: column; }
.preview-img-full { max-width: 90%; max-height: 85%; border-radius: 5px; box-shadow: 0 0 20px rgba(255,255,255,0.2); }