/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&family=Kanit:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', 'Kanit', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Prevent horizontal scroll from full-bleed sections and zoom fallback */
html, body { overflow-x: hidden; }

/* =============================
   Global page scale: 75%
   - Uses CSS zoom for Chrome/Edge/Safari
   - Fallback to transform for browsers not supporting zoom (e.g., Firefox)
   ============================= */
body {
    zoom: 0.85; /* primary scaling */
}

@supports not (zoom: 1) {
    html, body {
        width: 133.3333%; /* compensate for 0.75 scale to keep layout width */
    }
    body {
        transform-origin: top left;
        transform: scale(0.75);
    }
}

/* Headings use Kanit */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Kanit', 'Sarabun', sans-serif;
    font-weight: 500;
}

/* Buttons and important text use Kanit */
.btn, .nav-menu a, .card-title {
    font-family: 'Kanit', 'Sarabun', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0; /* ลดความสูงของแถบเมนู */
}

.logo img {
    height: 70px; /* ลดขนาดโลโก้ให้แถบเตี้ยลง */
    width: auto;
    max-width: 240px; /* allow slightly wider logos */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-top: 0.15rem; /* ปรับให้เมนูวางเตี้ยลง */
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #007bff;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007bff;
}

.btn-quote {
    background: #007bff !important;
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn-quote:hover {
    background: #0056b3 !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(00vh - 80px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #fff;
    color: #007bff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline:hover {
    background: #fff;
    color: #007bff;
}

/* Slider */
.slider {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    max-height: 900px;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}




.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    will-change: transform;
}

.slide.active {
    transform: translateX(0);
}

