/* ===== 现代化餐厅菜单系统 - 新布局设计 ===== */

/* 🚨 强制清除深蓝色边框的全局规则 */
*:focus,
*:focus-visible,
*:focus-within {
    outline: none !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

/* 特别针对可能影响模态框的元素 */
div, .modal, [class*="modal"], [id*="modal"] {
    border: none !important;
    outline: none !important;
}

/* ===== 现代化模态框样式系统 ===== */
/* 确保所有输入框焦点样式使用项目主色 */
input:focus,
select:focus,
textarea:focus,
.flatpickr-input:focus {
    border-color: #ff6b6b !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

/* 专门清除模态框overlay的深蓝色边框 */
.modern-modal-overlay,
#dynamic-modal-overlay {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    /* overlay不需要圆角，只有内部模态框需要 */
    background: rgba(0, 0, 0, 0.5) !important;
    /* 彻底清除所有可能的边框样式 */
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    box-sizing: border-box !important;
    /* 清除webkit样式 */
    /* 清除focus相关样式 */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    /* 强制背景颜色覆盖 */
    background-color: rgba(0, 0, 0, 0.5) !important;
    background-image: none !important;
}

.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* 重新为模态框本身添加合适的样式 */
.modern-modal {
    background: white;
    border-radius: 20px !important;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    max-width: 440px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none !important;
    outline: none !important;
}

.modern-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modern-modal-overlay.closing {
    opacity: 0;
    visibility: hidden;
}

.modern-modal.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modern-modal.closing {
    transform: scale(0.9) translateY(30px);
    opacity: 0;
}

.modern-modal .modal-content {
    padding: 32px;
    text-align: center;
    position: relative;
    border: none !important;
    outline: none !important;
}

.modern-modal .modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
}

.modern-modal .modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: scale(1.1);
}

.modern-modal .modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.modern-modal .modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.modern-modal .modal-message {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modern-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.modern-modal .modal-action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.modern-modal .modal-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.modern-modal .modal-action-btn:active::before {
    width: 300px;
    height: 300px;
}

.modern-modal .modal-action-btn.primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.modern-modal .modal-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.modern-modal .modal-action-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.modern-modal .modal-action-btn.secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.modern-modal .modal-action-btn.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.modern-modal .modal-action-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* 不同类型的模态框样式 */
.modern-modal.success .modal-icon {
    color: #10b981;
}

.modern-modal.error .modal-icon {
    color: #ef4444;
}

.modern-modal.warning .modal-icon {
    color: #f59e0b;
}

.modern-modal.info .modal-icon {
    color: #ff6b6b;
}

.modern-modal.question .modal-icon {
    color: #8b5cf6;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .modern-modal {
        width: 95%;
        margin: 16px;
        border-radius: 16px;
    }
    
    .modern-modal .modal-content {
        padding: 24px 20px;
    }
    
    .modern-modal .modal-title {
        font-size: 20px;
    }
    
    .modern-modal .modal-message {
        font-size: 15px;
    }
    
    .modern-modal .modal-actions {
        flex-direction: column;
    }
    
    .modern-modal .modal-action-btn {
        width: 100%;
        min-width: auto;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .modern-modal {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .modern-modal .modal-title {
        color: #f9fafb;
    }
    
    .modern-modal .modal-message {
        color: #d1d5db;
    }
    
    .modern-modal .modal-close-btn {
        background: rgba(255, 255, 255, 0.1);
        color: #d1d5db;
    }
    
    .modern-modal .modal-close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #f9fafb;
    }
    
    .modern-modal .modal-action-btn.secondary {
        background: #374151;
        color: #d1d5db;
        border-color: #4b5563;
    }
    
    .modern-modal .modal-action-btn.secondary:hover {
        background: #4b5563;
    }
}

/* ===== 深蓝色边框重置样式 ===== */
/* 去除所有可能的深蓝色边框和轮廓 */
*:focus {
    outline: none !important;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none !important;
    border-color: #ff6b6b !important;
}

/* 去除浏览器默认的蓝色焦点轮廓 */
*:focus-visible {
    outline: none !important;
}

/* 去除可能的深蓝色边框 */
.modal,
.modal-content,
.modal-overlay,
.modern-modal,
.modern-modal-overlay,
.modern-modal .modal-content,
.modern-modal .modal-icon,
.modern-modal .modal-title,
.modern-modal .modal-message,
.modern-modal .modal-actions,
#datetime-picker,
#pickup-date,
#pickup-time,
#cart-popup {
    outline: none !important;
    border: none !important;
}

/* 特别针对模态框的边框重置 */
#dynamic-modal,
#dynamic-modal-overlay,
#dynamic-modal *,
#dynamic-modal-overlay * {
    outline: none !important;
    border: initial !important;
}

#dynamic-modal-overlay {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

#dynamic-modal {
    border: none !important;
    outline: none !important;
}

/* 重置任何可能的深蓝色边框 */
[style*="border"]:focus {
    outline: none !important;
}

/* ===== 日期时间选择器增强样式 ===== */
.flatpickr-calendar {
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    background: white !important;
    outline: none !important;
}

/* 去除flatpickr可能的深蓝色边框 */
.flatpickr-input {
    outline: none !important;
    border: 2px solid #e2e8f0 !important;
}

.flatpickr-input:focus {
    outline: none !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

.flatpickr-wrapper {
    outline: none !important;
}

.flatpickr-day {
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
}

.flatpickr-day:hover {
    background: #f0f9ff !important;
    border-color: #ff6b6b !important;
    color: #ff6b6b !important;
    transform: scale(1.05) !important;
}

.flatpickr-day.selected {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    border-color: #ff6b6b !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3) !important;
}

.flatpickr-day.today {
    border-color: #10b981 !important;
    color: #10b981 !important;
    font-weight: 600 !important;
}

.flatpickr-day.disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    position: relative !important;
}

