/* CSS สำหรับหน้า products-list ที่มีการจัดวางตำแหน่งใหม่ */

/* =================== CSS Variables & Base ================== */
:root {
    --primary-green: #4fd18b;
    --primary-dark: #2e7a6a;
    --primary-light: #3ab776;
    --accent-green: #5fd19b;
    --background: #f5f9f5;
    --background-light: #fafcfa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-medium: #555555;
    --text-light: #777777;
    --border-light: rgba(79, 209, 139, 0.15);
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 16px;
    --border-radius-large: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --max-width: 1400px;
    
    /* Search-specific variables */
    --search-bg: rgba(255, 255, 255, 0.95);
    --search-border: rgba(79, 209, 139, 0.3);
    --suggestion-bg: #ffffff;
    --suggestion-hover: var(--background-light);
    --highlight-bg: #fff3cd;
    --highlight-border: #ffeaa7;
}

/* =================== Base Styles ================== */
* {
    box-sizing: border-box;
    font-family: 'Kanit', Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--background) 0%, #e8f5e8 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* =================== Background Animations ================== */
.background-animations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.9;
}


/* Circles */
.circles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 8s ease-in-out infinite, pulse 4s ease-in-out infinite;
}

.circle1 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--primary-green) 0%, transparent 70%);
    top: 15%;
    right: 8%;
    animation-delay: 0s;
}

.circle2 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    bottom: 15%;
    left: 10%;
    animation-delay: 2.5s;
}

.circle3 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent-green) 0%, transparent 70%);
    top: 55%;
    right: 15%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.08;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.15;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Floating particles */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, var(--primary-green) 0%, var(--primary-light) 70%);
    border-radius: 50%;
    animation: particle-float 12s linear infinite;
    opacity: 0.4;
    box-shadow: 0 0 6px rgba(79, 209, 139, 0.4);
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1.5s; }
.particle:nth-child(3) { left: 30%; animation-delay: 3s; }
.particle:nth-child(4) { left: 40%; animation-delay: 4.5s; }
.particle:nth-child(5) { left: 50%; animation-delay: 6s; }
.particle:nth-child(6) { left: 60%; animation-delay: 7.5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 9s; }
.particle:nth-child(8) { left: 80%; animation-delay: 10.5s; }

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    5% {
        opacity: 0.4;
        transform: scale(1);
    }
    95% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

/* =================== Header ================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light) 100%);
    padding: 60px 20px;
    text-align: center;
    color: white;
    position: relative;
    z-index: 5;
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.brand-section {
    position: relative;
}

.brand-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    font-size: 1.2rem;
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-weight: 300;
}

/* =================== Category Section ================== */
.category-section {
    padding: 80px 20px;
    background: var(--background-light);
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-green);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin: 0;
    font-weight: 300;
}

/* Category Content Wrapper */
.category-content-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.category-buttons-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.category-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
    max-width: 1200px;
}

/* =================== Category Button Styles ================== */
.category-button {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border-radius: var(--border-radius-large);
    padding: 25px 30px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
    position: relative;
    min-height: 120px;
    overflow: hidden;
}

.category-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 15;
    z-index: 0;
}

.category-button:hover::before {
    opacity: 0.1;
}

.category-button:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.category-button.active {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light) 100%);
    color: var(--white);
}

.category-button.active::before {
    display: none;
}

.category-button-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.button-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.category-button-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.category-button-desc {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.8;
    line-height: 1.3;
}

.popular-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* =================== Service Button Styles ================== */
.service-button-wrapper {
    position: relative;
    display: flex;
    flex-direction: row;
    z-index: 5;
}

.service-toggle-btn.category-button-style {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-large);
    padding: 25px 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    min-height: 120px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    width: 100%;
    text-align: left;
}

.service-toggle-btn.category-button-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 15;
    z-index: 0;
}

.service-toggle-btn.category-button-style:hover::before {
    opacity: 1;
}

.service-toggle-btn.category-button-style:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.service-toggle-btn.category-button-style .service-icon {
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.service-toggle-btn.category-button-style .service-main-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    filter: brightness(0) invert(1); /* ทำให้เป็นสีขาวเพื่อให้เห็นบน background เทา */
}

.service-toggle-btn.category-button-style .button-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.service-toggle-btn.category-button-style .toggle-arrow {
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 15;
}

.service-toggle-btn.category-button-style.collapsed .toggle-arrow {
    transform: rotate(-90deg);
}

