/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: pan-y !important; /* 只允许单指垂直滚动 */
    overscroll-behavior: none !important; /* 禁用滑动边界效果 */
    -webkit-overflow-scrolling: auto !important; /* 禁用iOS惯性滚动 */
    -webkit-user-drag: none !important;
    user-select: none !important;
}

html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none !important; /* 禁用滑动边界效果 */
    overscroll-behavior-x: none !important;
    overscroll-behavior-y: none !important;
    touch-action: pan-y !important;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.container {
    width: 100vw;
    height: 100vh;
    max-width: 768px;
    margin: 0 auto;
    position: relative;
    background-color: #000000;
    overflow: hidden;
}

/* 页面切换 */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    background-color: #000000;
}

.page.active {
    opacity: 1;
    visibility: visible;
}

/* 首页样式 */
.homepage-content {
    position: relative;
    width: 100%;
    height: 100vh;
    padding: 0;
}

.button-container {
    position: absolute;
    top: 310px;
    left: 0;
    right: 0;
    z-index: 10; /* 浮在动图上方 */
    display: flex;
    flex-direction: row;
    /* gap: 5px; */
    padding: 0 20px;
    justify-content: center;
    align-items: center;
}

.order-btn {
    background: transparent;
    color: #CB0008;
    border: none;
    padding: 0;
    cursor: pointer;
    flex: 1;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    padding-left: 30px;
    gap: 20px;
}

/* 中文按钮背景 */
.order-btn-zh {
    background-image: url('/images/icon/order_bg_ch.png');
    max-width: 360px;
}

/* 英文按钮背景 */
.order-btn-en {
    background-image: url('/images/icon/order_bg_en.png');
    max-width: 420px;
    padding-left: 60px;
}

.order-btn:active {
    filter: brightness(0.7);
    transform: scale(0.95);
}

.order-btn-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    flex-shrink: 0;
}

.order-btn-text {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}

.order-btn-main {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    color: #EC0000;
}

.order-btn-sub {
    font-size: 18px;
    font-weight: normal;
    line-height: 1;
    color: #C20107;
}

/*.order-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.order-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}*/

.gif-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    overflow: hidden;
    z-index: 1; /* 在背景层 */
}

#homepage-gif {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 全屏覆盖 */
}

/* 点单页面样式 */
.order-top-image {
    position: relative;
    width: 100%;
    height: 200px;
    /*overflow: hidden;*/
}

.order-top-image img {
    width: 100%;
    height: 100%;
    /*object-fit: contain;*/
    background-color: #000000;
}

/* 语言切换按钮 */
.language-switch-btn {
    position: absolute;
    top: 15px;
    right: 0;
    background-color: #CB0008;
    color: #ffffff;
    border: none;
    border-radius: 12px 0 0 12px;
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    box-shadow: -2px 2px 8px rgba(203, 0, 8, 0.4);
    transition: all 0.3s ease;
    height: 50px;
    width: 100px;
}

.language-switch-btn:active {
    background-color: #8B0005;
    transform: scale(0.95);
}

.order-main {
    display: flex !important;
    flex-direction: column !important;  /* 改为垂直布局 */
    height: calc(100vh - 280px);
}

/* 顶部咖啡豆分类 */
.coffee-beans-sidebar {
    width: 100% !important;
    background-color: #000000;
    padding: 0;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    gap: 40px;
    min-height: auto;
    position: relative;  /* 为滑动背景提供定位参考 */
}

