/* ==========================================================================
   1. General Styling & Variables
   ========================================================================== */
/* ==========================================================================
   1. General Styling & Variables
   ========================================================================== */
:root {
    --accent-color: #B13022; /* Burnt Red */
    --font-headline: 'Bebas Neue', sans-serif;
    --font-body: 'Poppins', sans-serif;

    /* Light Theme Variables */
    --primary-light: #FFFFFF;
    --secondary-light: #0D0D0D;
    --bg-section-light: #f7f7f7;
    --bg-card-light: #FFFFFF;
    --text-color-light: #1f1f1f;
    --text-muted-light: #555555;
    --border-color-light: #dddddd;
    --header-bg-light: rgba(255, 255, 255, 0.8);
    --form-bg-light: #f9f9f9;
    --modal-bg-light: #ffffff;
    --input-bg-light: #f0f0f0;
    --table-header-bg-light: #e9e9e9;
    --table-row-alt-bg-light: #f5f5f5;


    /* Dark Theme Variables */
    --primary-dark: #0D0D0D;
    --secondary-dark: #FFFFFF;
    --bg-section-dark: #1a1a1a;
    --bg-card-dark: #1f1f1f;
    --text-color-dark: #e1e1e1;
    --text-muted-dark: #A0AEC0;
    --border-color-dark: #444444;
    --header-bg-dark: rgba(13, 13, 13, 0.8);
    --form-bg-dark: #2D3748;
    --modal-bg-dark: #1a1a1a;
    --input-bg-dark: #1f1f1f;
    --table-header-bg-dark: #222;
    --table-row-alt-bg-dark: #111;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Default to Dark Theme */
body {
    --primary-color: var(--primary-dark);
    --secondary-color: var(--secondary-dark);
    --bg-section: var(--bg-section-dark);
    --bg-card: var(--bg-card-dark);
    --text-color: var(--text-color-dark);
    --text-muted: var(--text-muted-dark);
    --border-color: var(--border-color-dark);
    --header-bg: var(--header-bg-dark);
    --form-bg: var(--form-bg-dark);
    --modal-bg: var(--modal-bg-dark);
    --input-bg: var(--input-bg-dark);
    --table-header-bg: var(--table-header-bg-dark);
    --table-row-alt-bg: var(--table-row-alt-bg-dark);

    font-family: var(--font-body);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

html.light-mode body {
    /* Switch to Light Theme */
    --primary-color: var(--primary-light);
    --secondary-color: var(--secondary-light);
    --bg-section: var(--bg-section-light);
    --bg-card: var(--bg-card-light);
    --text-color: var(--text-color-light);
    --text-muted: var(--text-muted-light);
    --border-color: var(--border-color-light);
    --header-bg: var(--header-bg-light);
    --form-bg: var(--form-bg-light);
    --modal-bg: var(--modal-bg-light);
    --input-bg: var(--input-bg-light);
    --table-header-bg: var(--table-header-bg-light);
    --table-row-alt-bg: var(--table-row-alt-bg-light);
}
main {
    flex-grow: 1;
}

/* ==========================================================================
   2. Buttons & Common Components
   ========================================================================== */
.cta-button {
    display: inline-block;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    padding: 12px 28px;
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease-in-out, background-color 0.4s ease-in-out;
    z-index: 1;
    text-align: center;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease-in-out;
    z-index: -1;
}

.cta-button:hover::before {
    transform: scaleX(1);
    transform-origin: right;
}

.cta-button:hover {
    color: var(--primary-color) !important;
}

.primary-button {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.primary-button:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.secondary-button {
    background-color: transparent;
    color: var(--accent-color);
}

.secondary-button:hover {
    color: var(--primary-color);
}

/* เพิ่มระยะห่างสำหรับปุ่มที่อยู่ติดกัน */
.cta-button + .cta-button {
    margin-top: 15px;
}
.loading-spinner {
    border: 4px solid var(--border-blue);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
/* สไตล์สำหรับปุ่มที่ปิดรับสมัคร/กดไม่ได้ */
.cta-button-unavailable {
    background-color: #333 !important;
    border-color: #555 !important;
    color: #777 !important;
    cursor: not-allowed;
    pointer-events: none; /* ทำให้ปุ่มกดไม่ได้ */
}

/* ปิดเอฟเฟกต์ hover ของปุ่มที่ปิดรับสมัคร */
.cta-button-unavailable::before {
    background-image: none !important;
    transform: scaleX(0) !important;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */
header {
    position: fixed;
    width: 100%;
    padding: 20px 5%;
    z-index: 100;
    transition: background-color 0.3s;
}

header.scrolled {
    background-color: rgba(0, 0, 0, 0.8);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 700;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:not(.open-contact-btn)::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover:not(.open-contact-btn)::after {
    width: 100%;
}

.nav-button {
    padding: 6px 20px; /* ปรับ Padding ให้เหมาะกับ 2 บรรทัด */
    font-size: 0.9em;
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    line-height: 1.3; /* ปรับระยะห่างระหว่างบรรทัด */
    text-align: center;
}
.nav-button .button-text-small {
    display: block; /* ทำให้ขึ้นบรรทัดใหม่ */
    font-size: 0.75em;
    font-weight: 400;
    text-transform: uppercase;
}

.nav-button .button-text-large {
    display: block;
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.nav-button:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color) !important;
}

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
    z-index: 102;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

@keyframes navLinkFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0px); }
}

/* ==========================================================================
   4. Page Sections (Homepage)
   ========================================================================== */
section {
    padding: 100px 10%;
    text-align: center;
}

section h2 {
    font-family: var(--font-headline);
    font-size: 3.5em;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.video-background {
    position: fixed; /* << เปลี่ยนเป็น fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* ให้สูงเต็มหน้าจอ */
    z-index: -2;
    transition: filter 0.5s ease-in-out; /* เพิ่ม transition ให้การเบลอนุ่มนวล */
}
/* Class สำหรับทำให้วิดีโอเบลอ */
.video-background.is-blurred video {
    filter: blur(8px); /* ปรับความเบลอได้ตามต้องการ */
}
.video-background video {
    width: 100%; height: 100%;
    object-fit: cover;
}

.hero::after { /* Overlay */
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.hero-content h1 {
    font-family: var(--font-headline);
    font-size: 6em;
    letter-spacing: 3px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}

#open-dreamwerks-btn {
    margin-top: 20px;
}

/* Offer / Classes Section */
.offer-section {
    background-color: var(--bg-light);
}

.class-cards {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background-color: var(--primary-color);
    padding: 40px;
    border-radius: 10px;
    flex: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.card h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--accent-color);
}

/* Why Us Section */
.features {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.feature-item { flex: 1; }
.feature-item h4 { font-size: 1.5em; margin-bottom: 10px; }

/* ==========================================================================
   5. Footer
   ========================================================================== */
footer {
    padding: 80px 10%;
    text-align: center;
    background-color: var(--bg-light);
}

.footer-contact-info {
    margin-bottom: 30px;
    font-size: 1.1em;
    font-weight: 700;
    color: #ccc;
}
.footer-contact-info p { margin: 5px 0; }
.footer-contact-info a { color: inherit; text-decoration: none; transition: color 0.3s; }
.footer-contact-info a:hover { color: var(--accent-color); }

.social-links {
    margin: 30px 0;
}

.social-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 700;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   6. Modal Styles
   ========================================================================== */
/* General Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--bg-light);
    color: var(--secondary-color);
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 900px;
    position: relative;
    animation: fadeIn 0.5s;
}

.modal-content h2 {
    font-family: var(--font-headline);
    color: var(--accent-color);
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    margin-top: 0;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px; right: 25px;
    font-size: 35px;
    font-weight: bold;
    transition: color 0.3s;
    z-index: 10;
}

.close-button:hover,
.close-button:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Contact Us & Dreamwerks Modal Forms */
.contact-modal-content {
    max-width: 800px;
    padding: 30px 40px;
    text-align: center;
}
.contact-modal-content > div > p { margin-bottom: 30px; }
.contact-modal-body {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: flex-start;
}
.contact-form-container { text-align: left; }
.contact-info-container {
    padding-left: 40px;
    border-left: 1px solid #444;
    text-align: center;
}
.qr-code { margin-bottom: 30px; }
.qr-code img { width: 150px; height: 150px; border-radius: 10px; margin: 0 auto 10px auto; display: block; }
.qr-code span, .phone-info span { font-size: 1em; font-weight: 700; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 0.9em; color: #ccc; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    background-color: #1f1f1f;
    border: 1px solid #444;
    border-radius: 8px;
    color: var(--secondary-color);
    font-size: 1em;
    font-family: var(--font-body);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23CCCCCC%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.4-5.4-13z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: .65em auto;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(177, 48, 34, 0.3);
}

.form-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background-color: #1f1f1f;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #444;
}
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #ccc;
    font-weight: 400;
}
.checkbox-group input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
}

