/* Modern & Compact Design System for Foodie */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --premium-gradient: linear-gradient(135deg, #ff9d00 0%, #ff5e00 100%);
    --premium-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    --premium-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.1);
    --compact-gap: 0.8rem;
    --section-padding: 2.5rem;
}

/* Global Resets */
body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] {
    --glass-bg: rgba(18, 18, 18, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --eye-ball: #121212;
}

main {
    flex: 1;
}

/* Compactness Overrides */
section {
    padding-block: var(--section-padding) !important;
}

h1 {
    font-size: 3.5rem !important; /* Reduced from 5.6vw/4.5rem */
}

h2 {
    font-size: 2.2rem !important;
}

p {
    font-size: 1.1rem !important; /* Reduced from 1.5rem */
    line-height: 1.6 !important;
}

.para {
    margin-block: 1rem 1.5rem !important; /* Reduced from 2rem 3rem */
}

/* Glassmorphism Navbar */
header {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color:  var(--glass-bg) !important;
    border-bottom: 1px solid var(--glass-border);
    height: auto !important;
    padding-block: 0.35rem !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0 !important; /* Ensure no margin causing gap */
}

.navbar {
    padding-block: 0.1rem !important;
    max-width: 98% !important; /* Use almost full width */
    max-width: 98% !important; /* Almost full width */
    margin: 0 auto !important;
    gap: 1.2rem !important; /* Reduced gap */
    padding-inline: 0.5rem !important; /* Minimal inline padding */
    
}

.navList {
    flex-wrap: nowrap !important;
    white-space: nowrap;
    gap: 0.8rem !important; /* Tighter links */
}
.navList li a {
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navList li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #ff7b00;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.navList li a:hover::after,
.navList li.active a::after {
    width: 100%;
}

.navList li a:hover {
    color: #ff7b00 !important;
}

.desktop-action {
    gap: 0.6rem !important; /* Tighter actions */
}

.navList li a {
    font-size: 0.88rem !important; /* Slightly smaller for fit */
    padding: 0.4rem 0.4rem !important;
    font-weight: 500;
}

/* Premium Buttons - Compact */
.btn {
    background: var(--premium-gradient) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(255, 94, 0, 0.2) !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease-in-out !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 94, 0, 0.3) !important;
}

/* Polished Cards & Responsive Grids */
.grid { display: grid !important; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.grid-cols-1 { grid-template-columns: 1fr !important; }
.gap-1 { gap: 0.5rem !important; }
.gap-2 { gap: 1rem !important; }
.mt-2 { margin-top: 1rem !important; }
.ms-auto { margin-left: auto !important; }
.items-center { align-items: center !important; }
.text-center { text-align: center !important; }

.order-card, .srevice-card, .card {
    background: var(--bg-secondary) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--premium-shadow) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    border-radius: 16px !important;
    padding: 1rem !important;
}

/* Mobile Responsiveness for Grids */
@media (max-width: 768px) {
    .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr !important; }
    .profile-info-main { flex-direction: column !important; text-align: center !important; gap: 1rem !important; }
    .profile-actions { margin-left: 0 !important; width: 100% !important; display: flex !important; gap: 10px !important; justify-content: center !important; }
    .profile-actions .btn { flex: 1 !important; }
}

/* Navbar Components Polish */
.navbar-search {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 20px !important;
    padding: 2px 5px !important;
    border: 1px solid var(--glass-border) !important;
}

.navbar-search input {
    background: transparent !important;
    border: none !important;
    padding: 0.4rem 0.8rem !important;
    font-size: 0.9rem !important;
    width: 150px !important;
    transition: width 0.3s ease;
}

.navbar-search input:focus {
    width: 200px !important;
    outline: none;
}

#navbar-search-btn {
    background: var(--premium-gradient) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
}

/* Language Dropdown Polish */
.custom-select .selected {
    background: transparent !important;
    border: 1px solid var(--glass-border) !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
}

/* Theme Toggle Polish */
.theme-toggle {
    background: transparent !important;
    border: 1px solid var(--glass-border) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-primary) !important;
}

/* Visibility fixes for Dark Mode */
[data-theme="dark"] .logo {
    color: #ffffff !important;
}

[data-theme="dark"] .navList li a {
    color: #eeeeee !important;
}

