/* ===== MENU PAGE STYLES ===== */

/* Root Variables (inheriting from main styles) */
:root {
    --primary-color: #d64161;
    --primary-light: #e87a90;
    --primary-dark: #b8344f;
    --secondary-color: #f8b3c4;
    --accent-color: #ffd6e1;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --text-muted: #999;
    --background-light: #fefefe;
    --background-cream: #faf8f6;
    --white: #ffffff;
    --success-color: #28a745;
    --shadow-light: 0 2px 10px rgba(214, 65, 97, 0.1);
    --shadow-medium: 0 4px 20px rgba(214, 65, 97, 0.15);
    --shadow-heavy: 0 8px 30px rgba(214, 65, 97, 0.2);
    --border-radius: 12px;
    --border-radius-large: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
}

/* ===== MENU CONTAINER ===== */
.menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== MENU ITEM STYLES ===== */
.menu-item {
    background: var(--white);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

/* ===== ITEM IMAGE STYLES ===== */
.item-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--background-cream), var(--accent-color));
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.menu-item:hover .item-image img {
    transform: scale(1.1);
}

/* ===== IMAGE OVERLAY ===== */
.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(214, 65, 97, 0.8), rgba(232, 122, 144, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.menu-item:hover .item-overlay {
    opacity: 1;
}

.overlay-btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.overlay-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== ITEM CONTENT ===== */
.item-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.item-title {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.item-description {
    font-family: var(--font-secondary);
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.item-price {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

/* ===== ADD TO CART BUTTON ===== */
.add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

/* ===== CATEGORY FILTERS ===== */
.menu-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    color: var(--text-light);
    border: 2px solid var(--accent-color);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: capitalize;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* ===== MENU HEADER ===== */
.menu-header {
    text-align: center;
    margin-bottom: 3rem;
}

.menu-title {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.animate-on-scroll:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-on-scroll:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-on-scroll:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-on-scroll:nth-child(4) {
    animation-delay: 0.4s;
}

.animate-on-scroll:nth-child(5) {
    animation-delay: 0.5s;
}

.animate-on-scroll:nth-child(6) {
    animation-delay: 0.6s;
}

/* ===== LOADING STATES ===== */
.menu-item.loading {
    pointer-events: none;
}

.menu-item.loading .item-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .menu-container {
        padding: 1.5rem;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .menu-container {
        padding: 1rem;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .menu-title {
        font-size: 2.5rem;
    }

    .item-image {
        height: 220px;
    }

    .item-content {
        padding: 1.25rem;
    }

    .menu-filters {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .menu-title {
        font-size: 2rem;
    }

    .menu-subtitle {
        font-size: 1rem;
    }

    .item-image {
        height: 200px;
    }

    .item-content {
        padding: 1rem;
    }

    .item-title {
        font-size: 1.2rem;
    }

    .item-description {
        font-size: 0.9rem;
    }

    .menu-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
        text-align: center;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {

    .menu-item,
    .overlay-btn,
    .add-to-cart-btn,
    .filter-btn,
    .item-image img {
        transition: none;
    }

    .animate-on-scroll {
        animation: none;
        opacity: 1;
    }

    .menu-item:hover {
        transform: none;
    }

    .menu-item:hover .item-image img {
        transform: none;
    }
}

/* ===== FOCUS STYLES ===== */
.overlay-btn:focus,
.add-to-cart-btn:focus,
.filter-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {

    .item-overlay,
    .overlay-btn,
    .add-to-cart-btn,
    .menu-filters {
        display: none;
    }

    .menu-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .item-image {
        height: 150px;
    }
}

/* ===== PAGE HEADER STYLES ===== */
.page-header {
    background: linear-gradient(135deg, var(--background-cream) 0%, var(--secondary-color) 100%);
    padding: 5rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    /* Space for fixed navbar */
    box-shadow: var(--shadow-light);
}

.page-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.page-title.reveal-text {
    overflow: hidden;
    position: relative;
}

.page-title.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    animation: revealText 1.2s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

@keyframes revealText {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(101%);
    }
}

.page-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}

/* ===== MENU CATEGORIES STYLES ===== */
.menu-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0.5rem;
}

.category-btn {
    background: var(--white);
    color: var(--text-light);
    border: 2px solid var(--accent-color);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    background: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.category-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.category-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .page-header {
        padding: 4rem 0 2.5rem;
    }

    .page-title {
        font-size: 3rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 3.5rem 0 2rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .category-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 3rem 0 1.5rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .menu-categories {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ===== ACCESSIBILITY STYLES ===== */
@media (prefers-reduced-motion: reduce) {
    .page-title.reveal-text::after {
        animation: none;
        display: none;
    }

    .category-btn::before {
        display: none;
    }

    .category-btn:hover,
    .category-btn:active {
        transform: none;
    }
}

.category-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== ANIMATION FOR MENU CATEGORIES ===== */
.menu-categories.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.menu-categories.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}