/* ==========================================================================
   EPHREM KITCHEN & FRIES - MASTER STYLESHEET 
   Includes: Light/Dark Auto-Switch, Premium Navbar, Modals, and Footer
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

/* --- 1. THEME VARIABLES --- */
/* DEFAULT: LIGHT THEME */
:root {
    --bg-color: #fcfcfc;
    --card-bg: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --gold: #D4AF37; 
    --gold-hover: #b5952f;
    --border-color: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #f4f4f4;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --hero-overlay: rgba(255, 255, 255, 0.6);
    --hero-text: #111111;
}

/* AUTO-SWITCH: DARK THEME */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0a0a0a;
        --card-bg: #151515;
        --text-main: #ffffff;
        --text-muted: #aaaaaa;
        --gold: #D4AF37; 
        --gold-hover: #b5952f;
        --border-color: rgba(212, 175, 55, 0.15);
        --nav-bg: rgba(10, 10, 10, 0.95);
        --footer-bg: #050505;
        --shadow-color: rgba(0, 0, 0, 0.5);
        --hero-overlay: rgba(0, 0, 0, 0.7);
        --hero-text: #ffffff;
    }
}

/* --- 2. BASE STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, .brand {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
}

/* --- 3. TOP BAR & NAVBAR (Merged from header.php) --- */
.top-bar { 
    background-color: #050505; color: #aaaaaa; padding: 8px 5%; display: flex; 
    justify-content: space-between; align-items: center; font-size: 0.85rem; 
}
.top-bar-left i { color: var(--gold); margin-right: 5px; }
.top-bar-left span { margin-right: 20px; }
.top-bar-right a { color: #aaaaaa; margin-left: 15px; text-decoration: none; transition: 0.3s; }
.top-bar-right a:hover { color: var(--gold); }

.navbar { 
    display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; 
    background: var(--nav-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); 
    position: fixed; width: 100%; top: 35px; z-index: 1000; border-bottom: 1px solid var(--border-color); transition: all 0.4s ease; 
}
.navbar.scrolled { top: 0; padding: 12px 5%; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); background: rgba(10, 10, 10, 0.98); }
.navbar.scrolled .nav-links a:not(.btn-premium-cart) { color: #ffffff; }
.navbar.scrolled .brand a { color: var(--gold); }

.brand { font-size: 1.8rem; font-weight: 600; letter-spacing: 1px; }

.nav-links { display: flex; list-style: none; align-items: center; margin: 0; }
.nav-links li { margin-left: 35px; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 0.95rem; text-transform: uppercase; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--gold); }

