/* Main CSS - Modern Foundation */

:root {
    --primary-color: #0056b3;
    --secondary-color: #FFE01F;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --white: #ffffff;
    --font-main: 'Sarabun', 'Roboto', sans-serif;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    text-decoration: underline;
}

/* Layout */
#container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--white);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    text-align: center;
}

#header h1 {
    margin-bottom: 0.5rem;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

nav a {
    color: var(--white);
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* Main Content */
#content {
    padding: 2rem;
    flex: 1;
    /* Pushes footer down */
}

/* Product Grid System */
.product-category {
    margin-bottom: 3rem;
}

.category-title {
    background-color: var(--secondary-color);
    color: #000;
    padding: 0.75rem 1.5rem;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-weight: 800;
    border-left: 5px solid #000;
    text-transform: uppercase;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.product-card img {
    width: 100%;
    max-width: 180px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 1.1rem;
    margin-top: auto;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
}

/* Footer */
#footer {
    background-color: #333;
    color: var(--white);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
}

#footer p {
    color: #ccc;
    font-size: 0.9rem;
}

#footer a {
    color: var(--secondary-color);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #content {
        padding: 1rem;
    }

    .category-title {
        font-size: 1.25rem;
        padding: 0.5rem 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
        gap: 0.75rem;
    }

    .product-card {
        padding: 1rem;
    }

    .product-card h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        /* 1 column on very small screens */
    }
}

/* Footer QR Code */
.footer-qr {
    margin-top: 20px;
    text-align: center;
}

.footer-qr img {
    border: 1px solid #ddd;
    padding: 5px;
    background: white;
    margin-top: 5px;
    border-radius: 5px;
}

.footer-qr p {
    font-weight: bold;
    font-size: 0.9em;
    color: #ccc;
    /* Updated to match footer text color */
    margin-bottom: 5px;
}

/* Header Description */
.site-description {
    margin-top: 10px;
    font-size: 1.1rem;
    color: var(--white);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    opacity: 0.9;
}

/* Selling Points Section */
.selling-points {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background-color: #f9f9f9;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.selling-points .point {
    flex: 1 1 300px;
    padding: 10px;
}

.selling-points .icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.selling-points h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.selling-points p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}