/* 滑动的梯形背景 */
.coffee-beans-sidebar::before {
    content: '';
    position: absolute;
    width: 300px;  /* 梯形背景宽度 */
    height: 70px;  /* 梯形背景高度，与容器高度一致 */
    background-image: url('/images/icon/bean_bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);  /* 平滑滑动动画 */
    pointer-events: none;  /* 不阻止点击 */
    z-index: 1;
    top: 0;  /* 确保从顶部对齐 */
}

/* 根据选中的豆子调整背景位置 */
.coffee-beans-sidebar[data-active="a"]::before {
    /* left: calc(50% - 370px);  a豆位置 */
    left: 50%;
    transform: translateX(-50%);
}

.coffee-beans-sidebar[data-active="b"]::before {
    left: calc(50% - 150px);  /* b豆位置 */
}

.bean-option {
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;  /* 移除padding，让flexbox完全控制居中 */
    position: relative;
    flex: none !important;
    text-align: center !important;
    background: transparent;
    border: none !important;
    z-index: 2;
    min-width: 220px;  /* 最小宽度 */
    height: 70px;  /* 固定高度 */
}

.bean-option .bean-label {
    color: #777777;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 0 20px;  /* 左右留白，防止文字贴边 */
}

.bean-option.active .bean-label {
    color: #FF000A;
    font-weight: bold;
}

.bean-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dc2626;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.bean-label {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    top: 12px;
    right: 10px;
}

/* 产品区域 */
.products-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 25px 100px 25px;
    background-color: #000000;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    scrollbar-width: none; /* Firefox隐藏滚动条 */
    -ms-overflow-style: none; /* IE/Edge隐藏滚动条 */
    display: flex;
    justify-content: center;  /* 产品区域居中 */
    align-items: flex-start;
}

.products-area::-webkit-scrollbar {
    display: none; /* Chrome/Safari隐藏滚动条 */
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
    max-width: 600px;  /* 限制最大宽度，保持居中 */
    width: 100%;
}

.product-card {
    background-color: #000000;
    border-radius: 0;
    padding: 0;
    text-align: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* .product-card:hover {
    transform: translateY(-3px);
} */

.product-image {
    width: 260px;
    height: 260px;
    margin: 0 auto 10px auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 18px;
    /* font-weight: bold; */
    margin-bottom: 10px;
    color: #ffffff;
    line-height: 1.2;
}

.product-price-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
    margin-top: 5px;
}

.product-price {
    font-size: 20px;  /* 从18px增加到20px */
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 3px;  /* ¥符号和数字之间的间距 */
}

.currency-symbol {
    font-weight: normal;  /* ¥符号不加粗 */
    font-size: 18px;  /* ¥符号稍小一点 */
}

.price-number {
    font-weight: bold;  /* 数字加粗 */
    font-size: 26px;  /* 数字更大一点 */
}

.add-btn {
    background: url('/images/icon/add.svg') no-repeat center;
    background-size: contain;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    font-size: 0;
}

/* .add-btn:hover {
    transform: scale(1.1);
    filter: brightness(0.9);
} */

/* 购物车 */
.cart-section {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 680px;
    background-color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2100;
    overflow: hidden;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-height: 60px;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 15px 20px;
    flex: 1;
    position: relative;  /* 为小字定位提供参考 */
}

.cart-icon {
    width: 28px;
    height: 28px;
    background: url('/images/icon/cart.svg') no-repeat center;
    background-size: contain;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc2626;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
}

#cart-total {
    font-size: 20px;
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 4px;  /* ¥符号和数字之间的间距 */
}

#cart-total .currency-symbol {
    font-weight: normal;  /* ¥符号不加粗 */
    font-size: 18px;
}

#cart-total .price-number {
    font-weight: bold;  /* 数字加粗 */
    font-size: 26px;  /* 数字更大 */
}

.cart-disclaimer {
    position: absolute;
    bottom: 5px;  /* 距离cart-info底部5px */
    right: 15px;  /* 距离cart-info右边15px */
    font-size: 10px;
    color: #888888;
    line-height: 1.2;
    white-space: nowrap;
}

.checkout-btn {
    background-color: #666666;
    color: white;
    border: none;
    border-radius: 0;
    padding: 0 30px;
    font-size: 18px;
    font-weight: normal;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .checkout-btn:hover {
    background-color: #777777;
} */

.checkout-btn:disabled {
    background-color: #444444;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 购物车有商品时的红色状态 */
.cart-section.has-items .checkout-btn {
    background-color: #CB0008;
}

/* .cart-section.has-items .checkout-btn:hover {
    background-color: #b91c1c;
}

.cart-section.has-items .checkout-btn:disabled {
    background-color: #dc2626;
    opacity: 0.6;
} */

/* 购物车详情弹窗 */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    opacity: 0;
    /* transition: opacity 0.3s ease; */
}

.cart-modal.show {
    display: block;
    opacity: 1;
}

.cart-modal.show .cart-modal-content {
    transform: translateX(-50%) translateY(0);
}

.cart-modal .cart-modal-content {
    transform: translateX(-50%) translateY(100%);
}

.cart-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.cart-modal-content {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 768px;
    max-height: 80vh;
    background-color: #ffffff;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-out;
    padding-bottom: 80px;
}

.cart-modal-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.cart-modal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #333333;
    font-size: 16px;
}

