:root { 
    --primary-red: #d32f2f; 
    --dark-red: #b71c1c; 
    --light-red: #ffebee; 
    --dark: #212121; 
    --gray: #666666; 
    --light-bg: #f8fafc; 
    --accent: #2c3e50; 
    --digital-blue: #2980b9; 
    --line-green: #00B900; 
    --fb-blue: #1877F2; 
    --service-orange: #e67e22; 
    --site-font: 'Kanit', sans-serif;
    --site-font-size: 16px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: var(--site-font); 
    scroll-behavior: smooth; 
}

body { 
    background-color: var(--light-bg); 
    color: var(--dark); 
    line-height: 1.7; 
    overflow-x: hidden; 
    font-size: var(--site-font-size); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    margin: 0;
    padding: 0;
} 
    
header { 
    background: #ffffff; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
    width: 100%;
}

.nav-container { 
    max-width: 1280px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 24px; 
    position: relative;
}

.logo img { 
    height: 45px; 
    max-height: 45px;
    object-fit: contain; 
    display: block;
}

.nav-right-group { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.nav-links { 
    display: flex; 
    gap: 25px; 
    align-items: center; 
}

.nav-links a { 
    text-decoration: none; 
    color: var(--dark); 
    transition: 0.3s; 
    font-size: 1rem; 
    font-weight: 400; 
    position: relative; 
    white-space: nowrap; 
    padding-bottom: 4px; 
}

.nav-links a::after { 
    content: ''; 
    position: absolute; 
    width: 0; 
    height: 2px; 
    bottom: 0; 
    left: 0; 
    background-color: var(--primary-red); 
    transition: width 0.3s ease; 
}

.nav-links a:hover { 
    color: var(--primary-red); 
}

.nav-links a:hover::after { 
    width: 100%; 
}

.nav-links a.cart-menu-link { 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
}

.cart-badge { 
    background: var(--primary-red); 
    color: white; 
    border-radius: 50%; 
    padding: 1px 6px; 
    font-size: 0.7rem; 
    font-weight: 500; 
}

.menu-toggle { 
    display: none; 
    font-size: 1.6rem; 
    cursor: pointer; 
    color: var(--dark); 
    background: none; 
    border: none; 
}

.desktop-admin-icon { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    background: #f1f5f9; 
    padding: 6px 14px; 
    border-radius: 20px; 
    border: 1px solid #e2e8f0; 
    transition: 0.2s; 
}

.desktop-admin-icon:hover { 
    background: #e2e8f0; 
}

.mobile-only-link { 
    display: none; 
}

@media(max-width: 768px) {
    .menu-toggle { display: block; }
    .desktop-admin-icon { display: none !important; }
    .mobile-only-link { display: inline-flex !important; }
    .nav-links { position: absolute; top: 75px; left: 0; width: 100%; background: white; flex-direction: column; align-items: flex-start; padding: 0; box-shadow: 0 10px 25px rgba(0,0,0,0.1); max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; border-top: 1px solid #eee; }
    .nav-links.active { max-height: 550px; padding: 20px 25px; }
    .nav-links a { padding: 12px 0; border-bottom: 1px dashed #eee; width: 100%; font-size: 1.05rem; color: var(--dark) !important; }
    .nav-links a::after { display: none; }
    .cart-badge { position: relative; top: 0; right: 0; margin-left: 8px; display: inline-block; }
}

.slider-container { 
    position: relative; 
    max-width: 1280px; 
    margin: 40px auto; 
    border-radius: 20px; 
    overflow: hidden; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
    width: calc(100% - 48px); 
}

.slide { 
    display: none; 
    position: relative; 
    height: 380px; 
    background-size: cover; 
    background-position: center; 
    transition: opacity 1s ease-in-out; 
}

@media(min-width: 768px) { 
    .slide { height: 460px; } 
}

.slide.active { 
    display: block; 
    animation: fadeIn 1s; 
}

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

.slide-overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.35) 100%); 
    display: flex; 
    align-items: center; 
    padding: 0 25px; 
}

@media(min-width: 768px) { 
    .slide-overlay { padding: 0 70px; } 
}

.slide-content { 
    color: white; 
    max-width: 650px; 
}

.slide-content h2 { 
    font-size: 2.2rem; 
    font-weight: 500; 
    margin-bottom: 12px; 
}

@media(min-width: 768px) { 
    .slide-content h2 { font-size: 3.2rem; } 
}

.slide-content p { 
    font-size: 1.05rem; 
    margin-bottom: 25px; 
    opacity: 0.95; 
    font-weight: 300; 
}

.slide-btn { 
    background: var(--primary-red); 
    color: white; 
    padding: 12px 28px; 
    border-radius: 35px; 
    font-weight: 500; 
    text-decoration: none; 
    display: inline-block; 
    transition: 0.3s; 
    box-shadow: 0 6px 20px rgba(211,47,47,0.4); 
}