.flatpickr-day.disabled::before {
    content: '✕' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 10px !important;
    color: #ef4444 !important;
    font-weight: bold !important;
}

.flatpickr-day.disabled:hover {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    transform: none !important;
}

.flatpickr-months .flatpickr-month {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    color: white !important;
    border-radius: 12px 12px 0 0 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent !important;
    color: white !important;
}

.flatpickr-current-month input.cur-year {
    background: transparent !important;
    color: white !important;
    font-weight: 600 !important;
}

.flatpickr-weekday {
    background: #f8fafc !important;
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 11px !important;
}

.numInputWrapper:hover .arrowUp,
.numInputWrapper:hover .arrowDown {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* 时间选择器样式 */
#pickup-time {
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    background: white !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}

#pickup-time:focus {
    outline: none !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

#pickup-time option:disabled {
    color: #94a3b8 !important;
    background: #f1f5f9 !important;
}

/* 日期输入框样式 */
#pickup-date {
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    background: white !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    cursor: pointer !important;
}

#pickup-date:focus {
    outline: none !important;
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

/* 日期时间选择器容器 */
#datetime-picker {
    background: #f8fafc !important;
    padding: 20px !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    margin-top: 16px !important;
    outline: none !important;
}

#datetime-picker label {
    display: block !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
    margin-top: 16px !important;
    font-size: 14px !important;
}

#datetime-picker label:first-child {
    margin-top: 0 !important;
}

/* 特殊状态指示器 */
.special-hours-indicator {
    display: inline-block;
    padding: 4px 8px;
    background: #fef3c7;
    color: #d97706;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.special-hours-indicator.closed {
    background: #fee2e2;
    color: #dc2626;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .flatpickr-calendar {
        max-width: 280px !important;
    }
    
    #datetime-picker {
        padding: 16px !important;
    }
    
    #pickup-time,
    #pickup-date {
        padding: 10px 14px !important;
        font-size: 15px !important;
    }
}

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #191919;
    line-height: 1.6;
    /* overflow-x: hidden; 移除这行，可能影响sticky定位 */
    height: auto;
    min-height: 100vh;
    /* 确保sticky定位正常工作 */
    position: relative;
}

/* 特殊时间选择模态框样式 */
.special-time-modal {
    max-width: 480px;
    width: 90%;
}

.special-time-modal .modal-header {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.special-time-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.special-time-modal .modal-body {
    padding: 24px;
    text-align: center;
}

.warning-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.special-message {
    font-size: 16px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 8px;
}

.special-reason {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    font-style: italic;
}

.pickup-time-message {
    font-size: 15px;
    color: #374151;
    margin-bottom: 20px;
}

.time-selector {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.time-selector label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.time-selector input[type="time"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.time-selector input[type="time"]:focus {
    border-color: #ff6b6b;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.special-time-modal .modal-actions {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}

.special-time-modal .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.special-time-modal .btn-primary {
    background: #ff6b6b;
    color: white;
}

.special-time-modal .btn-primary:hover {
    background: #ee5a24;
}

.special-time-modal .btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.special-time-modal .btn-secondary:hover {
    background: #d1d5db;
}

/* 模态框覆盖层基础样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===== 1. 顶部固定栏：LOGO + 购物车 ===== */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

#restaurant-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

#logo-image {
    width: 230;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

/* #logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #191919;
} */

/* 顶部栏的购物车图标 */
#top-bar #cart-icon-container {
    position: relative;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

#top-bar #cart-icon-container:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

#top-bar #cart-icon img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

#top-bar #cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: #ff6b6b;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    padding: 2px 6px;
    min-width: 20px;
    text-align: center;
    border: 2px solid #ff6b6b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===== 2. 主页图片 ===== */
#hero-image {
    position: relative;
    width: 100%;
    height: 250px;
    margin-top: 72px; /* 为顶部栏留出空间 */
    overflow: hidden;
}

#hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;      
    transition: transform 0.3s ease;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
    pointer-events: none; /* 允许点击穿透到下层元素 */
}

.hero-overlay > * {
    pointer-events: auto; /* 恢复子元素的点击事件 */
}

/* 语言选择器在hero图片上 */
#language-selector {
    z-index: 100;
    position: relative; /* 确保定位上下文 */
}

#language-button {
    background: rgba(255, 255, 255, 0.5);
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    color: #191919;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(7px);
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative; /* 确保定位上下文 */
    z-index: 101;
    pointer-events: auto; /* 确保可点击 */
}

#language-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

#language-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: white;
    color: #191919;
    border: none;
    border-radius: 12px;
    list-style: none;
    padding: 8px 0;
    width: 120px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1300; /* 提高z-index确保在所有元素之上 */
    pointer-events: auto; /* 确保可点击 */
}

#language-menu li {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
    pointer-events: auto; /* 确保可点击 */
}

#language-menu li:hover {
    background-color: #f8f9fa;
}

.hidden {
    display: none;
}

/* ===== 3. 餐厅信息 ===== */
#restaurant-info {
    background: white;
    padding: 30px 20px 20px 5px; /* 减少底部padding */
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 0; /* 确保没有底部margin */
}

#restaurant-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #191919;
    letter-spacing: -0.5px;
}

.restaurant-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

#restaurant-phone, #restaurant-address {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
}

#restaurant-phone a, #restaurant-address a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

#restaurant-phone a:hover, #restaurant-address a:hover {
    color: #ff6b6b;
}

.icon {
    font-size: 18px;
}

#business-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 0; /* 确保没有底部margin */
}

#hours-button {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(238, 90, 36, 0.1) 100%);
    border: 2px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.15);
}

#hours-button:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(238, 90, 36, 0.2) 100%);
    border-color: rgba(255, 107, 107, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.25);
}

#status-el {
    font-size: 16px;
    font-weight: 600;
    color: #00d084;
    background: rgba(0, 208, 132, 0.1);
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid rgba(0, 208, 132, 0.3);
}

#status-el.closed {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

/* ===== 4. 菜品导航栏（现代粘性设计） ===== */

