/**
 * Food Store App - Main Application Styles
 * Thiết kế giao diện App Đặt Món Ăn hiện đại, tối ưu Mobile-First
 */

/* ==================== 1. LAYOUT & CONTAINER ==================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: clip;
    max-width: 100vw;
    width: 100%;
    margin: 0;
    padding: 0;
}

.food-app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--app-bg, #f8fafc);
    padding-bottom: 24px;
}

.app-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    gap: 24px;
}

.app-feed-column {
    flex: 1;
    min-width: 0;
}

.app-sidebar-column,
.app-layout-sidebar-cart {
    width: 360px;
    flex-shrink: 0;
}

/* ==================== 2. HEADER APP ==================== */
.app-header {
    background: #ffffff;
    border-bottom: 1px solid var(--app-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.app-header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.app-header-mobile-bar {
    width: 100%;
}

.mobile-full-pill {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 7px 14px !important;
    background: #f8fafc !important;
    border: 1px solid var(--app-border) !important;
}

.show-mobile {
    display: none !important;
}

@media (max-width: 640px) {
    .show-mobile {
        display: block !important;
    }
    .hide-mobile {
        display: none !important;
    }
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--app-text);
}

.brand-logo-icon {
    font-size: 28px;
    background: var(--app-primary-light);
    border-radius: 10px;
    padding: 2px 6px;
}

.brand-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--app-text);
    letter-spacing: -0.5px;
}

/* Viên thuốc chọn chi nhánh (Location Pill) */
.app-location-pill {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    max-width: 320px;
}

.app-location-pill:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.app-location-pill .loc-icon {
    font-size: 18px;
    color: var(--app-primary);
}

.app-location-pill .loc-text {
    overflow: hidden;
}

.app-location-pill .loc-label {
    display: block;
    font-size: 10px;
    color: var(--app-text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.app-location-pill .loc-name {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header Actions */
.app-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-action-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    transition: all 0.2s;
}

.header-action-btn:hover {
    background: #f1f5f9;
}

.btn-ai-trigger {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-color: #ddd6fe;
    color: #6d28d9;
}

.btn-cart-trigger {
    background: var(--app-primary-light);
    border-color: #fdba74;
    color: var(--app-primary);
}

.cart-badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--app-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
}

/* Thanh tìm kiếm mở rộng (Search Tray) */
.header-search-tray {
    background: #fff;
    border-top: 1px solid var(--app-border);
    padding: 10px 16px;
}

.search-tray-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.tray-search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
}

.search-tray-container input {
    width: 100%;
    padding: 10px 40px 10px 38px;
    border: 1.5px solid var(--app-primary);
    border-radius: 30px;
    font-size: 14px;
    background: #fff;
    outline: none;
}

.search-tray-container button {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
}

/* ==================== 3. BANNER & PROMO CAROUSEL ==================== */
.app-promo-carousel {
    display: flex;
    gap: 16px;
    margin: 16px 0 20px 0;
    overflow-x: auto;
    padding-bottom: 4px;
}