.slide-btn:hover { 
    background: var(--dark-red); 
    transform: translateY(-2px); 
}

.slider-dots { 
    text-align: center; 
    position: absolute; 
    bottom: 20px; 
    width: 100%; 
    z-index: 10; 
}

.dot { 
    display: inline-block; 
    width: 10px; 
    height: 10px; 
    margin: 0 5px; 
    background: rgba(255,255,255,0.5); 
    border-radius: 50%; 
    cursor: pointer; 
    transition: 0.3s; 
}

.dot.active { 
    background: white; 
    width: 28px; 
    border-radius: 6px; 
}

.container { 
    max-width: 1280px; 
    margin: 40px auto; 
    padding: 0 24px; 
    width: 100%; 
}

/* บังคับให้คอนเทนต์แรกสุดเว้นระยะห่างจาก Header ลงมาเสมอ ไม่ให้ชนกัน */
body > .container:first-of-type,
body > div:first-of-type,
body > .slider-container:first-of-type {
    margin-top: 40px !important;
}

.section-title { 
    text-align: center; 
    margin-bottom: 40px; 
}

.section-title h2 { 
    font-size: 2rem; 
    color: var(--dark); 
    font-weight: 500; 
    display: inline-block; 
    margin-bottom: 10px; 
}

@media(min-width: 768px) { 
    .section-title h2 { font-size: 2.5rem; } 
}

.section-title h2 span { 
    color: var(--primary-red); 
}

.section-title p { 
    color: var(--gray); 
    font-size: 1.05rem; 
    font-weight: 300; 
    max-width: 600px; 
    margin: 0 auto; 
}

.section-title-bar { 
    width: 80px; 
    height: 4px; 
    background: linear-gradient(90deg, var(--primary-red), #ff6b6b); 
    margin: 15px auto 0; 
    border-radius: 3px; 
}

.category-filter-bar { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    flex-wrap: wrap; 
    margin-bottom: 35px; 
}

.cat-filter-btn { 
    background: #ffffff; 
    color: var(--dark); 
    border: 1px solid #cbd5e1; 
    padding: 8px 20px; 
    border-radius: 30px; 
    text-decoration: none; 
    font-size: 0.95rem; 
    transition: 0.2s; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
}

.cat-filter-btn:hover, .cat-filter-btn.active { 
    background: var(--primary-red); 
    color: white; 
    border-color: var(--primary-red); 
    box-shadow: 0 4px 12px rgba(211,47,47,0.3); 
}

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

@media(min-width: 768px) { 
    .items-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 35px; } 
}

.item-card { 
    background: white; 
    border-radius: 18px; 
    overflow: hidden; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.06); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    transition: 0.35s ease; 
    border: 1px solid #eaeaea; 
    position: relative; 
    height: 100%; 
}

.item-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 16px 35px rgba(0,0,0,0.12); 
}

.item-img-wrapper { 
    width: 100%; 
    aspect-ratio: 16 / 10; 
    overflow: hidden; 
    position: relative; 
    background: #f1f5f9; 
    flex-shrink: 0; 
}

.item-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.5s ease; 
    display: block; 
}

.item-card:hover .item-img-wrapper img { 
    transform: scale(1.06); 
}