/* 导航栏容器 - 现代化粘性设计 */
#menu-navigation-sticky {
    position: -webkit-sticky; /* Safari 兼容性 */
    position: sticky;
    top: 72px;
    z-index: 999;
    
    /* 现代化背景设计 */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 250, 0.98) 50%, 
        rgba(255, 255, 255, 0.95) 100%);
    
    /* 毛玻璃效果 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* 精美边框和阴影 */
    border-bottom: 1px solid rgba(255, 107, 107, 0.1);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    
    /* 基本布局 */
    display: flex;
    padding: 16px 24px;
    overflow-x: auto;
    white-space: nowrap;
    
    /* 基本尺寸 */
    width: 100%;
    min-height: 64px;
    
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    
    /* 丝滑过渡效果 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-navigation-sticky::-webkit-scrollbar {
    display: none;
}

/* 滚动时的增强效果 */
#menu-navigation-sticky.scrolled {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 249, 250, 1) 50%, 
        rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 107, 107, 0.15);
}

/* 导航按钮样式 - 现代化设计 */
.menu-nav-button {
    flex-shrink: 0;
    padding: 12px 24px;
    margin: 0 8px;
    
    /* 现代化背景设计 */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(248, 249, 250, 0.9) 100%);
    
    /* 精美边框 */
    border: 1px solid rgba(255, 107, 107, 0.15);
    border-radius: 28px;
    
    /* 现代化字体 */
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    
    /* 微妙阴影 */
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    
    /* 流畅过渡 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    
    /* 防止文字选择 */
    user-select: none;
    -webkit-user-select: none;
    
    /* 现代化触摸优化 */
    -webkit-tap-highlight-color: transparent;
}

.menu-nav-button:first-child {
    margin-left: 0;
}

.menu-nav-button:last-child {
    margin-right: 0;
}

/* 悬停效果 - 精致动画 */
.menu-nav-button:hover:not(.active) {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 250, 1) 100%);
    border-color: rgba(255, 107, 107, 0.25);
    color: #343a40;
    
    /* 增强阴影 */
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    
    /* 微妙上升效果 */
    transform: translateY(-1px);
}

/* 活跃状态 - 品牌色渐变 */
.menu-nav-button.active {
    background: linear-gradient(135deg, 
        #ff6b6b 0%, 
        #ee5a24 50%, 
        #ff6b6b 100%);
    color: white;
    border-color: #ff6b6b;
    
    /* 活跃状态阴影 */
    box-shadow: 
        0 6px 20px rgba(255, 107, 107, 0.3),
        0 3px 10px rgba(255, 107, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* 活跃状态上升 */
    transform: translateY(-2px);
}

/* 活跃状态悬停 */
.menu-nav-button.active:hover {
    background: linear-gradient(135deg, 
        #ee5a24 0%, 
        #d63031 50%, 
        #ee5a24 100%);
    
    /* 增强活跃阴影 */
    box-shadow: 
        0 8px 25px rgba(255, 107, 107, 0.4),
        0 4px 12px rgba(255, 107, 107, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    
    transform: translateY(-3px);
}

/* 点击效果 - 微妙反馈 */
.menu-nav-button:active {
    transform: translateY(0);
    transition-duration: 0.1s;
    
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.06);
}

.menu-nav-button.active:active {
    transform: translateY(-1px);
    transition-duration: 0.1s;
}

/* 移动端优化 - 简化版 */
@media screen and (max-width: 768px) {
    #menu-navigation-sticky {
        top: 60px; /* 移动端顶部栏高度 */
        padding: 14px 20px;
        min-height: 60px;
        
        /* 移动端优化的背景 */
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.96) 0%, 
            rgba(248, 249, 250, 0.99) 50%, 
            rgba(255, 255, 255, 0.96) 100%);
        
        /* 移动端增强的毛玻璃效果 */
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
    
    .menu-nav-button {
        padding: 10px 20px;
        font-size: 14px;
        margin: 0 6px;
        border-radius: 24px;
        
        /* 移动端优化的阴影 */
        box-shadow: 
            0 2px 6px rgba(0, 0, 0, 0.08),
            0 1px 2px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }
    
    .menu-nav-button:hover:not(.active) {
        /* 移动端减少悬停效果 */
        transform: translateY(-0.5px);
        
        box-shadow: 
            0 3px 12px rgba(0, 0, 0, 0.1),
            0 1px 4px rgba(0, 0, 0, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }
    
    .menu-nav-button.active {
        /* 移动端活跃状态优化 */
        transform: translateY(-1px);
        
        box-shadow: 
            0 4px 16px rgba(255, 107, 107, 0.25),
            0 2px 8px rgba(255, 107, 107, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    
    .menu-nav-button.active:hover {
        transform: translateY(-1.5px);
        
        box-shadow: 
            0 6px 20px rgba(255, 107, 107, 0.3),
            0 3px 10px rgba(255, 107, 107, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* 超小屏幕优化 - 简化版 */
@media screen and (max-width: 480px) {
    #menu-navigation-sticky {
        padding: 12px 16px;
        min-height: 56px;
    }
    
    .menu-nav-button {
        padding: 8px 16px;
        font-size: 13px;
        margin: 0 4px;
        border-radius: 20px;
        
        /* 超小屏幕的简化阴影 */
        box-shadow: 
            0 1px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
    
    .menu-nav-button:hover:not(.active),
    .menu-nav-button.active {
        /* 超小屏幕减少动画效果 */
        transform: none;
    }
    
    .menu-nav-button.active {
        box-shadow: 
            0 2px 8px rgba(255, 107, 107, 0.2),
            0 1px 4px rgba(255, 107, 107, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

/* ===== 5. 菜单内容区域 ===== */
#menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* 移除可能干扰sticky定位的padding-top */
    margin-top: 20px;
}

.menu-category-section {
    padding: 30px 0;
    margin-bottom: 20px;
}

.category-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #191919;
    letter-spacing: -0.5px;
}

.category-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* ===== 现代化菜品卡片 ===== */
.menu-items-grid {
    display: grid;
    gap: 20px;
}

.menu-item {
    display: flex;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 140px; /* 确保所有菜品卡片高度统一 */
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.menu-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0; /* 防止图片被压缩 */
}

.menu-thumbnail:hover {
    transform: scale(1.05);
}

/* 当图片为空时隐藏缩略图容器 */
.menu-thumbnail[src=""], 
.menu-thumbnail[src="#"], 
.menu-thumbnail:not([src]) {
    display: none;
}

.menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px; /* 确保内容区域最小高度 */
}

/* 当没有图片时，调整内容区域的左边距 */
.menu-item:has(.menu-thumbnail[src=""]) .menu-content,
.menu-item:has(.menu-thumbnail[src="#"]) .menu-content,
.menu-item:has(.menu-thumbnail:not([src])) .menu-content {
    margin-left: 0;
}

/* 如果浏览器不支持:has()选择器，使用JavaScript类名 */
.menu-item.no-image .menu-content {
    margin-left: 0;
}

.menu-item:not(.no-image) .menu-content {
    margin-left: 20px;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.menu-name {
    font-size: 18px;
    font-weight: 600;
    color: #191919;
    line-height: 1.3;
    flex: 1;
    margin-right: 15px;
}

.menu-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff6b6b;
    white-space: nowrap;
}

.menu-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 8px 0 12px 0;
    /* 移除固定高度和行数限制，让描述完整显示 */
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap; /* 保留换行符 */
}

/* 当描述为空时的处理 - 不再需要，因为空描述不会创建元素 */
/* .menu-description:empty 样式已删除 */

/* 移除渐变遮罩效果，因为现在显示完整内容 */
/* .menu-description.text-overflow::after 样式已删除 */

/* ===== 现代化按钮设计 ===== */
.menu-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.menu-actions button {
    width: 36px;
    height: 36px;
    border: 2px solid #ff6b6b;
    border-radius: 50%;
    background: white;
    color: #ff6b6b;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu-actions button:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.menu-actions .quantity {
    font-size: 16px;
    font-weight: 600;
    color: #191919;
    min-width: 24px;
    text-align: center;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid #e9ecef;
}

/* ===== 配料相关样式 ===== */
.ingredient-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.ingredient-btn:hover {
    background-color: #dcdcdc;
}

.ingredient-btn i {
    font-size: 16px;
    color: #333;
}

/* ===== 模态框和弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    margin: 10% auto;
    padding: 30px;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: none;
    color: #191919;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

/* ===== Business Hours 模态窗口样式 ===== */
#hours-modal .modal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #191919;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

#hours-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#hours-list li {
    padding: 8px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
}

#hours-list li[style*="font-weight: bold"] {
    color: #191919;
    font-weight: 600;
    font-size: 17px;
    margin-top: 12px;
    margin-bottom: 4px;
    padding-left: 0;
}

#hours-list li[style*="margin-left: 20px"] {
    color: #666;
    font-size: 15px;
    padding-left: 20px;
    position: relative;
}

#hours-list li[style*="margin-left: 20px"]:before {
    content: "•";
    color: #ff6b6b;
    font-weight: bold;
    position: absolute;
    left: 8px;
}

/* ===== 购物车弹窗 ===== */
.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

#cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#cart-popup-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
    background: white;
    margin: 20px;
}

#all-cart-controls {
    flex-shrink: 0;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #fff;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#cart-title {
    margin-bottom: 10px;
}