/* =================== Service Dropdown ================== */
.service-dropdown {
    position: absolute;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    z-index: 15;
    overflow: hidden;
    transition: var(--transition);
    z-index: 15;
    opacity: 1;
    visibility: visible;
    border: 1px solid var(--border-light);
}

/* Desktop: แสดงทางขวา */
@media (min-width: 769px) {
    .service-dropdown {
        top: 0;
        left: 100%;
        width: 320px;
        margin-left: 15px;
    }
    
    /* ถ้าอยู่คอลัมน์สุดท้าย แสดงทางซ้าย */
    .service-button-wrapper:nth-child(even) .service-dropdown {
        left: auto;
        right: 100%;
        margin-left: 0;
        margin-right: 15px;
    }
}

/* Mobile/Tablet: แสดงด้านล่าง */
@media (max-width: 768px) {
    .service-dropdown {
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        margin-top: 15px;
    }
}

.service-dropdown.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px);
    pointer-events: none;
}

.service-dropdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    z-index: 15;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.service-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: var(--background-light);
    transition: var(--transition);
    z-index: 15;
    z-index: 0;
}

.service-dropdown-item:hover::before {
    left: 0;
}

.service-dropdown-item:last-child {
    border-bottom: none;
}

.service-icon-small {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.service-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.service-dropdown-item .service-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
    line-height: 1.2;
}

.service-dropdown-item .service-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

/* =================== Main Section ================== */
.main-section {
    padding: 60px 20px;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

/* Sidebar */
.sidebar {
    position: relative;
    z-index: 1;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-light);
    position: sticky;
    top: 30px;
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu li {
    margin: 0;
}

.category-menu a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-medium);
    border-radius: var(--border-radius);
    transition: var(--transition);
    z-index: 15;
    font-weight: 400;
    position: relative;
}

.category-menu a:hover {
    background: var(--background-light);
    color: var(--primary-green);
    transform: translateX(5px);
}

.category-menu a.active {
    background: var(--primary-green);
    color: var(--white);
}

/* Main Content */
.main-content {
    min-height: 400px;
    position: relative;
    z-index: 15;
    background: var(--white);
}

/* Force animations to display */
.background-animations,
.background-animations * {
    display: block !important;
}

.sound-waves,
.wave-container,
.circles-container,
.floating-particles {
    display: block !important;
    visibility: visible !important;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    flex: 1;
    min-width: 200px;
}

.category-header {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 10px 0;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.breadcrumb .current {
    color: var(--primary-green);
    font-weight: 500;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 15;
}

.filter-toggle-btn:hover {
    background: var(--primary-dark);
}

.sort-select {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 10px 15px;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    z-index: 15;
    min-width: 200px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(79, 209, 139, 0.1);
}

/* Product Grid */
.product-grid-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius-large);
    padding: 25px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 15;
    z-index: 0;
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.product-item-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    background: var(--background-light);
    padding: 15px;
}

.product-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.product-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.4;
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-products h3 {
    font-size: 1.5rem;
    color: var(--text-medium);
    margin: 0 0 15px 0;
}

.no-products p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Error Messages */
.error-message {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    padding: 15px !important;
    margin-bottom: 20px !important;
    border-radius: var(--border-radius) !important;
    text-align: center !important;
    border: 1px solid #f5c6cb;
    position: relative;
    z-index: 50;
    font-weight: 500;
}

.error-message:before {
    content: '⚠️';
    margin-right: 10px;
    font-size: 1.1em;
}

/* Loading Spinner */
.loading {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
    margin: 20px auto 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================== Floating Elements ================== */
.floating-button-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: inline-block;
}

.floating-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-dark);
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: var(--shadow-heavy);
    border: 2px solid var(--border-light);
    transition: var(--transition-smooth);
    font-weight: 500;
    min-width: 180px;
}

.floating-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background: var(--white);
    border-color: var(--primary-green);
}

.button-bg {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.close-button {
    width: 30px;
    position: absolute;
    top: -10px;
    right: -10px;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    z-index: 15;
}

.close-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 15;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-overlay-content {
    background: var(--white);
    border-radius: var(--border-radius-large);
    padding: 30px;
    margin: 20px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.sidebar-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-overlay-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-dark);
}

.sidebar-close-btn {
    width: 30px;
    height: 30px;
    background: var(--text-light);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 15;
}