/* Meet the Crew Modal */
.crew-modal-content { max-width: 1000px; padding: 30px 40px; }
.crew-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; margin-top: 30px; }
.instructor-card { text-align: center; transition: transform 0.3s; cursor: pointer; }
.instructor-card:hover { transform: scale(1.05); }
.instructor-card img { display: block; margin: 0 auto 15px auto; width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: center top; border: 3px solid var(--accent-color); }
.instructor-card h4 { font-size: 1.2em; font-weight: 700; margin-bottom: 5px; color: var(--secondary-color); }
.instructor-card p { font-size: 0.9em; color: #ccc; }
.instructor-social { margin-top: 10px; }
.instructor-social a { text-decoration: none; color: #ccc; font-size: 0.9em; transition: color 0.3s; }
.instructor-social a:hover { color: var(--accent-color); }

/* Instructor Video Modal */
.video-modal-content { background-color: transparent; padding: 0; max-width: 80vw; width: auto; box-shadow: none; border: none; }
#instructorVideoPlayer { max-height: 90vh; display: block; border-radius: 10px; border: 2px solid var(--secondary-color); }
.instructor-video-close { color: #fff; text-shadow: 0 0 5px #000; }

/* ==========================================================================
   7. `class.html` Specific Styles
   ========================================================================== */

/* === FIX: Restore background for pages without video === */
body.classes-page,
body.schedule-page,
body.event-page,
body.audition-page {
    background-color: var(--primary-dark);
}

.classes-page > section, .schedule-page > section { padding: 60px 8%; }
.page-hero { padding-top: 150px; padding-bottom: 80px; background-color: var(--primary-color); }
.page-hero h1 { font-family: var(--font-headline); font-size: 5em; color: var(--secondary-color); margin: 0; }
.page-hero p { font-size: 1.2em; color: #cccccc; } /* Changed color for better visibility */

.class-detail-section { border-bottom: 1px solid #333; }
.class-detail-section.dark-bg { background-color: var(--bg-light); }
.class-content { max-width: 900px; margin: 0 auto; text-align: center; }
.class-content h2 { font-size: 3em; color: var(--accent-color); margin-bottom: 20px; }
.class-description { font-size: 1.1em; color: #ccc; max-width: 700px; margin: 0 auto 40px auto; }
.class-features { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.class-features span { background-color: #222; padding: 8px 15px; border-radius: 20px; font-size: 0.9em; font-weight: 700; border: 1px solid #444; }

.competition-details { display: flex; justify-content: center; align-items: center; gap: 40px; margin-bottom: 40px; flex-wrap: wrap; }
.price-box { background-color: var(--primary-color); padding: 20px 30px; border-radius: 10px; border: 2px solid var(--accent-color); }
.price-box .price { font-size: 2.5em; font-weight: 700; display: block; }
.price-box .per { font-size: 1em; color: #ccc; }
.schedule-box { text-align: left; }
.schedule-box h4 { font-size: 1.5em; margin-bottom: 10px; }
.schedule-box ul { list-style: none; padding: 0; }
.schedule-box ul li { margin-bottom: 5px; }

.price-table { width: 100%; border: 1px solid #444; border-radius: 10px; overflow: hidden; margin-bottom: 40px; font-size: 0.9em; }
.table-header, .table-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; align-items: center; }
.table-header { background-color: #222; font-weight: 700; padding: 15px; }
.table-row { padding: 15px; border-top: 1px solid #444; }
.table-row:nth-child(even) { background-color: #111; }
.table-row div:first-child { text-align: left; }

/* ==========================================================================
   8. `schedule.html` (Advanced Booking) Specific Styles
   ========================================================================== */
.booking-section { padding: 40px 5%; }

.booking-flow-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}
.booking-options {
    background-color: var(--bg-dark-blue);
    padding: 1.5rem;
    border-radius: 10px;
    height: fit-content;
}
.step-box {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--bg-med-blue);
}
.booking-options .step-box:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.step-box h3 {
    font-family: var(--font-headline);
    font-size: 1.8em;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.custom-select, .custom-input {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-med-blue);
    border: 1px solid var(--border-blue);
    border-radius: 50px;
    color: var(--secondary-color);
    font-size: 1em;
    font-weight: 600;
    font-family: var(--font-body);
}
.custom-select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23A0AEC0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.4-5.4-13z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 1.5rem top 50%;
    background-size: .65em auto;
    cursor: pointer;
}
.input-wrapper { margin-top: 1rem; }
.input-wrapper label { margin-right: 1rem; font-weight: 600; }

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}
.option-item input[type="radio"] { display: none; }
.option-item label {
    display: block;
    padding: 1rem;
    background-color: var(--bg-med-blue);
    color: var(--text-light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    text-align: center;
    font-size: 0.9em;
}
.option-item label small { font-weight: 400; display: block; font-size: 0.8em; margin-top: 2px; }
.option-item input[type="radio"]:checked + label {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    box-shadow: 0 0 10px var(--accent-color);
}

#calculated-price {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--secondary-color);
    word-wrap: break-word;
    line-height: 1.3;
}
#calculated-price small {
    display: block;
    font-size: 0.5em;
    font-weight: 400;
    color: #A0AEC0;
    margin-top: 5px;
}
.calendar-container {
    background-color: var(--bg-dark-blue);
    padding: 1.5rem;
    border-radius: 10px;
}
#calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
#calendar-header h3 { font-family: var(--font-headline); font-size: 2.5em; color: var(--secondary-color); margin: 0; }
#calendar-header button {
    background: none; border: 2px solid var(--border-blue); color: var(--text-light-gray);
    width: 40px; height: 40px; border-radius: 50%; font-size: 1.5em; cursor: pointer; transition: all 0.2s;
}
#calendar-header button:hover { background-color: var(--accent-color); border-color: var(--accent-color); color: var(--secondary-color); }
#calendar-weekdays, #calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
#calendar-weekdays { font-weight: 700; color: var(--text-light-gray); margin-bottom: 0.5rem; text-align: center; }
#calendar-grid { min-height: 300px; position: relative; }

.day-cell {
    padding: 0.75rem; text-align: center; background-color: var(--bg-med-blue);
    border-radius: 5px; cursor: pointer; transition: all 0.2s; font-weight: 600;
}
.day-cell:hover { background-color: var(--border-blue); }
.day-cell.other-month { color: #718096; background-color: transparent; cursor: default; }
.day-cell.is-today { border: 2px solid var(--accent-color); }
.day-cell.is-selected {
    background-color: var(--accent-color); color: var(--secondary-color);
    transform: scale(1.1); box-shadow: 0 0 15px var(--accent-color);
}
.day-cell.is-disabled { color: var(--border-blue); background-color: var(--bg-med-blue); cursor: not-allowed; text-decoration: line-through; }
#time-selection-step { display: block; }
#time-slot-display { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--bg-med-blue); }
#time-slot-header { font-size: 1.5em; font-weight: 700; margin-bottom: 1rem; }
#time-slots-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.booking-type-selector { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.booking-type-selector input[type="radio"] { display: none; }
.booking-type-selector label {
    padding: 0.5rem 1rem; background-color: var(--bg-med-blue); color: var(--text-light-gray);
    border-radius: 5px; cursor: pointer; transition: all 0.2s; font-weight: 600;
}
.booking-type-selector input[type="radio"]:checked + label { background-color: var(--accent-color); color: var(--secondary-color); }
#recurring-options { margin-bottom: 1.5rem; }

.time-slot-checkbox input[type="checkbox"] { display: none; }
.time-slot-checkbox label {
    display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--border-blue);
    border-radius: 5px; font-weight: 600; font-family: var(--font-body);
    cursor: pointer; transition: all 0.2s; background-color: var(--bg-med-blue); color: var(--text-light-gray);
}
.time-slot-checkbox input[type="checkbox"]:hover + label { border-color: var(--accent-color); color: var(--secondary-color); }
.time-slot-checkbox input[type="checkbox"]:checked + label {
    background-color: var(--accent-color); color: var(--secondary-color);
    border-color: var(--accent-color); box-shadow: 0 0 10px var(--accent-color);
}
.time-slot-checkbox input[type="checkbox"]:disabled + label {
    background-color: var(--bg-dark-blue); color: var(--border-blue);
    cursor: not-allowed; opacity: 0.6; border-color: var(--bg-med-blue); text-decoration: line-through;
}

.booking-action-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #2D3748;
    border-radius: 8px;
}
#selection-summary p {
    font-size: 1.1em;
    color: var(--text-light-gray);
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    justify-content: center;
}
#selection-summary span {
    font-family: var(--font-headline);
    font-size: 2.8em;
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1;
}
#request-booking-btn:disabled {
    background-color: transparent;
    border-color: #4A5568;
    color: #718096;
    cursor: not-allowed;
    opacity: 0.6;
}
#request-booking-btn:disabled::before {
    transform: scaleX(0);
}

.booking-confirm-content { max-width: 500px; }
.booking-summary { background-color: var(--bg-med-blue); padding: 1rem; border-radius: 8px; margin: 1.5rem 0; border-left: 4px solid var(--accent-color); }
.booking-summary h4 { font-weight: 700; margin-bottom: 0.5rem; color: var(--accent-color); }
#summary-details-list { list-style: none; padding: 0; line-height: 1.8; }
.payment-info { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-blue); }
.payment-info h4 { text-align: center; margin-bottom: 1rem; font-weight: 700; }
.payment-details { display: flex; align-items: center; gap: 1.5rem; background-color: var(--bg-med-blue); padding: 1rem; border-radius: 8px; }
#payment-qr-code { width: 120px; height: 120px; border-radius: 8px; flex-shrink: 0; }
.payment-details p { line-height: 1.8; font-size: 0.9em; }
#payment-slip { width: 100%; color: var(--text-light-gray); background-color: var(--bg-dark-blue); border: 1px dashed var(--border-blue); padding: 1rem; border-radius: 8px; }
#booking-request-form .form-group input { background-color: var(--bg-dark-blue); }