#cart-items-list {
    flex: 1;
    margin-bottom: 10px;
    padding: 12px 10px;
    background: #f8f9fa;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* 自定义滚动条 */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 107, 0.3) transparent;
}

#cart-items-list::-webkit-scrollbar {
    width: 4px;
}

#cart-items-list::-webkit-scrollbar-track {
    background: transparent;
}

#cart-items-list::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 107, 0.3);
    border-radius: 2px;
}

#cart-items-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 107, 0.5);
}

/* 购物车项目紧凑卡片设计 */
.cart-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.cart-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 107, 107, 0.2);
}

.cart-item:last-child {
    margin-bottom: 0;
}

/* 购物车项目头部紧凑布局 */
.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    gap: 8px;
}

/* 紧凑数量控制器 */
.cart-item-quantity-control {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 16px;
    padding: 2px;
    gap: 4px;
    min-width: 80px;
}

.cart-item-quantity-control button {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cart-item-quantity-control button:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #d63031 100%);
    transform: scale(1.05);
}

.cart-item-quantity {
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #191919;
}

/* 商品名称紧凑布局 */
.cart-item-name {
    flex: 1;
    margin: 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #191919;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

/* 价格显示紧凑版 */
.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

/* 商品详情紧凑布局 */
.cart-item-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.cart-item-details .ingredientList-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.cart-item-details .ingredientList-icon:hover {
    opacity: 1;
}

.cart-item-details .ingredients-text {
    flex: 1;
    line-height: 1.3;
}

/* 配料信息紧凑样式 */
.cart-item-ingredients {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 4px;
}

.cart-item-ingredients p {
    margin: 2px 0;
    font-size: 12px;
    color: #495057;
    line-height: 1.3;
}

.cart-item-ingredients p:last-child {
    margin-bottom: 0;
}

/* 备注紧凑样式 */
.cart-item-note {
    font-size: 13px;
    color: #666;
    margin: 4px 0 0 0;
    font-style: italic;
    background: rgba(255, 193, 7, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    border-left: 2px solid #ffc107;
}

/* 图标紧凑样式 */
.note-icon, .ingredientList-icon {
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.note-icon:hover, .ingredientList-icon:hover {
    opacity: 1;
}

/* 空购物车状态紧凑版 */
#cart-items-list:empty::after {
    content: "购物车是空的";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    font-size: 16px;
    color: #999;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(255, 107, 107, 0.2);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    #top-bar {
        padding: 10px 15px;
    }
    
    #hero-image {
        height: 200px;
        margin-top: 60px;
    }
    
    #restaurant-name {
        font-size: 26px;
    }
    
    .restaurant-details {
        flex-direction: column;
        gap: 10px;
    }
    
    #menu-navigation-sticky {
        top: 60px;
        padding: 12px 15px;
    }
    
    .menu-nav-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .menu-category-section {
        padding: 20px 0;
    }
    
    .category-title {
        font-size: 24px;
    }
    
    .menu-item {
        padding: 15px;
    }
    
    .menu-thumbnail {
        width: 80px;
        height: 80px;
    }
    
    .menu-content {
        margin-left: 15px;
    }
    
    .menu-name {
        font-size: 16px;
    }
    
    .menu-price {
        font-size: 16px;
    }
    
    .cart-item {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .cart-item-header {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .cart-item-name {
        font-size: 14px;
        margin: 0 6px;
    }
    
    .cart-item-price {
        font-size: 14px;
        padding: 3px 6px;
    }
    
    .cart-item-quantity-control button {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }
    
    .cart-item-quantity {
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .restaurant-details {
        align-items: stretch;
        text-align: left;
    }
    
    #restaurant-phone, #restaurant-address {
        justify-content: center;
    }
    
    #business-status {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .menu-item {
        flex-direction: column;
        text-align: center;
    }
    
    .menu-thumbnail {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }
    
    .menu-content {
        margin-left: 0;
    }
    
    .menu-header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .menu-name {
        margin-right: 0;
        text-align: center;
    }
    
    .menu-actions {
        justify-content: center;
        margin-top: 15px;
    }
    
    #cart-items-list {
        padding: 8px 6px;
    }
    
    .cart-item {
        padding: 8px;
    }
    
    .cart-item-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .cart-item-name {
        order: 1;
        flex-basis: 100%;
        margin: 0 0 4px 0;
        font-size: 14px;
    }
    
    .cart-item-quantity-control {
        order: 2;
        min-width: 70px;
    }
    
    .cart-item-price {
        order: 3;
        margin-left: auto;
    }
}