.select-all-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent;
    border: 2px solid #333333;
    border-radius: 3px;
    position: relative;
}

.select-all-container input[type="checkbox"]:checked {
    background-color: #000000;
    border-color: #000000;
}

.select-all-container input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
}

.empty-cart-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    /* transition: background-color 0.3s ease; */
    display: flex;
    align-items: center;
}

/* 移除清空购物车按钮悬停效果 */

.cart-modal-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background-color: #ffffff;
}

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

.cart-item-checkbox {
    margin-right: 15px;
}

.cart-item-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent;
    border: 2px solid #333333;
    border-radius: 3px;
    position: relative;
}

.cart-item-checkbox input[type="checkbox"]:checked {
    background-color: #000000;
    border-color: #000000;
}

.cart-item-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 15px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    margin-right: 15px;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 14px;
    color: #666666;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666666;
    /* transition: all 0.3s ease; */
}

/* 移除数量按钮悬停效果 */

.quantity-display {
    min-width: 30px;
    text-align: center;
    font-size: 16px;
    color: #333333;
}


/* 支付弹窗样式 */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    background-color: rgba(0, 0, 0, 0.5);
}

.payment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.payment-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-content {
    width: 90%;
    max-width: 500px;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    background-color: #ffffff;
    /*border-bottom: 1px solid #e9ecef;*/
}

.payment-modal-header h2 {
    font-size: 20px;
    font-weight: bold;
    color: #333333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    /* transition: background-color 0.3s ease; */
}

/* 移除关闭按钮悬停效果 */

.close-btn img {
    width: 20px;
    height: 20px;
}

.payment-modal-body {
    padding: 20px 20px 0 20px; /* 底部padding改为0，让图片紧贴底部 */
}

.payment-section {
    margin-bottom: 20px;
}

.payment-section:last-child {
    margin-bottom: 0;
}

.payment-option {
    border: 2px solid #b7b5b5;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    background-color: #d0c9c9; /* 添加灰色背景 */
    /* transition: all 0.3s ease; */
}

/* 移除悬停效果 */

.payment-option.selected {
    border-color: #dc2626;
    /*background-color: #fff5f5;*/
}

/* 移除默认选中状态 */

.payment-option-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.payment-title {
    font-size: 20px;
    font-weight: 500;
    color: #333333;
}

.payment-icons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.payment-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.payment-accept-header {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    margin-bottom: 15px;
    text-align: center;
}

.payment-accept-footer {
    text-align: center;
    margin: 20px -20px 0 -20px; /* 使用负边距让图片突破padding限制，紧贴左右边 */
}

.footer-logo {
    width: 100%;
    height: auto;
    display: block; /* 去除图片下方的默认空白 */
    border-radius: 0 0 12px 12px; /* 只保留底部左右圆角，与弹窗圆角一致 */
}

/* 机器人印花选择弹窗样式 */
.pattern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    opacity: 0;
    /* transition: opacity 0.3s ease; */
}

.pattern-modal.show {
    display: block;
    opacity: 1;
}

.pattern-modal.show .pattern-modal-content {
    transform: translateX(-50%) translateY(0);
}

.pattern-modal .pattern-modal-content {
    transform: translateX(-50%) translateY(100%);
}

.pattern-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.pattern-modal-content {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 768px;
    max-height: 80vh;
    background-color: #ffffff;
    border-radius: 12px 12px 0 0;
    overflow-y: auto; /* 允许纵向滚动 */
    overflow-x: hidden; /* 隐藏横向滚动 */
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-out;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    /* padding-bottom: 100px; 增加底部内边距，避免被购物车遮挡 */
}

.pattern-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #ffffff;
    /*border-bottom: 1px solid #e9ecef;*/
}