/* ==========================================================================
   9. `event.html` Specific Styles
   ========================================================================== */
.event-list-section {
    padding-top: 60px;
    padding-bottom: 80px;
    background-color: var(--primary-color);
}
.event-list-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}
.event-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    background-color: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.event-card-content {
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
}
.event-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8em;
    font-weight: 700;
    margin-bottom: 15px;
    align-self: flex-start;
}
.event-tag-workshop {
    background-color: var(--accent-color);
    color: var(--primary-color);
}
.event-tag-event {
    background-color: #4a90e2;
    color: var(--secondary-color);
}
.event-tag-news {
    background-color: #555;
    color: var(--secondary-color);
}
.event-title {
    font-family: var(--font-headline);
    font-size: 2em;
    margin-bottom: 5px;
    color: var(--secondary-color);
}
.event-date {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 15px;
}
.event-description {
    color: #ccc;
    flex-grow: 1;
    margin-bottom: 20px;
}
#eventDetailModal .modal-content {
    max-width: 700px;
}
#modalEventDescription h4 {
    font-family: var(--font-headline);
    color: var(--accent-color);
    font-size: 1.5em;
    margin-top: 15px;
    margin-bottom: 10px;
}
#modalEventDescription ul {
    list-style-position: inside;
    padding-left: 10px;
}
#modalEventDescription ul li {
    margin-bottom: 8px;
    color: #ccc;
}
/* ==========================================================================
   10. teamwerks-qualify.html Styles
   ========================================================================== */