/* ===== 购物车控件 ===== */
.pickup-time-toggle {
    display: flex;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    margin: 5px 0;
}

.toggle-button {
    flex: 1;
    padding: 12px 0;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    border: none;
    background-color: #f9f9f9;
    transition: background-color 0.3s, color 0.3s;
}

.toggle-button:not(:last-child) {
    border-right: 1px solid #ccc;
}

.toggle-button.selected {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.cart-controls {
    display: flex;
    flex-direction: column;
    margin: 10px;
    gap: 10px;
}

.cart-control-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.cart-control-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
    flex: 1 1 100%;
}

.cart-control-item label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.cart-control-item input,
.cart-control-item textarea {
    padding: 8px;
    font-size: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
}

.cart-control-item textarea {
    resize: vertical;
    min-height: 20px;
}

.cart-control-item.full-row {
    flex-direction: row;
    align-items: center;
}

.cart-control-item.full-row textarea {
    flex: 1;
    margin-left: 10px;
}

.cart-control-item small.error-message {
    color: red;
    font-size: 12px;
    margin-top: 5px;
}

/* ===== 小费选择 ===== */
.tip-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tip-button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: background-color 0.3s, border-color 0.3s;
}

.tip-button.selected {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* ===== 日期时间选择器 ===== */
#datetime-picker {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: auto;
}

#datetime-picker input[type="date"],
#datetime-picker input[type="time"],
#datetime-picker input[type="text"],
#datetime-picker select {
    padding: 14px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 100%;
    box-sizing: border-box;
    height: 50px; /* 确保所有控件高度一致 */
    appearance: none; /* 移除默认样式 */
    -webkit-appearance: none;
    -moz-appearance: none;
}

#datetime-picker input[type="date"]:focus,
#datetime-picker input[type="time"]:focus,
#datetime-picker input[type="text"]:focus,
#datetime-picker select:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

#datetime-picker label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 0;
}

/* ===== 自定义小费弹窗 ===== */
.customTipPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 24px;
    width: 320px;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.customTipPopup-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.customTipPopup-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.customTipPopup-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.customTipPopup-actions button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #4caf50, #81c784);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.customTipPopup-actions button:hover {
    background: linear-gradient(135deg, #388e3c, #66bb6a);
}

.customTipPopup-actions button:active {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
}

#custom-tip-input {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* ===== 备注弹窗 ===== */
#note-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1200;
}

#note-popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#note-popup textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#note-popup button {
    margin: 5px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#cancel-note-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

#save-note-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

#cancel-note-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

#save-note-btn:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #d63031 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ===== 图片弹窗 ===== */
#image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    overflow: hidden;
}

#image-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    overflow: hidden;
}

#popup-image {
    max-width: 50%;
    max-height: 50%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

#close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: red;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
}

/* ===== 配料弹窗 ===== */
#ingredient-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1200;
}

#ingredient-popup-content {
    background: white;
    border-radius: 10px;
    width: 100%;
    height: 100%;
    max-width: 100%;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.ingredient-type-selector {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 20px 15px;
    border-bottom: 2px solid rgba(255, 107, 107, 0.1);
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ingredient-type-selector::-webkit-scrollbar {
    height: 4px;
}

.ingredient-type-selector::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.ingredient-type-selector::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 107, 0.3);
    border-radius: 2px;
}

.ingredient-type-selector::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 107, 0.5);
}

.ingredient-type-selector button {
    flex-shrink: 0;
    padding: 12px 24px;
    border: 2px solid rgba(255, 107, 107, 0.2);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.ingredient-type-selector button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.ingredient-type-selector button:hover::before {
    left: 100%;
}

.ingredient-type-selector button:hover {
    border-color: rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.ingredient-type-selector button.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.ingredient-type-selector button.active:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #d63031 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
}

.ingredient-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.ingredient-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.05), transparent);
    transition: left 0.5s;
}