.promo-card {
    flex: 1;
    min-width: 290px;
    border-radius: var(--app-radius);
    padding: 22px 24px;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.promo-gradient-orange {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 60%, #fb923c 100%);
}

.promo-gradient-purple {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 60%, #c084fc 100%);
}

.promo-badge {
    background: rgba(255, 255, 255, 0.25);
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    align-self: flex-start;
}

.promo-title {
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.promo-sub {
    font-size: 12px;
    margin: 0 0 14px 0;
    opacity: 0.9;
    line-height: 1.4;
}

.promo-cta {
    background: #ffffff;
    color: #0f172a;
    border: none;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    align-self: flex-start;
    transition: transform 0.15s;
}

.promo-cta:hover {
    transform: scale(1.05);
}

/* ==================== 4. CATEGORY CHIPS ==================== */
.app-categories-section {
    margin-bottom: 20px;
}

.cat-chips-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.cat-chips-scroll::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 30px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cat-chip:hover {
    background: #f1f5f9;
}

.cat-chip.active {
    background: var(--app-primary);
    border-color: var(--app-primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(234, 88, 12, 0.3);
}

.cat-chip .chip-icon {
    font-size: 16px;
}

.cat-chip .chip-title {
    font-size: 13px;
    font-weight: 700;
}

/* ==================== 5. SECTION HEAD & DISHES GRID ==================== */
.app-section {
    margin-bottom: 30px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.sec-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sec-emoji {
    font-size: 22px;
}

.sec-heading {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
}

.sec-tag {
    font-size: 11px;
    font-weight: 700;
    background: #fef2f2;
    color: #dc2626;
    padding: 3px 8px;
    border-radius: 12px;
}

.sec-counter {
    font-size: 12px;
    color: var(--app-text-muted);
    font-weight: 600;
}

.app-dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

@media (max-width: 600px) {
    .app-dishes-grid {
        grid-template-columns: 1fr 1fr; /* 2 cột trên điện thoại như app */
        gap: 12px;
    }
}

/* Thẻ Món Ăn (Food Card) */
.food-app-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.food-app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #fed7aa;
}

.food-app-card.card-out-of-stock {
    opacity: 0.65;
}

.card-media {
    height: 150px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .card-media { height: 120px; }
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.food-app-card:hover .card-media img {
    transform: scale(1.05);
}

.media-placeholder {
    font-size: 48px;
}

.card-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.tag-sale {
    background: #ef4444;
    color: #fff;
}

.tag-out {
    background: #000;
    color: #fff;
}

.card-floating-badges {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.badge-mini {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-details {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-dish-name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-dish-desc {
    font-size: 11px;
    color: var(--app-text-muted);
    line-height: 1.35;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #f1f5f9;
    padding-top: 8px;
    margin-top: auto;
}

.card-pricing {
    display: flex;
    flex-direction: column;
}

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

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

.btn-card-add-dish {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: var(--app-primary);
    border: 1.5px solid #fed7aa;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.08);
    white-space: nowrap;
}

.btn-card-add-dish:hover,
.btn-card-add-dish.btn-added-pop {
    background: linear-gradient(135deg, var(--app-primary) 0%, #ea580c 100%);
    color: #ffffff;
    border-color: var(--app-primary);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.28);
    transform: translateY(-1px);
}

.btn-card-add-dish.btn-card-has-opts {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #f97316;
}

.btn-card-add-dish .plus-icon {
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
}

.btn-card-disabled {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
}

/* ==================== 6. DESKTOP STICKY SIDEBAR CART ==================== */
.desktop-cart-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 16px;
    box-shadow: var(--app-shadow);
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
}

.desk-cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--app-border);
}

.desk-cart-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.desk-cart-head-title .icon {
    font-size: 18px;
}

.desk-cart-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.desk-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 420px;
}

.desk-empty-cart {
    text-align: center;
    padding: 36px 12px;
    color: #94a3b8;
}

.desk-empty-cart .empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.desk-empty-cart .empty-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    margin: 0 0 4px 0;
}

.desk-empty-cart .empty-sub {
    font-size: 11.5px;
    color: #94a3b8;
    margin: 0;
}

.desk-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.desk-cart-item:last-child {
    border-bottom: none;
}

.desk-cart-item-info {
    flex: 1;
    padding-right: 8px;
}

.desk-cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: block;
    line-height: 1.35;
}

.desk-cart-item-opt {
    font-size: 11px;
    color: #059669;
    margin-top: 2px;
}

.desk-cart-item-price {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--app-primary);
    margin-top: 4px;
}

.desk-cart-item-qty {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
}

.desk-cart-item-qty button {
    border: none;
    background: transparent;
    width: 26px;
    height: 26px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    transition: background 0.15s;
}

.desk-cart-item-qty button:hover {
    background: #e2e8f0;
}

.desk-cart-item-qty span {
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.desk-cross-sell-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px;
    margin: 8px 0;
}

.desk-cross-sell-box .cs-label {
    font-size: 11px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 6px;
}

.desk-cart-foot {
    border-top: 1px solid var(--app-border);
    padding-top: 12px;
}

.desk-cart-total-row,
.desk-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--app-text-muted);
}

.desk-cart-total-row strong,
.desk-total-row strong {
    font-size: 17px;
    color: var(--app-primary);
    font-weight: 800;
}

