/* ============================================================
   MIDNIGHT BITES restaurant menu page  (css/restaurant.css)
   Layout for the 12 individual restaurant pages, built on top
   of the shared design tokens in css/main.css.
   ============================================================ */

/* ---------- Hero banner ---------- */
.restaurant-hero {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: flex-end;
    padding: 64px 56px 54px;
    background-size: cover;
    background-position: center;
    color: var(--cream);
    overflow: hidden;
}

/* Dark gradient so text stays readable over any photo */
.restaurant-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(23, 11, 7, 0.96) 0%, rgba(23, 11, 7, 0.55) 45%, rgba(23, 11, 7, 0.25) 100%);
}

.restaurant-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cream);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 10px;
    background: rgba(23, 11, 7, 0.55);
    border: 1px solid var(--line);
    margin-bottom: 22px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hero-back:hover {
    background: var(--amber);
    color: #1a1207;
}

.hero-cuisine {
    display: inline-block;
    color: var(--herb);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-left: 10px;
}

.restaurant-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cream);
}

.hero-fact {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero-fact svg {
    color: var(--amber);
}

.hero-fact.open {
    color: var(--mint);
}

.hero-fact .rating-pill {
    background: var(--amber);
    color: #1a1207;
    border-color: var(--amber);
}

.hero-fact .rating-pill svg {
    color: #1a1207;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

/* ---------- Info / about strip ---------- */
.restaurant-about {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 56px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 54px;
    align-items: center;
}

.restaurant-about .about-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--muted);
}

.about-details {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
}

.about-details .detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.94rem;
}

.about-details .detail-row + .detail-row {
    border-top: 1px solid var(--line);
}

.about-details .detail-row svg {
    color: var(--herb);
    flex-shrink: 0;
    margin-top: 2px;
}

.about-details .detail-row .label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}

.about-details .detail-row .value {
    color: var(--cream);
    font-weight: 600;
}

/* ---------- Menu sections ---------- */
.menu-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 56px 92px 56px;
}

.menu-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cream);
    margin: 54px 0 24px 0;
}

.menu-section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--line);
}

.menu-section-title .count {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--bg-2);
    border: 1px solid var(--line);
    padding: 3px 11px;
    border-radius: 10px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 28px;
}

/* ---------- Menu item card ---------- */
.menu-item {
    text-align: left;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    font-family: var(--font-body);
    color: var(--cream);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease, background-color 0.25s ease;
    opacity: 0;
    animation: fadeUp 0.4s ease forwards;
}

.menu-item:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255, 167, 51, 0.45);
    background: var(--bg-3);
}

.menu-item-media {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bg-3);
}

.menu-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.menu-item:hover .menu-item-media img {
    transform: scale(1.05);
}

/* Icon tile used for items without a photo (drinks, sweets) */
.menu-item-glyph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 25%, rgba(255, 167, 51, 0.22), transparent 60%), var(--bg-3);
    color: var(--amber);
}

.badge-deal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--amber);
    color: #1a1207;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 10px;
}

.menu-item-body {
    padding: 18px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.menu-item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.menu-item-head h4 {
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--cream);
}

.menu-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.menu-item-price .now {
    color: var(--amber);
    font-weight: 800;
    font-size: 1rem;
    white-space: nowrap;
}

.menu-item-price .was {
    color: var(--muted);
    font-size: 0.78rem;
    text-decoration: line-through;
}

.menu-item-desc {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.5;
}

.menu-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

/* Base tag is butter-gold (used by Halal); each diet gets its own colour */
.menu-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--butter);
    background: var(--butter-soft);
    border: 1px solid rgba(255, 217, 138, 0.3);
    padding: 3px 9px;
    border-radius: 10px;
}

.menu-tag.veg {
    color: var(--mint);
    background: rgba(168, 208, 124, 0.1);
    border-color: rgba(168, 208, 124, 0.3);
}
.menu-tag.spicy {
    color: var(--chili);
    background: var(--chili-soft);
    border-color: rgba(255, 122, 92, 0.3);
}
.menu-tag.chef {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: rgba(255, 167, 51, 0.35);
}

/* Fully plant-based dishes get a solid leafy badge */
.menu-tag.vegan {
    color: #14290b;
    background: var(--herb);
    border-color: var(--herb);
    font-weight: 800;
}

/* ---------- Item detail modal ---------- */
.item-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(16, 7, 4, 0.86);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.item-modal.open {
    display: flex;
    opacity: 1;
}

.item-modal-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: fadeUp 0.3s ease;
}

.item-modal-media {
    aspect-ratio: 16 / 10;
    background: var(--bg-3);
    overflow: hidden;
}

.item-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-modal-media .menu-item-glyph {
    aspect-ratio: 16 / 10;
}

