/* ==========================================================================
   ROOTS BAR & TASTE BUILDER — STYLESHEET
   Mobile-First, Clean & Minimal, Organic Aesthetic
   ========================================================================== */

:root {
    --bar-primary: #4d835f;
    --bar-primary-dark: #3b654a;
    --bar-primary-light: #f0f6f2;
    --bar-primary-border: #cce2d4;
    --bar-accent: #f59e0b;
    --bar-accent-light: #fffbeb;
    --bar-danger: #B24A3E;
    --bar-danger-light: #fef2f2;
    --bar-dark: #0f172a;
    --bar-text-main: #1e293b;
    --bar-text-sub: #64748b;
    --bar-bg: #f8fafc;
    --bar-card-bg: #ffffff;
    --bar-radius-xl: 20px;
    --bar-radius-lg: 16px;
    --bar-radius-md: 12px;
    --bar-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --bar-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
    --bar-shadow-lg: 0 16px 36px rgba(77, 131, 95, 0.16);
}

/* Chuẩn Typography theo font Siêu thị ROOTS (Inter) */
body,
.bar-page-wrapper,
.taste-modal-fullscreen,
.bar-modal-sheet,
.bar-hero-modern,
button,
input,
select,
textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Container Boxed Layout for PC */
.bar-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 100px;
}

@media (min-width: 768px) {
    .bar-page-wrapper {
        padding: 24px 24px 100px;
    }
}

/* ─────────────────────────────────────────────────────────────
   HERO BANNER HIỆN ĐẠI (BEING JUICE STYLE x ROOTS PALETTE)
   ───────────────────────────────────────────────────────────── */
.bar-hero-modern {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 40%, #fdf2f8 75%, #fef2f2 100%);
    border: 1px solid rgba(77, 131, 95, 0.16);
    border-radius: 28px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
    padding: 0 !important; /* Ghi đè triệt để padding mặc định của thẻ section để marquee áp sát tuyệt đối đáy thẻ */
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Fix bo góc Safari / WebKit */
    isolation: isolate;
}

/* ─────────────────────────────────────────────────────────────
   HÌNH TRÒN LỚN CSS CHUYỂN ĐỘNG CHẬM SINH ĐỘNG (ANIMATED BLOBS)
   ───────────────────────────────────────────────────────────── */
.bar-hero-circles-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-circle-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    filter: blur(2px);
}

/* Hình tròn 1: Xanh ROOTS thương hiệu (#4d835f) ở góc trái sau tiêu đề */
.hero-circle-1 {
    width: 440px;
    height: 440px;
    left: -80px;
    top: -60px;
    background: radial-gradient(circle, rgba(77, 131, 95, 0.42) 0%, rgba(110, 231, 183, 0.28) 55%, transparent 85%);
    animation: moveCircle1 22s ease-in-out infinite alternate;
}

/* Hình tròn 2: Xanh bạc hà dịu mát (Mint/Sage ROOTS) ở góc phải sau ly nước */
.hero-circle-2 {
    width: 480px;
    height: 480px;
    right: -100px;
    top: -80px;
    background: radial-gradient(circle, rgba(134, 214, 163, 0.5) 0%, rgba(77, 131, 95, 0.25) 60%, transparent 85%);
    animation: moveCircle2 26s ease-in-out infinite alternate;
}

/* Hình tròn 3: Xanh lá non hữu cơ tươi mới ở trung tâm dưới */
.hero-circle-3 {
    width: 380px;
    height: 380px;
    left: 28%;
    bottom: -80px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.45) 0%, rgba(77, 131, 95, 0.22) 55%, transparent 85%);
    animation: moveCircle3 20s ease-in-out infinite alternate;
}

/* Hình tròn 4: Xanh táo / chanh mạ hữu cơ tươi mát ở góc dưới phải */
.hero-circle-4 {
    width: 320px;
    height: 320px;
    right: 18%;
    bottom: -40px;
    background: radial-gradient(circle, rgba(163, 230, 53, 0.4) 0%, rgba(134, 214, 163, 0.25) 55%, transparent 85%);
    animation: moveCircle4 24s ease-in-out infinite alternate;
}

/* Hình tròn 5: Xanh ngọc ROOTS sâu lắng tạo chiều sâu không gian */
.hero-circle-5 {
    width: 280px;
    height: 280px;
    left: 10%;
    bottom: 30px;
    background: radial-gradient(circle, rgba(77, 131, 95, 0.35) 0%, rgba(167, 243, 208, 0.3) 60%, transparent 85%);
    animation: moveCircle5 28s ease-in-out infinite alternate;
}

@keyframes moveCircle1 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(45px, 35px) scale(1.08); }
    66% { transform: translate(-25px, 55px) scale(0.94); }
    100% { transform: translate(35px, -20px) scale(1.05); }
}

@keyframes moveCircle2 {
    0% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(-55px, 45px) scale(1.1); }
    75% { transform: translate(-25px, -35px) scale(0.92); }
    100% { transform: translate(40px, 25px) scale(1.06); }
}

