/* ================================================
   FoodZone - Main Stylesheet
   A beautiful, modern food ordering experience
   ================================================ */

/* CSS Variables */
:root {
    --primary: #ff6b6b;
    --primary-dark: #ff5252;
    --secondary: #ff8e53;
    --accent: #ffd700;
    --success: #4caf50;
    --info: #4ecdc4;
    --warning: #ff9800;
    --danger: #f44336;

    --bg-dark: #0a0a0f;
    --bg-darker: #121218;
    --bg-card: rgba(255, 255, 255, 0.03);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-gold: linear-gradient(135deg, var(--primary), var(--accent));

    --shadow-primary: 0 20px 40px rgba(255, 107, 107, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;

    --transition: all 0.3s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast i {
    color: var(--success);
    font-size: 1.2rem;
}

/* Utility Classes */
.gradient-text {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Form Elements */
.form-control {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.05);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(255, 107, 107, 0.2);
    color: var(--primary);
}

.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent);
}

.badge.veg {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.badge.non-veg {
    background: rgba(128, 0, 0, 0.2);
    color: #ff4d4d;
}

/* Food Type Icons (Indian Standard) */
.gov-icon {
    width: 16px;
    height: 16px;
    border: 1.5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    flex-shrink: 0;
    background: #fff;
    margin-right: 4px;
}

.gov-icon.veg {
    border-color: #008000;
}

.gov-icon.non-veg {
    border-color: #800000;
}

.gov-icon .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.gov-icon.veg .dot {
    background-color: #008000;
}

.gov-icon.non-veg .dot {
    background-color: #800000;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            rgba(255, 255, 255, 0.05) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

/* Responsive Grid */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.gap-4 {
    gap: 32px;
}

/* Spacing Utilities */
.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.p-1 {
    padding: 8px;
}

.p-2 {
    padding: 16px;
}

.p-3 {
    padding: 24px;
}

.p-4 {
    padding: 32px;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .no-print {
        display: none !important;
    }
}



/* ============================================
   NOTIFICATION SYSTEM STYLES
   ============================================ */

/* Notification Container in Header */
.notification-container-header {
    position: relative;
    display: inline-block;
    z-index: 10001;
}

/* Ensure header doesn't clip dropdown */
.main-header,
.header-container,
.header-actions {
    overflow: visible !important;
}

/* Ensure notification container allows dropdown overflow */
.notification-container-header {
    overflow: visible !important;
}

/* Notification Bell Button in Header */
.notification-bell-header {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-header:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.notification-bell-header:active {
    transform: translateY(0);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.5), 0 0 0 2px #1a1a24;
    animation: pulse-badge 2s infinite;
    letter-spacing: -0.02em;
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    width: 380px;
    max-height: 600px;
    background: rgba(26, 26, 32, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 10000;
    backdrop-filter: blur(16px);
    display: none;
}

.notification-dropdown[style*="display: block"],
.notification-dropdown.show {
    display: block !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Header */
.notification-header {
    padding: 18px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mark-all-read {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Notification List */
.notification-list {
    max-height: 450px;
    overflow-y: auto;
    background: transparent;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 107, 0.3);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 107, 0.5);
}

/* Notification Item */
.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: transparent;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notification-item:last-child {
    border-bottom: none;
}

/* Notification Icon */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notif-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.notif-info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.notif-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.notif-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.notif-primary {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.4;
}

.notification-content p {
    margin: 0 0 6px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.notification-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

/* Notification Close Button */
.notification-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.notification-item:hover .notification-close {
    opacity: 1;
}

.notification-close:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    transform: scale(1.1);
}

/* Empty State */
.notification-empty {
    padding: 50px 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.3;
    color: rgba(255, 255, 255, 0.4);
    display: block;
}

.notification-empty p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-container-header {
        position: relative;
        z-index: 10001;
    }

    .notification-bell-header {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .notification-badge {
        top: -5px;
        right: -5px;
        font-size: 0.65rem;
        padding: 2px 5px;
        min-width: 18px;
        height: 18px;
    }

    .notification-dropdown {
        position: fixed !important;
        top: 70px !important;
        left: 48% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 92vw !important;
        max-width: 400px !important;
        min-width: unset !important;
        max-height: 80vh;
        border-radius: 16px;
        z-index: 10002;
        box-sizing: border-box;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .notification-header {
        padding: 16px 18px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .notification-header h3 {
        font-size: 1.05rem;
        flex-shrink: 0;
    }

    .mark-all-read {
        font-size: 0.75rem;
        padding: 6px 12px;
        white-space: nowrap;
    }

    .notification-item {
        padding: 14px 18px;
        gap: 12px;
    }

    .notification-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .notification-content {
        flex: 1;
        min-width: 0;
        padding-right: 30px;
    }

    .notification-content h4 {
        font-size: 0.92rem;
        line-height: 1.3;
        word-wrap: break-word;
        margin-bottom: 6px;
    }

    .notification-content p {
        font-size: 0.82rem;
        line-height: 1.45;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .notification-time {
        font-size: 0.72rem;
        margin-top: 6px;
        display: block;
    }

    .notification-close {
        width: 26px;
        height: 26px;
        top: 14px;
        right: 14px;
        font-size: 0.75rem;
        opacity: 1;
    }

    .notification-empty {
        padding: 45px 25px;
    }

    .notification-empty i {
        font-size: 2.5rem;
    }

    .notification-empty p {
        font-size: 0.92rem;
    }

    .notification-list {
        max-height: calc(100vh - 180px);
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .notification-bell-header {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .notification-dropdown {
        /* Inherit robust styles from 768px media query */
        top: 70px !important;
        left: 48% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 92vw !important;
        max-width: 400px !important;
    }

    .notification-header {
        padding: 14px 16px;
        gap: 10px;
    }

    .notification-header h3 {
        font-size: 0.98rem;
    }

    .mark-all-read {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .notification-item {
        padding: 12px 16px;
        gap: 10px;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.9rem;
    }

    .notification-content {
        padding-right: 28px;
    }

    .notification-content h4 {
        font-size: 0.88rem;
    }

    .notification-content p {
        font-size: 0.78rem;
    }

    .notification-close {
        width: 24px;
        height: 24px;
        top: 12px;
        right: 12px;
    }
}

/* Animation for new notifications */
@keyframes newNotification {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-item.new {
    animation: newNotification 0.5s ease;
}

/* Mobile Header Responsive Fixes */
@media (max-width: 768px) {
    .main-header {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 10px 0;
    }

    .header-container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 16px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        overflow: visible;
    }

    .notification-container-header {
        position: relative;
    }
}

/* Very Small Mobile */
@media (max-width: 375px) {
    .header-container {
        padding: 0 10px;
        gap: 6px;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .header-actions {
        gap: 6px;
    }

    .notification-bell-header {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .cart-icon {
        width: 34px;
        height: 34px;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    .notification-dropdown {
        /* Inherit robust styles from 768px media query */
        width: 94vw !important;
        /* Slightly wider on very small screens */
        left: 14% !important;
        transform: translateX(-50%) !important;
    }
}