.pattern-modal-header h2 {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    margin: 0;
}

.pattern-modal-body {
    padding: 20px;
    text-align: center;
}

.pattern-preview {
    margin-bottom: 20px;
    position: relative;
    width: 280px;
    height: 280px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pattern-coffee-cup {
    width: 280px;
    height: 280px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.pattern-overlay {
    position: absolute;
    width: 140px;
    height: 140px;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
    top: 50%;
    left: 50%;
    transform: translate(-51%, -54%);
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: contrast(1.1) brightness(0.95);
}

.pattern-overlay.visible {
    opacity: 1;
}

.pattern-selector-section {
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden; /* 防止容器溢出 */
}

.pattern-selector-section h3 {
    font-size: 16px;
    color: #333333;
    margin-bottom: 15px;
    text-align: center;
}

.pattern-options {
    display: flex;
    gap: 15px;
    overflow-x: auto; /* 允许横向滚动 */
    overflow-y: hidden;
    padding: 10px 5px;
    flex-wrap: nowrap; /* 不换行，保持在一行 */
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    scrollbar-width: none; /* Firefox隐藏滚动条 */
    -ms-overflow-style: none; /* IE/Edge隐藏滚动条 */
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start; /* 从左开始显示，确保所有图片都可见 */
    cursor: grab; /* 鼠标悬停时显示抓手 */
    user-select: none; /* 防止拖拽时选中文字 */
}

.pattern-options:active {
    cursor: grabbing; /* 拖拽时显示抓取手势 */
}

.pattern-options::-webkit-scrollbar {
    display: none; /* Chrome/Safari隐藏滚动条 */
}

.pattern-option {
    width: 100px;
    height: 100px;
    min-width: 100px; /* 防止收缩 */
    min-height: 100px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #e0e0e0; /* 默认淡灰色边框 */
    /* transition: border-color 0.3s ease; */
    overflow: hidden;
    flex-shrink: 0; /* 不允许缩小 */
}

.pattern-option.selected {
    border-color: #dc2626; /* 选中时红色边框 */
}

.pattern-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pattern-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.pattern-price {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
}

.pattern-quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pattern-actions {
    display: flex;
    gap: 10px;
}

.pattern-buy-btn, .pattern-add-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    /* transition: background-color 0.3s ease; */
}

.pattern-buy-btn {
    background-color: #d0c9c9;
    color: #000000;
}

.pattern-add-btn {
    background-color: #dc2626;
    color: white;
}

.payment-content {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: #111111;
    border-radius: 12px;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    border: 2px solid transparent;
}

/* 移除支付方式悬停效果 */

.payment-method.selected {
    border-color: #dc2626;
    background-color: #1a1a1a;
}

.payment-method img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.payment-method span {
    font-size: 18px;
    font-weight: 500;
}

.payment-total {
    font-size: 28px;
    font-weight: bold;
    color: #dc2626;
}

.pay-btn {
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 20px 60px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    width: 100%;
    max-width: 400px;
}

/* 移除支付按钮悬停效果 */

.pay-btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
}

