﻿@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-body: #f5f5f5;
    --primary: #f89641;
    --text-main: #222;
    --radius: 20px;
}

* {
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif !important;
}

body {
    font-family: 'Rubik', sans-serif !important;
    background-color: #000;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

.app-container {
    width: 100%;
    max-width: 480px;
    background-color: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* --- HEADER --- */
.header {
    height: 175px;
    position: relative;
    background-color: #000;
    overflow: hidden;
    display: block;
    z-index: 5;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.header-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.header-logo-center {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85px;
    height: 85px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 10;
    background: #fff;
}

.header-logo-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header.hidden {
    height: 0;
}

.header.hidden .header-banner-img,
.header.hidden .header-logo-center {
    display: none;
}

/* --- CONTENT SHEET --- */
.sheet {
    position: relative;
    z-index: 10;
    background-color: #fff;
    border-radius: 30px 30px 0 0;
    margin-top: -40px;
    padding: 0 20px 80px 20px;
    min-height: calc(100vh - 210px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.sheet.full-height {
    margin-top: 0;
    border-radius: 0;
    min-height: 100vh;
}

.home-view.compact + #dishes-view .back-row {
    margin-left: 20px;
    margin-right: 20px;
}

.home-view.compact + #dishes-view .back-circle {
    margin-left: 8px;
}

.brand-header-row {
    margin-bottom: 15px;
}

.brand-title-text {
    font-family: inherit;
    font-size: 30px;
    font-weight: 400;
    color: #000;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #757575;
    font-size: 14px;
    font-weight: 500;
}

.info-row svg {
    width: 16px;
    height: 16px;
    color: #999;
    flex-shrink: 0;
}

/* TABS */
.tabs-wrapper {
    background: transparent;
    border-radius: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.tab-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: none;
    border: 3px solid var(--primary);
    color: var(--primary);
    background: #fff;
}

.tab-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* SEARCH BAR */
.search-container {
    position: relative;
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    background: #f5f5f5;
    border: none;
    padding: 12px 45px 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    color: #333;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* CATEGORIES */
.cat-card {
    height: 117px;
    border-radius: 20px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cat-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

.cat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.108);
}

.cat-title {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    margin: 0 -20px;
    padding: 10px 20px 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    overflow: hidden;
}

.home-view.compact #list-food,
.home-view.compact #list-bar {
    display: none !important;
}

.home-view.compact .sticky-header {
    display: none;
}

.home-view.compact ~ #dishes-view {
    margin-top: 6px;
}

/* --- DISHES VIEW --- */
#dishes-view {
    display: none;
}

.back-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 5px;
}

.back-circle {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.chips-container {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.chips-container::-webkit-scrollbar {
    display: none;
}

.chip {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #eee;
    cursor: pointer;
    transition: 0.2s;
}

.chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(186, 155, 115, 0.3);
}

.section-header {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 25px 0 15px 0;
    font-size: 14px;
    font-weight: 900;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-header::after {
    content: '';
    width: 90%;
    height: 4px;
    background-color: var(--primary);
    margin-top: 8px;
    opacity: 1;
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(213, 190, 13, 0.4);
}

.dishes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dish-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
}

.dish-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: #eee;
}

.dish-info {
    padding: 8px 10px 0 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dish-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #222;
}

.dish-desc {
    font-size: 11px;
    color: #999;
    line-height: 1.2;
    margin-bottom: 8px;
    flex-grow: 1;
}

