/* ===== ตั้งค่าพื้นฐาน ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', 'Arial', sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

/* ===== Loading Screen ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #050505;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-in-out;
}

.loading-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 300px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #00aaff;
    transition: width 0.1s linear;
}

.progress-percent {
    margin-top: 10px;
    font-size: 14px;
    color: #888;
}

/* ===== สถานะโหลดเสร็จ ===== */
.loaded #loading-screen {
    opacity: 0;
    pointer-events: none;
}

.loaded #main-page {
    opacity: 1;
    pointer-events: auto;
}

#main-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

/* ===== Popup วิดีโอ ===== */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.video-modal.active {
    display: flex;
}

.video-container {
    position: relative;
    width: 80%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-video {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
}

/* ===== หน้าร้านค้า ===== */
.page-shop {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

.shop-section {
    padding: 120px 40px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.shop-title {
    font-size: 48px;
    margin-bottom: 40px;
    text-align: center;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.shop-item:hover {
    transform: translateY(-10px);
    border-color: #00aaff;
}

.shop-item-img {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.shop-item-price {
    font-size: 28px;
    color: #00aaff;
    font-weight: bold;
    margin: 10px 0;
}

.shop-item-btn {
    background: #00aaff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.shop-item-btn:hover {
    background: #0088cc;
}