:root {
    --primary-color: #FF9933;
    /* Saffron */
    --accent-color: #D4AF37;
    /* Gold */
    --bg-light: #F9F9F9;
    --text-dark: #333333;
    --navbar-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --footer-bg: #FFF5E6;
}

[data-theme="dark"] {
    --bg-light: #0a192f;
    /* Dark Navy - Spiritual Night */
    --text-dark: #f0f0f0;
    --navbar-bg: #112240;
    --card-bg: #112240;
    --footer-bg: #0a192f;
    --primary-color: #FFAD60;
    /* Lighter Saffron for dark mode */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

.navbar {
    background-color: var(--navbar-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.card {
    border: none;
    border-radius: 15px;
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    height: 200px;
    object-fit: cover;
}

.pooja-price {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.spiritual-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Mandala Pattern Background for Hero */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1604104085429-15822e030062?q=80&w=1920&auto=format&fit=crop');
    /* Spiritual background */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Parallax effect */
    padding: 120px 0;
    /* Increased padding */
    text-align: center;
    color: white;
    /* Ensure text is white on dark overlay */
}

.sticky-bottom-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
    /* Show only on mobile via media query if needed, or JS */
}

@media (max-width: 768px) {
    .sticky-bottom-mobile {
        display: block;
    }
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease-out;
    /* CSS failsafe: auto-hide after 2s even if JavaScript fails */
    animation: hideLoader 0.5s ease-out 2s forwards;
}

@keyframes hideLoader {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

#loader img {
    width: 150px;
    margin-bottom: 20px;
    animation: spiritualPulse 3s infinite ease-in-out;
}

@keyframes spiritualPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 153, 51, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px rgba(255, 153, 51, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 153, 51, 0.3));
    }
}

/* Header Logo */
.navbar-brand img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}