/* FontAwesome 图标库 */
@import url('../css/all.min.css');

/* index.html 样式 */
/* ...index.html中<style>标签内所有CSS内容粘贴到这里... */
/* ========== 新增：加密弹窗样式 ========== */
/* ========== 新增：加密弹窗样式 ========== */
#password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.password-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-logo {
    font-size: 4rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.password-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.password-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.password-wechat {
    background-color: #f8f9fa;
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 1.2rem;
    margin: 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.password-wechat i {
    color: #27ae60;
}

.password-input-container {
    position: relative;
    margin: 2rem 0;
}

.password-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
}

.password-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.password-submit {
    background: linear-gradient(to right, #3498db, #2c3e50);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.password-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(52, 152, 219, 0.3);
}

.password-error {
    color: #e74c3c;
    margin-top: 1rem;
    font-size: 0.95rem;
    display: none;
}

.password-attempts {
    color: #e67e22;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.password-hint {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 2rem;
    font-style: italic;
}

.password-footer {
    margin-top: 2rem;
    color: #95a5a6;
    font-size: 0.85rem;
}

/* 网站内容初始隐藏 */
.website-content {
    display: none;
}

/* ========== 修改：商品图片相关样式 ========== */
.cigarette-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    position: relative;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    cursor: default;
}

.cigarette-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.cigarette-card:hover .cigarette-image {
    transform: scale(1.03);
}

.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #bdc3c7;
}

.no-image i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.no-image span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ========== 原有样式保持不变 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.admin-link {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.warning-banner {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #f5c6cb;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.category-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
}

.category-btn {
    background-color: white;
    border: 2px solid #e0e0e0;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #444;
}

.category-btn:hover,
.category-btn.active {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
    transform: translateY(-2px);
}

.cigarettes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ========== 修改：香烟卡片布局 ========== */
/* ========== 修改：香烟卡片布局（与单页面版本一致） ========== */
.cigarette-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cigarette-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.cigarette-info {
    padding: 1.5rem;
}

.cigarette-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.cigarette-brand {
    color: #7f8c8d;
    font-size: 0.95rem;
    /* margin-bottom: 1rem; */
    display: flex;
    align-items: center;
}

.cigarette-brand i {
    margin-right: 0.5rem;
}

.discount-badge {
    background-color: #e74c3c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}


/* ========== 修改：价格区域布局 ========== */
.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px dashed #eee;
}

.current-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #e74c3c;
}

.price-details {
    text-align: right;
}

.cigarette-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #e74c3c;
    line-height: 1.3;
}

.original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 1.2rem;
    font-weight: 700; /* 添加加粗 */
}

.savings {
    color: #27ae60;
    font-size: 0.9rem;
    font-weight: 600;
}

.price-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.cigarette-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.feature-tag {
    background-color: #f1f8ff;
    color: #3498db;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.feature-tag.premium {
    background-color: #fff8e1;
    color: #f39c12;
}

.feature-tag.menthol {
    background-color: #e8f6f3;
    color: #16a085;
}

.feature-tag.domestic {
    background-color: #f9f4ff;
    color: #9b59b6;
}

.feature-tag.imported {
    background-color: #fff0f0;
    color: #e74c3c;
}

.cigarette-icon {
    font-size: 2.5rem;
    color: #ddd;
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    opacity: 0.3;
}

.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2.5rem 1rem;
    margin-top: 3rem;
}

.health-warning {
    background-color: #1a1a1a;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    border-radius: 8px;
}

.health-warning h3 {
    color: #e74c3c;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.health-icon {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
    padding: 0.5rem 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.3rem;
}

.search-box {
    margin: 2rem auto;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

/* ========== 修改：列表视图价格布局 ========== */
.list-price-container {
    margin-top: 0.5rem;
}

.list-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.list-price-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.price-filter-btn {
    background-color: white;
    border: 2px solid #e0e0e0;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #444;
}

.price-filter-btn:hover,
.price-filter-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.discount-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.discount-filter-btn {
    background-color: white;
    border: 2px solid #e74c3c;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #e74c3c;
}

.discount-filter-btn:hover,
.discount-filter-btn.active {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.filter-summary {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .cigarettes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.2rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .category-nav {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .cigarette-name {
        font-size: 1.4rem;
    }

    .current-price {
        font-size: 1.8rem;
    }

    .admin-link {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
        display: inline-block;
    }

    .password-container {
        padding: 2rem;
    }

    .password-title {
        font-size: 1.8rem;
    }

    .password-wechat {
        font-size: 1.1rem;
    }

    .cigarette-image-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .cigarettes-grid {
        grid-template-columns: 1fr;
    }

    .price-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-details {
        text-align: left;
        margin-top: 0.8rem;
    }

    .password-container {
        padding: 1.5rem;
    }

    .password-title {
        font-size: 1.5rem;
    }

    .cigarette-image-container {
        height: 180px;
    }
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.error-message {
    text-align: center;
    padding: 3rem;
    color: #e74c3c;
    font-size: 1.2rem;
}

/* ========== 新增：图片模式切换按钮样式 ========== */
.view-mode-toggle {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    gap: 0.5rem;
}

.view-mode-btn {
    background-color: white;
    border: 2px solid #e0e0e0;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-mode-btn:hover,
.view-mode-btn.active {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* ========== 新增：列表视图样式 ========== */
.cigarettes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cigarette-list-item {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: stretch;
}

.cigarette-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.list-item-image {
    width: 140px;
    min-width: 140px;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-right: 1px solid #eee;
    position: relative;
    cursor: default;
}

.list-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 10px;
}

.list-item-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.list-item-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
}

/* ========== 修改：列表视图价格布局 ========== */
.list-item-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.list-item-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #e74c3c;
}

.list-item-original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

@media (max-width: 768px) {
    .list-item-image {
        width: 120px;
        min-width: 120px;
    }

    .list-item-name {
        font-size: 1.2rem;
    }

    .list-item-price {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .cigarette-list-item {
        flex-direction: column;
    }

    .list-item-image {
        width: 100%;
        height: 180px;
        min-height: 180px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* 新增分页样式 */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 2rem 0;
            gap: 0.5rem;
        }
        
        .pagination-btn {
            padding: 0.5rem 1rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            background: #fff;
            color: #333;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .pagination-btn:hover {
            background: #f5f5f5;
        }
        
        .pagination-btn.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }
        
        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: #f9f9f9;
        }
        
        .pagination-info {
            padding: 0 1rem;
            color: #666;
        }
        
        /* 加载中样式 */
        .loading-container {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 2rem;
            grid-column: 1 / -1;
        }
        
        .loading-spinner {
            font-size: 1.5rem;
            color: #007bff;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 新增的CSS样式 */
        .category-buttons-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }

        .more-categories-btn {
            padding: 8px 15px;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9rem;
            color: #666;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .more-categories-btn:hover {
            background-color: #f0f0f0;
            border-color: #ccc;
        }

        .more-categories-btn i {
            font-size: 0.8rem;
            transition: transform 0.3s ease;
        }

        .all-categories-container {
            display: none;
            flex-wrap: wrap;
            gap: 8px;
            padding: 15px;
            background-color: #f9f9f9;
            border-radius: 8px;
            border: 1px solid #eee;
            margin-top: 5px;
            max-height: 200px;
            overflow-y: auto;
        }

        .all-categories-container.show {
            display: flex;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        