* {
    font-family: "Kanit", sans-serif;
    box-sizing: border-box;
}

body {
    background: url('../../_assets/images/background5.png') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('../../_assets/images/background5.png') no-repeat center center fixed;
    background-size: cover;
    filter: blur(8px);
    z-index: -1;
}

.product-remaining {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, .4);
    color: #fff;
    padding: 6px 10px;
    border-radius: 10px;
}

.product-remaining .clock {
    opacity: .9
}


header {
    background: linear-gradient(90deg, #cd0000 0%, #990000 50%, #820000 100%);
    color: white;
    padding: 10px 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    letter-spacing: 2px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(90deg, #0a0a0a 0%, #212121 50%, #3c3c3c 100%);
}

nav ul {
    list-style-type: none;
    display: flex;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a,
button {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

nav div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: center;
    }

    nav div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    nav div a.btn {
        flex: 0 1 calc(50% - 10px);
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        margin: 10px 0;
    }
}



section {
    padding: 50px 20px;
    margin: 20px 0;
    color: #FFF;
    background: #0009;
    border: 2px solid #820000;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

section p {
    font-size: 1rem;
    line-height: 1.8;
}

section ul {
    list-style-type: none;
    margin-top: 10px;
}

section ul li {
    margin-bottom: 10px;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
}

footer p {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        /* Centering items */
        padding: 0;
    }

    nav ul li {
        margin: 10px 10px;
    }

    section {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }
}

/* General Button Styling */
.btn {
    font-size: 16px;
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    /* รูปทรงปุ่มโค้งมน */
    cursor: pointer;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    border-radius: 50px;
}

.btn-primary {
    background-color: #820000;
    border: 2px solid #550000;
    text-shadow: 0px 2px 3px #000000;
    color: white;
}

.btn-primary:hover {
    background-color: #6c0000;
    box-shadow: 0 0px 20px #FF0000;
    transform: translateY(-2px);
}

.btn-primary:active {
    background-color: #6c0000;
    box-shadow: 0 0px 20px #FF0000;
    transform: translateY(2px);
}

.btn-warning {
    background: linear-gradient(90deg, #e9bc3e 0%, #fff395 50%, #eac554 100%);
    color: white;
    border: 2px solid #e9bc3e;
    text-shadow: 0px 2px 3px #000000;
}

.btn-warning:hover {
    background-color: #c07300;
    box-shadow: 0 0px 20px #c07300;
    transform: translateY(-2px);
}

.btn-warning:active {
    background-color: #c07300;
    box-shadow: 0 0px 20px #c07300;
    transform: translateY(2px);
}

.btn-dark {
    background-color: #0e0e0e;
    border: 2px solid #000000;
    color: white;
    text-shadow: 0px 2px 3px #000000;
}

.btn-dark:hover {
    background-color: #080808;
    box-shadow: 0 0px 20px #8b8b8b;
    transform: translateY(-2px);
}

.btn-dark:active {
    background-color: #080808;
    box-shadow: 0 0px 20px #8b8b8b;
    transform: translateY(2px);
}

.btn-blue {
    background-color: #166eff;
    border: 2px solid #0048c0;
    color: white;
    text-shadow: 0px 2px 3px #000000;
}

.btn-blue:hover {
    background-color: #0261ff;
    box-shadow: 0 0px 20px #5997ff;
    transform: translateY(-2px);
}

.btn-blue:active {
    background-color: #0261ff;
    box-shadow: 0 0px 20px #5997ff;
    transform: translateY(2px);
}

.btn-green {
    background-color: #43c84d;
    border: 2px solid #0dad19;
    color: white;
    text-shadow: 0px 2px 3px #000000;
}

.btn-green:hover {
    background-color: #00bf0e;
    box-shadow: 0 0px 20px #5fd568;
    transform: translateY(-2px);
}

.btn-green:active {
    background-color: #00bf0e;
    box-shadow: 0 0px 20px #5fd568;
    transform: translateY(2px);
}

.btn:disabled {
    background-color: #dcdcdc;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.container {
    padding: 0;
    margin: 0;
    margin-top: 50px;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}


.product-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
}

.product-box {
    position: relative;
    /* <— สำคัญ */
    background-size: cover;
    border-radius: 10px;
    overflow: hidden;
    width: 300px;
    height: 400px;
    transition: all .3s ease;
}

/* รูปให้เต็มการ์ดแต่ไม่ดันความสูงการ์ด */
.product-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    /* <— สำคัญ */
}

.product-price-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: red;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 15px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    transform: none;
}