/* Dropdown styling */
.dropdown { position: relative; display: inline-block; padding: 10px 0; }
.dropdown-content { 
    visibility: hidden; opacity: 0; position: absolute; background-color: var(--card-bg); 
    min-width: 150px; box-shadow: 0px 15px 30px rgba(0,0,0,0.2); border-radius: 8px; z-index: 1001; 
    top: 100%; left: 50%; transform: translateX(-50%) translateY(10px); border: 1px solid var(--border-color); overflow: hidden; transition: all 0.3s ease; 
}
@media (min-width: 993px) {
    .dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
}
.dropdown-content a { color: var(--text-main) !important; padding: 12px 20px; text-transform: none; display: block; border-bottom: 1px solid var(--border-color); }
.dropdown-content a:hover { background-color: var(--gold); color: #fff !important; padding-left: 25px; }
.dropdown-content a:last-child { border-bottom: none; }

/* Cart Button */
.checkout-item { margin-left: 40px; }
.gtranslate-item { margin-top: 5px; }
.btn-premium-cart { 
    background: transparent; border: 2px solid var(--gold); color: var(--gold) !important; 
    padding: 8px 20px; border-radius: 30px; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; 
}
.btn-premium-cart:hover { background: var(--gold); color: #fff !important; box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3); transform: translateY(-2px); }
.cart-badge { background: #ff4d4d; color: white; font-size: 0.75rem; padding: 2px 7px; border-radius: 50%; font-weight: bold; }

.hamburger { display: none; font-size: 1.8rem; color: var(--gold); cursor: pointer; border: none; background: transparent; }

/* --- 4. BUTTONS --- */
.btn-gold {
    background: var(--gold); color: #ffffff !important; padding: 12px 30px; border: none; border-radius: 5px;
    font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.3s ease; display: inline-block;
}
.btn-gold:hover { background: var(--gold-hover); transform: translateY(-3px); box-shadow: 0 5px 15px var(--shadow-color); }

.btn-gold-outline {
    border: 2px solid var(--gold); color: var(--gold) !important; padding: 8px 15px;
    border-radius: 20px; transition: 0.3s; text-decoration: none; font-weight: 600;
}
.btn-gold-outline:hover { background: var(--gold); color: #ffffff !important; }

/* --- 5. HERO SECTION --- */
.hero {
    height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('https://images.unsplash.com/photo-1414235077428-338989a2e8c0?auto=format&fit=crop&w=1920&q=80') center/cover;
    background-attachment: fixed;
}
.hero h1 { font-size: 4rem; margin-bottom: 10px; color: var(--hero-text); }
.hero p { font-size: 1.2rem; letter-spacing: 2px; margin-bottom: 30px; color: var(--hero-text); }

/* --- 6. MENU CARDS & CONTROLS --- */
.menu-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding: 0 5% 30px; }
.search-bar { flex: 1; min-width: 280px; position: relative; }
.search-bar input { width: 100%; padding: 14px 20px 14px 45px; border-radius: 30px; border: 1px solid var(--border-color); background: var(--nav-bg); color: var(--text-main); font-size: 1rem; outline: none; transition: 0.3s; }
.search-bar input:focus { border-color: var(--gold); box-shadow: 0 0 15px rgba(212, 175, 55, 0.2); }
.search-bar i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1.1rem; }

.filter-buttons { display: flex; gap: 10px; flex-wrap: wrap; flex: 2; justify-content: flex-end; }
.filter-btn { padding: 10px 22px; border-radius: 30px; background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-main); cursor: pointer; transition: 0.3s; font-weight: 500; }
.filter-btn:hover, .filter-btn.active { background: var(--gold); color: #ffffff; border-color: var(--gold); }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; padding: 20px 0; }
.menu-card { background: var(--card-bg); border-radius: 12px; overflow: hidden; transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; border: 1px solid var(--border-color); box-shadow: 0 4px 10px var(--shadow-color); }
.menu-card:hover { transform: translateY(-10px); border-color: var(--gold); box-shadow: 0 10px 20px var(--shadow-color); }
.menu-card img { width: 100%; height: 220px; object-fit: cover; border-bottom: 1px solid var(--border-color); }
.menu-card-content { padding: 25px; }
.menu-card-content h3 { font-size: 1.3rem; color: var(--text-main); margin: 5px 0 10px; }
.price { color: var(--gold); font-size: 1.4rem; font-weight: 600; margin: 10px 0; }

/* --- 7. BEAUTIFUL POPUP MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 2000;
    display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--card-bg); width: 90%; max-width: 450px; border-radius: 20px; overflow: hidden;
    transform: translateY(50px) scale(0.95); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; border: 1px solid var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }

.close-modal {
    position: absolute; top: 15px; right: 15px; background: rgba(0, 0, 0, 0.6); color: #fff; border: none;
    width: 35px; height: 35px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; transition: 0.3s; z-index: 10;
}
.close-modal:hover { background: var(--gold); transform: rotate(90deg); }

.modal-img { width: 100%; height: 250px; object-fit: cover; }
.modal-body { padding: 30px; text-align: center; }
.modal-title { font-size: 1.5rem; margin-bottom: 10px; color: var(--text-main); }
.modal-price { color: var(--gold); font-size: 1.8rem; font-weight: 600; margin-bottom: 20px; }

.qty-controls { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 25px; }
.qty-btn { background: var(--bg-color); border: 1px solid var(--border-color); color: var(--text-main); width: 45px; height: 45px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; transition: 0.3s; }
.qty-btn:hover { border-color: var(--gold); color: var(--gold); }
.qty-input { width: 50px; text-align: center; border: none; background: transparent; font-size: 1.5rem; font-weight: 600; color: var(--text-main); }

/* --- 8. PREMIUM FOOTER --- */
.premium-footer { background-color: var(--footer-bg); padding: 80px 5% 20px; border-top: 1px solid var(--border-color); color: var(--text-muted); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 60px; }
.footer-brand { font-size: 2rem; color: var(--gold); margin-bottom: 20px; }
.footer-col h4 { color: var(--text-main); font-size: 1.2rem; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background-color: var(--gold); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 15px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: all 0.3s ease; display: inline-block; }
.footer-links a:hover { color: var(--gold); transform: translateX(5px); }

.footer-socials { display: flex; gap: 15px; margin-top: 25px; }
.footer-socials a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-main); transition: 0.3s; text-decoration: none; }
.footer-socials a:hover { background: var(--gold); color: #fff; border-color: var(--gold); transform: translateY(-3px); }

.newsletter-form { display: flex; margin-top: 15px; box-shadow: 0 5px 15px var(--shadow-color); border-radius: 5px; overflow: hidden; }
.newsletter-form input { flex: 1; padding: 12px 15px; border: 1px solid var(--border-color); border-right: none; background: var(--card-bg); color: var(--text-main); outline: none; }
.newsletter-form button { padding: 12px 20px; background: var(--gold); color: #fff; border: none; cursor: pointer; transition: 0.3s; font-weight: 600; }
.newsletter-form button:hover { background: var(--gold-hover); }

.footer-bottom-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-top: 25px; border-top: 1px solid rgba(212, 175, 55, 0.2); font-size: 0.9rem; }
.footer-bottom-links a { color: var(--text-muted); text-decoration: none; margin-left: 20px; transition: 0.3s; }
.footer-bottom-links a:hover { color: var(--gold); }

/* --- 9. GLOBAL RESPONSIVE ADJUSTMENTS --- */
/* Standardized Tablet/Mobile Navigation Breakpoint (Matches header.php) */
@media screen and (max-width: 992px) {
    .top-bar { display: none; }
    .navbar { top: 0; padding: 15px 5%; }
    .brand { font-size: 1.4rem; } 
    .hamburger { display: block; }
    
    .nav-links { 
        position: fixed; top: 0; right: -100%; height: 100vh; width: 280px; max-width: 80vw; 
        flex-direction: column; background: rgba(10, 10, 10, 0.98); padding-top: 80px; 
        align-items: flex-start; transition: 0.4s ease; box-shadow: -5px 0 15px rgba(0,0,0,0.5); overflow-y: auto; 
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 12px 0 12px 25px; width: 80%; }
    .checkout-item { margin-left: 25px; margin-top: 10px; }
    .gtranslate-item { margin-top: 0; }
    .btn-premium-cart { justify-content: center; width: 100%; }
    
    .dropdown-content { position: relative; left: 0; transform: none; box-shadow: none; border: none; display: none; visibility: visible; opacity: 1; padding-top: 10px; background: transparent; }
    .dropdown.active-mobile .dropdown-content { display: block; } 
    
    .navbar.scrolled .nav-links a { color: #ffffff; }
}

/* Smaller Mobile Adjustments */
@media screen and (max-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .filter-buttons { justify-content: center; }
    .footer-bottom-bar { flex-direction: column; text-align: center; gap: 15px; }
    .footer-bottom-links a { margin: 0 10px; }
}