.notification-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.notification-icon:hover {
    background: rgba(255,123,0,0.1);
    transform: translateY(-2px);
    color: #ff7b00;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff3d00;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Active Navigation Link Highlighting */
.navList li.active a {
    color: var(--premium-color, #ff5e00) !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--premium-color, #ff5e00) !important;
    padding-bottom: 0.2rem !important;
}

[data-theme="dark"] .navList li.active a {
    color: #ffa500 !important;
    border-bottom-color: #ffa500 !important;
}

.mobile-menu li.active a {
    background: rgba(255, 94, 0, 0.1) !important;
    color: var(--premium-color, #ff5e00) !important;
    font-weight: 700 !important;
    border-left: 3px solid var(--premium-color, #ff5e00) !important;
    padding-left: 0.7rem !important;
}

[data-theme="dark"] .mobile-menu li.active a {
    background: rgba(255, 165, 0, 0.1) !important;
    color: #ffa500 !important;
    border-left-color: #ffa500 !important;
}

[data-theme="dark"] .navbar-search {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .navbar-search input {
    color: #ffffff !important;
}

[data-theme="dark"] .custom-select .selected {
    color: #ffffff !important;
}

.order-card:hover, .srevice-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--premium-shadow-hover) !important;
}

/* Premium Hero Section Refinement */
.hero-section {
    padding-top: 5vh !important;
    min-height: auto !important;
}

.hero-section .content h1 {
    background: var(--premium-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 5px rgba(255, 94, 0, 0.1));
}

/* Floating Elements (Icons) */
.floating-food {
    position: absolute;
    z-index: -1;
    opacity: 0.4;
    font-size: 1.5rem;
    color: var(--gold-finger);
    animation: floating 6s ease-in-out infinite;
}

[data-theme="dark"] .floating-food {
    opacity: 0.75;
    color: #F2BD12;
    text-shadow: 0 0 12px rgba(242, 189, 18, 0.55);
    filter: drop-shadow(0 0 6px rgba(242, 189, 18, 0.4));
}

@keyframes floating {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(8deg); }
}

/* User Profile Badge */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 0.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.user-profile-badge:hover {
    background: var(--premium-gradient);
    border-color: transparent;
}

.user-profile-badge:hover .user-name-text, 
.user-profile-badge:hover i {
    color: white !important;
}

.user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.user-name-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-secondary);
    min-width: 160px;
    border-radius: 12px;
    box-shadow: var(--premium-shadow-hover);
    padding: 0.5rem;
    display: none;
    z-index: 2000;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.3s ease;
}

.user-profile-badge:hover .profile-dropdown {
    display: block;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background: rgba(255, 94, 0, 0.1);
    color: var(--auth-primary) !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer Polish */
footer {
    padding-block: 1.5rem !important; /* Even more compact */
    background-color: var(--eye-ball) !important;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    padding-top: 0 !important;
}

.social-media {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease !important;
}

.social-media:hover {
    background: var(--premium-gradient) !important;
    color: white !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 94, 0, 0.3) !important;
}

/* Mobile Menu Polish */
.mobile-menu {
    backdrop-filter: blur(20px);
    background: var(--glass-bg) !important;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--premium-shadow-hover);
}

/* Custom Scrollbar - Thinner */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-finger);
    border-radius: 10px;
}

/* Global Mobile Optimization */
@media (max-width: 768px) {
    :root {
        --section-padding: 1.5rem;
    }
    
    body { font-size: 14px !important; }
    
    .navbar { padding-inline: 1rem !important; }
    .logo { font-size: 1.5rem !important; }
    
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.6rem !important; }
    p { font-size: 1rem !important; }
    
    .desktop-action { display: none !important; } /* Hide desktop actions on mobile */
    .hamberger { display: flex !important; }
    
    .hero-section { text-align: center !important; }
    .hero-section .content { padding: 0 !important; }
    
    section { padding-inline: 1rem !important; }
    
    .footer-container { 
        grid-template-columns: 1fr !important; 
        text-align: center !important;
        gap: 2rem !important;
    }
    
    .footer-container .footer-list { align-items: center !important; }
}

/* Fix for profile dropdown on touch */
.user-profile-badge:active .profile-dropdown {
    display: block;
}