.dish-variants {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.dish-variant {
    border: 1px solid #e2e2e2;
    background: #f3f3f3;
    color: #666;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.dish-variant.active {
    color: var(--primary);
    border-color: #ddd;
    background: #fff;
}

.dish-variant.unavailable {
    opacity: 0.5;
    text-decoration: line-through;
}

.dish-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.dish-out {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: #999;
    border-radius: 10px;
    padding: 4px 8px;
}

.dish-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dish-price-old {
    font-size: 11px;
    color: #999;
    text-decoration: line-through;
    display: none;
}

.dish-price {
    font-size: 15px;
    font-weight: 900;
    color: var(--primary);
}

.dish-discount {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    border-radius: 10px;
    padding: 3px 6px;
}

.add-btn {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

.add-btn:active {
    transform: scale(0.9);
}

.add-btn.disabled,
.add-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- CART BAR --- */
.float-cart-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: 90%;
    max-width: 440px;
    background-color: var(--primary);
    border-radius: 16px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 10px 30px rgba(191, 161, 15, 0.4);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    gap: 12px;
}

.float-cart-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.cart-info-text {
    font-weight: 700;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.cart-cancel-btn {
    background: #d63c3c;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.cart-count-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 2px;
    width: fit-content;
}

.cart-action-text {
    font-weight: 900;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.cart-action-text::after {
    content: '→';
    margin-left: 8px;
    font-size: 20px;
}

/* --- CART MODAL --- */
.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.dish-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    padding: 20px;
}

.dish-modal.show {
    display: flex;
}

.dish-modal__card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.dish-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.dish-modal__img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #eee;
}

.dish-modal__body {
    padding: 14px 16px 18px;
}

.dish-modal__title {
    font-weight: 800;
    font-size: 18px;
    color: #222;
    margin-bottom: 4px;
}

.dish-modal__comment {
    color: #777;
    font-size: 13px;
    margin-bottom: 8px;
}

.dish-modal__price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--primary);
    font-size: 16px;
}

.dish-modal__old {
    color: #999;
    text-decoration: line-through;
    font-weight: 600;
    font-size: 13px;
}

.dish-modal__badge {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    display: none;
}

.cart-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 26px 26px 0 0;
    padding: 20px 20px 40px 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-weight: 800;
    font-size: 15px;
    gap: 10px;
}

.cart-footer .cart-total-row:first-child {
    border-top: 1px dashed #e6e6e6;
    padding-top: 10px;
}

.cart-total-value {
    color: var(--primary);
}

.cart-total-value.free {
    color: #22c55e;
}

.cart-total-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-total-note {
    font-size: 12px;
    font-weight: 600;
    color: #9a9a9a;
}

.cart-modal-overlay.active .cart-modal {
    transform: translateY(0);
}

.cart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-title {
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.cart-close {
    font-size: 24px;
    color: #888;
    cursor: pointer;
    padding: 5px;
}

.cart-items-container {
    overflow-y: auto;
    margin-bottom: 20px;
    flex: 1;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eaeaea;
}

.cart-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cart-item-details {
    flex: 1;
    padding-right: 10px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cart-item-size {
    font-size: 12px;
    color: #888;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 2px;
}

.cart-counter {
    display: flex;
    align-items: center;
    background: #f3f3f3;
    border-radius: 14px;
    padding: 4px;
}

.counter-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    color: #555;
    transition: background 0.1s;
    border-radius: 6px;
}

.counter-btn:active {
    background-color: #d0d0d0;
    color: #000;
}

.counter-val {
    width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.cart-footer {
    margin-top: auto;
}

.address-input {
    width: 100%;
    padding: 14px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 15px;
    outline: none;
    transition: all 0.3s;
}

.address-input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(251, 251, 251, 0.1);
}

.cart-checkout-btn {
    width: 100%;
    background: #25D366;
    color: white;
    padding: 15px;
    border-radius: 18px;
    text-align: center;
    font-weight: 900;
    font-size: 16px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* DELIVERY SWITCH */
.delivery-switch {
    display: flex;
    background: #f2f2f2;
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 15px;
    border: 1px solid #e9e9e9;
}

.ds-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #777;
}

.ds-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 800;
}

.cart-total-row {
    padding-top: 6px;
    padding-bottom: 6px;
}

.address-input.hidden {
    display: none;
}

.empty {
    padding: 18px;
    border-radius: 14px;
    background: #fafafa;
    color: #888;
    text-align: center;
    border: 1px dashed #eee;
    grid-column: 1 / -1;
}

@media (max-width: 520px) {
    .app-container { max-width: 100%; }
}
