:root {
    /* Light Theme (Default) */
    --primary-color: #ffffff;
    --primary-rgb: 255, 255, 255;
    --secondary-color: #f8f9fa;
    --accent-color: #00c853;
    --tagred-color: #d40000;
    --text-color: #495057;
    --heading-color: #0d1b2a;
    --gold-color: #b59200; /* Darker gold for better contrast */
    --border-color: #dee2e6;
}

[data-theme='dark'] {
    --primary-color: #0d1b2a;
    --primary-rgb: 13, 27, 42;
    --secondary-color: #1b263b;
    --text-color: #e0e1dd;
    --heading-color: #ffffff;
    --gold-color: #ffd700;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

/* --- Helper Classes & Global Styles --- */
.section {
    padding: 60px 0;
}

.bg-light-dark {
    background-color: var(--secondary-color);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Top Bar --- */
[data-theme='light'] .top-bar {
    background-color: #212529;
}
[data-theme='dark'] .top-bar {
    background-color: #000;
}
.top-bar {
    font-size: 0.85rem;
    font-weight: 300;
    color: #f8f9fa;
}
.top-bar i {
    color: var(--accent-color);
}

/* --- Navbar --- */
.navbar {
    background-color: rgba(var(--primary-rgb), 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    color: var(--heading-color) !important;
    font-size: 1.5rem;
}

.navbar-brand .brand-auto {
    color: var(--gold-color);
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 400;
    margin: 0 0.5rem;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold-color) !important;
}

.navbar-toggler {
    border-color: var(--border-color);
}

[data-theme='dark'] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme='light'] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33, 37, 41, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Hero Section with BG Animation --- */
.hero-section {
    min-height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out;
    animation: zoom-pan 20s linear infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(var(--primary-rgb), 0.7);
    z-index: 1;
}

[data-theme='light'] .hero-overlay {
    background-color: rgba(var(--primary-rgb), 0.5);
}

.hero-section .container {
    z-index: 2;
}

[data-theme='dark'] .hero-content .display-3 {
    color: #fff;
}
[data-theme='dark'] .hero-content .lead {
    color: #e0e1dd;
}

@keyframes zoom-pan {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.hero-content .lead {
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.btn-line {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    font-weight: 500;
}
.btn-line:hover {
    background-color: #00b34a;
    border-color: #00b34a;
    color: #fff;
    transform: translateY(-2px);
}

[data-theme='dark'] .btn-outline-light {
    color: #f8f9fa;
    border-color: #f8f9fa;
}

[data-theme='dark'] .btn-outline-light:hover {
    color: #000;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

[data-theme='light'] .btn-outline-light {
    color: #1b263b;
    border-color: #1b263b;
}

[data-theme='light'] .btn-outline-light:hover {
    color: #fff;
    background-color: #1b263b;
    border-color: #1b263b;
}

/* --- About / Features Section --- */
.feature-card {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.icon-box {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-color);
}

/* --- Product Section --- */
.product-card {
    background-color: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.product-card .card-img-top {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.product-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-card .card-title {
    color: var(--heading-color);
}
.product-card .price {
    margin-bottom: 15px;
}
.product-card .price .new-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-color);
}
.product-card .price .old-price {
    font-size: 1rem;
    text-decoration: line-through;
    color: var(--text-color);
    opacity: 0.7;
    margin-left: 10px;
}
.btn-outline-gold {
    color: var(--gold-color);
    border-color: var(--gold-color);
    margin-top: auto;
}
.btn-outline-gold:hover {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: var(--primary-color);
}

/* --- Contact CTA Section --- */
.contact-cta-section {
    background: linear-gradient(rgba(var(--primary-rgb), 0.8), rgba(var(--primary-rgb), 0.9)), url('../images/cover-2.jpg') no-repeat center center;
    background-size: cover;
}
[data-theme='dark'] .contact-cta-section h2,
[data-theme='dark'] .contact-cta-section p {
    color: #fff;
}

/* --- Footer --- */
[data-theme='dark'] .footer {
    background-color: #000;
}
[data-theme='light'] .footer {
    background-color: #212529;
}
.footer {
    padding: 40px 0 20px;
}
.navbar-brand-footer {
    font-weight: 700;
    color: var(--heading-color) !important;
    font-size: 1.5rem;
    text-decoration: none;
}
.footer p {
    color: var(--text-color);
    opacity: 0.8;
}
[data-theme='dark'] .footer .navbar-brand-footer {
    color: #fff !important;
}
.footer .copyright-text {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.6;
    margin-top: 30px;
}
.footer .social-icons a {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.5rem;
    margin: 0 15px;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
    position: relative;
}
.custom-select__trigger {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.custom-select__trigger:hover {
    border-color: var(--gold-color);
}
.custom-select.open .custom-select__trigger {
    border-color: var(--gold-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--gold-color), 0.25);
}
.arrow {
    position: relative;
    height: 10px;
    width: 10px;
}
.arrow::before, .arrow::after {
    content: "";
    position: absolute;
    bottom: 0px;
    width: 0.15rem;
    height: 100%;
    transition: all 0.2s;
}
.arrow::before {
    left: -5px;
    transform: rotate(45deg);
    background-color: var(--text-color);
}
.arrow::after {
    left: 0;
    transform: rotate(-45deg);
    background-color: var(--text-color);
}
.custom-select.open .arrow::before {
    transform: rotate(-45deg);
}
.custom-select.open .arrow::after {
    transform: rotate(45deg);
}
.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-top: 0;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    border-radius: 0 0 8px 8px;
}
.custom-select.open .custom-options {
    display: block;
}
.custom-option {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}
.custom-option:hover {
    background-color: var(--primary-color);
}

[data-theme='light'] .custom-option:hover {
    background-color: #e9ecef;
}

[data-theme='dark'] .custom-option:hover {
    background-color: var(--primary-color);
}

.custom-option img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 5px;
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}
.fab-main-button {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-color);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}
.fab-main-button:hover {
    transform: rotate(45deg);
}
.fab-container.open .fab-main-button {
    transform: rotate(45deg);
}
.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.fab-container.open .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.fab-item {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    color: var(--gold-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.fab-item:hover {
    background-color: var(--gold-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .fab-container {
        bottom: 15px;
        left: 35px;
        transform: translateX(-50%);
        width: 100%;
        max-width: 350px;
    }
    .fab-menu {
        flex-direction: row;
        justify-content: space-around;
        bottom: 0;
        right: 0;
        width: 100%;
        padding: 10px;
        background: rgba(18, 18, 18, 0.9);
        backdrop-filter: blur(10px);
        border-radius: 30px;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
    }
     .fab-main-button {
        margin: auto;
    }
}

/* --- Booking Form --- */
.booking-form {
    background: var(--secondary-color);
    padding: 40px;
    border-radius: 10px;
}

.booking-form .form-label {
    color: var(--text-color);
    font-weight: 500;
}

.booking-form .form-control,
.booking-form .form-select {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.booking-form .form-control:focus,
.booking-form .form-select:focus {
    background-color: var(--primary-color);
    color: var(--text-color);
    border-color: var(--gold-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
}

.booking-form .form-control::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

.booking-form .btn-gold {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
    color: var(--primary-color);
    font-weight: bold;
    padding: 12px;
}

.booking-form .btn-gold:hover {
    background-color: #e0c200;
    border-color: #e0c200;
}

#selectedProductPreview .price .new-price {
    color: var(--gold-color);
}

[data-theme='dark'] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(0.8);
}

[data-theme='light'] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: initial;
}

/* --- Simplified Product Card --- */
.product-card-simple {
    background-color: var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative; /* For tag positioning */
}

.popular-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--tagred-color);
    color: white;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 7px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.product-card-simple:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.product-image-container {
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}
.product-card-simple .product-image {
    width: 100%;
    /* aspect-ratio: 4 / 3; */
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card-simple:hover .product-image {
    transform: scale(1.05);
}
.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--heading-color);
    min-height: 40px; /* Adjust as needed */
}
.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-color);
    margin-top: 10px;
    margin-bottom: 15px;
}

