/**
 * Cafe Menu V2 - Improved Public Menu Styles
 * Modern, professional design with centered layout
 */

:root {
    --primary: #E84545;
    --primary-dark: #C73636;
    --dark: #1E1E1E;
    --gray: #666666;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--dark);
    line-height: 1.6;
}

/* ============================================
   HEADER - CENTERED DESIGN
   ============================================ */

.menu-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* Decorative gradient overlay */
.menu-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Admin Button in Header */
.admin-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--primary);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-btn:hover {
    background: var(--white);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.admin-btn i {
    font-size: 1.2rem;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(232, 69, 69, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(232, 69, 69, 0.5);
}

.scroll-top-btn i {
    font-size: 1.5rem;
}

.header-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 20px;
    background: var(--white);
    padding: 10px;
    margin: 0 auto 1.5rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo-placeholder {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 20px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo-placeholder i {
    font-size: 4rem;
    color: var(--primary);
}

.menu-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 400;
}

/* ============================================
   SALE BANNER
   ============================================ */

.sale-banner {
    background: linear-gradient(90deg, #FFA500 0%, #FF6B35 50%, #FFA500 100%);
    padding: 1rem 0;
    animation: slideGradient 4s ease infinite;
    background-size: 200% 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes slideGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.sale-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sale-banner-content i {
    font-size: 1.5rem;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ============================================
   SECTIONS
   ============================================ */

section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
}

.section-title i {
    color: var(--primary);
    font-size: 2.25rem;
}

.category-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50%;
    height: 3px;
    background: var(--primary-dark);
}

/* ============================================
   POPULAR CAROUSEL
   ============================================ */

.popular-section {
    background: var(--white);
    box-shadow: 0 2px 15px var(--shadow);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.popular-card {
    box-shadow: 0 10px 30px rgba(232, 69, 69, 0.25) !important;
    transform: scale(1.02);
    border: 2px solid rgba(232, 69, 69, 0.1);
}

/* ============================================
   NEW ARRIVALS
   ============================================ */

.new-arrivals-section {
    background: var(--white);
    box-shadow: 0 2px 15px var(--shadow);
}

/* ============================================
   SEARCH BAR
   ============================================ */

.search-section {
    padding: 2.5rem 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--light-gray) 100%);
}

.search-bar {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--gray);
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.1rem 1.1rem 65px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(232, 69, 69, 0.15);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: #999;
}

/* ============================================
   CATEGORY FILTERS
   ============================================ */

.filter-section {
    padding: 1.5rem 0;
    background: var(--white);
    box-shadow: 0 2px 15px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.85rem 1.75rem;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(232, 69, 69, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(232, 69, 69, 0.3);
}

/* ============================================
   MENU CARDS
   ============================================ */

.menu-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.menu-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-card:hover img {
    transform: scale(1.05);
}

.menu-card .card-body {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.badge {
    padding: 0.5em 1em;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-popular {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.badge-new {
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
    color: var(--dark);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.badge-sale {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.menu-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
    line-height: 1.3;
}

.description {
    color: var(--gray);
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.price {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
}

.original-price {
    font-size: 1.25rem;
    text-decoration: line-through;
    color: var(--gray);
    font-weight: 400;
    margin-right: 0.5rem;
}

.sale-price {
    color: #4CAF50;
}

/* ============================================
   MENU SECTION
   ============================================ */

.menu-section {
    padding: 2rem 0 4rem 0;
}

.category-section {
    margin-bottom: 4rem;
}

.category-section.hidden {
    display: none;
}

.menu-item-col.hidden {
    display: none;
}

/* ============================================
   FOOTER
   ============================================ */

.menu-footer {
    background: linear-gradient(135deg, var(--dark) 0%, #2a2a2a 100%);
    color: var(--white);
    padding: 2.5rem 0;
    text-align: center;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
}

.menu-footer p {
    margin: 0;
    opacity: 0.85;
    font-size: 1rem;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .admin-btn {
        top: 15px;
        right: 15px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .scroll-top-btn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .scroll-top-btn i {
        font-size: 1.3rem;
    }

    .menu-header {
        padding: 2.5rem 0;
    }

    .menu-header h1 {
        font-size: 2.25rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .logo,
    .logo-placeholder {
        width: 80px;
        height: 80px;
    }

    .logo-placeholder i {
        font-size: 3rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .menu-card h3 {
        font-size: 1.3rem;
    }

    .filter-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .sale-banner-content {
        font-size: 1rem;
        gap: 0.75rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 1rem 1rem 1rem 55px;
    }

    .search-bar i {
        left: 18px;
        font-size: 1.3rem;
    }

    .menu-card img {
        height: 220px;
    }
}

@media (max-width: 576px) {
    .admin-btn {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .admin-btn i {
        font-size: 1rem;
    }

    .scroll-top-btn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    .scroll-top-btn i {
        font-size: 1.2rem;
    }

    .menu-header {
        padding: 2rem 0;
    }

    .menu-header h1 {
        font-size: 1.85rem;
    }

    .logo,
    .logo-placeholder {
        width: 70px;
        height: 70px;
    }

    section {
        padding: 2rem 0;
    }

    .menu-card img {
        height: 200px;
    }

    .price {
        font-size: 1.6rem;
    }

    .filter-section {
        padding: 1rem 0;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Stagger animations */
.menu-item-col:nth-child(1) .menu-card { animation-delay: 0s; }
.menu-item-col:nth-child(2) .menu-card { animation-delay: 0.1s; }
.menu-item-col:nth-child(3) .menu-card { animation-delay: 0.2s; }
.menu-item-col:nth-child(4) .menu-card { animation-delay: 0.3s; }
.menu-item-col:nth-child(5) .menu-card { animation-delay: 0.4s; }
.menu-item-col:nth-child(6) .menu-card { animation-delay: 0.5s; }