.sidebar-close-btn:hover {
    background: var(--text-dark);
}

/* Wave Bottom */
.wave-bottom {
    height: 100px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
}

.wave-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E") no-repeat center/cover;
}

/* =================== Language Translate Button ================== */
/* ส่วนของปุ่มเปลี่ยนภาษาและเมนู */
.language-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Kanit', Arial, sans-serif;
}

/* ปุ่มไอคอนโลก */
.language-button {
    width: 50px;
    height: 50px;
    background-color: #4fd18b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.language-button:hover {
    transform: scale(1.05);
    background-color: #3ab776;
}

.language-button img, .language-button svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* เมนูเลือกภาษา */
.language-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.language-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    text-align: center;
}

.language-option:hover {
    background-color: #f5f9f5;
    color: #2e7a6a;
}

.language-option:first-child {
    border-radius: 8px 8px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 8px 8px;
}

/* Google Translate ที่ซ่อนไว้ */
.goog-te-banner-frame, .skiptranslate {
    display: none !important;
}

/* =================== Z-Index Management ================== */
.background-animations {
    z-index: 1 !important;
}

.container, .content-layout {
    z-index: 10 !important;
}

.main-content {
    z-index: 15 !important;
}

.floating-button-container {
    z-index: 9998 !important;
}

.language-container {
    z-index: 9999 !important;
}

/* Force display animations */
.background-animations,
.background-animations *,
.sound-waves,
.wave-container,
.circles-container,
.floating-particles {
    display: block !important;
    visibility: visible !important;
}

/* =================== Responsive Design ================== */

/* Mobile responsive for language container */
@media (max-width: 768px) {
    .language-container {
        top: 15px;
        right: 15px;
    }
    
    .language-button {
        width: 40px;
        height: 40px;
    }
    
    .language-button img, .language-button svg {
        width: 20px;
        height: 20px;
    }
    
    .language-dropdown {
        min-width: 100px;
    }
}

/* Large Tablets */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-buttons {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .section-title {
        font-size: 2.2rem;
    }

    /* เพิ่มปุ่มตัวกรองสำหรับ tablet */
    .filter-toggle-btn.mobile-only {
        display: flex;
    }

    .sidebar {
        display: none;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .brand-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-buttons {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-button,
    .service-toggle-btn.category-button-style {
        min-height: 100px;
        padding: 20px;
        gap: 15px;
    }
    
    .category-button-image {
        width: 70px;
        height: 70px;
    }
    
    .service-toggle-btn.category-button-style .service-icon {
        font-size: 1.5rem;
    }
    
    .service-toggle-btn.category-button-style .service-main-icon {
        width: 40px;
        height: 40px;
    }
    
    .service-dropdown-item {
        padding: 12px;
        gap: 12px;
    }
    
    .service-icon-small {
        width: 40px;
        height: 40px;
    }
    
    .filter-toggle-btn.mobile-only {
        display: flex;
    }
    
    .sidebar {
        display: none;
    }
    
    .content-header {
        flex-direction: row;
        align-items: stretch;
    }
    
    .header-controls {
        justify-content: space-between;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .category-section {
        padding: 40px 10px;
    }
    
    .section-container {
        padding: 0 10px;
    }
    
    .category-button,
    .service-toggle-btn.category-button-style {
        padding: 15px;
        gap: 10px;
        min-height: 80px;
    }
    
    .category-button-name {
        font-size: 1.1rem;
    }
    
    .category-button-desc {
        font-size: 0.85rem;
    }
    
    .category-button-image {
        width: 60px;
        height: 60px;
    }
    
    .brand-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .floating-button-container {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-button {
        min-width: 150px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}
/* =================== Two Columns Separated Layout ================== */
.two-columns-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 20px;
    background: var(--white);
    position: relative;
    z-index: 20;
}

/* =================== Sidebar Section (Left Frame) ================== */
.sidebar-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-light);
    height: fit-content;
    position: sticky;
    top: 30px;
}

.sidebar-content {
    padding: 25px;
}

.sidebar-section .sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section .sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.sidebar-section .category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section .category-menu li {
    margin: 0;
}

.sidebar-section .category-menu-header {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.sidebar-section .category-menu a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-medium);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 400;
    position: relative;
    margin-bottom: 5px;
}

.sidebar-section .category-menu a:hover {
    background: var(--background-light);
    color: var(--primary-green);
    transform: translateX(5px);
}

.sidebar-section .category-menu a.active {
    background: var(--primary-green);
    color: var(--white);
}

/* =================== Products Section (Right Frame) ================== */
.products-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-light);
    min-height: 600px;
}