.product-remaining {
    position: absolute;
    /* <— ลอยอยู่ในกรอบเสมอ */
    left: 12px;
    bottom: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    /* ไม่บังการคลิกการ์ด */
}

.product-remaining .clock {
    opacity: .9
}

/* มือถือ */
@media (max-width: 768px) {
    .product-box {
        width: 100%;
        max-width: 300px;
        height: 400px;
    }
}

.product-info {
    padding: 15px;
    text-align: center;
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.2rem;
    color: #e74c3c;
    margin-bottom: 15px;
}

.product-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .product-container {
        justify-content: center;
        gap: 10px;
    }

    .product-box {
        width: 100%;
        max-width: 300px;
    }
}

.btn-lg {
    width: 100%;
}

.text-red {
    color: #FF0000;
}

.text-yellow {
    color: rgb(255, 238, 0);
}

.text-green {
    color: rgb(0, 255, 21);
}

.text-white {
    color: #FFF;
}

.card-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
}

.card-box {
    max-width: 380px;
    background: linear-gradient(90deg, #810000 0%, #a60000 50%, #810000 100%);
    border: 2px solid #ffeb3b;
    margin: 80px auto;
    padding: 40px 30px;
    border-radius: 20px;
    color: white;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 20px #ffeb3b;
}

.mt-2 {
    margin-top: 10px;
}

.mb-2 {
    margin-bottom: 10px;
}

input {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    background-color: rgba(0, 0, 0, 0.69);
    border-radius: 10px;
    box-sizing: border-box;
    color: #FFF;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0.69) inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.logo-image {
    width: 200px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #111;
}

/* ซ่อนไว้ในมือถือ */
.main-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.right-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 220px;
    height: 100%;
    background: #222;
    padding: 20px;
    transition: left 0.3s ease;
    z-index: 1000;
}

#sidebar.active {
    left: 0;
}

#sidebar ul {
    list-style: none;
    padding: 0;
}

#sidebar ul li {
    margin: 15px 0;
}

#sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 900;
}

#overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .main-menu {
        display: none !important;
    }

    .hamburger {
        display: block;
    }
}

#statusImage {
    animation: pulse 1.5s infinite ease-in-out;
    transform-origin: center;
}

#logoimage {
    animation: pulse 1s infinite ease-in-out;
    transform-origin: center;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#logoimage {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.profile-card {
    max-width: 480px;
    background: linear-gradient(90deg, #810000 0%, #a60000 50%, #810000 100%);
    border: 2px solid #ffeb3b;
    margin: 80px auto;
    padding: 40px 30px;
    border-radius: 20px;
    color: white;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 20px #ffeb3b;
}

.profile-card h2 {
    text-align: center;
    color: #ffeb3b;
    margin-bottom: 30px;
    font-size: 2rem;
}

.profile-item {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.32);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: 0.3s ease;
}

.profile-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.profile-label {
    font-size: 0.9rem;
    color: #ffeb3b;
    margin-bottom: 5px;
}

.profile-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

@media (max-width: 600px) {
    .profile-card {
        margin: 40px 20px;
        padding: 30px 20px;
    }
}

ul.main-menu li.dropdown {
    position: relative;
}

ul.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #222;
    padding: 10px 0;
    list-style: none;
    min-width: 180px;
    border-radius: 0 0 8px 8px;
    z-index: 999;
    top: 100%;
    left: 0;
}

ul.dropdown-menu li {
    padding: 5px 20px;
}

ul.dropdown-menu li a {
    color: #fff;
    text-decoration: none;
    display: block;
}

ul.dropdown-menu li:hover {
    background-color: #444;
}