@keyframes moveCircle3 {
    0% { transform: translate(0, 0) scale(1); }
    35% { transform: translate(-40px, -45px) scale(1.06); }
    70% { transform: translate(45px, -25px) scale(0.95); }
    100% { transform: translate(20px, 30px) scale(1.03); }
}

@keyframes moveCircle4 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(35px, -50px) scale(1.12); }
    100% { transform: translate(-40px, 25px) scale(0.9); }
}

@keyframes moveCircle5 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-35px, -35px) scale(0.92); }
    100% { transform: translate(45px, 40px) scale(1.08); }
}

.bar-hero-container {
    display: flex;
    flex-direction: column-reverse;
    padding: 28px 20px 20px;
    position: relative;
    z-index: 2;
    flex: 1;
}

@media (min-width: 860px) {
    .bar-hero-container {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        align-items: center;
        padding: 44px 44px 28px;
        gap: 32px;
    }
}

.bar-hero-left {
    max-width: 580px;
    text-align: center;
    position: relative;
    z-index: 2;
}

@media (min-width: 860px) {
    .bar-hero-left {
        text-align: left;
    }
}

.bar-hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(178, 74, 62, 0.25);
    color: #B24A3E;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(178, 74, 62, 0.08);
}

.bar-hero-badge-pill i {
    font-size: 12px;
    color: #4d835f;
}

.bar-hero-headline {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.22;
    color: #1e293b;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

@media (min-width: 640px) {
    .bar-hero-headline {
        font-size: 34px;
    }
}

@media (min-width: 1024px) {
    .bar-hero-headline {
        font-size: 42px;
    }
}

.hero-title-highlight {
    color: #B24A3E;
    position: relative;
    display: inline;
}

.bar-hero-description {
    font-size: 14px;
    line-height: 1.65;
    color: #475569;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .bar-hero-description {
        font-size: 15px;
    }
}

/* CTA Buttons */
.bar-hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

@media (min-width: 860px) {
    .bar-hero-cta-group {
        justify-content: flex-start;
        gap: 14px;
        margin-bottom: 0;
    }
}

.bar-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    user-select: none;
}

.bar-cta-primary {
    background: #4d835f;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(77, 131, 95, 0.32);
}

.bar-cta-primary:hover {
    background: #3b654a;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(77, 131, 95, 0.42);
}

.bar-cta-secondary {
    background: #B24A3E;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(178, 74, 62, 0.28);
}

.bar-cta-secondary:hover {
    background: #99372c;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(178, 74, 62, 0.38);
}

.bar-cta-btn:active {
    transform: scale(0.97);
}

/* Mockup Ly Nước Bo 4 Góc Đẹp */
.bar-hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

@media (min-width: 860px) {
    .bar-hero-right {
        margin-bottom: 0;
    }
}

.bar-cup-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 340px;
    border-radius: 28px;
}

.bar-cup-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.25) 0%, rgba(254, 215, 170, 0.2) 50%, transparent 70%);
    filter: blur(24px);
    z-index: 1;
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(0.85); opacity: 0.7; }
    100% { transform: scale(1.15); opacity: 1; }
}

.bar-cup-mockup {
    position: relative;
    z-index: 2;
    max-height: 270px;
    width: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 28px;
    border: 4px solid #ffffff;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(178, 74, 62, 0.08);
    animation: cupFloat 4.8s ease-in-out infinite;
    user-select: none;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (min-width: 860px) {
    .bar-cup-mockup {
        max-height: 340px;
    }
}

.bar-cup-card:hover .bar-cup-mockup {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.16), 0 6px 18px rgba(178, 74, 62, 0.12);
}

@keyframes cupFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1.2deg);
    }
}

/* ─────────────────────────────────────────────────────────────
   RUNNING MARQUEE BAR (MÉP DƯỚI BANNER)
   ───────────────────────────────────────────────────────────── */
.bar-marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(90deg, #B24A3E 0%, #c45447 50%, #B24A3E 100%);
    color: #ffffff;
    padding: 12px 0;
    position: relative;
    z-index: 3;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: none !important;
    user-select: none;
    margin-top: auto;
    margin-bottom: 0 !important;
    border-bottom-left-radius: 27px;
    border-bottom-right-radius: 27px;
}

.bar-marquee-track {
    display: inline-flex;
    width: max-content;
    will-change: transform;
    animation: marqueeScroll 26s linear infinite;
}

.bar-marquee-track:hover {
    animation-play-state: paused;
}

.bar-marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding-right: 16px;
    flex-shrink: 0;
}

.bar-marquee-item {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: none;
    color: #ffffff;
}

.bar-marquee-dot {
    color: #fde047;
    font-size: 16px;
    line-height: 1;
    display: inline-block;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ─────────────────────────────────────────────────────────────
   FULLSCREEN TASTE BUILDER MODAL
   ───────────────────────────────────────────────────────────── */
body.taste-modal-open {
    overflow: hidden !important;
}

.taste-modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.taste-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Sticky Header */
.taste-modal-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px 8px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .taste-modal-header {
        padding: 12px 24px 10px;
    }
}

