/* Global Styles */
:root {
    --primary-color: #004e92;
    /* Deep Blue */
    --primary-light: #0072ff;
    /* Bright Blue */
    --accent-color: #ff416c;
    /* Red/Pink for emphasis */
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --bg-light: #f1f5f9;
    --font-th: 'Kanit', sans-serif;
    --font-en: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-en);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
.brand-th {
    font-family: var(--font-th);
}

img {
    max-width: 100%;
}

/* Header */
header {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    /* Minimal padding */
}

/* New Wrapper for just the logo image to be circular/3D */
/* New Wrapper for just the logo image to be circular/3D */
.logo-circle-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;

    /* 3D Convex Look - Pure White Background */
    background-color: #ffffff;
    background: #ffffff;
    box-shadow:
        5px 5px 15px rgba(0, 0, 0, 0.1),
        -5px -5px 15px rgba(255, 255, 255, 0.8);
    border: 3px solid white;
}

/* Sheen effect only on the circle - Now ON TOP */
.logo-circle-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.9) 50%,
            transparent 70%);
    transform: skewX(-20deg);
    animation: sheen 3s infinite 2s;
    pointer-events: none;
    z-index: 10;
}

.logo-circle-wrapper:hover .logo-img {
    transform: scale(1.1) rotate(-3deg);
}

.logo-img {
    height: auto;
    width: 90%;
    /* Fill even more */
    object-fit: contain;
    /* Multiply blends the white background away! */
    mix-blend-mode: multiply;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-th {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.embossed-text {
    color: var(--primary-color);
    text-shadow:
        1px 1px 2px rgba(255, 255, 255, 0.8),
        -1px -1px 2px rgba(0, 0, 0, 0.2);
}

.brand-en {
    font-size: 0.9rem;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-family: var(--font-th);
    transition: color 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Slideshow */
.slideshow-section {
    width: 100%;
    height: 500px;
    /* Fixed height for slideshow */
    background-color: #000;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure parts are fully visible */
    object-position: center;
    transition: opacity 1s ease-in-out;
    opacity: 0;
    /* JS handles fade in */
}

.slide-img.active {
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    bottom: 10%;
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.slide-text {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.8rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.slide-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Catalog */
.catalog-container {
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.filters-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    /* Removed border */
    background: #f0f0f0;
    /* Light gray base */
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-th);
    font-size: 1rem;
    transition: all 0.1s;
    /* Faster transition for press effect */
    /* 3D Effects */
    box-shadow:
        5px 5px 10px #bebebe,
        -5px -5px 10px #ffffff;
    color: var(--text-dark);
}

/* Filter Button Active State */
.filter-btn:active,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: inset 3px 3px 7px rgba(0, 0, 0, 0.4), inset -3px -3px 7px rgba(255, 255, 255, 0.2);
    transform: translateY(2px);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.5s;
}

.product-card:hover .card-img {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    /* Limit lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    /* Limit lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ask Price Button 3D */
.ask-price-btn {
    width: 100%;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    font-family: var(--font-th);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.1s;
    /* 3D Pop */
    box-shadow: 0 4px 0 #128C7E, 0 5px 10px rgba(0, 0, 0, 0.2);
}

.ask-price-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #128C7E, 0 10px 15px rgba(0, 0, 0, 0.2);
}

.ask-price-btn:active {
    transform: translateY(4px);
    /* Push down */
    box-shadow: 0 0 0 #128C7E, inset 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Remove bottom shadow */
}

/* Floating Buttons */
.floating-contacts {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* 3D Convex Look */
    background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.1) 100%);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.4),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.float-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.6) 50%,
            transparent 70%);
    transform: skewX(-20deg);
    animation: sheen 3s infinite;
}

.float-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.4),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2),
        0 12px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(255, 255, 255, 0.3);
    /* Glow effect */
}

@keyframes sheen {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.btn-line {
    background-color: #06C755;
}

.btn-messenger {
    background-color: #0084FF;
}

.btn-map {
    background-color: #DB4437;
}

/* Google Red */

/* Footer */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-info h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

.footer-info p {
    margin-bottom: 0.8rem;
    opacity: 0.9;
    line-height: 1.6;
}

.copyright {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }

    nav {
        width: 100%;
        order: 3;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        padding: 1rem 0;
        gap: 0;
        margin-top: 1rem;
        border-top: 1px solid #e2e8f0;
    }

    .nav-links.mobile-active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f1f5f9;
        transition: background-color 0.3s;
    }

    .nav-links a:hover {
        background-color: #f8fafc;
    }

    .mobile-menu-btn {
        display: block;
        padding: 0.5rem;
        color: var(--primary-color);
    }

    .hero {
        padding: 3rem 1rem;
    }

    .slideshow-section {
        height: 300px;
    }

    .slide-text {
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
    }

    .filters-bar {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(236, 72, 153, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
}

/* Showroom Brand Cards */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    align-items: stretch;
}

.brand-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.brand-logo-wrapper {
    width: 100%;
    height: 150px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.brand-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s;
}

.brand-card:hover .brand-logo {
    transform: scale(1.05);
}

.brand-info {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.brand-name {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.3;
}

.brand-btn {
    width: 100%;
    background-color: var(--primary-light);
    text-decoration: none;
    padding: 0.6rem;
    border-radius: 10px;
    color: white !important;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.brand-btn:hover {
    background-color: var(--primary-color);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}