.products-content {
    padding: 30px;
}

.products-section .content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.products-section .header-left {
    flex: 1;
    min-width: 200px;
}

.products-section .category-header {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 10px 0;
}

.products-section .breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.products-section .breadcrumb .current {
    color: var(--primary-green);
    font-weight: 500;
}

.products-section .header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.products-section .filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.products-section .filter-toggle-btn:hover {
    background: var(--primary-dark);
}

.products-section .sort-select {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 10px 15px;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.products-section .sort-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(79, 209, 139, 0.1);
}

/* Product Grid in Products Section */
.products-section .product-grid-container {
    min-height: 400px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.products-section .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    width: 100%;
}

.products-section .product-card {
    background: var(--white);
    border-radius: var(--border-radius-large);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
    min-height: 360px;
    display: flex;
    flex-direction: column;
}

.products-section .product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.products-section .product-card .product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    object-position: center;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    background: #ffffff;
    padding: 10px;
    flex: 1;
}

.products-section .product-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    text-align: center;
    line-height: 1.3;
}

.products-section .product-card .product-description {
    font-size: 1rem;
    color: var(--text-medium);
    line-height: 1.5;
    text-align: center;
    margin: 0;
    margin-top: auto;
}

/* Loading state */
.products-section .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-size: 1.1rem;
    color: var(--text-medium);
}

/* =================== Responsive Design for Separated Layout ================== */
@media (max-width: 1024px) {
    .two-columns-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 40px 20px;
    }
    
    .sidebar-section {
        order: 2;
        position: static;
    }
    
    .products-section {
        order: 1;
    }
    
    .products-section .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .products-section .product-card {
        min-height: 320px;
        padding: 25px;
    }
    
    .products-section .product-card .product-image {
        height: 220px;
    }
    
    .products-section .filter-toggle-btn.mobile-only {
        display: flex;
    }
    
    .sidebar-section {
        display: none;
    }
}

@media (max-width: 768px) {
    .two-columns-container {
        padding: 30px 15px;
    }
    
    .products-content {
        padding: 25px;
    }
    
    .products-section .content-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .products-section .category-header {
        font-size: 1.8rem;
    }
    
    .products-section .product-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .products-section .product-card {
        min-height: 280px;
        padding: 20px;
    }
    
    .products-section .product-card .product-image {
        height: 200px;
    }
    
    .products-section .product-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .two-columns-container {
        padding: 20px 10px;
    }
    
    .products-content {
        padding: 15px;
    }
    
    .products-section .category-header {
        font-size: 1.5rem;
    }
    
    .products-section .product-card {
        min-height: 250px;
        padding: 15px;
    }
    
    .products-section .product-card .product-image {
        height: 180px;
    }
    
    .products-section .product-card h3 {
        font-size: 1.1rem;
    }
}

/* Hide old main section styles */
.main-section {
    display: none !important;
}


/* Mobile: ลด z-index ของ service elements */
@media (max-width: 768px) {
    .service-button-wrapper {
        z-index: 3 !important;
    }
    
    .service-toggle-btn.category-button-style {
        z-index: 3 !important;
    }
    
    .service-dropdown {
        z-index: 4 !important;
    }
    
    .service-dropdown-item {
        z-index: 4 !important;
    }
    
    .category-section {
        z-index: 2 !important;
    }
}