.ingredient-item:hover::before {
    left: 100%;
}

.ingredient-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 107, 107, 0.2);
}

.ingredient-item.selected {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(238, 90, 36, 0.05) 100%);
    border-color: rgba(255, 107, 107, 0.3);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.15);
}

.ingredient-thumbnail-container {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.ingredient-thumbnail-container:hover {
    transform: scale(1.05);
}

.ingredient-thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ingredient-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.ingredient-details h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #191919;
    line-height: 1.3;
}

.ingredient-details p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #ff6b6b;
}

.ingredient-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 8px;
}

.ingredient-counter {
    display: flex;
    align-items: center;
    border: 2px solid rgba(255, 107, 107, 0.2);
    border-radius: 25px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.1);
    transition: all 0.3s ease;
}

.ingredient-counter:hover {
    border-color: rgba(255, 107, 107, 0.4);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
}

.ingredient-counter .ingredient-btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    margin: 4px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.ingredient-counter .ingredient-btn:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #d63031 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.ingredient-counter .ingredient-btn:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ingredient-counter .ingredient-quantity {
    min-width: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #191919;
    padding: 0 8px;
}

/* 单选按钮样式 */
.ingredient-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #888;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    cursor: pointer;
    background-color: white;
}

.ingredient-radio.selected::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: #060706;
    border-radius: 50%;
}

/* 复选框样式 */
.ingredient-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ingredient-checkbox.checked {
    border-color: #000;
}

.check-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* 配料弹窗按钮 */
.popup-button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px;
    background-color: white;
    border-top: 1px solid #ddd;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.confirm-ingredient-btn,
.cancel-ingredient-btn {
    padding: 10px 50px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}

.confirm-ingredient-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.confirm-ingredient-btn:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #d63031 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.confirm-ingredient-btn:disabled,
.confirm-ingredient-btn.disabled {
    background-color: #999;
    color: #ddd;
    cursor: not-allowed;
    opacity: 0.7;
}

.cancel-ingredient-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.cancel-ingredient-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

/* 配料类型选择提示 */
.selection-type-info {
    background-color: #f8f8f8;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
}

.selection-type-info i {
    margin-right: 8px;
    color: #e53935;
    font-size: 18px;
}

.ingredient-subtitle {
    margin: 0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #f90707;
    text-align: center;
    font-style: normal;
}

/* ===== 支付弹窗居中修复 ===== */
.payment-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1200;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px; /* 添加内边距确保在小屏幕上不贴边 */
    box-sizing: border-box;
}

.payment-popup.hidden {
    display: none;
}

.payment-popup-content {
    position: relative;
    background: white;
    padding: 32px;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: paymentSlideIn 0.3s ease-out;
    /* 确保完全居中 */
    margin: 0 auto;
    transform: none; /* 移除可能的变换 */
}

@keyframes paymentSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 关闭按钮 */
.close-payment-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-payment-btn:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    transform: scale(1.1);
}

/* 支付弹窗头部 */
.payment-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.payment-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #191919;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.payment-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* 支付方式容器 */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.payment-method-section {
    position: relative;
    margin-bottom: 0;
    /* 确保容器不限制内容显示 */
    overflow: visible;
    min-height: 56px;
}

/* ===== 统一支付按钮样式 ===== */
.payment-method-btn {
    width: 100%;
    height: 56px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible; /* 改为visible，避免裁剪 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
}

.payment-method-btn:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.payment-method-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ===== Apple Pay 黑色主题样式 ===== */
#apple-pay-button {
    width: 100% !important;
    height: 56px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    /* Apple Pay 黑色主题设置 - 无文字版本 */
    -webkit-appearance: -apple-pay-button !important;
    appearance: -apple-pay-button !important;
    -apple-pay-button-style: black !important;
    -apple-pay-button-type: plain !important; /* 使用plain移除文字 */
    /* 确保样式不被覆盖 */
    overflow: visible !important;
    position: relative !important;
    transform: none !important;
    transition: all 0.2s ease !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

#apple-pay-button:hover {
    border-color: rgba(0, 0, 0, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

#apple-pay-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Apple Pay SDK渲染的按钮内容 - 黑色主题无文字 */
#apple-pay-button *,
#apple-pay-button > *,
#apple-pay-button > div,
#apple-pay-button > button {
    width: 100% !important;
    height: 56px !important;
    border-radius: 8px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    box-shadow: none !important;
    /* 确保Apple Pay按钮显示为黑色主题无文字版本 */
    -webkit-appearance: -apple-pay-button !important;
    appearance: -apple-pay-button !important;
    -apple-pay-button-style: black !important;
    -apple-pay-button-type: plain !important; /* 移除文字 */
}

/* ===== Google Pay 黑色主题样式 ===== */
#google-pay-button {
    width: 100% !important;
    height: 56px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    overflow: visible !important;
    position: relative !important;
    /* 让JavaScript控制背景和颜色 */
    background: #000 !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#google-pay-button:hover {
    border-color: rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
    /* hover时稍微亮一点的黑色 */
    background: #222 !important;
}

#google-pay-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    /* 点击时回到原始黑色 */
    background: #000 !important;
}

/* 移除所有复杂的Google Pay SDK样式覆盖 */
/* 让JavaScript完全控制Google Pay按钮内容 */

/* ===== 移除旧的样式类 ===== */
.apple-pay,
.google-pay {
    /* 移除所有自定义样式，让SDK完全控制 */
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
}

.apple-pay:hover,
.apple-pay:focus,
.apple-pay:active,
.google-pay:hover,
.google-pay:focus,
.google-pay:active {
    background: none !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== 信用卡支付样式保持一致 ===== */
.card-pay {
    background: transparent;
    color: #333;
    border-color: rgba(0, 0, 0, 0.12);
    height: 56px;
}

.card-pay:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== 隐藏旧元素 ===== */
#category-bar {
    display: none !important;
}

.menu-navigation {
    display: none !important;
}

