/* ==================== CSS (แยกไฟล์) ==================== */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

/* Main Container */
.main-container {
    width: 100%;
    min-height: 100%;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Navigation */
.nav-wrapper {
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #005A32, #41AB5D);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-menu a {
    color: #000000;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    padding: 8px 0;
    position: relative;
}

.nav-menu a:hover {
    color: #41AB5D;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #41AB5D;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.login-btn {
    background-color: #005A32;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background-color: #41AB5D;
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #000000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-auth-item {
    display: none;
}

.mobile-auth-item a,
.mobile-auth-item span {
    font-size: 0.95rem;
}

.mobile-auth-user span {
    display: block;
    color: #000000;
    font-weight: 600;
    padding: 10px 0;
}

.desktop-user-badge {
    display: inline-flex;
    align-items: center;
}

/* Hero Section */
.hero-section {
    background-color: #ffffff;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h1 span {
    color: #005A32;
}

.hero-content p {
    font-size: 1.1rem;
    color: #545454;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-badge {
    background-color: #ffffff;
    padding: 12px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.hero-badge svg {
    color: #41AB5D;
}

.hero-badge span {
    font-size: 0.9rem;
    color: #545454;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    width: 100%;
    max-width: 2160px;
    aspect-ratio: 2;
    background: linear-gradient(135deg, #ffffff 0%, #F5EFE6 100%);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.hero-device {
    width: 60%;
    height: 80%;
    background: linear-gradient(180deg, #1a1a1a 0%, #333333 100%);
    border-radius: 40px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.hero-device::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background-color: #000000;
    border-radius: 20px;
}

.hero-device-screen {
    position: absolute;
    top: 50px;
    left: 10px;
    right: 10px;
    bottom: 50px;
    background: linear-gradient(135deg, #41AB5D 0%, #005A32 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-device-screen svg {
    width: 60px;
    height: 60px;
    color: #ffffff;
}

/* Categories Section */
.categories-section {
    background-color: #ffffff;
    padding: 60px 20px;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 10px;
}

.section-header p {
    color: #545454;
    font-size: 1rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.category-card {
    background-color: #F5F5F5;
    border-radius: 20px;
    padding: 30px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    background-color: #ffffff;
    border-color: #41AB5D;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(65, 171, 93, 0.15);
}

.category-card.active {
    background-color: #005A32;
    border-color: #005A32;
}

.category-card.active .category-icon {
    background-color: rgba(255,255,255,0.2);
}

.category-card.active .category-icon svg {
    color: #ffffff;
}

.category-card.active h3 {
    color: #ffffff;
}

.category-icon {
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    transition: all 0.3s ease;
}

.category-icon svg {
    width: 30px;
    height: 30px;
    color: #005A32;
    transition: all 0.3s ease;
}

.category-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000;
    transition: all 0.3s ease;
}

/* Products Section */
.products-section {
    background-color: #FFF8E7;
    padding: 60px 20px;
}

.products-section.new-products {
    background-color: #ffffff;
}

.section-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title-badge {
    background-color: #005A32;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
}

.section-title h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background-color: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #F0F0F0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background-color: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image svg {
    width: 80px;
    height: 80px;
    color: #9A7A5D;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #41AB5D;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-badge.used {
    background-color: #9A7A5D;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 5px;
    line-height: 1.4;
}

.product-detail {
    font-size: 0.85rem;
    color: #545454;
    margin-bottom: 15px;
}

.product-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #FAFAFA;
    border-radius: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-label {
    font-size: 0.8rem;
    color: #545454;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #005A32;
}

.price-value.installment {
    color: #9A7A5D;
    font-size: 0.95rem;
}

.product-accessories {
    margin-bottom: 12px;
}

.accessories-label {
    font-size: 0.75rem;
    color: #545454;
    margin-bottom: 5px;
}

.accessories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.accessory-tag {
    background-color: #F0F0F0;
    color: #545454;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
}

.product-description {
    font-size: 0.8rem;
    color: #545454;
    line-height: 1.6;
    padding-top: 12px;
    border-top: 1px solid #F0F0F0;
}

/* Gallery Section */
.gallery-section {
    background-color: #ffffff;
    padding: 60px 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gallery-item {
    aspect-ratio: 1;
    background-color: #F5F5F5;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #005A32 0%, #41AB5D 100%);
}

.gallery-item:nth-child(1) svg {
    color: #ffffff;
    width: 100px;
    height: 100px;
}

.gallery-item svg {
    width: 50px;
    height: 50px;
    color: #9A7A5D;
}

.gallery-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Footer */
.footer {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand p {
    color: #D9D9D9;
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: #1a1a1a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #005A32;
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #D9D9D9;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: #41AB5D;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #1a1a1a;
    text-align: center;
    color: #545454;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-badges {
        justify-content: center;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-item:nth-child(1) {
        grid-column: span 1;
        grid-row: span 1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        transform: none;
        background-color: #ffffff;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-top: 1px solid #F0F0F0;
        box-shadow: 0 12px 24px rgba(0,0,0,0.08);
        z-index: 1001;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        color: #000000;
        display: block;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
        margin-left: auto;
    }

    .login-btn {
        display: none;
    }

    #auth-container {
        display: none !important;
    }

    .mobile-auth-item {
        display: block;
        width: 100%;
    }

    .desktop-user-badge {
        display: none !important;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-title-wrapper {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 20px 10px;
    }

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }
}

/* ==================== Contact Page Styles ==================== */
.contact-page .section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.contact-page .section-header {
    text-align: center;
    margin-bottom: 32px;
}

.contact-page .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #005A32;
}

.contact-page .section-header p {
    color: #545454;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), #ffffff);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    border: 1px solid #F0F0F0;
}

.contact-card-header { text-align:center; margin-bottom:16px }
.avatar { width:72px; height:72px; border-radius:999px; background:#41AB5D; color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:32px; margin-bottom:8px }
.contact-card h3 { font-size:1.25rem; margin-bottom:6px }
.contact-card .muted { color:#545454 }

.contact-item { margin-bottom:12px }
.contact-item strong { display:block; font-size:0.9rem; color:#333; margin-bottom:6px }

.social-links a.social { display:inline-block; margin-right:8px; padding:8px 12px; background:#F0F0F0; border-radius:8px; color:#333; text-decoration:none; font-weight:600 }
.social-links a.social:hover { background:#41AB5D; color:#fff }

.map-card { background:#fff; border-radius:20px; padding:18px; box-shadow:0 12px 30px rgba(0,0,0,0.06); border:1px solid #F0F0F0 }
.map-wrapper iframe { border-radius:12px; width:100%; height:300px }
.travel-info h4 { margin-top:12px; color:#005A32 }
.travel-info ul { margin-top:8px; color:#545454 }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr }
    .map-wrapper iframe { height: 250px }
}