@media (max-width: 480px) {
    .service-button-wrapper {
        z-index: 2 !important;
    }
    
    .service-toggle-btn.category-button-style {
        z-index: 2 !important;
    }
    
    .service-dropdown {
        z-index: 3 !important;
    }
    
    .category-section {
        z-index: 1 !important;
    }

/* Mobile: ซ่อน service dropdown และปุ่มในโหมดมือถือ */
@media (max-width: 768px) {
    /* ซ่อน service dropdown ทั้งหมด */
    .service-dropdown {


/* Mobile: แก้ไข z-index ให้ dropdown และ overlay แสดงเหนือ main content */
@media (max-width: 768px) {
    /* Service dropdown ต้องอยู่เหนือ main content */
    .service-dropdown {
        z-index: 9999 !important;
        position: absolute !important;
    }
    
    /* Sidebar overlay ต้องอยู่เหนือ main content */
    .sidebar-overlay {
        z-index: 9998 !important;
    }
    
    /* Main content ต้องอยู่ต่ำกว่า dropdown และ overlay */
    .two-columns-container {
        z-index: 10 !important;
    }
    
    .products-section,
    .sidebar-section {
        z-index: 10 !important;
    }
    
    /* Category section ต้องอยู่ต่ำกว่า dropdown */
    .category-section {
        z-index: 5 !important;
    }
    
    /* Service button ต้องสามารถคลิกได้และแสดง dropdown */
    .service-button-wrapper {
        z-index: 100 !important;
        position: relative !important;
    }
    
    .service-toggle-btn.category-button-style {
        z-index: 100 !important;
        position: relative !important;
    }
}

@media (max-width: 480px) {
    .service-dropdown {
        z-index: 9999 !important;
    }
    
    .sidebar-overlay {
        z-index: 9998 !important;
    }
}
    }
}
}
/* =================== Two Columns Separated Layout ================== */
.two-columns-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 20px;
    background: var(--white);
    position: relative;
    z-index: 10;
}

/* =================== Sidebar Section (Left Frame) ================== */
.sidebar-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-light);
    height: fit-content;
    position: sticky;
    top: 30px;
    z-index: 10;
}

.sidebar-content {
    padding: 25px;
}

.sidebar-section .sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section .sidebar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.sidebar-section .category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section .category-menu li {
    margin: 0;
}

.sidebar-section .category-menu-header {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.sidebar-section .category-menu a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-medium);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 400;
    position: relative;
    margin-bottom: 5px;
}

.sidebar-section .category-menu a:hover {
    background: var(--background-light);
    color: var(--primary-green);
    transform: translateX(5px);
}

.sidebar-section .category-menu a.active {
    background: var(--primary-green);
    color: var(--white);
}

/* =================== Products Section (Right Frame) ================== */
.products-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-light);
    min-height: 600px;
    z-index: 10;
}

.products-content {
    padding: 30px;
}

.products-section .content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.products-section .header-left {
    flex: 1;
    min-width: 200px;
}

.products-section .category-header {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 10px 0;
}

.products-section .breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.products-section .breadcrumb .current {
    color: var(--primary-green);
    font-weight: 500;
}

.products-section .header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.products-section .filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.products-section .filter-toggle-btn:hover {
    background: var(--primary-dark);
}

.products-section .sort-select {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 10px 15px;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
}

.products-section .sort-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(79, 209, 139, 0.1);
}

/* Product Grid in Products Section */
.products-section .product-grid-container {
    min-height: 400px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.products-section .product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    width: 100%;
}

.products-section .product-card {
    background: var(--white);
    border-radius: var(--border-radius-large);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
    min-height: 360px;
    display: flex;
    flex-direction: column;
}

.products-section .product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.products-section .product-card .product-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    object-position: center;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    background: #ffffff;
    padding: 10px;
    flex: 1;
}

.products-section .product-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    text-align: center;
    line-height: 1.3;
}

.products-section .product-card .product-description {
    font-size: 1rem;
    color: var(--text-medium);
    line-height: 1.5;
    text-align: center;
    margin: 0;
    margin-top: auto;
}

/* Loading state */
.products-section .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    font-size: 1.1rem;
    color: var(--text-medium);
}

/* Hide old main section styles */
.main-section {
    display: none !important;
}

/* =================== Responsive Design for Separated Layout ================== */
@media (max-width: 1024px) {
    .two-columns-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 40px 20px;
    }
    
    .sidebar-section {
        order: 2;
        position: static;
    }
    
    .products-section {
        order: 1;
    }
    
    .products-section .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .products-section .filter-toggle-btn.mobile-only {
        display: flex;
    }
    
    .sidebar-section {
        display: none;
    }
}

/* =================== Mobile Z-Index Fix ================== */
@media (max-width: 768px) {
    /* ให้ overlay และ dropdown อยู่เหนือสุด */
    .sidebar-overlay {
        z-index: 99999 !important;
        position: fixed !important;
    }
    
    .service-dropdown {
        z-index: 99998 !important;
        position: absolute !important;
    }
    
    /* ลด z-index ของ main content */
    .two-columns-container,
    .products-section,
    .sidebar-section {
        z-index: 1 !important;
    }
    
    .category-section {
        z-index: 2 !important;
    }
    
    .service-button-wrapper {
        z-index: 50 !important;
        position: relative !important;
    }
}