/* ===== 滚动条现代化 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ===== 食材类型内容区域 ===== */
.ingredient-type-content {
    flex: 1;
    padding: 20px 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.ingredient-type-section {
    margin-bottom: 30px;
}

.ingredient-type-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: #191919;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 107, 107, 0.2);
}

/* ===== 选中项目信息 ===== */
.selected-item-info {
    padding: 20px 15px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.selected-item-info h2 {
    font-size: 18px;
    font-weight: 600;
    color: #191919;
    margin: 0;
    text-align: center;
}

/* ===== 购物车摘要现代化设计 ===== */
#cart-summary {
    padding: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 购物车按钮现代化设计 */
.cart-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

#close-cart-popup,
#checkout-button {
    flex: 1;
    max-width: 150px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

#close-cart-popup:hover,
#checkout-button:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #d63031 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

#close-cart-popup:active,
#checkout-button:active {
    transform: translateY(0);
}

/* 购物车摘要行紧凑版 */
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin: 8px 0;
    font-size: 15px;
}

.cart-summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 16px;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 10px 12px;
    border-radius: 8px;
    margin: 12px 0 0 0;
}

/* ===== 成功模态框样式 ===== */
/* 模态框覆盖层 */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

/* 成功模态框 */
#success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 模态框内容 */
#success-modal .modal-content {
    padding: 32px 24px;
    width: 100%;
}

/* 模态框标题 */
#success-modal .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #191919;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

/* 模态框正文 */
#success-modal .modal-body {
    font-size: 16px;
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* 模态框按钮 */
#modal-button {
    padding: 12px 32px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#modal-button:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

#modal-button:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    #success-modal {
        width: 95%;
        margin: 20px;
    }
    
    #success-modal .modal-content {
        padding: 24px 20px;
    }
    
    #success-modal .modal-title {
        font-size: 20px;
    }
    
    #success-modal .modal-body {
        font-size: 15px;
    }
}

/* 移动端优化：更敏感的滚动响应 */
@media (max-width: 768px) {
    #menu-navigation-sticky.fixed {
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #menu-navigation-sticky.fixed.nav-hidden {
        transform: translateY(-100%);
    }
} 

/* 移除所有主题变体，让 Square SDK 控制样式 */
.google-pay.black-theme,
.google-pay.white-theme {
    background: transparent;
    border-color: rgba(0, 0, 0, 0.1);
}

.google-pay.black-theme:hover,
.google-pay.white-theme:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Apple Pay 主题也简化 */
.apple-pay.white-theme,
.apple-pay.white-outline-theme {
    background: transparent;
    border-color: rgba(0, 0, 0, 0.1);
}

.apple-pay.white-theme:hover,
.apple-pay.white-outline-theme:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Square SDK 生成的按钮样式优化 */
.payment-method-btn > div,
.payment-method-btn > button {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 8px !important;
    border: none !important;
    margin: 0 !important;
}

/* Google Pay SDK 按钮特殊处理 */
#google-pay-button > div {
    width: 100% !important;
    height: 48px !important;
}

/* Apple Pay SDK 按钮特殊处理 */
#apple-pay-button {
    width: 100% !important;
    height: 56px !important;
    border: none !important;
    border-radius: 8px !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    /* 移除所有可能干扰Apple Pay SDK的样式 */
    -webkit-appearance: none !important;
    appearance: none !important;
    /* 确保Apple Pay按钮可以正常显示 */
    overflow: visible !important;
    position: relative !important;
    /* 移除任何可能的变换效果 */
    transform: none !important;
    transition: none !important;
    /* 确保按钮可以接收点击事件 */
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* 当Square SDK渲染Apple Pay按钮时，完全移除样式干扰 */
#apple-pay-button[data-apple-pay-button-rendered="true"],
#apple-pay-button.apple-pay-button-rendered {
    /* 让Square SDK完全控制已渲染的按钮 */
    all: unset !important;
    width: 100% !important;
    height: 56px !important;
    display: block !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
}

/* 移除对Apple Pay按钮内部元素的样式干扰 */
#apple-pay-button *,
#apple-pay-button > *,
#apple-pay-button > div,
#apple-pay-button > button {
    /* 完全移除所有样式覆盖，让Square SDK控制 */
    all: unset !important;
    width: 100% !important;
    height: 56px !important;
    display: block !important;
    border-radius: 8px !important;
    /* 确保Apple Pay按钮内容可见 */
    -webkit-appearance: -apple-pay-button !important;
    appearance: -apple-pay-button !important;
    /* 移除任何可能的样式干扰 */
    background: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

/* 移除之前的Apple Pay容器样式覆盖 */
.apple-pay {
    /* 移除所有自定义样式，让Square SDK完全控制 */
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
    /* 移除任何可能的变换效果 */
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
}

.apple-pay:hover,
.apple-pay:focus,
.apple-pay:active {
    /* 移除所有交互效果，让Apple Pay使用原生样式 */
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    background: none !important;
}

/* 移除所有主题变体 */
.apple-pay.white-theme,
.apple-pay.white-outline-theme,
.apple-pay.black-theme {
    background: none !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.apple-pay.white-theme:hover,
.apple-pay.white-outline-theme:hover,
.apple-pay.black-theme:hover {
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    background: none !important;
}

/* 当 SDK 按钮未加载时的备用样式 */
.payment-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    background: #fbf8f8;
    color: rgb(23, 23, 23);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
} 

/* ===== Square SDK 按钮精确控制 ===== */

/* 强制所有 Square SDK 生成的按钮元素统一尺寸 */
.payment-method-btn > *,
.payment-method-btn > div,
.payment-method-btn > button,
.payment-method-btn > iframe {
    width: 100% !important;
    height: 56px !important;
    border-radius: 8px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Google Pay 特殊处理 */
#google-pay-button,
#google-pay-button > *,
#google-pay-button > div {
    width: 100% !important;
    height: 56px !important;
    border-radius: 8px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Apple Pay 特殊处理 */
#apple-pay-button,
#apple-pay-button > *,
#apple-pay-button > div {
    width: 100% !important;
    height: 56px !important;
    border-radius: 8px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* 信用卡容器特殊处理 */
#card-container,
#card-container > *,
#card-container > div,
#card-container > iframe {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 8px !important;
    border: none !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    box-sizing: border-box !important;
}