.taste-modal-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.taste-modal-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.taste-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4d835f;
    background: #f0f6f2;
    padding: 3px 10px;
    border-radius: 999px;
    width: fit-content;
}

.taste-modal-main-title {
    font-size: 17.5px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.35;
}

@media (min-width: 768px) {
    .taste-modal-main-title {
        font-size: 21px;
    }
}

.taste-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #475569;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.taste-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Stepper Switcher: Luôn luôn ngang, không được xuống hàng */
.taste-stepper-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

.taste-stepper-nav::-webkit-scrollbar {
    display: none;
}

.taste-step-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
}

.taste-step-tab .step-num {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
    aspect-ratio: 1;
    box-sizing: border-box;
    line-height: 1;
}

.taste-step-tab.active {
    background: #f0f6f2;
    border-color: #4d835f;
    color: #4d835f;
}

.taste-step-tab.active .step-num {
    background: #4d835f;
    color: #ffffff;
}

#tab-taste-step-2.active {
    background: #fef2f2;
    border-color: #B24A3E;
    color: #B24A3E;
}

#tab-taste-step-2.active .step-num {
    background: #B24A3E;
    color: #ffffff;
}

.taste-step-divider {
    color: #94a3b8;
    font-size: 11px;
    flex-shrink: 0;
}

.taste-modal-subtitle {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.45;
    margin: 0 0 10px 0;
}

/* Quick Search Input */
.builder-search-wrapper {
    position: relative;
    width: 100%;
}

.builder-search-input {
    width: 100%;
    padding: 7px 34px 7px 32px;
    border: 1.5px solid #cbd5e1;
    border-radius: 999px;
    font-size: 12px;
    background: #f8fafc;
    color: #1e293b;
    outline: none;
    transition: all 0.22s;
    font-family: inherit;
    box-sizing: border-box;
}

.builder-search-input:focus {
    border-color: #4d835f;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(77, 131, 95, 0.12);
}

.builder-search-wrapper .search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
}

.builder-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.builder-search-clear:hover {
    color: #475569;
}

/* Scrollable Modal Body */
.taste-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 20px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .taste-modal-body {
        padding: 14px 24px 28px;
    }
}

.taste-step-panel {
    animation: fadeInStep 0.25s ease;
}

@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty Search Notice */
.empty-search-notice {
    grid-column: 1 / -1;
    text-align: center;
    padding: 36px 16px;
    color: #64748b;
    font-size: 13px;
}

.empty-search-notice i {
    font-size: 28px;
    color: #cbd5e1;
    margin-bottom: 10px;
    display: block;
}

/* Sticky Bottom Actions Bar */
.builder-sticky-actions {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e2e8f0;
    padding: 12px 18px;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .builder-sticky-actions {
        padding: 14px 28px;
    }
}

.builder-actions-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.builder-actions-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.builder-btn-primary.btn-finish {
    background: linear-gradient(135deg, #4d835f 0%, #3b654a 100%);
    box-shadow: 0 4px 14px rgba(77, 131, 95, 0.35);
}

/* Ingredient Chips Grid (Ưu tiên hiển thị đủ tên nguyên liệu, 2 cột trên mobile) */
.ingredients-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

@media (min-width: 600px) {
    .ingredients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (min-width: 860px) {
    .ingredients-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

.ingredient-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    min-height: 44px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--bar-radius-md);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
    box-sizing: border-box;
}

.ingredient-chip:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1.5px);
}

.ingredient-chip:active {
    transform: scale(0.98);
}

.ingredient-emoji {
    font-size: 19px;
    line-height: 1;
    flex-shrink: 0;
}

.ingredient-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--bar-text-main);
    flex: 1;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.35;
}

.ingredient-check-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
    aspect-ratio: 1;
    box-sizing: border-box;
}

/* Selected Favorite State (Roots Brand Green) */
.ingredient-chip.selected-favorite {
    background: #f0f6f2;
    border-color: #4d835f;
    box-shadow: 0 3px 10px rgba(77, 131, 95, 0.18);
}

.ingredient-chip.selected-favorite .ingredient-name {
    color: #3b654a;
    font-weight: 700;
}

.ingredient-chip.selected-favorite .ingredient-check-icon {
    background: #4d835f;
    border-color: #4d835f;
    color: #ffffff;
}

/* Selected Dislike State (Rose / Warning) */
.ingredient-chip.selected-dislike {
    background: #fff1f2;
    border-color: #f43f5e;
    box-shadow: 0 3px 10px rgba(244, 63, 94, 0.12);
}

.ingredient-chip.selected-dislike .ingredient-name {
    color: #9f1239;
    font-weight: 700;
}

.ingredient-chip.selected-dislike .ingredient-check-icon {
    background: #f43f5e;
    border-color: #f43f5e;
    color: #ffffff;
}