/* 二维码支付弹窗样式 */
.qr-payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.qr-payment-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.qr-payment-content {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.qr-robot-image {
    position: relative;
    z-index: 20;
    margin-bottom: -110px; /* 让机器人图片更多地覆盖到弹窗上，向下移动 */
    /* margin-top: 40px; 向下移动图片 */
    display: flex;
    justify-content: center;
}

.robot-img {
    width: 450px;
    height: 450px;
    object-fit: contain;
    display: block;
}

.qr-payment-body {
    position: relative;
    background: #ffffff;
    padding: 45px 30px 30px 30px; /* 增加顶部padding为更大的机器人图片留空间 */
    border-radius: 15px;
}

.qr-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.qr-countdown {
    position: absolute;
    bottom: 15px;
    left: 15px; /* 移动到左下角 */
    background: transparent;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    z-index: 10;
}

.countdown-icon {
    width: 16px; /* 调小图标尺寸 */
    height: 16px;
}

.countdown-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.countdown-text {
    font-size: 16px;
    color: #000000; /* 全黑色字体 */
}

.qr-close-btn {
    position: absolute;
    bottom: 8px;
    right: 10px; /* 关闭按钮在右下角 */
    background: transparent;
    border: none;
    cursor: pointer;
    /* padding: 5px; */
    z-index: 10;
}

.qr-close-btn img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.qr-code-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.qr-loading {
    color: #666;
    font-size: 16px;
}

.qr-description {
    margin: 20px 0;
    color: #000000; /* 改为全黑色 */
    line-height: 1.5;
    font-weight: normal;
}

.qr-description small {
    color: #000000; /* 改为全黑色 */
    font-size: 14px;
}

/* 支付状态弹窗样式 - 简洁设计 */
.payment-status-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.status-content {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    padding: 40px 60px;
    text-align: center;
    max-width: 400px;
    width: 85%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

.status-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.status-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 15px 0;
    color: #333333;
    letter-spacing: 0.5px;
}

.status-message {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    color: #666666;
    line-height: 1.4;
}

/* 成功状态样式 */
.status-content.success .status-title {
    color: #333333; /* 保持黑色，简洁设计 */
}

/* 失败状态样式 */
.status-content.failed .status-title {
    color: #333333; /* 保持黑色，简洁设计 */
}

/* 其他状态样式 */
.status-content.timeout .status-title,
.status-content.robot-success .status-title,
.status-content.robot-failed .status-title {
    color: #333333; /* 统一使用黑色 */
}

/* 个性化印花提示弹窗样式 */
.custom-print-tip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.tip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.tip-header {
    position: relative;
    z-index: 1;
    margin-bottom: -40px;  /* 让弹窗向上遮住背景图 */
    pointer-events: none;
    width: 100%;  /* 占满宽度 */
    max-width: 420px;  /* 与弹窗宽度一致 */
    display: flex;
    justify-content: flex-start;  /* 左对齐 */
}

.tip-header-bg {
    width: 80%;  /* 占满容器宽度，与弹窗左边对齐 */
    max-width: 420px;
    height: auto;
    display: block;
}

.tip-content {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    max-width: 420px;
    width: 85%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2;  /* 弹窗在背景图上层 */
    overflow: visible;  /* 允许机器人图片溢出显示 */
}

.tip-header-text {
    position: absolute;
    top: 35%;
    left: 40px;
    transform: translateY(-50%);
    z-index: 3;
}

.tip-header-text h2 {
    color: white;
    font-size: 20px;  /* 缩小字体 */
    font-weight: bold;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tip-header-robot {
    position: fixed;  /* 改为fixed定位，脱离文档流 */
    top: 50%;
    left: 50%;
    transform: translate(65px, -195px);  /* 相对于屏幕中心偏移到右上角 */
    width: 160px;
    height: auto;
    z-index: 7001;  /* 比弹窗容器(7000)更高 */
    pointer-events: auto;
}

.tip-body {
    padding: 40px 25px 35px 40px;  /* 恢复正常padding */
}

.tip-close-btn {
    position: relative;  /* 独立元素，在弹窗下方 */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-top: 20px;  /* 与弹窗保持间距 */
    z-index: 3;
}

.tip-close-btn img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.tip-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 35px;  /* 从20px增加到35px，增加行距 */
    gap: 15px;
}

.tip-step:last-of-type {
    margin-bottom: 0; /* 最后一个步骤无下边距 */
}

.step-number-img {
    width: 50px;  /* 步骤编号图片宽度 */
    height: 25px; /* 步骤编号图片高度 */
    object-fit: contain;
    flex-shrink: 0;
}

.step-text {
    font-size: 16px;
    color: #333333;
    line-height: 1.6;
    padding-top: 1px;  /* 与图片对齐 */
    flex: 1;
}


/* 个性化印花弹窗样式 */
.custom-print-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.custom-content {
    position: relative;
    background: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
}

.custom-header {
    position: relative;
    margin-bottom: 30px;
}

.custom-header h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.custom-header h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: normal;
    margin: 0;
}

.custom-countdown {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 13px;
    font-weight: bold;
}

.custom-body p {
    color: #cccccc;
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 30px;
}

.custom-body small {
    font-size: 16px;
}

.custom-qr {
    margin: 30px 0;
}

