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

:root {
    --green: #16a34a;
    --teal: #0d9488;
    --slate-50: #f8fafc;
    --slate-800: #1e293b;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background: var(--slate-50);
    overflow-x: hidden;
}

/* ── KNOWLEDGE TABS ──────────────────────────────────────── */
.knowledge-tab {
    background: transparent;
    color: #64748b;
    border: none;
    cursor: pointer;
}

.knowledge-tab.active {
    background: white;
    color: #047857;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

::-webkit-scrollbar {
    width: 5px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 10px
}

/* Custom Scrollbar for specific horizontal containers */
.custom-scrollbar::-webkit-scrollbar {
    height: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--green);
}

.glass-header {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(22, 163, 74, 0.1)
}

.hero-banner {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 40%, #0d9488 100%);
    position: relative;
    overflow: hidden
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15
}

.filter-btn {
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    border: 1.5px solid transparent
}

.filter-btn.active {
    background: var(--slate-800);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 41, 59, .25)
}

.filter-btn:not(.active) {
    background: white;
    color: #475569;
    border-color: #e2e8f0
}

.filter-btn:not(.active):hover {
    border-color: var(--green);
    color: var(--green)
}

.menu-card {
    transition: transform .25s cubic-bezier(.4, 0, .2, 1), box-shadow .3s ease;
    will-change: transform;
    cursor: pointer;
    transform: translateZ(0);
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #f1f5f9
}

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 40px -8px rgba(0, 0, 0, .12), 0 0 0 1px rgba(22, 163, 74, .08)
}

.menu-card:active {
    transform: scale(.98)
}

.food-img {
    transition: transform .6s cubic-bezier(.25, .46, .45, .94);
    will-change: transform
}

.menu-card:hover .food-img {
    transform: scale(1.07)
}

.kcal-badge {
    background: rgba(15, 23, 42, .75);
    backdrop-filter: blur(8px)
}

#modal-backdrop {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px)
}

.progress-bar-bg {
    background: #e2e8f0;
    border-radius: 999px;
    height: 5px;
    overflow: hidden
}

.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(.4, 0, .2, 1)
}

#cart-drawer {
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1)
}

#cart-drawer.open {
    transform: translateX(0)
}

.cart-item-row {
    transition: all .25s ease
}

.cart-item-row:hover {
    background: #f8fafc
}

.btn-primary {
    background: linear-gradient(135deg, var(--green), var(--teal));
    transition: all .3s ease;
    box-shadow: 0 4px 15px rgba(22, 163, 74, .35)
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(22, 163, 74, .4);
    transform: translateY(-1px)
}

.btn-dark {
    background: var(--slate-800);
    transition: all .3s ease
}

.btn-dark:hover {
    background: var(--green);
    box-shadow: 0 8px 20px rgba(22, 163, 74, .3)
}

.line-btn {
    background: linear-gradient(135deg, #00B900, #00a000);
    box-shadow: 0 4px 15px rgba(0, 185, 0, .3);
    transition: all .3s ease
}

.line-btn:hover {
    box-shadow: 0 8px 25px rgba(0, 185, 0, .4);
    transform: translateY(-1px)
}

#toast {
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .4s ease
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600
}

#map {
    border-radius: 12px;
    z-index: 0
}

.ing-tag {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--green)
}

.input-error {
    border-color: #f43f5e !important;
    background-color: #fff1f2 !important
}

.input-ok {
    border-color: #86efac !important
}

.delivery-date-banner {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12px;
    color: #15803d;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px
}

#qr-container {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px dashed #86efac;
    border-radius: 20px
}

.tracker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0
}

.tracker-dot.done {
    background: var(--green)
}

.tracker-dot.active {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .25);
    animation: pulse-dot 1.5s infinite
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(22, 163, 74, .25)
    }

    50% {
        box-shadow: 0 0 0 6px rgba(22, 163, 74, .1)
    }
}

.mobile-search-bar {
    display: none
}

@media(max-width:768px) {
    .mobile-search-bar {
        display: flex
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px
}

@keyframes shimmer {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

/* ─── SWEETALERT2 CUSTOM THEME ─────────────────────────── */
.swal-cf-popup {
    font-family: 'Prompt', sans-serif !important;
    border-radius: 20px !important;
    padding: 28px !important;
}

.swal-cf-title {
    font-family: 'Prompt', sans-serif !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    color: #1e293b !important;
}

.swal-cf-confirm {
    font-family: 'Prompt', sans-serif !important;
    background: linear-gradient(135deg, #16a34a, #0d9488) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.35) !important;
    transition: all 0.2s ease !important;
}

.swal-cf-confirm:hover {
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45) !important;
    transform: translateY(-1px) !important;
}

.swal-cf-cancel {
    font-family: 'Prompt', sans-serif !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.swal-cf-cancel:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
}

.swal2-actions {
    gap: 10px !important;
    margin-top: 20px !important;
}

/* Toast */
.swal-cf-toast {
    font-family: 'Prompt', sans-serif !important;
    border-radius: 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 12px 18px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    margin-bottom: 16px !important;
}

/* Back button responsive */
#back-to-cart-btn {
    display: none;
}

@media (max-width: 1024px) {
    #back-to-cart-btn {
        display: flex !important;
    }
}

/* Back button responsive */
#back-to-cart-btn {
    display: none;
}
@media (max-width: 1024px) {
    #back-to-cart-btn {
        display: flex !important;
    }
}

/* คลาสควบคุมสัดส่วนแบนเนอร์ (Anti-Jump & Responsive) */
.responsive-promo {
    aspect-ratio: 16 / 9; /* โหมดมือถือ: ทรงมาตรฐานวิดีโอ */
}

@media (min-width: 768px) { /* จอ md และ lg ขึ้นไป */
    .responsive-promo {
        aspect-ratio: 21 / 9 !important; /* ทรงกว้างแบบโรงหนัง */
    }
}