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

:root {
    --bg-primary: #080808;
    --bg-secondary: #121212;
    --bg-card: #181818;
    --bg-input: #1e1e1e;
    --border-color: #2a2a2a;
    --accent: #f5a623;
    --accent-hover: #ffb834;
    --accent-rgb: 245, 166, 35;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #6e6e6e;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.9);
    --shadow-glow: 0 0 20px rgba(245, 166, 35, 0.35);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-round: 50%;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    padding-bottom: 60px;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Layout Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Component */
header {
    padding: 40px 0 20px;
    text-align: center;
    position: relative;
}

.logo-container {
    display: inline-block;
    position: relative;
    margin-bottom: 15px;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.6) 0%, rgba(var(--accent-rgb), 0) 70%);
    z-index: 1;
    pointer-events: none;
    animation: pulseGlow 4s infinite alternate;
}

header img.logo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-round);
    border: 3px solid var(--accent);
    position: relative;
    z-index: 2;
    background-color: #000;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

header img.logo:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-glow);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 30%, #ffc0bd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 25px;
}

/* Search Bar */
.search-wrapper {
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
}

.search-input {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 16px 20px 16px 50px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    background-color: var(--bg-card);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.search-input:focus + .search-icon {
    color: var(--accent);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* Sandwich Card (Vertical 9:16 Aspect Ratio) */
.sandwich-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sandwich-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: var(--shadow-lg), 0 0 15px rgba(var(--accent-rgb), 0.15);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    cursor: pointer;
    background-color: #000;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Contain ensures 100% of the flyer (description + price) is visible */
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sandwich-card:hover .card-image {
    transform: scale(1.05);
}

/* Dark gradient overlay removed so it doesn't block flyer text */
.card-overlay {
    display: none;
}

.card-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
    text-transform: capitalize;
    text-align: center;
}

/* Details and Actions */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

/* WhatsApp Button (Red Cheddar Melt Style) */
.btn-whatsapp {
    background: linear-gradient(135deg, #ef4444, #be123c); /* Rich red-cheese color */
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 18px 8px 24px 10px / 12px 20px 10px 22px; /* Organic asymmetrical cheese shape */
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.3s, transform 0.25s, box-shadow 0.25s, border-radius 0.35s ease-in-out;
    flex-grow: 1;
    box-shadow: 0 4px 12px rgba(190, 18, 60, 0.32);
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #f43f5e, #e11d48); /* Warmer glowing red */
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.45);
    border-radius: 10px 24px 8px 18px / 20px 10px 22px 12px; /* Smoothly melts/squishes on hover */
    transform: translateY(-2px);
}

.btn-whatsapp svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Secondary Button / View Button (Organic cheese match) */
.btn-view {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 8px 16px 10px 14px / 14px 10px 16px 8px; /* Organic coordinate match */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s, border-color 0.25s, color 0.25s, border-radius 0.35s ease-in-out, transform 0.25s;
}

.btn-view:hover {
    background-color: #be123c; /* Complimentary deep red */
    border-color: #be123c;
    color: white;
    border-radius: 14px 8px 16px 10px / 10px 16px 8px 14px; /* Organic morphing */
    transform: translateY(-2px);
}

.btn-view svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Lightbox / Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 5, 5, 0.95);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img-wrapper {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    background-color: #000;
}

.lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-footer {
    width: 100%;
    margin-top: 15px;
    text-align: center;
}

.lightbox-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    background-color: rgba(255,255,255,0.05);
}

.lightbox-close:hover {
    color: var(--accent);
    background-color: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

/* Floating WhatsApp Button for general questions */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 99;
    text-decoration: none;
    transition: var(--transition);
}

.floating-whatsapp:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Admin Styles */
.admin-login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.admin-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: var(--shadow-glow);
}

/* Admin Dashboard */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.btn-logout {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-logout:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

.admin-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .admin-grid-layout {
        grid-template-columns: 350px 1fr;
    }
}

.admin-panel-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    height: fit-content;
}

.admin-panel-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background-color: rgba(37, 211, 102, 0.15);
    border: 1px solid #25d366;
    color: #25d366;
}

.alert-error {
    background-color: rgba(177, 30, 23, 0.15);
    border: 1px solid var(--accent);
    color: #ff8b85;
}

/* Image Manager Grid */
.admin-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.admin-item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-item-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133%;
    background-color: #000;
}

.admin-item-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-item-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-item-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
}

.admin-item-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.btn-action {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition);
}

.btn-action-edit {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-action-edit:hover {
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-action-replace {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    position: relative;
}

.btn-action-replace:hover {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-action-delete {
    background-color: rgba(177, 30, 23, 0.1);
    border: 1px solid rgba(177, 30, 23, 0.2);
    color: #ff6e66;
}

.btn-action-delete:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* File Upload input formatting */
.file-upload-drag {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-drag:hover {
    border-color: var(--accent);
    background-color: rgba(var(--accent-rgb), 0.02);
}

.file-upload-drag svg {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* Animations */
@keyframes pulseGlow {
    0% {
        width: 120px;
        height: 120px;
        opacity: 0.4;
    }
    100% {
        width: 150px;
        height: 150px;
        opacity: 0.8;
    }
}

/* Responsive adjust */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p.tagline {
        font-size: 1rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 5px;
    }
    
    /* Proportions are managed globally by aspect-ratio: 9 / 16 now */
    
    .card-info {
        padding: 10px;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .btn-whatsapp {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .btn-view {
        display: none; /* Lightbox trigger is card click anyways, hide zoom button on mobile to save space */
    }

    .container {
        padding: 0 10px;
    }

    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .floating-whatsapp svg {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Cheese Physics Canvas Background */
#cheese-physics-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.35; /* Subtle glowing cheese physics background */
    background-color: var(--bg-primary);
    filter: drop-shadow(0 6px 15px rgba(245, 166, 35, 0.45)); /* Global drop shadow */
}