.audition-page {
    background: #000000;
}
.audition-form-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 150px 20px 80px 20px;
    position: relative;
    overflow: hidden;
}
.form-bg-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: auto;
    opacity: 0.5;
    z-index: 1;
    pointer-events: none;
}
.form-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background-color: rgba(26, 26, 26, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
}
.form-container h2 {
    font-family: var(--font-headline);
    font-size: 3em;
    color: var(--accent-color);
    margin-bottom: 5px;
}
.form-container p {
    color: #ccc;
    margin-bottom: 30px;
}
.form-container .form-group label {
    text-align: left;
}
.form-container button[type="submit"] {
    margin-top: 20px;
    width: 100%;
}
.form-note {
    font-size: 0.9em;
    text-align: left;
    color: #aaa !important;
    margin-top: -15px;
    margin-bottom: 10px !important;
}
/* ==========================================================================
   NEWS & EVENTS SECTION (HOMEPAGE)
   ========================================================================== */
.news-section {
    padding-top: 100px;
    padding-bottom: 100px;
}

.news-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background-color: var(--primary-color);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
}

.news-card .event-tag {
    align-self: center; /* ทำให้แท็กอยู่กึ่งกลาง */
}

.news-card h3 {
    font-family: var(--font-headline);
    font-size: 2.2em;
    margin-top: 10px;
    margin-bottom: 5px;
}

