/* === SHARED CORPORATE STYLE === */
:root {
    --jp-navy: #002B5B;
    --jp-blue-light: #1A5F7A;
    --jp-gray-bg: #F4F7F9;
    --text-main: #2D3436;
    --text-light: #636E72;
    --white: #FFFFFF;
    --danger: #E74C3C;
    --success: #2ECC71;
    --border-color: #E2E8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--white);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--jp-navy);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container img {
    height: 70px;
    width: auto;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links>li {
    position: relative;
    padding: 15px 0;
}

.nav-links>li>a {
    font-weight: 500;
    color: var(--jp-navy);
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    transition: color .2s ease-in-out;
    overflow: hidden;
}

.nav-links>li>a::after {
    content: "";
    display: block;
    height: 0;
    width: 100%;
    bottom: 0;
    left: 0;
    position: absolute;
    background-color: var(--jp-navy);
    transition: all .2s ease-out;
    z-index: -1;
}

.nav-links>li>a:hover::after,
.nav-links>li>a.active-nav::after {
    height: 100%;
}

.nav-links>li>a:hover,
.nav-links>li>a.active-nav {
    color: var(--white);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    min-width: 480px;
    /* Wider for 2 columns */
    display: none;
    border-top: 2px solid var(--jp-navy);
    grid-template-columns: 1fr 1fr;
    z-index: 1001;
}

@keyframes dropdownFadeSlide {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links li:hover .dropdown {
    display: grid;
    animation: dropdownFadeSlide 0.3s ease forwards;
}

.dropdown li a {
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--jp-navy);
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease-in-out;
}

.dropdown li a:hover {
    background-color: var(--jp-blue-light);
    color: var(--white);
    padding-left: 25px;
    /* slight slide right effect on hover */
}

.member-zone {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-member {
    padding: 5px 15px;
    border: 1px solid var(--jp-navy);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--white);
    color: var(--jp-navy);
    transition: 0.3s;
}

.btn-member:hover {
    background: var(--jp-navy);
    color: var(--white);
}

/* Cart Badge */
.cart-wrapper {
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.cart-wrapper:hover {
    color: var(--jp-blue-light);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    transition: 0.2s;
}

/* --- MAIN CONTENT WRAPPER --- */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.centered-main {
    align-items: center;
    justify-content: center;
}

/* --- FOOTER --- */
.footer {
    background: #111;
    color: #999;
    padding: 60px 5% 30px;
    border-top: 5px solid var(--jp-navy);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: left;
}

.footer-logo {
    height: 100px;
    width: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer h4 {
    color: white;
    margin-bottom: 20px;
    border-left: 3px solid var(--jp-blue-light);
    padding-left: 10px;
}

.footer-links li {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.8rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }
}

/* Scroll to Top Button */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--jp-navy);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollTopBtn:hover {
    background: var(--jp-blue-light);
    transform: translateY(-3px);
}