/* 确保支付方式区域整齐排列 */
.payment-method-section {
    position: relative;
    margin-bottom: 0; /* 移除额外间距，使用按钮自身的margin-bottom */
}

/* 当 SDK 按钮未加载时的备用样式 */
.payment-method-btn:not(:has(> *)) .payment-btn-content,
.payment-method-btn:empty .payment-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 56px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* 移动端响应式优化 */
@media screen and (max-width: 480px) {
    .payment-method-btn {
        height: 52px; /* 移动端稍微减小高度 */
        margin-bottom: 10px;
    }
    
    .payment-method-btn > *,
    .payment-method-btn > div,
    .payment-method-btn > button,
    .payment-method-btn > iframe {
        height: 52px !important;
    }
    
    #google-pay-button,
    #google-pay-button > *,
    #google-pay-button > div,
    #apple-pay-button,
    #apple-pay-button > *,
    #apple-pay-button > div {
        height: 52px !important;
    }
    
    .payment-text {
        font-size: 15px;
    }
}

/* 隐藏不再需要的占位元素 */
.nav-placeholder {
    display: none !important;
}

/* ===== 支付按钮内容样式 ===== */
.payment-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding: 0 16px;
    background: #000;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.payment-logo {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1);
}

.payment-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ===== 信用卡输入容器 ===== */
.card-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-input-container {
    order: -1; /* 将输入框放在按钮上方 */
}

.card-input-field {
    min-height: 48px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.card-input-field:focus-within {
    border-color: rgba(0, 0, 0, 0.3);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* ===== 分割线样式 ===== */
.payment-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 8px 0;
    position: relative;
}

.payment-divider::before {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin-right: 16px;
}

.payment-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin-left: 16px;
}

.payment-divider span {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    background: white;
    padding: 0 8px;
}

/* ===== 安全提示 ===== */
.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px;
    background: rgba(0, 208, 132, 0.05);
    border: 1px solid rgba(0, 208, 132, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: #00a86b;
}

.security-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

/* ===== 🚨 终极深蓝色边框清除器 - 必须放在CSS文件最后 ===== */
/* 超高优先级样式覆盖，解决所有深蓝色边框问题 */

/* 清除所有模态框相关的深蓝色边框 */
.modern-modal-overlay,
#dynamic-modal-overlay,
div[id*="modal-overlay"],
div[class*="modal-overlay"],
div[id*="modal"],
div[class*="modal"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    background-image: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
}

/* 重新设置模态框overlay的正确背景和定位 */
.modern-modal-overlay,
#dynamic-modal-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    /* 🚀 修复定位问题 - 强制设置正确的布局 */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* 修复overlay显示状态 */
.modern-modal-overlay.show,
#dynamic-modal-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 修复overlay关闭状态 */
.modern-modal-overlay.closing,
#dynamic-modal-overlay.closing {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 重新设置模态框本身的正确样式 */
.modern-modal,
#dynamic-modal {
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    border: none !important;
    outline: none !important;
    /* 🚀 修复动画跳跃问题 - 强制设置正确的定位和变换 */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: scale(0.9) translateY(30px) !important;
    opacity: 0 !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    max-width: 440px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow: hidden !important;
}

/* 修复显示状态的动画 */
.modern-modal.show,
#dynamic-modal.show {
    transform: scale(1) translateY(0) !important;
    opacity: 1 !important;
}

/* 修复关闭状态的动画 */
.modern-modal.closing,
#dynamic-modal.closing {
    transform: scale(0.9) translateY(30px) !important;
    opacity: 0 !important;
}

/* 清除所有可能的第三方框架深蓝色样式 */
* {
    --bs-primary: #ff6b6b !important;
    --primary: #ff6b6b !important;
    --primary-color: #ff6b6b !important;
    --blue: #ff6b6b !important;
    --indigo: #ff6b6b !important;
}

/* 强制覆盖任何使用深蓝色的元素 */
*[style*="#2563eb"],
*[style*="#3b82f6"], 
*[style*="#1d4ed8"],
*[style*="#0ea5e9"] {
    border-color: #ff6b6b !important;
    background-color: rgba(255, 107, 107, 0.1) !important;
}

/* 最后的救命稻草 - 如果还有深蓝色，强制隐藏 */
*[style*="border"][style*="blue"],
*[style*="border"][style*="#2563"],
*[style*="border"][style*="#3b82"],
*[style*="border"][style*="#1d4e"],
*[style*="border"][style*="#0ea5"] {
    border: none !important;
    outline: none !important;
}

/* ===== 🎬 动画跳跃问题终极修复器 ===== */
/* 防止任何CSS框架或样式影响模态框动画 */

/* 清除所有可能影响定位的transform */
.modern-modal-overlay *,
#dynamic-modal-overlay * {
    transform: none !important;
    position: static !important;
}

/* 重新设置模态框的transform */
.modern-modal,
#dynamic-modal {
    transform: scale(0.9) translateY(30px) !important;
}

.modern-modal.show,
#dynamic-modal.show {
    transform: scale(1) translateY(0) !important;
}

/* 防止任何全局CSS重置影响模态框 */
.modern-modal-overlay,
#dynamic-modal-overlay,
.modern-modal,
#dynamic-modal {
    animation: none !important;
    transition-delay: 0s !important;
    transform-origin: center center !important;
    will-change: transform, opacity !important;
}

/* 确保flexbox居中正常工作 */
.modern-modal-overlay,
#dynamic-modal-overlay {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

/* 防止子元素影响定位 */
.modern-modal > *,
#dynamic-modal > * {
    position: relative !important;
    transform: none !important;
}