/* Stepper Actions */
.builder-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.builder-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bar-primary) 0%, var(--bar-primary-dark) 100%);
    color: #ffffff;
    border: none;
    padding: 11px 20px;
    border-radius: var(--bar-radius-md);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(77, 131, 95, 0.28);
    transition: all 0.25s ease;
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    white-space: nowrap;
    box-sizing: border-box;
}

.builder-btn-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 5px 16px rgba(77, 131, 95, 0.38);
}

.builder-btn-primary:active {
    transform: scale(0.98);
}

.builder-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #f8fafc;
    color: var(--bar-text-sub);
    border: 1px solid #cbd5e1;
    padding: 11px 18px;
    border-radius: var(--bar-radius-md);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    box-sizing: border-box;
}

.builder-btn-secondary:hover {
    background: #f1f5f9;
    color: var(--bar-text-main);
}

.builder-btn-skip {
    background: transparent;
    border: none;
    color: var(--bar-text-sub);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    text-decoration: underline;
    transition: color 0.2s;
}

.builder-btn-skip:hover {
    color: var(--bar-primary);
}

/* ─────────────────────────────────────────────────────────────
   ACTIVE PREFERENCES NOTIFICATION BAR (Top of Menu)
   Thiết kế mới: Siêu gọn gàng trên mobile, chỉ dùng icon emoji + tim/ban, không chữ rườm rà
   ───────────────────────────────────────────────────────────── */
.taste-summary-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f0f6f2;
    border: 1px solid rgba(77, 131, 95, 0.25);
    border-radius: 999px;
    padding: 6px 8px 6px 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(77, 131, 95, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    max-width: 100%;
    box-sizing: border-box;
}

.taste-summary-banner:hover {
    background: #eaf4ed;
    border-color: rgba(77, 131, 95, 0.4);
    box-shadow: 0 4px 14px rgba(77, 131, 95, 0.12);
}

.taste-summary-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.taste-summary-content::-webkit-scrollbar {
    display: none;
}

.taste-summary-chips-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.taste-chips-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Avatar Pill cho từng nguyên liệu có mini badge tim / ban ở góc */
.taste-avatar-pill {
    position: relative;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #d1fae5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease;
    box-sizing: border-box;
}

.taste-avatar-pill:hover {
    transform: scale(1.15);
    z-index: 2;
}

.taste-avatar-pill.dislike {
    border-color: #fecdd3;
    background: #fff5f5;
}

.taste-avatar-emoji {
    font-size: 16.5px;
    line-height: 1;
}

.taste-avatar-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 13.5px;
    height: 13.5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7.5px;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    line-height: 1;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.taste-avatar-badge.fav {
    background: #ef4444;
}

.taste-avatar-badge.fav i {
    font-size: 7.5px;
    color: #ffffff;
}

.taste-avatar-badge.dislike {
    background: #B24A3E;
}

.taste-avatar-badge.dislike i {
    font-size: 7.5px;
    color: #ffffff;
}

.taste-avatar-more {
    font-size: 11px;
    font-weight: 800;
    color: #4d835f;
    background: #ffffff;
    border: 1px solid rgba(77, 131, 95, 0.3);
    padding: 2px 6px;
    border-radius: 999px;
    flex-shrink: 0;
    line-height: 1.2;
}

.taste-avatar-more.dislike {
    color: #B24A3E;
    border-color: rgba(178, 74, 62, 0.3);
}

.taste-summary-sep {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 4px;
    flex-shrink: 0;
}

/* Nút đổi khẩu vị gọn gàng */
.taste-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #4d835f;
    color: #4d835f;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.taste-btn-edit:hover {
    background: #4d835f;
    color: #ffffff;
}

.taste-btn-edit-text {
    font-size: 11.5px;
}

/* ─────────────────────────────────────────────────────────────
   HEADER NAV BAR (ẨN TỰ NHIÊN THEO CUỘN TRANG)
   ───────────────────────────────────────────────────────────── */
header {
    background: rgba(255, 255, 255, 0.96) !important;
}

.bar-header-nav-wrapper {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 90;
}

.bar-header-nav-wrapper .header-nav {
    margin-top: 0;
    border-top: none;
    padding-top: 6px;
    padding-bottom: 8px;
}

@media (min-width: 769px) {
    .bar-header-nav-wrapper .header-nav {
        margin-top: 0;
        padding-top: 8px;
        padding-bottom: 10px;
    }
}

/* ─────────────────────────────────────────────────────────────
   CATEGORY TABS (BỐ CỤC & MÀU SẮC CHUẨN SUB-CATEGORIES-TABS)
   ───────────────────────────────────────────────────────────── */
.bar-categories-nav {
    position: -webkit-sticky;
    position: sticky;
    top: var(--site-header-height, 52px);
    z-index: 95;
    min-height: 56px;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 9px 10px;
    scroll-behavior: smooth;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    transition: box-shadow 0.25s ease;
}

@media (max-width: 768px) {
    .bar-categories-nav {
        border-radius: 0px;
        margin-left: -16px;
        margin-right: -16px;
        border-left: none;
        border-right: none;
        padding: 9px 16px;
    }
}

.bar-categories-nav::-webkit-scrollbar {
    display: none;
    height: 0;
}