.slider.transitioning .slide {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Responsive slider heights */
@media (max-width: 1024px) {
    .slider {
        height: 50vh;
        min-height: 350px;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .slider {
        height: 40vh;
        min-height: 280px;
        max-height: 400px;
        border-radius: 8px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .slider {
        height: 35vh;
        min-height: 250px;
        max-height: 300px;
        border-radius: 6px;
        margin-bottom: 1rem;
    }
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    padding: 2rem 3rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    max-width: 80%;
    animation: slideContentIn 0.8s ease-out 0.3s both;
}

@keyframes slideContentIn {
    from {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.slide-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    font-weight: 600;
    line-height: 1.2;
}

.slide-content p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    margin-bottom: 1.5rem;
    opacity: 0.95;
    line-height: 1.4;
}

/* Responsive slide content */
@media (max-width: 768px) {
    .slide-content {
        padding: 1.5rem 2rem;
        max-width: 90%;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .slide-content {
        padding: 1rem 1.5rem;
        max-width: 95%;
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 15;
}

.slider-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slider-dot:hover {
    background: rgba(255,255,255,0.7);
    transform: scale(1.2);
}

.slider-dot.active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Slider Arrow Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #333;
    transition: all 0.3s ease;
    z-index: 15;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    opacity: 0;
}

.slider:hover .slider-arrow {
    opacity: 1;
}

.slider-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #667eea;
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

/* Slide animations for smooth transitions */
.slide.slide-in-left {
    animation: slideInLeft 0.5s ease-in-out forwards;
}

.slide.slide-in-right {
    animation: slideInRight 0.5s ease-in-out forwards;
}

.slide.slide-out-left {
    animation: slideOutLeft 0.5s ease-in-out forwards;
}

.slide.slide-out-right {
    animation: slideOutRight 0.5s ease-in-out forwards;
}

@keyframes slideInLeft {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Smooth slide transitions */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider.transitioning .slide {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive slider arrows */
@media (max-width: 768px) {
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .slider-arrow.prev {
        left: 15px;
    }
    
    .slider-arrow.next {
        right: 15px;
    }
    
    .slider-nav {
        bottom: 15px;
    }
}

@media (max-width: 480px) {
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .slider-arrow.prev {
        left: 10px;
    }
    
    .slider-arrow.next {
        right: 10px;
    }
}

/* Section Styles */
.section {
    padding: 3rem 0;
}

.section:first-child {
    padding-top: 2rem;
}

.section:last-child {
    padding-bottom: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: #333;
    position: relative;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #007bff;
}

/* Brand Slider */
.brand-slider {
    overflow: hidden;
    white-space: nowrap;
    background: #f8f9fa;
    padding: 1.5rem 0;
    width: 100%;
    position: relative;
    border-radius: 0; /* full-bleed ไม่ต้องมีมุมโค้ง */
}

/* Firefox fallback: เมื่อไม่รองรับ zoom บน body */
@supports not (zoom: 1) {
    .brand-slider {
        width: 100%;
    }
}

.brand-track {
    display: inline-flex;
    animation: scroll-brands-infinite 40s linear infinite;
    gap: 5rem;
    align-items: center;
    width: max-content;
}

.brand-track:hover {
    animation-play-state: paused;
}

.brand-item {
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 120px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-item:hover {
    transform: scale(1.15);
}

.brand-item img {
    height: 70px;
    width: auto;
    max-width: 120px;
    filter: grayscale(80%);
    transition: all 0.3s ease;
    object-fit: contain;
}

.brand-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

@keyframes scroll-brands-infinite {
    0% { 
        transform: translateX(0); 
    }
    100% { 
        transform: translateX(calc(-120px * 10 - 5rem * 10));
    }
}

/* Responsive adjustments for brand slider */
@media (max-width: 768px) {
    .brand-track {
        gap: 3rem;
    }
    
    .brand-item {
        width: 100px;
    }
    
    .brand-item img {
        height: 50px;
        max-width: 100px;
    }
    
    @keyframes scroll-brands-infinite {
        0% { 
            transform: translateX(0); 
        }
        100% { 
            transform: translateX(calc(-100px * 10 - 3rem * 10));
        }
    }
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-card-content {
    padding: 1.5rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Client Logos */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    align-items: center;
    margin-top: 2rem;
}

.client-logo {
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.client-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.client-logo img {
    max-width: 100px;
    max-height: 60px;
    width: auto;
    height: auto;
}

/* Clients toggle button: visible on white background */
#clients-toggle {
    color: #1f2937; /* slate-800 */
    background: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-weight: 600;
}
#clients-toggle i { color: #4b5563; /* gray-600 */ font-size: 0.95rem; }
#clients-toggle:hover { background: #f9fafb; border-color: #d1d5db; color: #111827; }
#clients-toggle:focus { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* Mobile: แสดงเพียง 12 รายการแรก ก่อนกดแสดงเพิ่มเติม */
@media (max-width: 768px) {
    #clients-grid:not(.open) .mobile-hidden {
        display: none;
    }
}



/* News/Articles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover::before {
    opacity: 1;
}

.article-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 1.8rem;
}

.article-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #333;
    line-height: 1.4;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

.article-meta i {
    color: #667eea;
}

/* Featured Article Badge */
.article-featured {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(45deg, #ffc107, #ff9800);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* Article Page Styles */
.article-single {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.article-single-header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.article-single-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-single-meta {
    opacity: 0.9;
    font-size: 1rem;
}

.article-single-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.article-single-content {
    padding: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-single-content h2,
.article-single-content h3,
.article-single-content h4 {
    margin: 2rem 0 1rem 0;
    color: #333;
}

.article-single-content p {
    margin-bottom: 1.5rem;
}

.article-single-footer {
    padding: 2rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    /* ยืดการ์ดแต่ละใบให้สูงเท่ากันในแต่ละแถว */
    align-items: stretch;
}

/* Force 3 columns on desktop widths */
@media (min-width: 992px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}

/* Featured products compact style */
.featured-products .product-card-content {
    padding: 1rem;
}
.featured-products .product-card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
    text-wrap: balance;
}
.featured-products .product-price,
.featured-products .product-card p,
.featured-products .product-brand {
    display: none;
}
.featured-products .product-card img {
    height: 180px;
}

/* Featured grid column settings */
.featured-products.products-grid {
    grid-template-columns: repeat(3, 1fr);
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    /* ทำให้การ์ดเป็นคอลัมน์ เพื่อดันปุ่มไว้ก้นการ์ด */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.product-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    /* ให้คอนเทนต์ยืดกินพื้นที่ที่เหลือของการ์ด */
    flex: 1 1 auto;
}

.product-card-actions {
    margin-top: auto;
}

.product-card h3 {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 0.45rem;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
    text-wrap: balance;
    /* จำกัดความสูงชื่อสินค้าให้เท่ากันทุกการ์ด */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card p {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 0.9rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007bff;
}

.product-brand {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.5rem;
}

/* ทำให้ปุ่มในการ์ดมีขนาดเท่ากันและกว้างเต็ม */
.product-card .quote-submit-btn {
    width: 100%;
    min-height: 42px;
}

/* Shop layout: sidebar + main */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.shop-sidebar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem;
    position: sticky;
    top: 90px; /* below fixed header */
}

.sidebar-title {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.sidebar-categories, .sidebar-brands { list-style: none; padding-left: 0; }
.sidebar-categories li, .sidebar-brands li { margin: 0.25rem 0; }
.sidebar-categories a, .sidebar-brands a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    color: #374151; /* slate-700 */
    transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-categories a .sidebar-thumb, .sidebar-brands a .sidebar-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    background: #fff;
    border: 1px solid #e5e7eb; /* gray-200 */
}
.mqm-list img.sidebar-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    background: #fff;
    border: 1px solid #e5e7eb; /* gray-200 */
}
.mqm-list li { margin: 0.25rem 0; }
.sidebar-categories a:hover, .sidebar-brands a:hover { background: #f3f4f6; color: #111827; }
.sidebar-categories a.active, .sidebar-brands a.active {
    background: #e7f0ff;
    color: #1d4ed8; /* blue-700 */
    font-weight: 600;
}

/* Responsive: sidebar stacks on top for mobile */
@media (max-width: 992px) {
    .shop-layout { grid-template-columns: 220px 1fr; }
}
@media (max-width: 768px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
}

/* -------- Mobile Quick Menu (FAB + Panel) -------- */
.mobile-quick-menu-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    box-shadow: 0 12px 24px rgba(29,78,216,0.35);
    display: none; /* hidden by default, show on mobile */
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 1100;
}
.mobile-quick-menu-btn:active { transform: scale(0.98); }

.mobile-quick-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1090;
}
.mobile-quick-menu-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-quick-menu-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.25s ease;
    z-index: 1110;
}
.mobile-quick-menu-panel.open { transform: translateY(0); }
.mqm-header { display:flex; align-items:center; justify-content:space-between; padding: 0.9rem 1rem; border-bottom: 1px solid #eee; }
.mqm-title { font-weight: 600; color: #333; }
.mqm-close { background: transparent; border: none; font-size: 1.25rem; color: #666; }
.mqm-content { max-height: 50vh; overflow-y: auto; padding: 0.5rem 1rem 1rem; }
.mqm-section { margin: 0.75rem 0; }
.mqm-section-title { font-size: 0.95rem; color: #6b7280; margin-bottom: 0.4rem; }
.mqm-list { list-style: none; padding-left: 0; }
.mqm-list li a { display:flex; align-items:center; gap: 10px; padding: 0.45rem 0.6rem; border-radius: 10px; text-decoration:none; color:#374151; }
.mqm-list li a.active { background: #f1f5f9; color: #111827; }
.mqm-footer { padding: 0.75rem 1rem; border-top: 1px solid #eee; }

/* Prevent body scroll when panel open */
.mqm-open { overflow: hidden; }

/* Mobile behavior: hide sidebar and show quick menu */
@media (max-width: 768px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { display: none; }
    .mobile-quick-menu-btn {
        display: inline-flex;
        right: 20px;
        bottom: 92px; /* เรียงเหนือปุ่มตะกร้า */
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    /* Ensure Thai-friendly, consistent UI font for inputs/selects */
    font-family: 'Kanit', 'Sarabun', 'Noto Sans Thai', Tahoma, sans-serif !important;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Products page: force font on filter controls (search/category/brand) */
.filters .form-control,
.filters select,
.filters select option,
.filters input[type="text"],
.filters .form-group label {
    font-family: 'Kanit', 'Sarabun', 'Noto Sans Thai', Tahoma, sans-serif !important;
}

.filters .form-control::placeholder {
    font-family: 'Kanit', 'Sarabun', 'Noto Sans Thai', Tahoma, sans-serif !important;
    color: #9aa0a6;
}

/* Filter box layout enhancements */
.filter-box {
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.filter-box .form-group label {
    font-weight: 500;
    color: #495057;
}

/* Extra filters toggle */
.extra-toggle-wrapper { text-align: right; margin-top: 0.5rem; }
.extra-toggle-wrapper .btn-filter {
    background-color: #fff;
    color: #6c757d;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.35rem 0.75rem;
    box-shadow: none;
}
.extra-toggle-wrapper .btn-filter i { margin-right: 6px; color: #6c757d; }
.extra-toggle-wrapper .btn-filter:hover {
    background-color: #f5f7fa;
    border-color: #d0d7de;
}
.extra-toggle-wrapper .btn-filter.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
.extra-toggle-wrapper .btn-filter.active i { color: #fff; }
.extra-filters {
    animation: slideDown 200ms ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main filter button (กรองสินค้า) */
.btn-filter-main {
    background-color: #fff;
    color: #0d6efd;
    border: 1.5px solid #e0e0e0;
    border-radius: 14px;
    padding: 0.5rem 0.9rem;
    font-weight: 600;
    box-shadow: none;
}
.btn-filter-main:hover { background-color: #f7fbff; border-color: #b6d4fe; }
.btn-filter-main:focus,
.btn-filter-main:active,
.btn-filter-main.active {
    background-color: #0d6efd !important;
    color: #fff !important;
    border-color: #0d6efd !important;
}

/* Compact height for inputs/selects in filter area */
.filters-layout .form-control {
    padding: 0.45rem 0.75rem;
    font-size: 0.95rem;
}

/* Filters inner grid (desktop) */
.filters-inner {
    display: grid;
    grid-template-columns: 2fr 0.8fr auto;
    gap: 1rem;
    align-items: end;
}
.filters-inner .form-group { margin-bottom: 0.25rem; }
.filters-inner .form-group label { margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.4rem; }
.filters-inner .form-control { padding: 0.45rem 0.75rem; font-size: 0.95rem; }

/* Collapsible animation for primary filters (desktop default hidden) */
.filters .filter-primary.collapsible {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease;
}
.filters .filter-primary.collapsible.open {
    max-height: 700px;
    opacity: 1;
    transform: translateY(0);
}

/* Mobile: allow filter toggle button visible */
/* (Removed previous rule that hid #filter-primary-toggle on mobile) */

/* Mobile: center the toggle buttons and keep layout tidy */
@media (max-width: 768px) {
    .extra-toggle-wrapper { text-align: center; margin-top: 0.25rem; }
    .extra-toggle-wrapper .btn-filter { padding: 0.4rem 0.8rem; border-radius: 10px; }
    /* Mobile: smaller product title to fit more content */
    .product-card h3 { font-size: 0.85rem; line-height: 1.25; margin-bottom: 0.3rem; }
    .product-brand { font-size: 0.7rem; }
}

/* Products list view */
.products-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.products-list .product-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    align-items: center;
}
.products-list .product-image img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}
.products-list .product-card-content p {
    margin-bottom: 0.5rem;
}
.products-list .product-card .product-card-actions { justify-content: flex-end; }

/* In list view, make quote button icon-only and compact */
.products-list .product-card .quote-submit-btn {
    width: 42px;
    padding: 0.5rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
}
.products-list .product-card .quote-submit-btn .btn-text { display: none; }

/* View toggle active state */
.view-toggle .btn.active {
    background-color: #0d6efd !important;
    color: #fff !important;
    border-color: #0d6efd !important;
}

/* View toggle default (unselected) appearance */
.view-toggle .btn {
    background-color: #fff !important;
    color: #6c757d !important;
    border: 1.5px solid #e0e0e0 !important;
    border-radius: 10px;
    padding: 0.5rem 0.6rem;
}
.view-toggle .btn i {
    color: inherit;
    font-size: 1.1rem;
}
.view-toggle .btn:hover {
    background-color: #f5f7fa !important;
    border-color: #d0d7de !important;
}
.view-toggle .btn.active i {
    color: #fff;
}

/* Mobile adjustments for filter layout */
@media (max-width: 576px) {
    .filters-inner {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        align-items: stretch;
    }
    .filters-inner .form-group label { margin-bottom: 0.25rem; }
    .filters-inner .form-control { width: 100%; }
}

/* Search input wrapper ensures icon centers relative to input height */
.filters-inner .search-input-wrapper { position: relative; }
.filters-inner .search-input-wrapper .form-control { padding-right: 2rem; }
.filters-inner .search-input-wrapper .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0a6;
    pointer-events: none;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Footer */
.footer {
    background: #333;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #007bff;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #007bff;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: #007bff;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

/* Footer - Mobile layout tweaks */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 0.75rem; /* ย่อความสูงรวมของ footer */
    }
    .footer-content {
        grid-template-columns: 1fr 1fr; /* จัดเป็นสองคอลัมน์บนมือถือ */
        gap: 1rem;
        margin-bottom: 1rem;
    }
    .footer-section { margin-bottom: 0; }
    .footer-logo img { height: 32px; }
    .footer-about { grid-column: 1 / -1; } /* เกริ่น/โลโก้ เต็มแถวบนสุด */
    .footer-contact { grid-column: 1 / -1; } /* ติดต่อเรา เต็มแถวถัดไป */
    .footer-buy { grid-column: 1; } /* ช่องทางการซื้อ ซ้าย */
    .footer-menu { grid-column: 2; } /* เมนูหลัก ขวา */
    .social-links { gap: 0.4rem; }
    .footer-menu li { margin-bottom: 0.35rem; }
    .footer-bottom { padding-top: 0.75rem; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .nav-menu li {
        border-bottom: 1px solid #eee;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }



    .clients-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .brand-track {
        gap: 2rem;
    }

    .brand-item img {
        height: 40px;
    }
    
    .section {
        padding: 2rem 0;
    }

    /* Force 2-column categories grid on small screens */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    .categories-grid .category-card {
        grid-column: auto;
    }
    .categories-grid .category-card img {
        height: 160px;
    }

    /* Mobile: show 3 boxes per row on products page */
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem;
    }
    .product-card img {
        height: 140px;
    }
    /* Mobile: make add-to-quote button icon-only and compact */
    .products-grid .quote-submit-btn { min-height: 36px; padding: 0.4rem; }
    .products-grid .quote-submit-btn .btn-text { display: none; }

    .featured-products.products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Make latest articles section 2 columns */
    .articles-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 1.5rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    /* Extra small: even smaller product title */
    .product-card h3 { font-size: 0.75rem; line-height: 1.2; margin-bottom: 0.25rem; }
    .featured-products.products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .category-card img {
        height: 140px;
    }
    .product-card img {
        height: 120px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Search Styles */
.search-highlight {
    background: linear-gradient(120deg, #ffc107 0%, #ff9800 100%);
    color: #333;
    padding: 0.1em 0.2em;
    border-radius: 3px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(255, 193, 7, 0.3);
}



/* Enhanced Article Styles */
.article-single-content .highlight-text {
    color: #667eea;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(102, 126, 234, 0.1);
}

.article-single-content .italic-text {
    color: #764ba2;
    font-style: italic;
}

.article-single-content .code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #667eea;
    border-radius: 6px;
    margin: 1rem 0;
    overflow-x: auto;
}

.article-single-content .code-block pre {
    margin: 0;
    padding: 1rem;
    background: transparent;
    color: #333;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.article-single-content .code-block code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

/* Gallery Styles */
.article-gallery .gallery-item {
    transition: all 0.3s ease;
}

.article-gallery .gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Image Modal Styles */
.image-modal {
    backdrop-filter: blur(5px);
}

.image-modal .modal-content {
    animation: modalZoomIn 0.3s ease-out;
}

@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced hover effects */
.article-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.article-card:hover::after {
    left: 100%;
}

/* Search form animations */
.search-input:focus {
    transform: scale(1.02);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Announcement Popup */
.announcement-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2000;
    padding: 20px;
}

.announcement-overlay.show { display: flex; }

.announcement-modal {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-width: 560px;
    width: 100%;
    overflow: hidden;
}

.announcement-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.announcement-title {
    font-size: 1.25rem;
    color: #2c3e50;
}

.announcement-close {
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1.4rem;
    cursor: pointer;
}

.announcement-body { padding: 18px 22px; color: #495057; }
.announcement-body p { margin-bottom: 0.8rem; }
.announcement-body a { color: #007bff; text-decoration: none; }
.announcement-body a:hover { text-decoration: underline; }

.announcement-footer { 
    padding: 16px 22px; 
    border-top: 1px solid #e9ecef; 
    display: flex; 
    gap: 10px; 
    justify-content: flex-end; 
}

.announcement-btn {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    font-weight: 500;
}

.announcement-btn-primary { background: #007bff; color: #fff; border-color: #007bff; }
.announcement-btn-primary:hover { background: #0056b3; }
.announcement-btn-outline { background: #f8f9fa; color: #495057; }
.announcement-btn-outline:hover { background: #eef0f2; }

/* Announcement Image Slider (frameless) */
.announcement-slider {
    position: relative;
    display: inline-block; /* ให้ขนาดยึดตามรูปภาพ ไม่เต็มจอ */
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
}
.announcement-slides {
    position: relative;
    width: 100%;
    height: 100%;
}
.announcement-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.announcement-slide.active { opacity: 1; }
.announcement-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.announcement-actions {
    position: absolute;
    top: 100%; /* วางใต้กรอบรูป ไม่ทับรูป */
    right: 0;
    margin-top: 8px; /* ระยะห่างเล็กน้อยจากขอบล่างของรูป */
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    color: #fff;
    z-index: 2100;
}
/* Close X at top-right of image */
.announcement-close-icon{
    position: absolute;
    top: 8px; /* ยึดตามกรอบภาพ ไม่ล้นออกไปขอบจอ */
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 24px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    z-index: 2200;
}
.announcement-close-icon:hover{ background: rgba(0,0,0,0.6); }

/* ปรับสำหรับหน้าจอเล็กให้ปุ่ม X ดูไม่ไกลและไม่ใหญ่เกินไป */
@media (max-width: 480px){
  .announcement-close-icon{
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 32px;
  }
  .announcement-actions{
    margin-top: 6px; /* มือถือให้ชิดรูปนิดเดียว */
    gap: 8px;
  }
}

/* Hide-7-days checkbox label styling */
.announcement-hide-label{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0; /* เอากรอบ/ช่องว่างออก */
    background: none; /* ไม่ใช้พื้นหลังกล่อง */
    border-radius: 0;
}
.announcement-hide-label input[type="checkbox"]{
    width: 18px;
    height: 18px;
}
/* Admin: hide deprecated announcement title/content fields */
label[for="popup_title"],
input[name="popup_title"],
label[for="popup_content"],
textarea[name="popup_content"] {
  display: none !important;
}

/* Cookie Banner */
.cookie-banner{
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  background: rgba(30, 33, 36, 0.9);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  z-index: 3000;
}
.cookie-message{ display:flex; align-items:center; gap:10px; }
.cookie-message{ font-size: 15px; line-height: 1.5; }
.cookie-message i{ font-size: 18px; }
.cookie-actions{ display:flex; gap:8px; }
.cookie-btn{ padding: 8px 12px; border-radius:8px; border:1px solid #e9ecef; cursor:pointer; font-weight:500; }
.cookie-btn-primary{ background:#28a745; color:#fff; border-color:#28a745; }
.cookie-btn-outline{ background:#2b2f33; color:#fff; border-color:#3a3f45; }
.cookie-btn-link{ background: transparent; color: #9ec5ff; border: none; text-decoration: underline; padding: 8px 10px; }
.cookie-btn,
.cookie-btn-primary,
.cookie-btn-outline,
.cookie-btn-link{
  font-family: var(--ui-font, inherit);
  font-size: 14px;
}
.cookie-panel{
  margin-top:10px; background:#2b2f33; border-radius:8px; padding:10px 12px;
}
.cookie-info{ margin-bottom:10px; color:#e5e7eb; }
.cookie-info h5{ font-size:1rem; margin:8px 0 4px; color:#fff; }
.cookie-info p{ font-size:0.95rem; line-height:1.5; }

.cookie-option{ margin:8px 0 12px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.cookie-option-label{ font-size:0.95rem; color:#fff; }

/* Switch control */
.cookie-switch{ position:relative; display:inline-block; width:48px; height:26px; }
.cookie-switch input{ opacity:0; width:0; height:0; }
.cookie-slider{ position:absolute; cursor:pointer; inset:0; background:#6b7280; transition:.25s; border-radius:26px; }
.cookie-slider:before{ content:""; position:absolute; width:22px; height:22px; left:2px; top:2px; background:#fff; border-radius:50%; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:.25s; }
.cookie-switch input:checked + .cookie-slider{ background:#28a745; }
.cookie-switch input:checked + .cookie-slider:before{ transform: translateX(22px); }
.cookie-panel-actions{ display:flex; gap:8px; justify-content:flex-end; }

@media (max-width: 480px){
  .cookie-banner{ left:12px; right:12px; bottom:12px; padding:10px 12px; gap:10px; }
  .cookie-actions{ flex-wrap: wrap; }
  .cookie-message{ font-size: 14px; }
  .cookie-message i{ font-size: 16px; }
  .cookie-btn,
  .cookie-btn-primary,
  .cookie-btn-outline,
  .cookie-btn-link{
    font-size: 13px;
    padding: 8px 10px;
  }
}

/* Cookie Modal (Popup) */
.cookie-modal-overlay{ position:fixed; inset:0; background:rgba(0,0,0,0.55); display:none; align-items:center; justify-content:center; z-index:3100; }
.cookie-modal{ background:#2b2f33; color:#fff; border-radius:12px; width:min(680px, 92vw); max-height:82vh; overflow:auto; box-shadow:0 12px 40px rgba(0,0,0,0.35); padding:16px; position:relative; }
.cookie-modal-close{ position:absolute; top:10px; right:10px; width:36px; height:36px; border:none; border-radius:50%; background:rgba(0,0,0,0.4); color:#fff; font-size:22px; line-height:36px; cursor:pointer; }
.cookie-modal-close:hover{ background:rgba(0,0,0,0.6); }

/* LINE Floating Widget */
.line-widget{ position:fixed; right:0; top:50%; transform:translateY(-50%); z-index:2500; display:flex; align-items:center; }
.line-widget-toggle{ background:#28a745; color:#fff; border:none; width:40px; height:40px; border-radius:8px 0 0 8px; box-shadow:0 6px 20px rgba(0,0,0,0.15); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.line-widget-toggle-icon{ font-size:18px; font-weight:700; }
.line-widget.open .line-widget-toggle-icon{ transform: rotate(180deg); }
.line-widget-panel{ display:none; background:#fff; color:#222; border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,0.16); padding:12px; margin-right:6px; width:220px; }
.line-widget.open .line-widget-panel{ display:block; }
.line-widget-header{ text-align:center; margin-bottom:8px; }
.line-widget-title{ font-size:16px; font-weight:700; color:#28a745; }
.line-widget-sub{ font-size:12px; color:#666; }
.line-widget-body{ display:flex; flex-direction:column; align-items:center; gap:8px; }
.line-widget-qr{ width:160px; height:auto; border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,0.08); }
.line-widget-qr-placeholder{ width:160px; height:160px; display:flex; align-items:center; justify-content:center; background:#f1f3f5; border-radius:8px; color:#888; font-weight:600; }
.line-widget-id{ width:100%; text-align:center; font-weight:600; padding:6px 8px; border:1px dashed #ced4da; border-radius:6px; }
.line-widget-copy{ width:100%; background:#28a745; color:#fff; border:none; border-radius:8px; padding:8px 10px; cursor:pointer; box-shadow:0 6px 18px rgba(40,167,69,0.35); font-weight:600; }
.line-widget-copy.copied{ background:#20c997; }
/* เปิด LINE */
.line-widget-open{ width:100%; background:#20c997; color:#fff; border:none; border-radius:8px; padding:8px 10px; cursor:pointer; box-shadow:0 6px 18px rgba(32,201,151,0.35); font-weight:600; }
.line-widget-open:hover{ filter:brightness(1.05); }

@media (max-width: 480px){
  .line-widget{ top: 45%; }
.line-widget-panel{ width: 200px; padding: 10px; }
.line-widget-qr{ width:140px; }
}

/* Stylish Quote Submit Button */
.btn-quote-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.0rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff !important;
  background: #0d6efd; /* official primary blue */
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(13, 110, 253, 0.25);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-quote-primary i { font-size: 1.1rem; }

.btn-quote-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 20px rgba(13, 110, 253, 0.30);
  transform: translateY(-1px);
}

.btn-quote-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(13, 110, 253, 0.25);
}

.btn-quote-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

@media (max-width: 576px) {
  .btn-quote-primary {
    padding: 0.8rem 1.4rem;
    font-size: 1rem;
  }
}