/* --- Custom Select Dropdown --- */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}
.custom-select {
    position: relative;
}
.custom-select__trigger {
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.custom-select__trigger:hover {
    border-color: var(--gold-color);
}
.custom-select.open .custom-select__trigger {
    border-color: var(--gold-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 215, 0, 0.25);
}
.arrow {
    position: relative;
    height: 10px;
    width: 10px;
}
.arrow::before, .arrow::after {
    content: "";
    position: absolute;
    bottom: 0px;
    width: 0.15rem;
    height: 100%;
    background-color: var(--text-color);
    transition: all 0.2s;
}
.arrow::before {
    left: -5px;
    transform: rotate(45deg);
}
.arrow::after {
    left: 0;
    transform: rotate(-45deg);
}
.custom-select.open .arrow::before {
    transform: rotate(-45deg);
}
.custom-select.open .arrow::after {
    transform: rotate(45deg);
}
.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-top: 0;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    border-radius: 0 0 8px 8px;
}
.custom-select.open .custom-options {
    display: block;
}
.custom-option {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}
.custom-option:hover {
    background-color: var(--primary-color);
}
.custom-option img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 5px;
}
.option-details {
    display: flex;
    flex-direction: column;
}
.option-name {
    font-weight: 500;
    color: var(--heading-color);
}
.option-price {
    font-size: 0.9rem;
    color: var(--gold-color);
}

/* --- Theme Switcher --- */
.theme-switcher {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: 1rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.theme-switcher:hover {
    color: var(--gold-color);
}
