/* ==========================================================================
   KOREAN MINIMALISM DESIGN SYSTEM (TỐI GIẢN & HIỆN ĐẠI HÀN QUỐC)
   ========================================================================== */
:root {
    --primary: #F4C145; /* Sẽ đè động bởi Google Sheet config */
    --bg-main: #FAFAFA;
    --card-white: #FFFFFF;
    --text-dark: #1C1917;
    --text-muted: #78716C;
    --border-light: #E7E5E4;
    --radius-korean: 16px; /* Bo góc mượt tinh tế đặc trưng Hàn Quốc */
}

* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-weight: 400;
}

/* APP HEADER - TINH GỌN PHẲNG */
.header {
    background: var(--card-white);
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.brand img {
    height: 40px; /* Thu nhỏ logo tinh tế */
    width: auto;
}

.search-container {
    position: relative;
    margin-top: 15px;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-korean);
    background: #F5F5F4;
    font-size: 14px;
    outline: none;
}

.trending-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.tag-hot {
    font-size: 12px;
    padding: 4px 12px;
    background: #F5F5F4;
    border-radius: 20px;
    color: var(--text-muted);
}

/* STICKY CATEGORIES */
.categories {
    display: flex;
    overflow-x: auto;
    padding: 12px 16px;
    gap: 8px;
    background: var(--bg-main);
}

.category-tab {
    padding: 8px 16px;
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.category-tab.active {
    background: var(--text-dark);
    color: var(--card-white);
    border-color: var(--text-dark);
}

/* GRID THỰC ĐƠN RESPONSIVE AUTOMATION */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile mặc định 2 cột phẳng thanh lịch */
    gap: 12px;
    padding: 16px;
}

@media (min-width: 768px) {
    .menu-grid { grid-template-columns: repeat(3, 1fr); } /* PC rộng rãi */
}
@media (min-width: 1200px) {
    .menu-grid { grid-template-columns: repeat(4, 1fr); }
}

/* PRODUCT CARD STYLING */
.product-card {
    background: var(--card-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-korean);
    overflow: hidden;
}

.card-img-box {
    position: relative;
    width: 100%; padding-top: 100%;
    background: #F5F5F4;
}

.card-img-box img {
    position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover;
}

.card-badge {
    position: absolute; top: 8px; left: 8px;
    background: rgba(28, 25, 22, 0.8); color: white;
    font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 4px;
}

.card-body {
    padding: 12px;
}

.card-body h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.card-body p { font-size: 11px; color: var(--text-muted); height: 32px; overflow: hidden; }

.card-footer {
    display: flex; justify-content: space-between; align-items: center; margin-top: 8px;
}

.card-footer .price { font-size: 14px; font-weight: 700; }
.card-footer .add-btn {
    width: 28px; height: 28px; background: var(--text-dark); color: white;
    border: none; border-radius: 50%; font-size: 16px; cursor: pointer;
}

/* POPUP MODAL PILLS - PHONG CÁCH TỐI GIẢN */
.opt-section-title {
    font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 12px 0 6px; text-transform: uppercase;
}

.opt-pills {
    display: flex; flex-wrap: wrap; gap: 6px;
}

.opt-pill {
    padding: 6px 14px; background: #F5F5F4; border: 1px solid #F5F5F4;
    border-radius: var(--radius-korean); font-size: 13px; cursor: pointer;
}

.opt-pill.selected {
    background: var(--card-white); border-color: var(--text-dark); font-weight: 600;
}

.quantity-wrapper {
    display: flex; align-items: center; justify-content: center; gap: 15px; margin: 15px 0;
}

.quantity-wrapper button {
    width: 32px; height: 32px; border: 1px solid var(--border-light); background: white; border-radius: 50%; font-size: 16px;
}

.modal-action-btn {
    width: 100%; padding: 12px; background: var(--text-dark); color: white; border: none; border-radius: var(--radius-korean); font-weight: 600; font-size: 14px; cursor: pointer;
}

/* FLOATING BOTTOM BAR */
.cart-bar {
    position: fixed; bottom: 16px; left: 16px; right: 16px;
    background: var(--text-dark); color: white; padding: 12px 20px;
    border-radius: var(--radius-korean); display: flex; justify-content: space-between; align-items: center; z-index: 100;
}

.btn-view-cart { font-size: 13px; font-weight: 600; background: var(--primary); color: var(--text-dark); padding: 6px 14px; border-radius: 20px; }

/* ẨN TOÀN BỘ TOAST & CHATBOX HOẠT HÌNH CŨ, THAY BẰNG HIỂN THỊ PHẲNG MƯỢT */
#toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(28,25,22,0.9); color: white; padding: 8px 20px; border-radius: 20px; font-size: 12px; display: none; z-index: 200;
}