/* Public menu - single-page layout (10bis style) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #040404;
    line-height: 1.5;
    padding-bottom: 2rem;
}

.public-menu-wrap {
    max-width: 600px;
    margin: 0 auto;
}

.menu-header {
    margin-bottom: 0;
    overflow: hidden;
}

.menu-header-banner {
    display: block;
    width: 100%;
    min-height: 140px;
    max-height: 220px;
    object-fit: cover;
    object-position: center;
}

.menu-header:not(.menu-header-with-banner) {
    text-align: center;
    padding: 1.5rem 0;
    background-color: #040404;
    color: #fff;
    border-radius: 0 0 15px 15px;
}

.menu-header-title {
    text-align: center;
    padding: 0.75rem 0;
    background-color: #FFFFFF;
}

.menu-header-title h1 {
    font-size: 1.75rem;
    color: #040404;
    margin: 0;
}

.menu-header:not(.menu-header-with-banner) .menu-header-title {
    padding: 0;
    background: transparent;
}

.menu-header:not(.menu-header-with-banner) .menu-header-title h1 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.menu-logo {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    margin-top: 0.5rem;
}

/* Menu search bar */
.menu-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #FFFFFF;
    border: 1px solid #00000029;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    margin-top: 10px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px #00000029;
}

.menu-search-icon {
    flex-shrink: 0;
    color: #FC693E;
}

.menu-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #040404;
    outline: none;
    direction: rtl;
}

.menu-search-input::placeholder {
    color: #707070;
}

/* Sticky category nav bar */
.category-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #FFFFFF;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #00000029;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.category-nav::-webkit-scrollbar {
    height: 4px;
}

.category-nav::-webkit-scrollbar-thumb {
    background: #707070;
    border-radius: 4px;
}

.cat-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: #707070;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.cat-btn:first-child {
    margin-left: 0;
}

.cat-btn:hover {
    color: #040404;
}

.cat-btn.active {
    color: #040404;
    border-bottom: 2px solid #FC693E;
    background-color: transparent;
}

/* Menu sections */
.menu-section {
    background-color: #FFFFFF;
    border-radius: 0;
    padding: 1.25rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px #00000029;
    scroll-margin-top: 4rem;
}

.menu-section h2 {
    font-size: 1rem;
    color: #040404;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    background-color: #FFFFFF;
    border: none;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Product card (horizontal: image left, content right in RTL) */
.menu-item-card {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    border: 1px solid #00000029;
    border-radius: 0;
    background-color: #FFFFFF;
    cursor: pointer;
    text-align: right;
    transition: box-shadow 0.2s;
}

.menu-item-card:hover {
    box-shadow: 0 2px 8px #00000029;
}

.menu-item-card-image {
    width: 90px;
    min-width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 0;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 1px 4px #00000029;
}

.menu-item-card-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #f0f0f0 100%);
    color: #707070;
    font-size: 0;
    border-radius: 0;
}

.menu-item-card-image.placeholder svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.menu-item-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 12px;
}

.menu-item-card-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #040404;
    margin-bottom: 0.25rem;
}

.menu-item-card-desc {
    font-size: 0.85rem;
    color: #707070;
    line-height: 1.4;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-item-card-price {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
}

/* Product detail modal */
.product-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.product-modal-overlay.open {
    display: flex;
}

.product-modal {
    background-color: #FFFFFF;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    position: relative;
}

.product-modal-content .product-detail-image {
    border-radius: 16px 16px 0 0;
}

.product-modal-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.45);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    color: #FFFFFF;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal-close:hover {
    background-color: #dee2e6;
}

.product-modal-content {
    padding: 0;
}

.product-modal-content .product-detail-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0;
}

.product-modal-content .product-detail-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.product-detail-body .product-detail-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    background-color: #e9ecef;
    color: #707070;
    font-size: 0.9rem;
}

.product-detail-body .product-detail-name {
    font-size: 1.35rem;
    color: #040404;
    margin-bottom: 0.5rem;
}

.product-detail-body .product-detail-description {
    font-size: 0.95rem;
    color: #707070;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-detail-body .product-detail-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-detail-body .price-base,
.product-detail-body .price-variant {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
}

.product-detail-body .price-variant {
    display: inline-block;
    background-color: #FFF0EB;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

/* Modifier groups in product detail (sizes / add-ons) */
.product-detail-body .product-detail-modifier-group {
    margin: 1rem 0;
    padding: 0.75rem 0;
    border: none;
    border-top: 1px solid #00000029;
}

.product-detail-body .product-detail-modifier-legend {
    font-weight: 600;
    font-size: 0.95rem;
    color: #040404;
    padding: 0 0.25rem 0.35rem 0;
}

.product-detail-body .product-detail-modifier-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.product-detail-body .product-detail-modifier-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95rem;
}

.product-detail-body .modifier-option-name {
    font-weight: 500;
    color: #040404;
}

.product-detail-body .modifier-option-price {
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
}

.empty-menu {
    text-align: center;
    color: #707070;
    padding: 2rem;
}

/* Hidden product detail source (cloned into modal) */
.product-detail-source {
    display: none;
}

@media (max-width: 480px) {
    .menu-header-title h1 {
        font-size: 1.4rem;
    }
    .menu-item-card-name {
        font-size: 1rem;
    }
    .menu-item-card-desc {
        -webkit-line-clamp: 1;
    }
}