.item-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(23, 11, 7, 0.7);
    color: var(--cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.item-modal-close:hover {
    background: var(--amber);
    color: #1a1207;
}

.item-modal-body {
    padding: 26px 28px 30px 28px;
}

.item-modal-body .modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.item-modal-body h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.item-modal-body .modal-price .now {
    color: var(--amber);
    font-size: 1.4rem;
    font-weight: 800;
    white-space: nowrap;
}

.item-modal-body .modal-price .was {
    display: block;
    text-align: right;
    color: var(--muted);
    text-decoration: line-through;
    font-size: 0.85rem;
}

.item-modal-body p.modal-desc {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

.item-modal-body .modal-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--amber-soft);
    border: 1px solid rgba(255, 167, 51, 0.3);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 0.9rem;
    color: var(--cream);
    line-height: 1.55;
}

.item-modal-body .modal-note svg {
    color: var(--amber);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---------- Reviews section ---------- */
.reviews-section {
    background: var(--bg-1);
    border-top: 1px solid var(--line);
    padding: 84px 56px;
}

.reviews-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.reviews-top {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.reviews-score {
    text-align: center;
    flex-shrink: 0;
}

.reviews-score .big {
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--amber);
}

.reviews-score .stars {
    color: var(--amber);
    letter-spacing: 2px;
    margin: 8px 0 4px 0;
}

.reviews-score .count {
    font-size: 0.85rem;
    color: var(--muted);
}

.reviews-heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 8px;
}

.reviews-heading p {
    color: var(--muted);
    line-height: 1.6;
    max-width: 520px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 44px;
}

.review-card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
}

.review-card .review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.review-card .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--amber);
    color: #1a1207;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.review-card .who strong {
    display: block;
    font-size: 0.95rem;
}

.review-card .who span {
    font-size: 0.78rem;
    color: var(--muted);
}

.review-card .review-stars {
    color: var(--amber);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.review-card blockquote {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--cream);
}

/* Mock "write a review" box */
.review-form {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
}

.review-form h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.review-form p.sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.review-form .star-pick {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 16px;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: pointer;
}

.review-form .star-pick span {
    transition: color 0.15s ease, transform 0.15s ease;
}

.review-form .star-pick span:hover {
    transform: scale(1.15);
}

.review-form .star-pick span.lit {
    color: var(--amber);
}

.review-form textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    background: var(--bg-0);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
    margin-bottom: 14px;
}

.review-form textarea:focus {
    border-color: var(--amber);
}

.review-form .form-success {
    display: none;
    margin-top: 14px;
    color: var(--mint);
    font-weight: 600;
    font-size: 0.9rem;
}

.review-form .form-success.show {
    display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .restaurant-about {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .restaurant-hero,
    .restaurant-about,
    .menu-wrap,
    .reviews-section {
        padding-left: 22px;
        padding-right: 22px;
    }
}

@media (max-width: 576px) {
    .restaurant-hero { min-height: 320px; padding: 24px 20px; }
    .restaurant-hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); margin-bottom: 12px; }
    .hero-facts { font-size: 0.86rem; gap: 8px 14px; }
    .hero-cuisine { margin-bottom: 8px; }

    .restaurant-about { padding: 32px 20px; }
    .restaurant-about .about-text { font-size: 0.96rem; line-height: 1.65; }
    .about-details { padding: 18px 20px; }

    .reviews-section { padding: 56px 20px; }
    .reviews-top { gap: 20px; margin-bottom: 30px; }
    .reviews-score .big { font-size: 2.7rem; }
    .review-card { padding: 18px 20px; }
    .review-card .avatar { width: 36px; height: 36px; font-size: 0.8rem; }
    .review-form { padding: 22px 22px; }
}

/* ---------- Save button + your-review tag + mobile polish ---------- */
.hero-save.saved {
    border-color: var(--amber);
    color: var(--amber);
}

.review-you {
    display: inline-block;
    margin-left: 7px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a1207;
    background: var(--amber);
    padding: 2px 7px;
    border-radius: 10px;
    vertical-align: middle;
}

/* Comfortable tap targets + tighter spacing on phones */
@media (max-width: 576px) {
    .hero-actions { width: 100%; }
    .hero-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 46px; }
    .menu-grid { grid-template-columns: 1fr; gap: 16px; }
    .menu-item { flex-direction: row; }
    .menu-item .menu-item-media { width: 104px; min-width: 104px; aspect-ratio: 1 / 1; }
    .menu-item .menu-item-body { padding: 12px 14px; min-width: 0; }
    .menu-item .menu-item-head { flex-wrap: wrap; }
    .menu-item .menu-item-head h4 { font-size: 0.96rem; min-width: 0; overflow-wrap: break-word; }
    .menu-item-desc { font-size: 0.83rem; }
    .menu-section-title { font-size: 1.2rem; margin: 30px 0 16px 0; }
    .reviews-grid { grid-template-columns: 1fr; }
    .item-modal-card { max-height: 92vh; }
}
