/*!
Theme Name: Blocksy
Theme URI: https://creativethemes.com/blocksy/
Author: CreativeThemes
Author URI: https://creativethemes.com
Description: Blocksy is a fast, modern WordPress theme with advanced WooCommerce support and full compatibility with the block editor.
Version: 2.1.48
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Copyright: (c) 2019 CreativeThemes.
Requires at least: 6.7
Requires PHP: 7.0
Tested up to: 7.0
Text Domain: blocksy
Blocksy Minimum Companion Version: 2.1.36-dev1
Tags: accessibility-ready, blog, block-patterns, e-commerce, wide-blocks, block-styles, grid-layout, one-column, two-columns, three-columns, four-columns, right-sidebar, left-sidebar, translation-ready, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, theme-options, threaded-comments
*/

/* =======================================================
   RESTAURANT MENU CSS 
   ======================================================= */

/* 1. Hero Section & Top Bar */
.hero-section {
    background-color: #f8f9fa; /* Fallback color */
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.hero-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
}

.hero-top-bar button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.hero-top-bar button:hover {
    background: #219653;
}

/* 2. Sticky Category Slider */
.sticky-category-bar {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 100;
    padding: 15px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
    white-space: nowrap;
    
    /* Hide scrollbar for a cleaner mobile look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sticky-category-bar::-webkit-scrollbar {
    display: none;
}

.category-slider {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    gap: 15px;
    max-width: 1200px;
}

.category-slider li a {
    text-decoration: none;
    color: #4a5568;
    background: #f1f3f5;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.category-slider li a:hover,
.category-slider li a:active {
    background: #27ae60;
    color: #ffffff;
}

/* 3. Menu Layout & Sections */
.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.menu-category-section {
    margin-bottom: 60px;
    scroll-margin-top: 90px; /* Prevents the sticky header from covering titles when jumping down the page */
}

.menu-category-section h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #2d3748;
    border-bottom: 3px solid #27ae60;
    display: inline-block;
    padding-bottom: 8px;
}

/* 4. The Product Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* 5. Product Cards */
.menu-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.menu-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.menu-card h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #1a202c;
    line-height: 1.4;
    font-weight: 700;
}

.menu-card .price {
    font-size: 17px;
    font-weight: 800;
    color: #27ae60;
    margin-top: auto;
}

/* 6. Mobile Responsiveness */
@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr); /* Forces exactly 2 columns on small phones */
        gap: 12px;
    }
    
    .menu-container {
        padding: 20px 10px;
    }

    .menu-card {
        padding: 10px;
    }

    .menu-card img {
        height: 110px;
        margin-bottom: 10px;
    }
    
    .menu-card h3 {
        font-size: 14px;
    }

    .menu-card .price {
        font-size: 15px;
    }
}

/* =======================================================
   MODALS & POPUPS CSS
   ======================================================= */

/* Base Modal Styling */
.custom-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.custom-modal.active {
    display: flex;
}

.custom-modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

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

/* Slide-Up Animation Mechanics */
.slide-up {
    align-items: flex-end; /* Pushes content to the bottom of the screen */
}
.slide-up .custom-modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 25px 25px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-up.active .custom-modal-content {
    transform: translateY(0);
}

/* Modal Elements */
.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #a0aec0;
}
#modal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}
.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}
.action-btn, .order-type-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}
.action-btn:hover, .order-type-btn:hover { background: #219653; }

/* Cart Specific Styles */
#cart-items-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
#cart-items-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 16px;
}
.remove-btn {
    background: none; border: none; cursor: pointer; color: #e53e3e; margin-left: 10px;
}
.cart-total-wrap {
    display: flex; justify-content: space-between;
    font-size: 20px; margin-bottom: 20px;
}

/* Sticky Bottom Cart Bar */
.bottom-cart-bar {
    display: none; /* Hidden until items are added */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #27ae60;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9998;
    cursor: pointer;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
}
.cart-info { display: flex; flex-direction: column; }
.cart-info #bar-items-count { font-size: 12px; opacity: 0.9; }
.cart-info #bar-total-price { font-size: 18px; font-weight: bold; }
.view-order-btn {
    background: white; color: #27ae60; border: none;
    padding: 8px 16px; border-radius: 20px; font-weight: bold; pointer-events: none;
}