/* ================= RESET ================= */
* {
    box-sizing: border-box;
    margin: 0;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../img/logoTrans.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 550px;
    opacity: 0.20;
    z-index: -1;
}


/* ================= MAIN CONTAINER ================= */
.container {
    max-width: 420px;
    margin: auto;
    padding: 15px;
}

/* ================= LOGO ================= */
.logo img {
    width: 120px;
    display: block;
    margin: 10px auto 20px;
}

/* ================= CATEGORY TITLE ================= */
.category {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
    position: sticky;
    top: 0;
    background: rgba(244,244,244,0.95);
    padding: 8px 6px;
    z-index: 5;
    border-bottom: 1px solid #e9e9e9;
}
/* Make category able to hold a small inline logo / layout */
.category {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================= MENU CARD ================= */
.card {
    background: rgba(255,255,255,0.85);
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}

.card { position: relative; }

/* Categories grid (home screen) */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 6px 0 20px;
}

.category-tile {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    border: none;
}

.category-tile:active { transform: scale(0.98); }

.category-tile .tile-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 14px;
}

.category-tile .tile-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Panel that opens for a category */
.category-panel {
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
}

.panel-header h2 { font-size: 18px; margin: 0; }

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}

.panel-inner {
    padding: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0; /* allow flex child to shrink and enable scrolling */
}

/* Category item list inside panel */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.list-item {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.list-item .title { font-weight: 600; color: #222; }
.list-item .chev { font-size: 18px; color: #888; }
.list-item:active { transform: scale(0.997); }

.category-list .card {
    margin: 8px 0 12px;
}

/* Cards inside panel start slightly down & faded, then slide up on open */
.panel-inner .card {
    opacity: 0;
    transform: translateY(12px);
    transition: transform 320ms cubic-bezier(.2,.8,.2,1), opacity 320ms ease;
}
.category-panel.open .panel-inner .card {
    opacity: 1;
    transform: translateY(0);
}

/* Backdrop to dim page when panel is open */
.panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 320ms ease;
    z-index: 2400;
}
.panel-backdrop.visible { opacity: 1; }

@media (min-width: 480px) {
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ================= ITEM IMAGE ================= */
.card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

/* ================= CONTENT ================= */
.content {
    padding: 12px;
}

/* ================= TAP HINT ================= */
.tap {
    font-size: 13px;
    color: #777;
    margin-bottom: 6px;
}

/* ================= DETAILS (EXPANDABLE) ================= */
.details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

/* Expanded state */
.card.active .details {
    max-height: 300px;
}

/* ================= PRICE ROWS ================= */
.row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.row:last-child {
    border-bottom: none;
}

/* Each column */
.row span {
    flex: 1;
}

/* Size */
.row span:nth-child(1) {
    text-align: left;
}

/* Price (CENTERED) */
.row span:nth-child(2) {
    text-align: center;
    font-weight: bold;
    color: #c98b2b;
}

/* Persons */
.row span:nth-child(3) {
    text-align: right;
    color: #555;
}

/* Branch picker and header */
.hidden {
    display: none !important;
}

.branch-picker {
    background: rgba(255,255,255,0.92);
    border-radius: 20px;
    padding: 24px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

.branch-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.branch-header p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

.branch-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.branch-buttons button,
.change-branch-btn {
    background: linear-gradient(135deg, #c98b2b, #f2c94c);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.branch-buttons button:active,
.change-branch-btn:active {
    transform: scale(0.98);
}

.selected-branch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 0;
}

.selected-branch {
    font-size: 17px;
    font-weight: 700;
    color: #333;
}