.custom-close-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        width: 100vw;
        height: 100vh;
    }
    
    .button-container {
        padding: 30px 15px;
        gap: 25px;
    }
    
    .order-btn {
        height: 90px;
        padding-left: 20px;
        gap: 15px;
    }
    
    .order-btn-zh {
        max-width: 280px;
    }
    
    .order-btn-en {
        max-width: 340px;
    }
    
    .order-btn-icon {
        width: 55px;
        height: 55px;
    }
    
    .order-btn-main {
        font-size: 24px;
    }
    
    .order-btn-sub {
        font-size: 15px;
    }
    
    .order-main {
        flex-direction: column;
        height: calc(100vh - 280px);
    }
    
    .coffee-beans-sidebar {
        width: 100%;
        flex-direction: row;
        padding: 10px;
        border-right: none;
        border-bottom: 1px solid #333333;
    }
    
    .bean-option {
        flex: 1;
        text-align: center;
        padding: 15px 10px;
        margin-bottom: 0;
        margin-right: 10px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .bean-option.active {
        border-left: none;
        border-bottom-color: #dc2626;
    }
    
    .bean-option.active .bean-label {
        color: #dc2626; /* 移动端选中时字体也变红色 */
    }
    
    .bean-option:last-child {
        margin-right: 0;
    }
    
    .bean-label {
        font-size: 14px;
    }
    
    .products-area {
        padding: 15px 15px 100px 15px;
    }
    
    .cart-section {
        bottom: 15px;
        width: calc(100% - 30px);
        padding: 12px 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px 15px;
    }
    
    .product-image {
        width: 160px;  /* 移动端也调大一些 */
        height: 160px;
        margin-bottom: 15px;
    }
    
    .product-name {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .product-price {
        font-size: 16px;
        font-weight: bold;
    }
    
    .add-btn {
        width: 28px;
        height: 28px;
    }
    
    .payment-methods {
        gap: 15px;
    }
}

@media (max-height: 800px) {
    .button-container {
        padding: 20px 15px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #333333;
    border-radius: 50%;
    border-top-color: #dc2626;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 抖动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #dc2626;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    /* transition: opacity 0.3s ease; */
}

.notification.show {
    opacity: 1;
}

.notification.success {
    background-color: #16a34a;
}

.notification.error {
    background-color: #dc2626;
}

/* DIY印花二维码弹窗样式 - 底部弹出 */
.diy-print-qrcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8000;
    pointer-events: none;
}

.diy-print-qrcode-modal.show {
    pointer-events: auto;
}

.diy-qrcode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.diy-print-qrcode-modal.show .diy-qrcode-overlay {
    opacity: 1;
    pointer-events: auto;
}

.diy-qrcode-bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    height: 600px;
}

.diy-print-qrcode-modal.show .diy-qrcode-bottom-sheet {
    transform: translateY(0);
}

.diy-qrcode-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diy-qrcode-close img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.diy-qrcode-countdown {
    position: absolute;
    bottom: 20px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.diy-qrcode-countdown .countdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.diy-qrcode-countdown .countdown-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.diy-qrcode-countdown .countdown-text {
    font-size: 18px;
    font-weight: normal;
    color: #000000;
    min-width: 35px;
    text-align: left;
}

.diy-qrcode-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: 100% auto;
    background-position: bottom center;
    background-repeat: no-repeat;
}

.diy-qrcode-bg {
    display: none;
}

.diy-qrcode-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 30px;
    box-sizing: border-box;
}

.diy-qrcode-title {
    position: absolute;
    top: 20px;
    left: 20px;
}

.diy-qrcode-title h2 {
    color: #333333;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    text-align: left;
}

.diy-qrcode-image {
    display: flex;
    justify-content: center;
    align-items: center;
    /*padding: 2px;*/
    background: #ffffff;
    border-radius: 15px;
    margin-bottom: 40px;
    /* margin-top: -50px; */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.diy-qrcode-image img {
    width: 250px;
    height: 250px;
    border-radius: 10px;
    display: block;
}

.diy-qrcode-description {
    text-align: center;
}

.diy-qrcode-description p {
    color: #333333;
    font-size: 18px;
    margin: 0;
    font-weight: 500;
}