.btn-desk-checkout {
    width: 100%;
    background: var(--app-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-desk-checkout:hover {
    background: var(--app-primary-dark);
    transform: translateY(-1px);
}

.btn-desk-checkout:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================== 7. MOBILE STICKY FLOATING CART PILL ==================== */
.app-sticky-cart-pill {
    position: fixed;
    bottom: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    background: #0f172a;
    color: #fff;
    border-radius: 30px;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

body.has-mbm .app-sticky-cart-pill,
body.has-bottom-nav .app-sticky-cart-pill,
.has-mbm .app-sticky-cart-pill {
    bottom: 80px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 992px) {
    .app-sticky-cart-pill { display: none !important; }
}

.pill-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.pill-total {
    color: #38bdf8;
    font-size: 15px;
}

.btn-open-drawer-pill {
    background: var(--app-primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}

/* ==================== 8. MOBILE BOTTOM NAVIGATION (TỰ DO / KHÔNG BẮT BUỘC) ==================== */
.app-bottom-nav {
    display: none !important;
}

.bottom-cart-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--app-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    border-radius: 10px;
    padding: 1px 5px;
}

/* ==================== 9. MODALS & DRAWERS ==================== */
.app-modal-backdrop,
.app-drawer-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-modal-box {
    background: #ffffff;
    border-radius: 16px;
    width: 92%;
    max-width: 520px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalScale 0.2s ease;
}

@keyframes modalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.app-modal-head,
.app-drawer-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-modal-head h3,
.app-drawer-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.app-modal-close,
.app-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.app-modal-body,
.app-drawer-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

.app-modal-foot,
.app-drawer-foot {
    padding: 14px 18px;
    border-top: 1px solid var(--app-border);
    background: #f8fafc;
}

/* Branch Cards List */
.branch-pick-card {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s;
}

.branch-pick-card:hover,
.branch-pick-card.selected {
    border-color: var(--app-primary);
    background: var(--app-primary-light);
}

.branch-pick-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.branch-pick-left .b-icon {
    font-size: 24px;
}

.b-name { font-size: 14px; font-weight: 800; }
.b-addr { font-size: 12px; color: var(--app-text-muted); margin: 2px 0; }
.b-phone { font-size: 11px; font-weight: 600; color: #1e40af; }

.btn-select-branch {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.branch-pick-card.selected .btn-select-branch {
    background: var(--app-primary);
    color: #fff;
    border-color: var(--app-primary);
}

/* Cart Drawer Animation */
.app-drawer-backdrop {
    justify-content: flex-end;
}

.app-drawer-box {
    background: #ffffff;
    width: 100%;
    max-width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: drawerIn 0.25s ease;
}

@keyframes drawerIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@media (max-width: 600px) {
    .app-drawer-backdrop {
        align-items: flex-end;
        padding-bottom: 78px;
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }
    .app-drawer-box {
        height: calc(85vh - 78px);
        border-radius: 20px 20px 16px 16px;
        animation: drawerUp 0.25s ease;
    }
    @keyframes drawerUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}

.app-checkout-block {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--app-border);
}

.app-checkout-block .block-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1e293b;
}

.app-select-slot {
    width: 100%;
    padding: 9px;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    background: #eff6ff;
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
}

.app-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.app-checkout-block input,
.app-checkout-block textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
}

.pay-option {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    cursor: pointer;
}

.drawer-price-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    margin-bottom: 12px;
}

.drawer-price-line strong {
    font-size: 20px;
    color: var(--app-primary);
}

.btn-app-order {
    width: 100%;
    background: var(--app-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* ==================== 10. SUCCESS MODAL & ORDER TRACKER ==================== */
.modal-success-card {
    text-align: center;
    padding: 24px;
    max-width: 460px;
    position: relative;
}

.modal-success-card .btn-close-success {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s;
    z-index: 10;
}

.modal-success-card .btn-close-success:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.modal-success-icon {
    font-size: 48px;
    margin-bottom: 6px;
}

.modal-success-card h2 {
    color: var(--app-success);
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 4px 0;
}

.app-qr-display-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    margin: 14px 0;
}

.qr-svg-holder svg {
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.qr-usage-tip {
    font-size: 12px;
    color: var(--app-text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

.success-info-table {
    text-align: left;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}

.s-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.success-btn-actions {
    display: flex;
    gap: 8px;
}

.btn-app-primary,
.btn-app-secondary {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-app-primary { background: #e2e8f0; color: #334155; border: none; }
.btn-app-secondary { background: #3b82f6; color: #fff; border: none; }

/* Tracker Page Styling */
.tracker-page-wrapper {
    max-width: 720px;
    margin: 20px auto;
}

.tracker-head-card {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--app-shadow);
    margin-bottom: 20px;
}

.tracker-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.tracker-head-card h1 {
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 6px 0;
}

.tracker-head-card p {
    font-size: 13px;
    color: var(--app-text-muted);
    margin: 0 0 18px 0;
}

.tracker-input-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tracker-input-row .t-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
}

.tracker-input-row input {
    flex: 1;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.btn-track-submit {
    background: var(--app-primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

/* Timeline 4 bước tiến độ */
.tracker-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 24px 0 16px 0;
}

.tracker-timeline::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.timeline-step.completed .step-circle {
    border-color: #10b981;
    background: #ecfdf5;
}

.timeline-step.active .step-circle {
    border-color: var(--app-primary);
    background: var(--app-primary-light);
    transform: scale(1.15);
}

.step-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}

.timeline-step.active .step-label {
    color: var(--app-primary);
}

.tracker-guide-card {
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 20px;
}

.tracker-guide-card h3 {
    margin: 0 0 14px 0;
    font-size: 15px;
    font-weight: 800;
}

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

@media (max-width: 600px) {
    .guide-steps-grid { grid-template-columns: 1fr; }
}

.guide-step {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 10px;
}

.guide-step .step-num {
    background: var(--app-primary);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.guide-step h4 {
    margin: 4px 0;
    font-size: 13px;
    font-weight: 800;
}

.guide-step p {
    margin: 0;
    font-size: 11px;
    color: var(--app-text-muted);
    line-height: 1.4;
}

/* ==================== 11. DESKTOP FOOTER ==================== */
.app-desktop-footer {
    background: #ffffff;
    border-top: 1px solid var(--app-border);
    margin-top: 40px;
    padding: 30px 16px 16px 16px;
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 30px;
    padding-bottom: 20px;
}

@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; gap: 20px; }
}

.footer-logo { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.footer-slogan { font-size: 13px; color: var(--app-text-muted); line-height: 1.5; }
.footer-links-col h4, .footer-contact-col h4 { font-size: 14px; font-weight: 800; margin: 0 0 10px 0; }
.footer-links-col ul { list-style: none; padding: 0; margin: 0; }
.footer-links-col li { margin-bottom: 6px; }
.footer-links-col a { text-decoration: none; color: #475569; font-size: 13px; }
.footer-links-col a:hover { color: var(--app-primary); }
.footer-contact-col p { margin: 0 0 6px 0; font-size: 13px; color: #475569; }
.footer-bottom-line {
    text-align: center;
    border-top: 1px solid var(--app-border);
    padding-top: 14px;
    font-size: 12px;
    color: #94a3b8;
}

.hide-mobile {
    display: block;
}

@media (max-width: 991px) {
    .hide-mobile {
        display: none !important;
    }
    .app-header-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .app-container {
        display: block !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        gap: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .app-feed-column {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    .app-layout-sidebar-cart {
        display: none !important;
    }
    .app-promo-carousel {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        margin: 12px 0 16px 0 !important;
        box-sizing: border-box !important;
    }
    .promo-card {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 18px 16px !important;
        box-sizing: border-box !important;
    }
    .cat-chips-scroll {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .section-head {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .app-dishes-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .app-dishes-grid .food-app-card {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   BỔ SUNG: BỐ CỤC 2 / 4 CỘT, TÙY BIẾN THÔNG TIN VÀ POPUP CHI TIẾT MÓN ĂN
   ========================================================================== */

/* Store Closed Banner */
.app-store-closed-banner {
    background: linear-gradient(135deg, #1e1b4b, #311042);
    border-bottom: 2px solid #f43f5e;
    color: #ffffff;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.app-store-closed-banner .banner-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}
.app-store-closed-banner .banner-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.app-store-closed-banner .banner-body {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.app-store-closed-banner .banner-body strong {
    display: block;
    font-size: 13.5px;
    color: #fda4af;
    margin-bottom: 2px;
    overflow-wrap: break-word;
    word-break: break-word;
}
.app-store-closed-banner .banner-body p {
    margin: 0;
    font-size: 12.5px;
    color: #e2e8f0;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Toolbar Điều Chỉnh Bố Cục Thực Đơn */
.app-grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--app-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-switch-btns {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 3px;
}

.btn-grid-layout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-grid-layout svg {
    flex-shrink: 0;
}

.btn-grid-layout.active {
    background: #ffffff;
    color: var(--app-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Dropdown Tùy Chọn Hiển Thị Thông Tin Món */
.prefs-dropdown-wrap {
    position: relative;
}

.btn-toggle-prefs {
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-toggle-prefs:hover {
    background: #f1f5f9;
}

.prefs-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 12px 14px;
    width: 240px;
    z-index: 100;
}

.prefs-menu-head {
    font-size: 11.5px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 4px;
}

.pref-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
}

.pref-option input {
    cursor: pointer;
}

/* Quy Tắc Cột Lưới Thực Đơn */
.app-dishes-grid.grid-cols-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px !important;
}

.app-dishes-grid.grid-cols-2 .card-media {
    height: 220px !important;
}

.app-dishes-grid.grid-cols-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

.app-dishes-grid.grid-cols-4 .card-media {
    height: 150px !important;
}

@media (max-width: 991px) {
    .app-dishes-grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

.btn-mobile-cols {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mobile-cols.active {
    background: #ffffff;
    color: var(--app-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
    .app-dishes-grid.grid-mobile-cols-1 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .app-dishes-grid.grid-mobile-cols-1 .card-media {
        height: 180px !important;
    }
    .app-dishes-grid.grid-cols-2,
    .app-dishes-grid.grid-cols-4,
    .app-dishes-grid.grid-mobile-cols-2 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .app-dishes-grid.grid-mobile-cols-2 .card-media,
    .app-dishes-grid.grid-cols-2 .card-media,
    .app-dishes-grid.grid-cols-4 .card-media {
        height: 125px !important;
    }

    /* Fix nút Tùy chọn và bố cục card món ăn trên Mobile không bị che/cắt góc */
    .food-app-card .card-details {
        padding: 8px 8px 10px 8px !important;
    }
    .food-app-card .card-bottom-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px !important;
        padding-top: 6px !important;
    }
    .food-app-card .card-pricing {
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    .food-app-card .price-current {
        font-size: 13.5px !important;
        white-space: nowrap !important;
    }
    .food-app-card .price-original {
        font-size: 10px !important;
    }
    .food-app-card .card-actions-group {
        flex-shrink: 0 !important;
        max-width: 100% !important;
    }
    .food-app-card .btn-card-add-dish {
        padding: 4px 7px !important;
        font-size: 11.5px !important;
        border-radius: 14px !important;
        gap: 3px !important;
        box-sizing: border-box !important;
        max-width: 100% !important;
    }
    .food-app-card .btn-card-add-dish .plus-icon {
        font-size: 13px !important;
    }
    .food-app-card .btn-card-add-dish.btn-card-has-opts {
        padding: 4px 7px !important;
        font-size: 11px !important;
        letter-spacing: -0.2px !important;
    }
    .food-app-card .btn-card-add-dish.btn-card-has-opts .add-text {
        white-space: nowrap !important;
    }

    /* Fix banner thông báo đóng cửa không bị tràn phải ở Mobile */
    .app-store-closed-banner {
        padding: 10px 12px !important;
    }
    .app-store-closed-banner .banner-inner {
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .app-store-closed-banner .banner-icon {
        font-size: 20px !important;
        margin-top: 2px !important;
    }
    .app-store-closed-banner .banner-body strong {
        font-size: 12.5px !important;
        line-height: 1.35 !important;
    }
    .app-store-closed-banner .banner-body p {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
    }
}

/* Các Class Ẩn Thông Tin Kèm Theo */
.app-dishes-grid.hide-ratings .badge-rating {
    display: none !important;
}

.app-dishes-grid.hide-time .badge-time {
    display: none !important;
}

.app-dishes-grid.hide-desc .card-dish-desc {
    display: none !important;
}

.app-dishes-grid.hide-tags .card-tag {
    display: none !important;
}

/* Card Media Overlay & Action Buttons */
.card-media {
    cursor: pointer;
    position: relative;
}

.card-media-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(2px);
}

.food-app-card:hover .card-media-overlay {
    opacity: 1;
}

.btn-overlay-view {
    background: #ffffff;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card-dish-name {
    cursor: pointer;
}

.card-dish-name:hover {
    color: var(--app-primary);
}

.card-actions-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-card-info {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-card-info:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* ==========================================================================
   MODAL CHI TIẾT SẢN PHẨM (POPUP THÔNG TIN MÓN ĂN & TOPPING)
   ========================================================================== */
.modal-product-detail-box {
    max-width: 540px !important;
    width: 95% !important;
    padding: 0 !important;
    border-radius: 24px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    position: relative;
}

.btn-close-detail {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, background 0.2s;
}

.btn-close-detail:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8) !important;
}

.detail-modal-scrollable {
    overflow-y: auto;
    flex: 1;
}

.detail-modal-media {
    position: relative;
    width: 100%;
    height: 240px;
    background: #0f172a;
}

.detail-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-media-badges {
    position: absolute;
    bottom: 12px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-modal-body {
    padding: 20px 22px;
}

.detail-main-info {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--app-border);
    padding-bottom: 14px;
}

.detail-title {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.detail-pricing-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-big-current {
    font-size: 24px;
    font-weight: 900;
    color: var(--app-primary);
}

.price-big-original {
    font-size: 15px;
    color: #94a3b8;
    text-decoration: line-through;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-sec-heading {
    font-size: 13.5px;
    font-weight: 800;
    color: #334155;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-desc-text {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

.detail-options-list {
    background: transparent;
    border: none;
    padding: 0;
}

.detail-option-group {
    margin-bottom: 16px;
    background: #f8fafc;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    padding: 14px 16px;
}
.detail-option-group:last-child {
    margin-bottom: 0;
}

.detail-group-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-required {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 7px;
    border-radius: 6px;
}

.badge-optional {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 7px;
    border-radius: 6px;
}

.detail-choice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 13.5px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.18s ease;
}
.detail-choice-item:last-child {
    margin-bottom: 0;
}

.detail-choice-item:hover {
    border-color: #fdba74;
    background: #fffaf5;
}

.detail-choice-item.is-checked {
    border-color: var(--app-primary);
    background: #fff7ed;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
}

.choice-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.choice-item-left input[type="radio"],
.choice-item-left input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--app-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.choice-item-label {
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.choice-item-price {
    font-weight: 800;
    color: var(--app-primary);
    font-size: 13px;
    background: #ffedd5;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    margin-left: 10px;
}

.detail-note-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    background: #f8fafc;
    transition: all 0.2s;
}
.detail-note-input:focus {
    background: #ffffff;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
    outline: none;
}

/* Modal Footer */
.detail-modal-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #ffffff;
    border-top: 1px solid var(--app-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.detail-qty-control {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 6px;
}

.btn-qty-btn {
    width: 34px;
    height: 34px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-qty-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.qty-num {
    min-width: 26px;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.btn-detail-add-cart {
    flex: 1;
    background: linear-gradient(135deg, var(--app-primary), #ea580c);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.35);
    transition: transform 0.2s, opacity 0.2s;
}

.btn-detail-add-cart:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

/* Modal Options fallback & Mobile Responsive Sheet */
.modal-options-content {
    border-radius: 24px !important;
}
.btn-app-action {
    background: linear-gradient(135deg, var(--app-primary), #ea580c) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 13px 18px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    width: 100% !important;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.2s !important;
}
.btn-app-action:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}
.opt-price-calc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.opt-choice-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.15s;
}
.opt-choice-label:hover {
    border-color: #fdba74;
    background: #fff7ed;
}

/* Mobile Bottom Sheet Appearance */
body.app-modal-open {
    overflow: hidden !important;
}

body.app-modal-open .mbm-nav {
    transform: translateY(120%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@media (max-width: 640px) {
    .app-modal-backdrop {
        align-items: flex-end !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .modal-product-detail-box,
    .modal-options-content,
    .app-modal-box:not(.modal-ai-card) {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 88vh !important;
        border-radius: 24px 24px 0 0 !important;
        margin: 0 !important;
        animation: modalSlideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    @keyframes modalSlideUpSheet {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-product-detail-box::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 4.5px;
        background: rgba(255, 255, 255, 0.85);
        border-radius: 999px;
        z-index: 20;
    }

    .detail-modal-scrollable {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        padding-bottom: 10px !important;
    }

    .detail-modal-media {
        height: 160px !important;
        flex-shrink: 0 !important;
    }

    .detail-modal-body {
        padding: 14px 16px 12px 16px !important;
    }

    .detail-modal-footer,
    .app-modal-foot {
        padding: 12px 16px !important;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 12px)) !important;
        position: sticky !important;
        bottom: 0 !important;
        z-index: 50 !important;
        background: #ffffff !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
        flex-shrink: 0 !important;
    }

    .btn-detail-add-cart,
    .btn-app-action {
        height: 48px !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        border-radius: 12px !important;
    }
}

/* ==========================================================================
   AI COPILOT MODAL & CHAT WINDOW STYLES (ĐỒNG BỘ HOÀN TOÀN VỚI POS AI)
   ========================================================================== */
.modal-ai-card {
    max-width: 580px !important;
    width: 95% !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.25) !important;
}

.ai-prompts-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ai-prompts-bar::-webkit-scrollbar {
    display: none;
}

.btn-theme-ai-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-theme-ai-chip:hover {
    background: #ede9fe;
    border-color: #8b5cf6;
    color: #6d28d9;
    transform: translateY(-1px);
}

.theme-ai-chat-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    height: 290px;
    padding: 14px;
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 16px;
    word-break: break-word;
}

.bot-msg {
    background: #ede9fe;
    color: #312e81;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bot-msg strong {
    color: #1e1b4b;
}

.user-msg {
    background: var(--app-primary);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.25);
}

.ai-typing {
    color: #6b21a8;
    font-style: italic;
    background: #f5f3ff;
}

.theme-ai-input-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.theme-ai-input-row input {
    flex: 1;
    height: 42px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s;
    background: #ffffff;
}

.theme-ai-input-row input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.theme-ai-input-row button {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0 18px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s, transform 0.2s;
}

.theme-ai-input-row button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn-theme-ai-voice {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-theme-ai-voice:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    transform: scale(1.05);
}

.btn-theme-ai-voice.is-listening {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
    animation: voicePulse 1.2s infinite;
}

@keyframes voicePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
        transform: scale(1.08);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    .modal-ai-card {
        height: 85vh;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
    }
    .modal-ai-card .app-modal-body {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
    }
    .theme-ai-chat-box {
        flex: 1;
        height: auto;
    }
}

/* AI Suggested Dishes & Quick Order */
#modal-product-detail {
    z-index: 100000100 !important;
}

.ai-recommend-box {
    margin-top: 10px;
    background: #ffffff;
    border: 1.5px solid #e0e7ff;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.ai-rec-head {
    font-size: 11.5px;
    font-weight: 800;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-rec-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-rec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.ai-rec-item:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.ai-rec-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.ai-rec-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.ai-rec-thumb-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ai-rec-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ai-rec-name {
    font-size: 12.5px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.ai-rec-price {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--app-primary, #ea580c);
}

.btn-ai-quick-add {
    flex-shrink: 0;
    background: #ea580c;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.25);
    white-space: nowrap;
}

.btn-ai-quick-add:hover {
    background: #c2410c;
    transform: scale(1.03);
}

.btn-ai-quick-add.is-added {
    background: #10b981 !important;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.25) !important;
    pointer-events: none;
}

.btn-ai-add-combo {
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(124, 58, 237, 0.3);
    transition: opacity 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-ai-add-combo:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* ==================== 17. FLOATING HEADER & BACK TO TOP ==================== */
.app-header.is-floating {
    position: fixed !important;
    top: 10px !important;
    left: 12px !important;
    right: 12px !important;
    max-width: 1240px !important;
    margin: 0 auto !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    z-index: 10000 !important;
    animation: floatingHeaderIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes floatingHeaderIn {
    from {
        transform: translateY(-20px);
        opacity: 0.85;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.app-header.is-floating .app-header-container {
    padding: 6px 16px;
}

.app-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.app-back-to-top:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.48);
}

@media (max-width: 768px) {
    .app-back-to-top {
        right: 16px;
        bottom: 84px;
        width: 42px;
        height: 42px;
    }
}

/* ==================== 18. CUSTOMER AUTH & USER DROPDOWN ==================== */
.header-user-dropdown-wrap {
    position: relative;
}

.header-user-btn,
.btn-user-trigger,
.btn-login-trigger,
.btn-mobile-quick-auth {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    color: #1e293b;
}

.header-user-btn:hover,
.btn-user-trigger:hover,
.btn-login-trigger:hover,
.btn-mobile-quick-auth:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.user-dropdown-menu,
.header-user-menu,
#header-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    min-width: 220px;
    padding: 8px 0;
    z-index: 100001;
}

.user-menu-head {
    padding: 10px 16px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.u-name {
    font-weight: 800;
    font-size: 14px;
    color: #0f172a;
}

.u-badge {
    font-size: 11.5px;
    color: #ea580c;
    font-weight: 600;
    margin-top: 2px;
}

.user-menu-links {
    padding: 6px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.user-menu-item:hover {
    background: #f8fafc;
    color: var(--app-primary);
}

.user-menu-item.text-danger {
    color: #dc2626;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}

/* Modal Auth Box */
.modal-auth-box {
    max-width: 440px;
    padding: 24px;
    position: relative;
    border-radius: 18px;
}

.modal-auth-box .btn-close-auth {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.auth-box-header {
    text-align: center;
    margin-bottom: 18px;
}

.auth-icon-badge {
    font-size: 34px;
    margin-bottom: 6px;
}

.auth-box-header h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
}

.auth-box-header p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

.auth-nav-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
    gap: 4px;
}

.auth-tab-btn {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.auth-field {
    margin-bottom: 14px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s;
}

.auth-field input:focus {
    border-color: var(--app-primary);
}

.btn-auth-submit {
    width: 100%;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.28);
    transition: all 0.2s;
}

.btn-auth-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.quick-login-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
}

.quick-login-card p {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 12px 0;
    line-height: 1.45;
}

.auth-alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.auth-alert.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-alert.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* ==================== 19. AI RECOMMENDATION SECTION ==================== */
.section-ai-recommendations {
    background: linear-gradient(135deg, #fbfbfe 0%, #f5f3ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: var(--app-radius, 14px);
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.08);
}

.sec-head-ai-smart {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-head-titles {
    flex: 1;
    min-width: 250px;
}

.ai-badge-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #6366f1;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ai-badge-time {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 6px;
}

.sec-head-ai-smart h2 {
    font-size: 20px;
    font-weight: 900;
    color: #1e1b4b;
    margin: 4px 0;
}

.ai-sec-desc {
    font-size: 12.5px;
    color: #6366f1;
    margin: 0;
}

.btn-ai-refresh-picks {
    background: #ffffff;
    border: 1px solid #c7d2fe;
    color: #4f46e5;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.08);
}

.btn-ai-refresh-picks:hover {
    background: #e0e7ff;
    transform: rotate(-15deg);
}

.ai-rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.card-ai-pick {
    background: #ffffff;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-ai-pick:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.16);
    border-color: #a5b4fc;
}

.card-ai-img-wrap {
    height: 140px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.card-ai-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-ai-pick:hover .card-ai-img-wrap img {
    transform: scale(1.06);
}

.ai-rec-ribbon {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.card-ai-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-ai-name {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.35;
}

.card-ai-reason {
    font-size: 11.5px;
    color: #6366f1;
    font-weight: 600;
    margin: 0 0 10px 0;
    flex: 1;
}

.card-ai-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #f1f5f9;
    padding-top: 8px;
    margin-top: auto;
}

.card-ai-price {
    font-size: 14.5px;
    font-weight: 900;
    color: #ea580c;
}

.btn-ai-card-add {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #6d28d9;
    border: 1.5px solid #ddd6fe;
    border-radius: 18px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ai-card-add:hover {
    background: #6d28d9;
    color: #ffffff;
    border-color: #6d28d9;
    box-shadow: 0 3px 8px rgba(109, 40, 217, 0.3);
}

/* Fallback if desktop sidebar cart is hidden */
.app-container--no-sidebar .app-content-column {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 !important;
}

/* ==================== 20. FLYING CART ANIMATION & TOAST NOTIFICATION ==================== */
.fly-to-cart-item {
    position: fixed;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.45);
    z-index: 9999999 !important;
    pointer-events: none;
    transition: all 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background-color: #ffffff;
    border: 2px solid #ea580c;
}

@keyframes cartBadgeBounce {
    0% { transform: scale(1); }
    35% { transform: scale(1.65); background: #f97316; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.badge-bounce {
    animation: cartBadgeBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Modern Floating Toast Notification */
.app-toast-alert {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    z-index: 9999999;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90vw;
    white-space: nowrap;
}

.app-toast-alert.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.app-toast-alert .toast-icon {
    font-size: 16px;
}

.app-toast-alert .btn-toast-view-cart {
    background: var(--app-primary, #ea580c);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    margin-left: 6px;
    transition: background 0.15s;
}

.app-toast-alert .btn-toast-view-cart:hover {
    background: #c2410c;
}