/* Skeleton xương cá giữ chỗ danh mục chống giật trang */
.bar-cat-skeleton {
    height: 38px;
    width: 95px;
    border-radius: 20px;
    flex-shrink: 0;
    background: #f1f5f9;
}

.bar-cat-tab {
    white-space: nowrap;
    padding: 8px 16px;
    background: #f7f8f9;
    border-radius: 20px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    user-select: none;
    box-shadow: none;
}

.bar-cat-tab:hover {
    background: #edf0f2;
    color: #1e293b;
    border-color: transparent;
}

.bar-cat-tab.active {
    background: var(--bar-primary-light, #f0f6f2);
    border-color: var(--bar-primary, #4d835f);
    color: var(--bar-primary, #4d835f);
    font-weight: 600;
    box-shadow: none;
}

/* ─────────────────────────────────────────────────────────────
   SKELETON LOADING (HIỆU ỨNG XƯƠNG CÁ SỐNG ĐỘNG)
   ───────────────────────────────────────────────────────────── */
.bar-skeleton-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: var(--bar-radius-lg);
    overflow: hidden;
    box-shadow: var(--bar-shadow-sm);
    display: flex;
    flex-direction: column;
    pointer-events: none;
    user-select: none;
    position: relative;
}

.bar-skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #e2e8f0;
    position: relative;
    z-index: 2;
}

.bar-skeleton-body {
    position: relative;
    z-index: 3;
    margin-top: -52px;
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.85);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
}

.bar-skeleton-title {
    height: 22px;
    width: 78%;
    border-radius: 6px;
    background: #e2e8f0;
}

.bar-skeleton-tags {
    display: flex;
    gap: 6px;
}

.bar-skeleton-tag {
    height: 22px;
    border-radius: 6px;
    background: #f1f5f9;
    display: inline-block;
}

.bar-skeleton-desc {
    height: 14px;
    width: 95%;
    border-radius: 4px;
    background: #f1f5f9;
}

.bar-skeleton-desc.short {
    width: 65%;
}

.bar-skeleton-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    margin-top: auto;
}

.bar-skeleton-price {
    height: 22px;
    width: 82px;
    border-radius: 6px;
    background: #e2e8f0;
}

.bar-skeleton-btn {
    height: 38px;
    width: 104px;
    border-radius: var(--bar-radius-md);
    background: #e2e8f0;
}

/* Shimmer wave sống động */
.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: #edf2f7;
}

.skeleton-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 35%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 65%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: barShimmerWave 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes barShimmerWave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ─────────────────────────────────────────────────────────────
   DRINK PRODUCTS GRID (BLOG-STYLE CARDS)
   ───────────────────────────────────────────────────────────── */
.bar-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .bar-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .bar-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.bar-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--bar-radius-lg);
    overflow: hidden;
    box-shadow: var(--bar-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
    position: relative;
    cursor: pointer;
}

.bar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    border-color: #cce2d4;
}

.bar-card:active {
    transform: scale(0.985);
    transition: transform 0.08s ease;
}

/* Ambient Color Layer: Lấy màu từ ảnh trên đắp xuống phần mở rộng bên dưới cho liền mạch */
.bar-card-ambient-bg {
    position: absolute;
    inset: -14px;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    filter: blur(28px) saturate(1.4);
    opacity: 0.58;
    z-index: 1;
    pointer-events: none;
    transform: scale(1.06);
    transition: opacity 0.4s ease, transform 0.5s ease;
}

.bar-card:hover .bar-card-ambient-bg {
    opacity: 0.80;
    transform: scale(1.12);
}

/* Light Pulse Highlight when navigating from cart */
@keyframes barCardHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 131, 95, 0.4);
        transform: scale(1);
        border-color: #cce2d4;
    }
    30% {
        box-shadow: 0 0 0 8px rgba(77, 131, 95, 0.35), 0 12px 28px rgba(77, 131, 95, 0.2);
        transform: scale(1.02);
        border-color: #4d835f;
    }
    60% {
        box-shadow: 0 0 0 4px rgba(77, 131, 95, 0.2), 0 8px 20px rgba(77, 131, 95, 0.15);
        transform: scale(1.01);
        border-color: #5c9c72;
    }
    100% {
        box-shadow: var(--bar-shadow-sm);
        transform: scale(1);
        border-color: #f1f5f9;
    }
}

.bar-card.bar-highlight-pulse {
    animation: barCardHighlight 2.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 5;
}

.bar-card-img-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8fafc;
}

.bar-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-card:hover .bar-card-img {
    transform: scale(1.08);
}

/* Badges on Image */
.bar-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 2;
}

