/* ============================================
   RESTAURANT PAGE REDESIGN - PHASE 2 (CSS ONLY)
   ============================================ */

/* ===== DESIGN SYSTEM ===== */
:root {
    --brand-red: #B91C1C;
    --brand-red-dark: #991B1B;
    --stone-50: #FAFAF9;
    --stone-100: #F5F5F4;
    --stone-200: #E7E5E4;
    --stone-300: #D6D3D1;
    --stone-400: #A8A29E;
    --stone-500: #78716C;
    --stone-600: #57534E;
    --stone-700: #44403C;
    --stone-800: #292524;
}

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

/* ===== 1. PAGE BACKGROUND ===== */
body {
    background: var(--stone-50);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

#about {
    background: var(--stone-50);
}

/* ===== 2. MENU CONTAINER ===== */
.card-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
}

.menu-group {
    gap: 12px;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 1fr;
}

/* ===== 3. MENU ITEM CARDS ===== */
.menu-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: white;
    border-radius: 16px;
    border: none !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, min-height 0.3s ease;
    width: 100%;
    text-align: left;
    content-visibility: auto;
    contain-intrinsic-size: 120px 120px;
    min-height: 120px;
    height: auto;
    align-items: flex-start;
}

.menu-item.is-open {
    min-height: auto;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    background: white;
}

.menu-item.is-open {
    background: #e7e9ed;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
    box-shadow: none;
}

/* Keep selected item visible while scrolling add-ons */
.menu-item.is-open {
    position: sticky;
    top: 112px;
    z-index: 2;
}

.menu-item-image {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    margin: 0;
}

.menu-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 96px;
    height: 100%;
}

.menu-item-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0;
    gap: 8px;
    order: 1;
    flex-shrink: 0;
}

.menu-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--stone-800);
    margin-right: 0;
}

.menu-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-red) !important;
    white-space: nowrap;
}

.menu-item-info {
    font-size: 0.875rem;
    color: var(--stone-500);
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 1.4em;
    flex-shrink: 1;
    order: 3;
    transition: max-height 0.3s ease, -webkit-line-clamp 0.3s ease;
}

.menu-item.is-open .menu-item-info {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
    display: block;
    overflow: visible;
}

.food-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    order: 2;
    flex-shrink: 0;
    min-height: 24px;
    max-height: 32px;
    overflow: hidden;
}

.food-item-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--stone-100);
    color: var(--stone-700);
    text-transform: capitalize;
    transition: all 0.15s ease;
    border: none;
}

.food-item-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.food-item-tag .fa {
    font-size: 0.85rem;
}

.food-item-tag .tag-icon {
    font-size: 0.85rem;
    line-height: 1;
}

/* Tag-specific colors */
.food-item-tag.tag-new {
    background: #DBEAFE;
    color: #1E40AF;
}

.food-item-tag.tag-popular {
    background: #FEF9C3;
    color: #A16207;
}

.food-item-tag.tag-hit {
    background: #FFEDD5;
    color: #C2410C;
}

.food-item-tag.tag-gluten-free,
.food-item-tag.tag-glutenfree {
    background: #FEF3C7;
    color: #B45309;
}

.food-item-tag.tag-spicy {
    background: #FEE2E2;
    color: #B91C1C;
}

.food-item-tag.tag-vegan {
    background: #D1FAE5;
    color: #065F46;
}

.food-item-tag.tag-vegetarian,
.food-item-tag.tag-vegeterian {
    background: #DCFCE7;
    color: #166534;
}

.tag-label {
    margin-left: 0;
    font-weight: 600;
    color: inherit;
    text-transform: capitalize;
}

.menu-item .details {
    text-align: right;
}

.menu-item .original-price {
    font-size: 0.8rem;
    color: var(--stone-400);
}

.menu-item .discounted-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-red) !important;
}

.menu-item .discount {
    font-size: 0.75rem;
    color: var(--stone-500);
}

/* ===== 4. EXPANDED CONTENT ===== */
.menu-item-content {
    background: #e7e9ed;
    border: none;
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: -1px;
    width: 100%;
    box-sizing: border-box;
}


.menu-item.is-open + .menu-item-content {
    background: #e7e9ed;
}

.menu-item.is-open + .menu-item-content::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--stone-200);
    margin: 0 16px;
}

/* ===== 5. PORTION SELECTION ===== */
.portion-group {
    background: #e7e9ed;
    margin: 12px;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--stone-200);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portion-group label {
    display: block;
    margin-bottom: 8px;
}

.portion-group label:last-child {
    margin-bottom: 0;
}

.portion-group .checkbox-item {
    background: var(--stone-50);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
}

.portion-group .checkbox-item:hover {
    background: var(--stone-100);
}

.portion-group label:has(input[type="radio"]:checked) .checkbox-item {
    background: #FEF2F2;
    border-color: var(--brand-red);
}

.portion-group .checkbox-item.selected {
    background: #FEF2F2;
    border-color: var(--brand-red);
}