.news-card .news-date {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 15px;
}

.news-card .news-description {
    color: #ccc;
    flex-grow: 1; /* ดันปุ่มไปอยู่ข้างล่างสุด */
}

.news-card-actions {
    margin-top: 20px;
}
/* ==========================================================================
   NEW INTERACTIVE SECTIONS & SCROLL ANIMATIONS (เวอร์ชันอัปเดต)
   ========================================================================== */

/* --- 1. Global Fade-in on Scroll Animation --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(50px); /* เพิ่มระยะการเลื่อนขึ้น */
    transition: opacity 1s ease-out, transform 1s ease-out; /* ทำให้นุ่มนวลขึ้น */
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- 2. Desktop Hover-Reveal Design --- */
.interactive-section .card-container {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 40px;
}

.interactive-card {
    background-color: var(--primary-color);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    flex: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.interactive-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.interactive-card h3, .interactive-card h4 {
    font-size: 1.8em;
    color: var(--accent-color);
    margin: 0;
    transition: color 0.3s ease;
}

.card-description {
    color: #ccc;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, margin-top 0.5s ease-in-out;
    margin-top: 0;
}

.interactive-card:hover .card-description {
    max-height: 200px;
    opacity: 1;
    margin-top: 20px;
}


/* --- 3. Mobile "End Credits" Design --- */
@media screen and (max-width: 768px) {
    .interactive-section .card-container {
        flex-direction: column;
        align-items: center;
    }

    .interactive-card {
        width: 100%;
        max-width: 400px;
        cursor: default;
        /* ทำให้การ์ดในมือถือค่อยๆ ทะยานขึ้นมาชัดเจนขึ้น */
        opacity: 0;
        transform: translateY(80px); /* เพิ่มระยะเลื่อนให้ชัดขึ้น */
        transition: opacity 1s ease-out, transform 1s ease-out;
    }

    /* เมื่อ Section แสดงผลในหน้าจอ ให้การ์ดปรากฏตัว */
    .interactive-section.is-visible .interactive-card {
        opacity: 1;
        transform: translateY(0);
    }

    /* ทำให้ Description แสดงผลตลอดเวลาในมือถือ */
    .card-description {
        max-height: 200px;
        opacity: 1;
        margin-top: 20px;
        transition: none;
    }

    /* ปิดการทำงานของ Hover Effect ในมือถือ */
    .interactive-card:hover .card-description {
        margin-top: 20px;
    }
    
    /* ตั้งค่า Delay ให้แต่ละการ์ดปรากฏไม่พร้อมกัน (ทำให้รู้สึกเหมือน End Credit) */
    .interactive-section.is-visible .interactive-card:nth-child(1) { transition-delay: 0.2s; }
    .interactive-section.is-visible .interactive-card:nth-child(2) { transition-delay: 0.4s; }
    .interactive-section.is-visible .interactive-card:nth-child(3) { transition-delay: 0.6s; }
}
/* ==========================================================================
   11. Responsive Design
   ========================================================================== */
.mobile-only-button { display: none !important; }

@media screen and (max-width: 1024px) {
    .booking-flow-container { grid-template-columns: 1fr; }
}

@media screen and (max-width: 900px) {
    .crew-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media screen and (max-width: 768px) {
    body { overflow-x: hidden; }

    .nav-links {
        position: fixed; right: 0px; top: 0px; height: 100vh;
        background-color: var(--primary-color);
        display: flex; flex-direction: column; align-items: center; justify-content: space-around;
        width: 60%; transform: translateX(100%); transition: transform 0.5s ease-in; z-index: 101;
    }
    .nav-links.nav-active { transform: translateX(0%); }
    .nav-links li { opacity: 0; }
    .burger { display: block; }
    .desktop-only-button { display: none; }
    .mobile-only-button { display: block !important; background-color: var(--accent-color); color: var(--primary-color); }
    section { padding: 80px 5%; }
    .hero-content h1 { font-size: 3.5em; }
    .hero-content p { font-size: 1em; }
    section h2 { font-size: 2.5em; }
    .class-cards, .features { flex-direction: column; }
    .contact-modal-body { grid-template-columns: 1fr; }
    .contact-info-container { padding-left: 0; border-left: none; border-top: 1px solid #444; padding-top: 30px; margin-top: 30px; }
    .page-hero h1 { font-size: 4em; }
    .class-content h2 { font-size: 2.5em; }
    .price-table { font-size: 0.8em; }
    .table-header, .table-row { grid-template-columns: 1.5fr 1fr 1fr 1fr; }

    /* --- Responsive for Event Page --- */
    .event-card {
        grid-template-columns: 1fr;
    }
    .event-card-image {
        height: 200px;
    }
    .event-card-content {
        padding: 25px;
    }

} /* <-- Closes @media (max-width: 768px) */

@media screen and (max-width: 600px) {
    .crew-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .instructor-card img { width: 100px; height: 100px; }
}

@media screen and (max-width: 500px) {
    .price-table { display: block; border: none; }
    .table-header { display: none; }
    .table-row {
        grid-template-columns: 1fr 1fr; gap: 10px;
        padding: 20px; margin-bottom: 20px;
        border: 1px solid #444; border-radius: 10px;
    }
    .table-row div:first-child { grid-column: 1 / -1; font-size: 1.2em; font-weight: 700; margin-bottom: 10px; text-align: center; }
    .table-row div:not(:first-child)::before {
        content: attr(data-label);
        font-weight: 700; display: block; color: #ccc; font-size: 0.8em;
    }
}

@media screen and (max-width: 400px) {
    .crew-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   TRANSPARENT SECTIONS & PARALLAX EFFECT STYLES
   ========================================================================== */

/* 1. ทำให้พื้นหลังหลักโปร่งใสเพื่อโชว์วิดีโอ */
body {
    background-color: transparent;
}

/* 2. ทำให้พื้นหลังของทุก Section เป็นสีดำกึ่งโปร่งใส พร้อมเอฟเฟกต์กระจกฝ้า */
/* ใช้ได้กับ Section ที่มีพื้นหลังสีเทาเข้มอยู่แล้ว */
.offer-section,
.why-section,
.news-section,
footer {
    background-color: rgba(13, 13, 13, 0.85); /* สีดำโปร่งแสง 85% */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px); /* เอฟเฟกต์เบลอพื้นหลัง (กระจกฝ้า) */
    -webkit-backdrop-filter: blur(8px);
}

/* ทำให้การ์ดที่อยู่ข้างใน Section กลับมามีพื้นหลังทึบเพื่อความสวยงาม */
.interactive-card,
.card {
    background-color: rgba(26, 26, 26, 0.7); /* สีเทาเข้มกึ่งโปร่งใส */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 3. เพิ่มเงาให้ตัวอักษรหลักๆ เพื่อให้อ่านง่ายขึ้น */
.hero-content h1,
.hero-content p,
section h2,
.card h3,
.card p,
.interactive-card h3,
.interactive-card h4,
.interactive-card .card-description {
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   STORE PAGE STYLES (from store-style.css)
   ========================================================================== */

:root {
    --store-primary: #FFFFFF;
    --store-secondary: #0D0D0D;
    --store-accent: #B13022;
}

.store-page {
    background-color: var(--store-primary);
    color: var(--store-secondary);
}

/* Override Navbar & Footer Styles */
.store-page header { background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid #eee; }
.store-page header.scrolled { background-color: rgba(255, 255, 255, 0.8); }
.store-page nav ul li a, .store-page .burger div { color: var(--store-secondary); }
.store-page nav ul li a:hover:not(.open-contact-btn)::after { background-color: var(--store-accent); }
.store-page .nav-button { color: var(--store-accent); border-color: var(--store-accent); }
.store-page .nav-button:hover { background-color: var(--store-accent); color: var(--store-primary) !important; }
.store-page footer { background-color: #f9f9f9; border-top: 1px solid #eee; color: #555; }
.store-page footer h2 { color: var(--store-secondary); }

/* Main Store Layout */
.store-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 60px;
    max-width: 1200px;
    margin: 120px auto 80px auto;
    padding: 0 40px;
}

/* Product Image Slider */
.product-image-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid #eee;
}
.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}
.slide {
    flex: 0 0 100%;
    height: 100%;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    color: var(--store-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: background-color 0.2s;
}
.slider-btn:hover { background-color: var(--store-primary); }
.slider-btn.prev { left: 15px; }
.slider-btn.next { right: 15px; }
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}
.dot.active { background-color: var(--store-primary); }

/* Product Info */
.product-title { font-family: 'Bebas Neue', sans-serif; font-size: 3em; margin: 20px 0 5px 0; line-height: 1.1; }
.product-price { font-size: 1.8em; font-weight: 700; color: var(--store-accent); margin-bottom: 15px; }
.product-description { color: #555; }

/* Order Form */
.order-form-container h2 { font-family: 'Bebas Neue', sans-serif; font-size: 3em; text-align: center; margin-bottom: 30px; }
.payment-info { text-align: center; padding: 20px; background: #f9f9f9; border-radius: 10px; margin-bottom: 30px; }
.payment-info .qr-code { max-width: 200px; margin: 10px auto; }
.payment-info .qr-note { font-size: 0.9em; color: #777; }
.form-step { text-align: center; margin-bottom: 20px; }
#order-form .form-group label { color: #333; font-weight: 600; }
#order-form input, #order-form textarea { background-color: #f9f9f9; border: 1px solid #ddd; color: #333; }
#order-form input:focus, #order-form textarea:focus { border-color: var(--store-accent); box-shadow: 0 0 0 3px rgba(177, 48, 34, 0.1); }

/* Size Selector */
.size-selector {
    display: flex;
    gap: 10px;
}
.size-selector label {
    flex: 1;
}
.size-selector input[type="radio"] {
    display: none;
}
.size-selector span {
    display: block;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.size-selector input[type="radio"]:checked + span {
    background-color: var(--store-secondary);
    border-color: var(--store-secondary);
    color: var(--store-primary);
}

.radio-group { display: flex; gap: 15px; background: #f9f9f9; padding: 10px; border-radius: 10px; }
#order-form button.cta-button { background-color: var(--store-accent); color: var(--store-primary); width: 100%; border: none; }
#order-form button.cta-button:hover { background-color: var(--store-secondary); color: var(--store-primary) !important; }
/* Force Dark Mode on Store Page */
html.light-mode body.store-page {
    --primary-color: var(--primary-dark);
    --secondary-color: var(--secondary-dark);
    --bg-section: var(--bg-section-dark);
    --bg-card: var(--bg-card-dark);
    --text-color: var(--text-color-dark);
    --text-muted: var(--text-muted-dark);
    --border-color: var(--border-color-dark);
    --header-bg: var(--header-bg-dark);
    --form-bg: var(--form-bg-dark);
    --modal-bg: var(--modal-bg-dark);
    --input-bg: var(--input-bg-dark);
    --table-header-bg: var(--table-header-bg-dark);
    --table-row-alt-bg: var(--table-row-alt-bg-dark);
}
/* Responsive Design */
@media screen and (max-width: 900px) {
    .store-container {
        grid-template-columns: 1fr;
        margin-top: 100px;
        padding: 0 20px;
        gap: 40px;
    }
    .product-title, .order-form-container h2 {
        font-size: 2.5em;
    }
}

/* ==========================================================================
   Fix Mobile Menu on Store Page
   ========================================================================== */

/* 1. เปลี่ยนสีปุ่มเมนู (Burger) ให้เป็นสีดำ */
.store-page .burger div {
    background-color: var(--store-secondary);
}

/* 2. จัดการสไตล์เมนูตอนที่สไลด์ออกมาในหน้าจอมือถือ */
@media screen and (max-width: 768px) {
    /* เปลี่ยนพื้นหลังของเมนูที่สไลด์ออกมาให้เป็นสีขาว */
    .store-page .nav-links {
        background-color: var(--store-primary);
    }

    /* ทำให้ลิงก์ในเมนูเป็นสีดำ (เผื่อไว้) */
    .store-page .nav-links li a {
        color: var(--store-secondary);
    }

    /* แก้สไตล์ปุ่ม BOOKING NOW ในเมนูให้กลับมาสวยงาม */
    .store-page .nav-links .mobile-only-button {
        background-color: var(--store-accent);
        border-color: var(--store-accent);
        color: var(--store-primary);
    }

    .store-page .nav-links .mobile-only-button:hover {
        background-color: var(--store-primary);
        color: var(--store-accent) !important;
    }
}
/* Style for Pickup Location Box */
.location-box {
    background: #f0f0f0; /* สีพื้นหลัง */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
}

.location-box p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #333;
}

.location-box a {
    color: var(--store-accent);
    text-decoration: underline;
    font-weight: 600;
}
/* Styles for Stock Info & Order Counter */

.pre-order-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--store-accent);
    color: var(--store-primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9em;
    z-index: 10;
}

.stock-info {
    font-weight: 600;
    color: #888;
    margin-top: -10px;
    margin-bottom: 20px;
}

.order-counter {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.counter-text {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.counter-text #sold-out-text {
    color: var(--store-accent);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #eee;
    border-radius: 6px;
    overflow: hidden;
}

#progress-bar-fill {
    height: 100%;
    width: 0%; /* จะถูกควบคุมด้วย JavaScript */
    background-color: var(--store-accent);
    border-radius: 6px;
    transition: width 1s ease-in-out;
}
/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */
.theme-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-color);
    cursor: pointer;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
}

.theme-toggle-btn svg {
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
}

/* --- Icon States --- */

/* Default (Dark Mode) - Moon is visible, Sun is hidden */
.theme-toggle-btn .sun-icon {
    opacity: 0;
    transform: rotate(-90deg);
}
.theme-toggle-btn .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Light Mode - Sun is visible, Moon is hidden */
html.light-mode .theme-toggle-btn .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

html.light-mode .theme-toggle-btn .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}
/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */
.theme-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-color);
    cursor: pointer;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
}

.theme-toggle-btn svg {
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
}

/* --- Icon States --- */

/* Default (Dark Mode) - Moon is visible, Sun is hidden */
.theme-toggle-btn .sun-icon {
    opacity: 0;
    transform: rotate(-90deg);
}
.theme-toggle-btn .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Light Mode - Sun is visible, Moon is hidden */
html.light-mode .theme-toggle-btn .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

html.light-mode .theme-toggle-btn .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

/* ==========================================================================
   Store Page Theme Overrides
   ========================================================================== */

/* This section ensures that when light mode is active, the store page elements
   correctly adopt the light theme styles. */
html.light-mode body.store-page {
    --primary-color: var(--primary-light);
    --secondary-color: var(--secondary-light);
    --bg-section: var(--bg-section-light);
    --bg-card: var(--bg-card-light);
    --text-color: var(--text-color-light);
    --text-muted: var(--text-muted-light);
    --border-color: var(--border-color-light);
    --header-bg: var(--header-bg-light);
    --form-bg: var(--form-bg-light);
    --modal-bg: var(--modal-bg-light);
    --input-bg: var(--input-bg-light);
}

html.light-mode .store-page .product-description,
html.light-mode .store-page .stock-info,
html.light-mode .store-page .payment-info .qr-note,
html.light-mode .store-page .location-box p {
    color: var(--text-muted-light);
}

html.light-mode .store-page #order-form .form-group label {
    color: var(--text-color-light);
}

html.light-mode .store-page .radio-group label {
     color: var(--text-color-light);
}
