/* =========================================
   1. Base Variables & Reset
   ========================================= */
:root { --primary: #1F4E3D; --accent: #C5A869; --bg: #F5F5F5; --text: #333333; }
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Prompt', sans-serif; }
body { background: var(--bg); color: var(--text); }

/* =========================================
   2. Search Header & Navigation
   ========================================= */
.main-header { position: sticky; top: 0; z-index: 1000; background: white; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* Top Search Bar */
.search-bar-container { display: flex; align-items: center; padding: 10px 5%; gap: 15px; border-bottom: 1px solid #f0f0f0; }
.logo img { max-height: 40px; width: auto; display: block; }
.logo a { text-decoration: none; font-size: 1.2rem; font-weight: bold; color: var(--primary); }
.search-form { flex: 1; display: flex; background: #f0f0f0; border-radius: 20px; padding: 5px 15px; align-items: center; }
.search-form input { border: none; background: transparent; width: 100%; outline: none; padding: 5px; font-size: 0.9rem; }
.search-form button { border: none; background: transparent; cursor: pointer; font-size: 1.1rem; color: #666; }

/* Scrollable Nav Links */
.nav-links-scroll { padding: 10px 5%; display: flex; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.nav-links-scroll::-webkit-scrollbar { display: none; /* &#3595;&#3656;&#3629;&#3609;&#3649;&#3606;&#3610;&#3648;&#3621;&#3639;&#3656;&#3629;&#3609;&#3651;&#3627;&#3657;&#3604;&#3641;&#3626;&#3632;&#3629;&#3634;&#3604; */ }
.nav-links-scroll a { margin-right: 1.5rem; text-decoration: none; color: var(--text); font-size: 0.95rem; font-weight: 500; display: inline-block; }
.nav-links-scroll a:hover { color: var(--accent); }

/* Dropdown */
.dropdown { position: relative; display: inline-block; cursor: pointer; }
.dropdown-content { display: none; position: absolute; top: 100%; left: 0; background: white; min-width: 250px; box-shadow: 0px 8px 16px rgba(0,0,0,0.1); z-index: 101; border-radius: 5px; flex-direction: column; }
@media (min-width: 769px) {
    .dropdown:hover .dropdown-content { display: flex; }
}
.dropdown-content a { padding: 12px 20px; border-bottom: 1px solid #f0f0f0; margin: 0; white-space: normal; display: block; color: var(--text); }
.dropdown-content a:hover { background-color: #f9f9f9; color: var(--accent); }

/* =========================================
   3. Category Icon Grid (&#3627;&#3617;&#3623;&#3604;&#3627;&#3617;&#3641;&#3656;&#3652;&#3629;&#3588;&#3629;&#3609;)
   ========================================= */
.category-icons-wrapper { background: white; padding: 20px 5%; display: grid; grid-template-columns: repeat(8, 1fr); gap: 15px; margin-bottom: 15px; }
.cat-icon-card { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #333; text-align: center; gap: 8px; }
.cat-icon-card img { width: 55px; height: 55px; border-radius: 12px; object-fit: cover; background: #f9f9f9; padding: 2px; border: 1px solid #eee; }
.cat-icon-card span { font-size: 0.75rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* =========================================
   4. Hero Banner Slider & Sections
   ========================================= */
.heroSwiper { width: 100%; max-height: 400px; background: white; margin-bottom: 10px; }
.heroSwiper .swiper-slide { height: 400px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.heroSwiper img { width: 100%; height: 100%; object-fit: cover; }
.heroSwiper .swiper-pagination-bullet-active { background: var(--accent); }

.section { padding: 2rem 5%; background: white; margin-bottom: 10px; }
.section-title { color: var(--primary); margin-bottom: 1.5rem; font-size: 1.5rem; display: flex; align-items: center; justify-content: space-between; }

/* =========================================
   5. Products Grid & Cards
   ========================================= */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.product-card { background: white; border-radius: 8px; overflow: hidden; border: 1px solid #f0f0f0; text-align: left; display: flex; flex-direction: column; cursor: pointer; transition: 0.3s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.product-image { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 10px; border-bottom: 1px solid #f9f9f9; }
.product-info { padding: 10px; display: flex; flex-direction: column; flex-grow: 1; }
.product-info h3 { font-size: 0.85rem; color: #333; margin-bottom: 8px; line-height: 1.4; font-weight: 400; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-price { color: #EE4D2D; font-size: 1.1rem; font-weight: bold; margin-bottom: 10px; }

/* &#3611;&#3640;&#3656;&#3617;&#3626;&#3629;&#3610;&#3606;&#3634;&#3617; (&#3626;&#3637;&#3615;&#3657;&#3634;&#3614;&#3634;&#3626;&#3648;&#3607;&#3621;&#3588;&#3640;&#3617;&#3650;&#3607;&#3609;) */
.btn-inquire { 
    width: 100%; 
    background: #D4E6F1; 
    color: var(--primary); 
    text-align: center; 
    padding: 8px; 
    border-radius: 4px; 
    font-weight: bold; 
    text-decoration: none; 
    font-size: 0.9rem; 
    border: 1px solid #AED6F1; 
    transition: all 0.3s ease;
    display: block;
}
.btn-inquire:hover { 
    background: #AED6F1; 
    color: var(--primary);
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(174, 214, 241, 0.4); 
}

/* =========================================
   6. Frontend Modal (Popup)
   ========================================= */
.fe-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); align-items: center; justify-content: center; padding: 1rem; }
.fe-modal-content { background: white; border-radius: 10px; width: 100%; max-width: 500px; padding: 2rem; text-align: center; position: relative; }
.fe-close-btn { position: absolute; top: 10px; right: 15px; font-size: 25px; cursor: pointer; }
.fe-modal-img { width: 100%; max-width: 250px; aspect-ratio: 1/1; object-fit: contain; margin-bottom: 1rem; }

/* =========================================
   7. Mobile Responsive
   ========================================= */
@media (max-width: 768px) {
    .search-bar-container { padding: 10px; gap: 10px; }
    .logo img { max-height: 35px; }
    .nav-links-scroll { padding: 10px; }
    
    /* &#3652;&#3629;&#3588;&#3629;&#3609;&#3627;&#3617;&#3623;&#3604;&#3627;&#3617;&#3641;&#3656; 4 &#3649;&#3606;&#3623;&#3651;&#3609;&#3617;&#3639;&#3629;&#3606;&#3639;&#3629; */
    .category-icons-wrapper { grid-template-columns: repeat(4, 1fr); padding: 15px 10px; gap: 10px; }
    .cat-icon-card img { width: 45px; height: 45px; }
    
    .heroSwiper { max-height: 200px; }
    .heroSwiper .swiper-slide { height: 200px; }
    .section { padding: 15px 10px; }
    
    /* &#3626;&#3636;&#3609;&#3588;&#3657;&#3634; 2 &#3594;&#3636;&#3657;&#3609;&#3605;&#3656;&#3629;&#3649;&#3606;&#3623;&#3651;&#3609;&#3617;&#3639;&#3629;&#3606;&#3639;&#3629; */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-info { padding: 8px; }
    .product-price { font-size: 1rem; }
}