.bar-badge-cat {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.bar-badge-hot {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

/* Match Tag (Relevance Inside Body) */
.bar-match-banner {
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    margin-bottom: 6px;
    width: fit-content;
    max-width: 100%;
}

.bar-match-banner.perfect {
    background: rgba(240, 246, 242, 0.95);
    color: #3b654a;
    border: 1px solid #cce2d4;
}

.bar-match-banner.topping {
    background: rgba(253, 242, 248, 0.95);
    color: #be185d;
    border: 1px solid #fbcfe8;
}

.bar-match-banner.caution {
    background: rgba(255, 241, 242, 0.95);
    color: #be123c;
    border: 1px solid #ffe4e6;
}

.bar-match-banner.neutral {
    display: none;
}

/* Card Body (Đè lên chân ảnh & kéo dài xuống dưới thành hình chữ nhật dọc với màu blur liền mạch) */
.bar-card-body {
    position: relative;
    z-index: 3;
    margin-top: -52px;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.85);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.bar-card:hover .bar-card-body {
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
}

.bar-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--bar-text-main);
    line-height: 1.3;
    margin-bottom: 5px;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-card:hover .bar-card-title {
    color: var(--bar-primary);
}

/* Ingredients Pill Tags (Recipe) */
.bar-card-ingredients {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 4px;
    margin-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.bar-card-ingredients::-webkit-scrollbar {
    display: none;
}

.bar-recipe-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(241, 245, 249, 0.85);
    color: #475569;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.bar-recipe-tag.matched {
    background: rgba(240, 246, 242, 0.95);
    color: #3b654a;
    border: 1px solid #cce2d4;
}

.bar-recipe-tag.matched i,
.bar-recipe-tag.matched .fa-heart {
    color: #ef4444;
}

.bar-recipe-tag.disliked {
    background: rgba(254, 226, 226, 0.95);
    color: #991b1b;
    border: 1px solid #fecaca;
    text-decoration: line-through;
}

.bar-card-desc {
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--bar-text-sub);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer & CTA */
.bar-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(226, 232, 240, 0.8);
    margin-top: auto;
}

.bar-card-price-group {
    display: flex;
    flex-direction: column;
}

.bar-card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--bar-primary-dark);
}

.bar-card-original-price {
    font-size: 11px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.bar-btn-select {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bar-primary);
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: var(--bar-radius-md);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(77, 131, 95, 0.25);
    white-space: nowrap;
}

.bar-btn-select:hover {
    background: var(--bar-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(77, 131, 95, 0.35);
}

.bar-btn-select.in-cart {
    background: #ffffff;
    color: var(--bar-primary);
    border: 1.5px solid var(--bar-primary);
    box-shadow: 0 2px 8px rgba(77, 131, 95, 0.15);
}

.bar-btn-select:active {
    transform: scale(0.94);
    transition: transform 0.08s ease;
}

.bar-btn-select.in-cart:hover {
    background: var(--bar-primary-light);
    border-color: var(--bar-primary-dark);
    color: var(--bar-primary-dark);
}

.bar-btn-select.in-cart:active {
    transform: scale(0.94);
}

/* ─────────────────────────────────────────────────────────────
   CUSTOMIZATION MODAL (TOPPING & OPTIONS POPUP)
   ───────────────────────────────────────────────────────────── */
.bar-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity;
    -webkit-tap-highlight-color: transparent;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.bar-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

@media (min-width: 640px) {
    .bar-modal-backdrop {
        align-items: center;
        padding: 20px;
    }
}

.bar-modal-sheet {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-origin: bottom center;
}

@media (min-width: 640px) {
    .bar-modal-sheet {
        border-radius: 20px;
        transform: translate3d(0, 20px, 0) scale(0.96);
        transform-origin: center center;
    }
}

.bar-modal-backdrop.active .bar-modal-sheet {
    transform: translate3d(0, 0, 0) scale(1);
}

/* Modal Header: Nổi đè lên trên đỉnh modal, trong suốt để lộ ảnh phía sau */
.bar-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 100%);
    border-bottom: none;
    pointer-events: none;
}

/* Title blur nhẹ để thấy ảnh phía sau, bo góc dạng pill kính mờ sang trọng */
.bar-modal-header-title {
    pointer-events: auto;
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    padding: 7px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 48px);
}

.bar-modal-close-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.2s;
    flex-shrink: 0;
}

.bar-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
    color: #0f172a;
}

/* Modal Scrollable Body */
.bar-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Stretchy Hero Image Wrapper: Chiếm ngang full bar-modal-header, tràn lên đỉnh chiếm hết khu vực header title */
.bar-modal-hero-wrapper {
    position: relative;
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    margin-top: -16px;
    margin-bottom: 16px;
    height: 250px;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    will-change: height;
    cursor: pointer;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.bar-modal-hero-wrapper .bar-modal-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.15s ease-out;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Product Info Banner in Modal (Bên dưới ảnh là mô tả sản phẩm và giá) */
.bar-modal-item-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.bar-modal-item-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bar-modal-item-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--bar-primary-dark);
}

.bar-modal-item-badge {
    background: #f0f6f2;
    color: #3b654a;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
}

/* Mô tả sản phẩm: Tối đa 2 hàng, chữ mờ dần ở cuối và nút Xem thêm */
.bar-modal-desc-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.bar-modal-item-desc {
    font-size: 13px;
    color: var(--bar-text-sub);
    line-height: 1.55;
    transition: all 0.2s ease;
}

