
:root {
    --gold: #D4AF37;
    --light-gold: #E8D9B0;
    --cream: #F8F4E9;
    --warm-gray: #E5E0D7;
    --dark-brown: #3E2723;
    --light-brown: #A1887F;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--cream);
    color: var(--dark-brown);
    line-height: 1.6;
    margin-left: 250px; /* 给侧边栏留出空间 */
    padding-top: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    overflow-y: auto; /* 垂直滚动 */
    z-index: 100;
}

.logo {
    display: block; /* 改为块级元素 */
    text-decoration: none;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--light-gold);
    margin-bottom: 20px;
    height: 80px; /* 固定高度 */
    background-image: url("../../static/images/LUIPERLEI.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain; /* 图片完整显示在容器内 */
    transition: all 0.3s ease;
    overflow: hidden; /* 防止放大时溢出 */
}
.logo:hover {
    /* 移除颜色变化，保持原有金色 */
    color: var(--gold);
    /* 添加阴影效果 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: scale(1.05); /* 鼠标悬停时轻微放大 */
}
.logo i {
    margin-right: 10px;
    font-size: 32px;
}

.nav-links {
    display: flex;
    flex-direction: column; /* 垂直排列 */
    list-style: none;
    padding: 0 20px;
}

.nav-links li {
    margin: 8px 0; /* 垂直间距 */
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-brown);
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
    position: relative;
    display: block; /* 块级元素，方便点击 */
    padding: 10px 15px;
    border-radius: 4px;
}

.nav-links a:hover {
    color: var(--gold);
    background-color: rgba(212, 175, 55, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 面包屑导航 */
.breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: var(--light-brown);
}

.breadcrumbs a {
    color: var(--light-brown);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--gold);
}

.breadcrumbs span {
    margin: 0 8px;
    color: var(--light-gold);
}


.copyright {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--light-brown);
    font-size: 14px;
}

/* 侧边栏下拉菜单样式 */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown > a:after {
    content: '▸';
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}


.nav-links .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    top: 20;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
    padding: 10px 0;
}

.nav-links .dropdown:hover .dropdown-menu {
    display: block;
}

.nav-links .dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.nav-links .dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* 未读消息徽章样式 */
.unread-badge {
    background-color: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.75rem;
    margin-left: 5px;
    vertical-align: top;
}

/* 导航栏图标样式 */
.nav-links a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}


<!-- 闪烁动画样式 -->
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}
.blinking {
    animation: blink 1s linear 3;
}

/* 预订单悬浮按钮样式 */
.preorder-fab {
    position: fixed;
    left: auto;
    top: auto;
    /* 初始位置使用JS设置 */
    bottom: auto !important;
    right: auto !important;

    width: 40px;
    height: 40px;
    background-color:rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    transition: all 0.3s ease;
}

.preorder-fab:hover {
    background-color: #0b5ed7;
    transform: scale(1.1);
}

.preorder-fab i {
    color: white;
    font-size: 24px;
}

.preorder-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* 预订单弹窗样式 - 修改为右侧半透明弹窗 */
.preorder-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 300px; /* 固定宽度 */
    background: rgba(255, 255, 255, 0.5); /* 半透明背景 */
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1999;
    overflow-y: auto;
    transition: transform 0.3s ease-out;
    transform: translateX(100%);
    border-left: 1px solid #eee;
}

.preorder-modal.open {
    display: block;
    transform: translateX(0);
}

.preorder-header {
    background: rgba(248, 249, 250, 0.9);
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.preorder-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.preorder-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.preorder-body {
    padding: 20px;
}

.preorder-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
}

.preorder-item:hover {
    background-color: rgba(0,0,0,0.02);
}

.preorder-item-image {
    width: 80px;
    height: 60px;
    object-fit: contain;
    border-radius: 5px;
    margin-right: 15px;
    background: #f8f9fa;
    padding: 5px;
}

.preorder-item-details {
    flex-grow: 1;
}

.preorder-item-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.preorder-item-price {
    color: #6c757d;
    font-size: 0.9rem;
}

.preorder-item-quantity {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.quantity-input {
    width: 40px;
    height: 25px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin: 0 5px;
    font-size: 0.9rem;
}

.preorder-item-remove {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.preorder-item-remove:hover {
    opacity: 1;
}

.preorder-footer {
    padding: 20px;
    background: rgba(248, 249, 250, 0.9);
    border-top: 1px solid #dee2e6;
    position: sticky;
    bottom: 0;
}

.preorder-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.preorder-actions {
    display: flex;
    justify-content: space-between;
}

.btn-preorder {
    flex: 1;
    margin: 0 5px;
}

/* 地址选择器样式 */
.address-selector {
    margin-bottom: 20px;
}

.address-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.address-selector select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 闪烁效果 */
.blinking {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* 弹窗滚动条样式 */
.preorder-modal::-webkit-scrollbar {
    width: 6px;
}

.preorder-modal::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.preorder-modal::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.preorder-fab.dragging {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

/* 移动端顶部导航 */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #1a1409;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
}

.mobile-logo {
    height: 40px;
}

.mobile-nav-icons {
    display: flex;
    gap: 20px;
}

.mobile-nav-icon {
    color: #f8ecc2;
    font-size: 20px;
}

/* 内容区域适配移动端导航 */
.container.mobile {
    margin-top: 60px;
}

/* 响应式判断 */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }
}

@media (max-width: 767px) {
    .sidebar {
        display: none;
    }

    body {
        margin-left: 0 !important;
    }
    .container {
        margin-left: 0 !important;
    }
}