.badge-digital { 
    position: absolute; 
    top: 14px; 
    right: 14px; 
    background: var(--digital-blue); 
    color: white; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    z-index: 2; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.badge-general { 
    position: absolute; 
    top: 14px; 
    right: 14px; 
    background: var(--accent); 
    color: white; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    z-index: 2; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.badge-service { 
    position: absolute; 
    top: 14px; 
    right: 14px; 
    background: var(--service-orange); 
    color: white; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    z-index: 2; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.badge-portfolio { 
    position: absolute; 
    top: 14px; 
    right: 14px; 
    background: #8e44ad; 
    color: white; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    z-index: 2; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.item-body { 
    padding: 24px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    flex-grow: 1; 
}

.item-category-tag { 
    font-size: 0.8rem; 
    color: var(--primary-red); 
    margin-bottom: 6px; 
    font-weight: 500; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px; 
}

.item-title { 
    font-size: 1.15rem; 
    font-weight: 500; 
    color: var(--dark); 
    margin-bottom: 10px; 
    display: -webkit-box; 
    -webkit-line-clamp: 1; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.item-desc { 
    color: var(--gray); 
    font-size: 0.95rem; 
    margin-bottom: 18px; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    min-height: 3em; 
    font-weight: 300; 
}

.item-price { 
    font-size: 1.3rem; 
    font-weight: 500; 
    color: var(--primary-red); 
    margin-bottom: 18px; 
}

.item-price-service { 
    font-size: 1.2rem; 
    font-weight: 500; 
    color: var(--service-orange); 
    margin-bottom: 18px; 
}

.btn-group-card { 
    display: flex; 
    gap: 10px; 
}

.btn-detail { 
    background: #34495e; 
    color: white; 
    border: none; 
    padding: 10px 14px; 
    border-radius: 10px; 
    flex: 1; 
    text-align: center; 
    text-decoration: none; 
    font-size: 0.9rem; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    transition: 0.2s; 
}

.btn-detail:hover { 
    background: #2c3e50; 
}

.btn-buy-now { 
    background: var(--primary-red); 
    color: white; 
    border: none; 
    padding: 10px 14px; 
    border-radius: 10px; 
    flex: 1; 
    text-align: center; 
    text-decoration: none; 
    font-size: 0.9rem; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px; 
    transition: 0.2s; 
}

.btn-buy-now:hover { 
    background: var(--dark-red); 
}

.clients-section { 
    margin: 60px auto 30px; 
    padding: 40px 0; 
    background: white; 
    border-radius: 20px; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.04); 
}

.clients-grid { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center; 
    gap: 35px; 
    padding: 0 20px; 
}

.client-logo-item { 
    width: 130px; 
    height: 75px; 
    object-fit: contain; 
    filter: grayscale(100%); 
    opacity: 0.75; 
    transition: 0.3s; 
}

.client-logo-item:hover { 
    filter: grayscale(0%); 
    opacity: 1; 
    transform: scale(1.05); 
}

footer { 
    background: #1a1a1a; 
    color: #cccccc; 
    padding: 70px 24px 30px; 
    margin-top: auto; 
    border-top: 4px solid var(--primary-red);
    transition: background 0.3s, color 0.3s;
}

.footer-content { 
    max-width: 1280px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 40px; 
    margin-bottom: 50px; 
}

.footer-col h3 { 
    font-size: 1.25rem; 
    font-weight: 500; 
    color: #ffffff; 
    margin-bottom: 20px; 
    position: relative; 
    padding-bottom: 10px; 
}

.footer-col h3::after { 
    content: ''; 
    position: absolute; 
    left: 0; 
    bottom: 0; 
    width: 40px; 
    height: 3px; 
    background: var(--primary-red); 
    border-radius: 2px; 
}

.footer-col p { 
    font-size: 0.95rem; 
    margin-bottom: 15px; 
    font-weight: 300; 
    line-height: 1.8; 
    opacity: 0.9; 
}

.footer-links { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.footer-links li a { 
    color: inherit; 
    text-decoration: none; 
    transition: 0.3s; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    font-weight: 300; 
    opacity: 0.85; 
}

.footer-links li a:hover { 
    color: #ffffff; 
    opacity: 1; 
    transform: translateX(5px); 
}

.footer-socials { 
    display: flex; 
    gap: 15px; 
    margin-top: 20px; 
}

.footer-socials a { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 42px; 
    height: 42px; 
    background: rgba(255,255,255,0.08); 
    color: #ffffff; 
    border-radius: 50%; 
    font-size: 1.1rem; 
    transition: 0.3s; 
    text-decoration: none; 
}

.footer-socials a:hover { 
    background: var(--primary-red); 
    transform: translateY(-3px); 
}

.footer-bottom { 
    max-width: 1280px; 
    margin: 0 auto; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 25px; 
    text-align: center; 
    font-size: 0.9rem; 
    font-weight: 300; 
    opacity: 0.8; 
}

.admin-wrap { 
    background: white; 
    padding: 30px; 
    border-radius: 16px; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.05); 
    margin-top: 30px; 
    border: 1px solid #eaeaea; 
}

@media(min-width: 768px) { 
    .admin-wrap { padding: 35px; } 
}

.admin-layout { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 30px; 
}

@media(min-width: 992px) { 
    .admin-layout { grid-template-columns: 280px 1fr; gap: 35px; align-items: start; } 
}

.admin-sidebar { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 14px; 
    padding: 20px; 
}

.admin-menu-section { 
    margin-bottom: 20px; 
    border-bottom: 1px solid #e2e8f0; 
    padding-bottom: 15px; 
}

.admin-menu-section:last-child { 
    border-bottom: none; 
    margin-bottom: 0; 
    padding-bottom: 0; 
}

.admin-menu-title { 
    font-size: 0.85rem; 
    font-weight: 500; 
    color: var(--primary-red); 
    text-transform: uppercase; 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.admin-menu-group { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
}

.admin-menu-group a { 
    padding: 10px 14px; 
    background: white; 
    color: var(--dark); 
    text-decoration: none; 
    border-radius: 8px; 
    font-size: 0.95rem; 
    transition: 0.2s; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    border: 1px solid #e2e8f0; 
}

.admin-menu-group a.active { 
    background: var(--primary-red); 
    color: white; 
    border-color: var(--primary-red); 
    font-weight: 500; 
}

.admin-content-area { 
    background: #ffffff; 
    border: 1px solid #e2e8f0; 
    border-radius: 14px; 
    padding: 25px; 
}

.admin-form-box { 
    background: #fdfdfd; 
    border: 1px solid #e0e0e0; 
    padding: 24px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
}

.form-control { 
    width: 100%; 
    padding: 12px 16px; 
    margin: 8px 0 18px; 
    border: 1px solid #cbd5e1; 
    border-radius: 10px; 
    font-size: 1rem; 
    font-family: var(--site-font); 
}

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

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

.table-responsive { 
    width: 100%; 
    overflow-x: auto; 
    margin-top: 15px; 
    margin-bottom: 25px; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 650px; 
}

th, td { 
    padding: 14px 16px; 
    text-align: left; 
    border-bottom: 1px solid #eee; 
    font-size: 0.95rem; 
}

th { 
    background: #f8f9fa; 
    color: var(--accent); 
    font-weight: 500; 
}

.btn-action-edit { 
    background: #f39c12; 
    color: white; 
    padding: 6px 12px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-size: 0.85rem; 
    margin-right: 6px; 
    border: none; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
}

.btn-action-del { 
    background: #e74c3c; 
    color: white; 
    padding: 8px 14px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-size: 0.85rem; 
    border: none; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
}

.btn-remove-item { 
    color: #e74c3c; 
    text-decoration: none; 
    font-size: 0.9rem; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
}

.cart-qty { 
    width: 60px; 
    padding: 8px; 
    text-align: center; 
    border: 1px solid #cbd5e1; 
    border-radius: 8px; 
    font-size: 1rem; 
}

.btn-checkout { 
    display: block; 
    text-align: center; 
    background: #27ae60; 
    color: white; 
    padding: 14px; 
    border-radius: 10px; 
    text-decoration: none; 
    font-weight: 500; 
    width: 100%; 
    border: none; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
}

.status-badge { 
    display: inline-block; 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: 500; 
}

.status-wait { 
    background: #fff3cd; 
    color: #856404; 
}

.status-process { 
    background: #e0f2fe; 
    color: #0369a1; 
}

.status-success { 
    background: #dcfce7; 
    color: #15803d; 
}

.status-cancel { 
    background: #fee2e2; 
    color: #b91c1c; 
}

#servicePaymentModal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    z-index: 99999; 
    background: rgba(0,0,0,0.7); 
    backdrop-filter: blur(4px); 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
}

#servicePaymentModal.active { 
    display: flex; 
    animation: fadeInModal 0.3s ease; 
}

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

.service-modal-box { 
    background: white; 
    width: 100%; 
    max-width: 650px; 
    border-radius: 20px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); 
    border-top: 6px solid var(--service-orange); 
    position: relative; 
    max-height: 90vh; 
    overflow-y: auto; 
    padding: 35px; 
}

.service-modal-close { 
    position: absolute; 
    top: 18px; 
    right: 20px; 
    background: #f1f5f9; 
    color: var(--dark); 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.2rem; 
    cursor: pointer; 
    border: none; 
    transition: 0.2s; 
}

.service-modal-close:hover { 
    background: var(--service-orange); 
    color: white; 
}

.toast-alert { 
    position: fixed; 
    top: 25px; 
    right: 25px; 
    background: #27ae60; 
    color: white; 
    padding: 15px 25px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    z-index: 99999; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    animation: slideInRight 0.4s ease, fadeOut 0.4s ease 2.6s forwards; 
    font-size: 1rem; 
}

@keyframes slideInRight { 
    from { transform: translateX(120%); opacity: 0; } 
    to { transform: translateX(0); opacity: 1; } 
}

@keyframes fadeOut { 
    to { opacity: 0; visibility: hidden; } 
}

#imageModal { 
    display: none; 
    position: fixed; 
    z-index: 99999; 
    inset: 0; 
    background: rgba(0,0,0,0.8); 
    align-items: center; 
    justify-content: center; 
    padding: 20px; 
}

#imageModal.active { 
    display: flex; 
}

.modal-content-wrap { 
    position: relative; 
    background: white; 
    padding: 12px; 
    border-radius: 14px; 
    max-width: 90%; 
    max-height: 90vh; 
    text-align: center; 
}

.modal-content-wrap img { 
    max-width: 100%; 
    max-height: 80vh; 
    object-fit: contain; 
    border-radius: 10px; 
    display: block; 
}

.modal-close-btn { 
    position: absolute; 
    top: -16px; 
    right: -16px; 
    background: var(--primary-red); 
    color: white; 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.3rem; 
    cursor: pointer; 
    border: 2px solid white; 
}