.portion-group .checkbox-heading {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.portion-group .checkbox-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--stone-700);
}

.portion-group .checkbox-price {
    font-size: 0.95rem;
    color: var(--stone-600);
}

.portion-group .on-discount {
    color: var(--brand-red) !important;
    font-weight: 600;
}

.portion-group input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand-red);
}

/* ===== 6. CONDIMENTS/ADD-ONS ===== */
.checkbox-group {
    background: #e7e9ed;
    margin: 12px;
    margin-top: 0;
    border-radius: 12px;
    padding: 10px;
    border: 1px solid var(--stone-200);
    gap: 6px;
    display: flex;
    flex-direction: column;
}

.checkbox-group label {
    display: block;
}

.checkbox-group .checkbox-item {
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}

.checkbox-group .checkbox-item:hover {
    background: var(--stone-100);
}

.checkbox-group label:has(input[type="checkbox"]:checked) .checkbox-item {
    background: #FEF2F2;
    border-color: #FECACA;
}

.checkbox-group .checkbox-heading {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.checkbox-group .checkbox-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--stone-700);
}

.checkbox-group .checkbox-price {
    font-size: 0.95rem;
    color: var(--stone-500);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--brand-red);
    border-radius: 4px;
}

.checkbox-group input[type="checkbox"]:checked ~ .checkbox-text .checkbox-name {
    color: var(--brand-red);
}

/* Hide empty condiments section */
.checkbox-group:empty {
    display: none;
}

.checkbox-group:not(:has(input)) {
    display: none;
}

@media screen and (min-width: 992px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* ===== 7. ADD TO CART BUTTON ===== */
.cd-add-to-cart {
    display: block;
    width: calc(100% - 32px);
    margin: 16px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
    transition: all 0.2s;
}

.cd-add-to-cart:hover {
    background: linear-gradient(135deg, var(--brand-red-dark) 0%, #7F1D1D 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.4);
}

.cd-add-to-cart:active {
    transform: scale(0.98);
}

/* ===== 8. CATEGORY HEADING ===== */
.menu-group-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--stone-800);
    padding: 16px 0 12px;
    margin: 0;
    border-bottom: 2px solid var(--stone-200);
}

/* ===== 9. CART LAYERING ONLY (keep original visuals) ===== */
.cd-cart__content {
    z-index: 300;
}

.cd-cart__trigger {
    z-index: 301;
    border-radius: 8px;
    box-shadow: 0 0 0 3px var(--brand-red), 0 6px 16px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.cd-cart--open .cd-cart__trigger {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.cd-cart__count {
    background: var(--brand-red);
    color: white;
    border-color: var(--brand-red);
}

/* ===== 11. HERO SECTION ===== */
.restaurant-hero {
    position: relative;
    height: 280px;
    overflow: hidden;
    margin-top: -56px;
    padding-top: 56px;
}

.hero-image-container {
    position: absolute;
    inset: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-open {
    background: #10B981;
    color: white;
}

.status-closed {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.hero-hours {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.hero-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.rating-star {
    color: #FBBF24;
    font-size: 1.1rem;
}

.rating-count {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.rating-new {
    color: rgba(255,255,255,0.8);
    font-style: italic;
}

.hero-actions {
    display: flex;
    gap: 10px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.hero-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
}

.hero-btn svg {
    opacity: 0.9;
}

.jumbotron {
    display: none;
}

#page-header {
    margin-bottom: 0;
}

/* ===== INFO / RECENZIJE ACTIONS BAR ===== */
.info-actions-bar {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--stone-200);
    max-width: 500px;
    margin: 0 auto;
}

.info-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--stone-50);
    border: 1px solid var(--stone-200);
    border-radius: 10px;
    color: var(--stone-700);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.info-action-btn:hover {
    background: var(--stone-100);
    color: var(--stone-800);
}

/* ===== 12. CATEGORY TABS ===== */
.category-nav {
    position: sticky;
    top: 56px;
    z-index: 20;
    background: white;
    border-bottom: 1px solid var(--stone-200);
    padding: 0 16px;
    margin-bottom: 0;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    max-width: 500px;
    margin: 0 auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 9999px;
    background: var(--stone-100);
    color: var(--stone-700);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.category-tab:hover {
    background: var(--stone-200);
    color: var(--stone-800);
    text-decoration: none;
}

.category-tab.active {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

/* Ensure overlays sit above sticky tabs and back button */
.overlay,
.overlay1 {
    z-index: 1001 !important;
}

/* Cart overlay should darken everything including tabs */
.cd-cart::before {
    z-index: 250;
}

.cd-cart__content {
    z-index: 260;
}

.cd-cart__trigger {
    z-index: 261;
}

/* Keep red border around cards and expanded section */
.menu-item {
    border: 2px solid var(--brand-red);
}

/* ===== 13. INSTRUCTION TEXT ===== */
#about > div:first-child {
    display: none;
}

/* ===== 14. RADIOBUTTON HEADING ===== */
.radiobutton-heading {
    border-bottom: none;
}

