/*
 * Spice Haven Restaurant - Master CSS
 * Fully Responsive, Premium Theme, Light/Dark Modes
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #ff6b00; /* Warm Accent Orange */
    --primary-hover: #e05e00;
    --secondary-color: #d4af37; /* Warm Gold */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
    
    /* Light Mode Variables (Default) */
    --bg-primary: #fcf9f5; /* Warm Creamy white */
    --bg-secondary: #ffffff; /* Pure white */
    --bg-tertiary: #f4eee5; /* Sand cream */
    --text-primary: #1c1c1c; /* Deep Charcoal */
    --text-secondary: #555555;
    --border-color: #eae1d4;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 10px 30px rgba(139, 90, 43, 0.08);
    --card-hover-shadow: 0 20px 40px rgba(139, 90, 43, 0.15);
}

/* Dark Mode Override */
[data-theme="dark"] {
    --bg-primary: #0b0b0a; /* True Deep Black */
    --bg-secondary: #141412; /* Rich Dark Charcoal */
    --bg-tertiary: #1e1e1a; /* Warm Slate Black */
    --text-primary: #f5f5f5; /* Off-White */
    --text-secondary: #b5b5b0;
    --border-color: #2b2b25;
    --glass-bg: rgba(20, 20, 18, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

/* Global Reset & Core Styling */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Glassmorphism Classes */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-speed);
}

.glass-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--secondary-color);
}

/* Interactive Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    border: none;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 30px;
    font-family: var(--font-heading);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    transition: transform 0.2s, box-shadow var(--transition-speed), opacity 0.2s;
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.45);
    color: #ffffff;
}
.btn-premium:active {
    transform: translateY(1px);
}

.btn-premium-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    padding: 10px 26px;
    border-radius: 30px;
    font-family: var(--font-heading);
    transition: all var(--transition-speed);
}
.btn-premium-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

/* Badge Styling */
.badge-premium {
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 30px;
    padding: 6px 14px;
}

/* Dark Mode Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 8px;
    border-radius: 50%;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}
.theme-toggle-btn:hover {
    background-color: var(--border-color);
}

/* Preloader Animation */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hero Section */
.hero-banner {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, rgba(212, 175, 55, 0.05) 50%, rgba(0,0,0,0) 100%);
    z-index: -1;
}

/* Category Filter Pills */
.filter-pills .nav-link {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 10px 24px;
    margin: 5px;
    font-weight: 500;
    transition: all var(--transition-speed);
}
.filter-pills .nav-link.active, .filter-pills .nav-link:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

/* Floating WhatsApp Order Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    text-decoration: none !important;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: #ffffff;
}

/* Menu Item Overlay Card */
.menu-img-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 220px;
}
.menu-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.glass-card:hover .menu-img-container img {
    transform: scale(1.08);
}
.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: #ffffff;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

/* Gallery Grid Styles */
.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 260px;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    transition: opacity 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Testimonials Carousel Styling */
.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    margin: 15px;
    position: relative;
}
.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: var(--font-heading);
    font-size: 8rem;
    color: rgba(255, 107, 0, 0.08);
    line-height: 1;
}

/* Cart Styles */
.cart-table th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}
.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.qty-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* Admin Dashboard Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 25px 0;
    transition: all var(--transition-speed);
}
.admin-content {
    flex: 1;
    padding: 40px;
    background: var(--bg-primary);
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all var(--transition-speed);
}
.sidebar-link i {
    margin-right: 15px;
    font-size: 1.1rem;
}
.sidebar-link:hover, .sidebar-link.active {
    color: var(--primary-color);
    background: rgba(255, 107, 0, 0.05);
    border-left-color: var(--primary-color);
}

.stat-card {
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* User Account Forms */
.auth-container {
    max-width: 480px;
    margin: 80px auto;
}

/* Footer styling */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px;
}
.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--text-primary);
}
.footer-logo span {
    color: var(--primary-color);
}
.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all var(--transition-speed);
}
.social-icon:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px);
}

/* Responsive tweaks */
@media (max-width: 991px) {
    .admin-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
    }
    .admin-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        margin: 0;
        padding: 0;
    }
    .sidebar-link {
        padding: 10px 15px;
    }
    .hero-banner {
        padding: 120px 0 60px;
    }
}