.bar-modal-desc-wrap.collapsed .bar-modal-item-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3.1em;
    -webkit-mask-image: linear-gradient(180deg, #000 40%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 40%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
}

.bar-modal-desc-wrap.expanded .bar-modal-item-desc {
    display: block;
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
}

.bar-modal-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 2px 0 0 0;
    margin-top: 2px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bar-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.bar-modal-desc-toggle:hover {
    color: var(--bar-primary-dark);
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────
   RECIPE INGREDIENTS (Lưới gọn gàng: 2 trên mobile, 3 trên PC)
   Giống lưới Bạn thích nguyên liệu nào?
   ───────────────────────────────────────────────────────────── */
.bar-recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

@media (min-width: 640px) {
    .bar-recipe-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

.bar-recipe-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--bar-radius-md);
    user-select: none;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.bar-recipe-chip.fav-ingredient {
    background: #f0fdf4;
    border-color: #86efac;
}

.bar-recipe-chip.dislike-ingredient {
    background: #fef2f2;
    border-color: #fca5a5;
}

.bar-recipe-chip-emoji {
    font-size: 19px;
    line-height: 1;
    flex-shrink: 0;
}

.bar-recipe-chip-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bar-text-main);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-recipe-chip-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.bar-recipe-chip-icon.fav {
    background: #fee2e2;
    color: #ef4444;
}

.bar-recipe-chip-icon.dislike {
    background: #fee2e2;
    color: #dc2626;
}

.bar-recipe-tag.neutral {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Option Groups */
.bar-opt-group {
    margin-bottom: 22px;
}

.bar-opt-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bar-opt-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--bar-text-main);
}

.bar-opt-group-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.bar-opt-group-badge.required {
    background: #fee2e2;
    color: #b91c1c;
}

.bar-opt-group-badge.optional {
    background: #f1f5f9;
    color: #475569;
}

/* Option List & Items */
.bar-opt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bar-opt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.18s ease;
}

.bar-opt-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.bar-opt-item.selected {
    background: #f0f6f2;
    border-color: #4d835f;
}

.bar-opt-item.fav-topping {
    background: #f0f6f2;
    border-color: #cce2d4;
}

.bar-opt-item.fav-topping.selected {
    background: #e2eee6;
    border-color: #4d835f;
}

.bar-opt-fav-badge {
    font-size: 11px;
    font-weight: 700;
    background: #e2eee6;
    color: #3b654a;
    border: 1px solid #cce2d4;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

.bar-opt-fav-badge i,
.bar-opt-fav-badge .fa-heart {
    color: #ef4444;
}

.bar-opt-item.dislike-topping {
    background: #fef2f2;
    border-color: #fecaca;
}

.bar-opt-item.dislike-topping.selected {
    background: #fee2e2;
    border-color: #ef4444;
}

.bar-opt-dislike-badge {
    font-size: 11px;
    font-weight: 700;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

.bar-opt-item.is-fixed {
    cursor: default;
}

.bar-opt-item.is-fixed:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.bar-opt-item.is-fixed.fav-topping:hover {
    background: #f0f6f2;
    border-color: #cce2d4;
}

.bar-opt-item.is-fixed.dislike-topping:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.bar-opt-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.bar-opt-input {
    accent-color: var(--bar-primary);
    width: 17px;
    height: 17px;
    cursor: pointer;
    pointer-events: none;
    flex-shrink: 0;
}

.bar-opt-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bar-text-main);
}

.bar-opt-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--bar-primary-dark);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.bar-opt-price.free {
    color: #64748b;
    font-weight: 500;
    font-size: 12.5px;
}

/* Bar Note Input */
.bar-modal-note-box {
    margin-top: 10px;
    margin-bottom: 20px;
}

.bar-modal-note-box label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--bar-text-main);
    margin-bottom: 6px;
}

.bar-modal-note-box input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.bar-modal-note-box input:focus {
    border-color: var(--bar-primary);
    box-shadow: 0 0 0 3px rgba(77, 131, 95, 0.15);
}

/* Modal Footer & Floating Add Button */
.bar-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.bar-modal-qty {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}

.bar-modal-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #ffffff;
    border-radius: 8px;
    color: var(--bar-text-main);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--bar-shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.bar-modal-qty-btn:active {
    transform: scale(0.92);
}

.bar-modal-qty-val {
    width: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--bar-text-main);
}

.bar-modal-add-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bar-primary) 0%, var(--bar-primary-dark) 100%);
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: var(--bar-radius-md);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(77, 131, 95, 0.35);
    transition: all 0.2s;
}

.bar-modal-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 131, 95, 0.45);
}

.bar-modal-add-btn:active {
    transform: scale(0.98);
}

/* ─────────────────────────────────────────────────────────────
   SUB-CART GROUP MODAL (Danh sách các phiên bản đã thêm vào giỏ)
   ───────────────────────────────────────────────────────────── */
.bar-cart-items-sheet {
    max-width: 520px;
    max-height: 85vh;
}

