/**
 * Restaurant Menu System Stylesheet
 * Flatsome Child Theme - Masonry Layout & Pixel Perfect Match
 */

/* ==========================================================================
   1. WRAPPER & MASONRY GRID (Không bị dư khoảng trống)
   ========================================================================== */
/* 
.sec-menu .col-menu {
    padding-top: 40px;
}
 */
.tc-menu-wrapper {
    width: 100%;
    margin: 0 auto 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tc-menu-grid {
    width: 100%;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.tc-menu-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tc-menu-grid--1-cols .tc-menu-col {
    flex: 0 0 100%;
    max-width: 100%;
}

.tc-menu-grid--2-cols .tc-menu-col {
    flex: 1;
    min-width: 0;
}

/* Hiệu ứng so le trên PC: Cột trái thụt xuống, giúp Box đầu bên phải cao hơn */
@media (min-width: 850px) {
    .tc-menu-grid--2-cols > .tc-menu-col--0 > .tc-menu-box:first-child {
        margin-top: 45px;
    }
}

.tc-menu-grid--3-cols .tc-menu-col {
    flex: 1;
    min-width: 0;
}

.tc-menu-grid--4-cols .tc-menu-col {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   2. MENU BOX (BOX LỚN)
   ========================================================================== */

.tc-menu-box {
    background: #ffffff;
    border: 1px solid #222222;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: visible;
    /* Masonry: Không bị ngắt đoạn giữa cột & tự động xếp sát nhau */
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 30px;
    vertical-align: top;
    box-sizing: border-box;
    transition: box-shadow 0.25s ease;
}

.tc-menu-box:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    z-index: 7;
}

/* Box chứa UX Block (ví dụ: home-discover ở trang chủ) */
.tc-menu-box--block {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.tc-menu-box--block:hover {
    box-shadow: none;
}

.tc-menu-box--block .row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.tc-menu-box--block .col {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

.tc-menu-box__inner {
    padding: 34px 28px;
}

/* Box Title - Serif với gạch đôi bên dưới chuẩn hình mẫu */
.tc-menu-box__title {
    text-align: left;
    margin: 0 0 10px 0;
    padding: 0;
    padding-left: 20px;
}

.tc-menu-box__title-text {
    display: inline-block;
    font-family: "Cinzel", "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #111111;
    padding-bottom: 4px;
    border-bottom: 1px solid #111111;
    line-height: 1.2;
}

.tc-menu-items {
    display: flex;
    flex-direction: column;
}

.tc-menu-items-empty,
.tc-menu-empty {
    font-size: 14px;
    color: #888888;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

/* ==========================================================================
   3. MENU ITEM & DOTTED LEADER
   ========================================================================== */

.tc-menu-item {
    position: relative;
    padding: 10px 20px;
    /* margin-bottom: 20px; */
}

.tc-menu-item:last-child {
    margin-bottom: 0;
}

.tc-menu-item--has-popup {
    cursor: pointer;
}

.tc-menu-item__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
}

.tc-menu-item__title {
    font-family: "Cinzel", "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: #111111;
    letter-spacing: 0.5px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.tc-menu-item--has-popup:hover .tc-menu-item__title {
    color: #cfa670;
}

/* Đường chấm Dotted Leader Line màu đen đậm */
.tc-menu-item__dots {
    flex: 1;
    border-bottom: 3px dotted #111111;
    margin: 0 8px;
    min-width: 15px;
    height: 1px;
    align-self: baseline;
}

.tc-menu-item__price {
    font-family: "Cinzel", "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    white-space: normal;
    line-height: 1.3;
}

/* Thành phần món ăn (Ingredients) */
.tc-menu-item__ingredients {
    font-family: inherit;
    font-size: 13.5px;
    color: #444444;
    margin-top: 4px;
    line-height: 1.4;
    font-style: normal;
}

/* ==========================================================================
   4. TAGGED BOX (HEADER NỀN ĐEN CHO ITEM CÓ TAG)
   ========================================================================== */

.tc-menu-group--tagged {
    margin: 10px 0 10px 0;
    border: 1px solid #1f1f1f;
    border-radius: 3px;
    background: #ffffff;
    position: relative;
    overflow: visible;
}

.tc-menu-group__tag {
    background: #1f1f1f;
    color: #ffffff;
    font-family: "Cinzel", "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 7px 20px;
    display: block;
    line-height: 1.3;
}

.tc-menu-group__tag span {
    color: #ffffff;
}

.tc-menu-group__content {
    /* padding: 16px 16px; */
    background: #ffffff;
}

.tc-menu-group__content .tc-menu-item {
    margin-bottom: 0;
}

.tc-menu-group__content .tc-menu-item + .tc-menu-item {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e4e4e4;
}

/* ==========================================================================
   5. HOVER POPUP (CHI TIẾT & ẢNH MÓN ĂN)
   ========================================================================== */

.tc-menu-popup {
    position: absolute;
    top: 50%;
    left: calc(100% + 1px);
    transform: translateY(-50%) translateX(10px);
    width: 280px;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14);
    padding: 18px 20px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
    text-align: left;
    cursor: default;
}

/* Khi hover vào item thì hiện popup */
.tc-menu-item:hover .tc-menu-popup,
.tc-menu-item:focus .tc-menu-popup,
.tc-menu-item:focus-within .tc-menu-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

/* Mũi tên trỏ sang trái (Mặc định khi mở sang phải) */
.tc-menu-popup::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #ffffff;
    z-index: 9;
}

.tc-menu-popup::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -9px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 9px solid #e2e2e2;
    z-index: 9;
}

/* Khi popup lật sang trái (không tràn mép phải màn hình) */
.tc-menu-popup.tc-popup--left {
    left: auto;
    right: calc(100% + 1px);
    transform: translateY(-50%) translateX(-10px);
}

.tc-menu-item:hover .tc-menu-popup.tc-popup--left {
    transform: translateY(-50%) translateX(0);
}

.tc-menu-popup.tc-popup--left::before {
    left: auto;
    right: -8px;
    border-right: none;
    border-left: 8px solid #ffffff;
}

.tc-menu-popup.tc-popup--left::after {
    left: auto;
    right: -9px;
    border-right: none;
    border-left: 9px solid #e2e2e2;
}

/* Ảnh trong Popup */
.tc-menu-popup__image {
    margin-bottom: 12px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.tc-menu-popup__image img {
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: cover;
    display: block;
}

/* Nội dung text trong Popup */
.tc-menu-popup__description {
    font-size: 13px;
    color: #333333;
    line-height: 1.6;
    word-break: break-word;
}

.tc-menu-popup__description strong,
.tc-menu-popup__description b {
    font-weight: 700;
    color: #111111;
}

.tc-menu-popup__description em,
.tc-menu-popup__description i {
    font-style: italic;
    color: #444444;
}

.tc-menu-popup__description u {
    text-decoration: underline;
}

.tc-menu-popup__description ul,
.tc-menu-popup__description ol {
    margin: 6px 0 6px 16px;
    padding: 0;
}

.tc-menu-popup__description li {
    margin-bottom: 3px;
}

.tc-menu-popup__description p {
    margin: 0 0 6px 0;
}

.tc-menu-popup__description p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   6. RESPONSIVE (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 849px) {
    .tc-menu-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .tc-menu-col {
        display: contents;
    }

    .tc-menu-grid > .tc-menu-col--0 > .tc-menu-box:first-child {
        margin-top: 0;
    }

    .tc-menu-box {
        margin-bottom: 24px;
    }

    .tc-menu-box__inner {
        padding: 26px 20px;
    }

    .tc-menu-box__title-text {
        font-size: 22px;
    }

    /* Trên Mobile/Tablet: Popup hiển thị ngay bên dưới item để tránh tràn màn hình */
    .tc-menu-popup,
    .tc-menu-popup.tc-popup--left {
        position: static;
        width: 100%;
        margin-top: 10px;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        padding: 14px;
        display: none;
    }

    .tc-menu-item:hover .tc-menu-popup,
    .tc-menu-item:focus .tc-menu-popup,
    .tc-menu-item.is-active .tc-menu-popup {
        display: block;
    }

    .tc-menu-popup::before,
    .tc-menu-popup::after {
        display: none;
    }
}

@media (max-width: 549px) {
    .tc-menu-box__inner {
        padding: 20px 14px;
    }

    .tc-menu-box__title-text {
        font-size: 19px;
    }

    .tc-menu-item__title,
    .tc-menu-item__price {
        font-size: 14px;
    }

    .tc-menu-item__dots {
        margin: 0 6px;
        min-width: 10px;
    }

    .tc-menu-group__tag {
        font-size: 12px;
        padding: 6px 10px;
    }

    .tc-menu-group__content {
        padding: 12px 10px;
    }
}




/* =========================================================
   MENU CATEGORY TABS
   ========================================================= */
.tc-menu-tabs {
    width: 100%;
}

.tc-menu-tabs__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.tc-menu-tabs__button {
    appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: #000;
    min-width: 178px;
    height: 46px;
    padding: 0 28px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: .25s ease;
    border: 1px solid #000000af;
}

.tc-menu-tabs__button:hover {
    background: var(--primary-color);
    color: #fff;
}

.tc-menu-tabs__button.is-active {
    background: var(--primary-color);
    color: #fff;
}

/* Tab content */
.tc-menu-tabs__panel {
    display: none;
}

.tc-menu-tabs__panel.is-active {
    display: block;
}

/* Không để hidden ảnh hưởng layout khi JS chưa chạy */
.tc-menu-tabs__panel[hidden] {
    display: none;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 767px) {
    .tc-menu-tabs__nav {
        justify-content: flex-start;
        gap: 10px;
        margin-bottom: 30px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
        scrollbar-width: none;
    }

    .tc-menu-tabs__nav::-webkit-scrollbar {
        display: none;
    }

    .tc-menu-tabs__button {
        flex: 0 0 auto;
        min-width: auto;
        height: 42px;
        padding: 0 20px;
        font-size: 15px;
        white-space: nowrap;
    }

}