/* =================== Mobile Products Display Optimization ================== */

/* ปรับแก้การแสดงผลสินค้าในโหมดมือถือให้เป็น 1 คอลัมน์ */
@media (max-width: 768px) {
    .products-section .product-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .products-section .product-card {
        padding: 25px 20px !important;
        min-height: 350px !important;
        border-radius: var(--border-radius) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    .products-section .product-card .product-image {
        height: 200px !important;
        width: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        margin-bottom: 20px !important;
        background: #ffffff !important;
        padding: 15px !important;
        border-radius: 12px !important;
        flex-shrink: 0 !important;
    }
    
    .products-section .product-card h3 {
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        margin-bottom: 10px !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }
    
    .products-section .product-card .product-description {
        font-size: 1rem !important;
        text-align: center !important;
        flex-grow: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.5 !important;
    }
    
    .products-content {
        padding: 20px !important;
    }
    
    .products-section .content-header {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: flex-start !important;
    }
    
    .products-section .header-controls {
        width: 100% !important;
        justify-content: space-between !important;
    }
    
    .products-section .sort-select {
        min-width: 160px !important;
        flex-shrink: 0 !important;
    }
    
    /* ปรับปรุงหัวข้อในโหมดมือถือ */
    .products-section .category-header {
        font-size: 1.5rem !important;
    }
}

/* =================== Ultra Small Mobile (480px and below) ================== */
@media (max-width: 480px) {
    .products-section .product-card {
        padding: 20px 15px !important;
        margin: 10px 0 !important;
        min-height: 320px !important;
    }
    
    .products-section .product-card .product-image {
        height: 180px !important;
        padding: 12px !important;
        margin-bottom: 15px !important;
    }
    
    .products-section .product-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }
    
    .products-section .product-card .product-description {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    .products-content {
        padding: 15px !important;
    }
    
    .products-section .content-header {
        gap: 12px !important;
    }
    
    .products-section .category-header {
        font-size: 1.3rem !important;
    }
    
    .products-section .sort-select {
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
}

/* =================== Tablet Responsive Optimization ================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .products-section .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
    
    .products-section .product-card {
        padding: 25px !important;
        min-height: 340px !important;
    }
    
    .products-section .product-card .product-image {
        height: 200px !important;
        padding: 12px !important;
    }
    
    .products-section .product-card h3 {
        font-size: 1.15rem !important;
    }
    
    .products-section .product-card .product-description {
        font-size: 0.95rem !important;
    }
}
/* =================== SEARCH FUNCTIONALITY STYLES ================== */

/* Search section */
.search-section {
    background: var(--search-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 20px 30px;
    margin-bottom: 30px;
    border: 1px solid var(--search-border);
    position: relative;
    z-index: 10;
}

.search-header {
    text-align: center;
    margin-bottom: 25px;
}

.search-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0 0 8px 0;
}

.search-subtitle {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin: 0;
}

/* Search input wrapper */
.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    font-size: 1rem;
    border: 2px solid var(--search-border);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-dark);
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(79, 209, 139, 0.1);
    background: var(--white);
}

.search-input::placeholder {
    color: var(--text-light);
}

/* Search buttons */
.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.search-button:hover {
    background: var(--primary-dark);
}

.clear-search-btn {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: none;
}

.clear-search-btn.visible {
    display: block;
}

.clear-search-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

/* Search suggestions dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--suggestion-bg);
    border: 1px solid var(--search-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.search-suggestions.visible {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--suggestion-hover);
}

.suggestion-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.suggestion-type {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* Search status */
.search-status {
    text-align: center;

/* =================== SIMPLE PRODUCTS LAYOUT ================== */

.main-content {
    position: relative;
    z-index: 10;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

.section-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-green);
}

.product-image-container {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    margin-bottom: 20px;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.product-code {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 500;
    margin-bottom: 10px;
    padding: 4px 8px;
    background: rgba(79, 209, 139, 0.1);
    border-radius: 6px;
    display: inline-block;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 10px;
}

.product-description {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
    margin: 0;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-actions {
    margin-top: auto;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-family: 'Kanit', sans-serif;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-medium);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error-container {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-medium);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-container h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.error-container p {
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 15px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-image-container {
        height: 160px;
    }
}

/* Animation Classes */
.slideInUp {
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    .search-section,
    .product-actions {
        display: none !important;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
}