.bar-cart-items-sheet .modal-handle-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    padding-bottom: 6px;
    cursor: grab;
    flex-shrink: 0;
    background: #ffffff;
}

.bar-cart-items-sheet .modal-handle-pill {
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s;
}

.bar-cart-items-sheet .modal-handle-bar:hover .modal-handle-pill {
    background: #94a3b8;
}

.bar-cart-items-sheet .bar-modal-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 18px 14px 18px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    pointer-events: auto;
    flex-shrink: 0;
}

.bar-cart-items-sheet .bar-modal-header-title {
    pointer-events: auto;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}

.bar-cart-items-sheet .bar-modal-close-btn {
    pointer-events: auto;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    box-shadow: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bar-cart-items-sheet .bar-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
}

.bar-cart-items-sheet .bar-modal-body {
    padding: 16px 18px 20px 18px;
    overflow-y: auto;
    flex-grow: 1;
}

.bar-item-cart-badge {
    background: #f0f6f2;
    color: #3b654a;
    border: 1px solid #cce2d4;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.bar-cart-group-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
}

.bar-cart-group-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar-cart-group-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.bar-cart-group-row:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.bar-cart-group-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.bar-cart-group-info {
    flex: 1;
    min-width: 0;
}

.bar-cart-group-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bar-text-main);
    margin-bottom: 2px;
    line-height: 1.35;
}

.bar-cart-group-options {
    font-size: 11.5px;
    color: var(--bar-primary-dark);
    font-weight: 600;
    line-height: 1.35;
}

.bar-cart-group-note {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
    margin-top: 2px;
}

.bar-cart-group-price {
    font-size: 13px;
    font-weight: 800;
    color: var(--bar-primary);
    margin-top: 4px;
}

.bar-cart-group-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.bar-cart-group-actions .card-qty-wrapper {
    background: #4d835f;
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    height: 30px;
    width: 75px;
    border: 1px solid #4d835f;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(77, 131, 95, 0.2);
    cursor: pointer;
}

.bar-cart-group-actions .card-qty-wrapper.collapsed {
    width: 32px !important;
    justify-content: center !important;
    background: #ffffff !important;
    color: #4d835f !important;
    border: 1.5px solid #4d835f !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.bar-cart-group-actions .card-qty-wrapper.collapsed .q-btn-card {
    display: none !important;
}

.bar-cart-group-actions .card-qty-wrapper.collapsed .q-val-card {
    color: #4d835f !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    pointer-events: none !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
}

.bar-cart-group-actions .card-qty-wrapper .q-btn-card {
    width: 24px;
    height: 100%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.1s;
    user-select: none;
}

.bar-cart-group-actions .card-qty-wrapper .q-btn-card:hover {
    background: rgba(255, 255, 255, 0.25);
}

.bar-cart-group-actions .card-qty-wrapper .q-btn-card:active {
    transform: scale(0.9);
}

.bar-cart-group-actions .card-qty-wrapper .q-val-card {
    font-weight: 800;
    font-size: 14px;
    color: #ffffff;
    width: 27px;
    text-align: center;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    -moz-appearance: textfield;
}

.bar-cart-group-actions .card-qty-wrapper .q-val-card::-webkit-outer-spin-button,
.bar-cart-group-actions .card-qty-wrapper .q-val-card::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bar-item-cart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.bar-item-cart-summary {
    display: flex;
    flex-direction: column;
}

.bar-item-cart-total-label {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
}

.bar-item-cart-total-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--bar-primary-dark);
}

.bar-btn-add-another {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bar-primary) 0%, var(--bar-primary-dark) 100%);
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    border-radius: var(--bar-radius-md);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(77, 131, 95, 0.3);
    transition: all 0.2s;
}

.bar-btn-add-another:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(77, 131, 95, 0.4);
}

.bar-btn-add-another:active {
    transform: scale(0.98);
}

/* All heart icons in Quầy Bar are red */
.fa-heart,
.fa-solid.fa-heart,
.fas.fa-heart {
    color: #ef4444 !important;
}

/* ─────────────────────────────────────────────────────────────
   HIGHLIGHT PULSE ANIMATION FOR PRODUCT DEEP-LINKING
   ───────────────────────────────────────────────────────────── */
@keyframes barCardGlowPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
        border-color: #f59e0b;
    }
    30% {
        transform: scale(1.035);
        box-shadow: 0 0 0 14px rgba(217, 119, 6, 0.25), 0 12px 28px rgba(217, 119, 6, 0.35);
        border-color: #d97706;
    }
    60% {
        transform: scale(1.015);
        box-shadow: 0 0 0 8px rgba(217, 119, 6, 0.15), 0 8px 20px rgba(217, 119, 6, 0.25);
        border-color: #d97706;
    }
    100% {
        transform: scale(1);
        box-shadow: var(--bar-shadow-sm);
        border-color: var(--bar-border);
    }
}

.bar-card.bar-highlight-pulse {
    animation: barCardGlowPulse 2.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    position: relative;
    z-index: 15;
}

