/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.5;
    font-size: 16px;
    /* background: linear-gradient(150deg, #cc2b2b 0%, #d93a3a 30%, #e64c4c 60%, #f05e5e 100%); */
    min-height: 100vh;
}

/* Logo 样式 */
.logo {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
}

.logo img {
    max-width: 120px;
    height: auto;
}

.container {
    padding: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.header {
    background-color: #cc2b2b;
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header h1 {
    position: relative;
}

.tip {
    font-size: 14px;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 主内容区域和筛选页面 */
#mainContent {
    display: block;
}

#filterPage {
    display: none;
}

/* 筛选页面头部 */
.filter-page-header {
    display: flex;
    align-items: center;
    background-color: #cc2b2b;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* 为油墨页面添加特殊样式 */
.filter-page-header.ink-header {
    background-image: url('../static/images/03.png');
    background-size: cover;
    background-position: center;
}

/* 为三防漆页面添加特殊样式 */
.filter-page-header.coating-header {
    background-image: url('../static/images/01.png');
    background-size: cover;
    background-position: center;
}

/* 为灌封胶页面添加特殊样式 */
.filter-page-header.potting-header {
    background-image: url('../static/images/02.png');
    background-size: cover;
    background-position: center;
}

.back-button {
    font-size: 24px;
    margin-right: 15px;
    cursor: pointer;
}

.current-category {
    font-size: 18px;
    font-weight: bold;
}

/* 产品分类卡片 */
.category-cards {
    margin-top: 150px;
    margin-bottom: 100px; /* Increased from 20px to create more space at the bottom */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 0;
    width: 100%;
}

    /* 添加底部提示按钮样式 */
.selection-tip {
    width: 100%;
    max-width: 450px;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    padding: 12px 15px;
    background-color: #ffffff;
    color: #000000;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    animation: pulse 2s infinite;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: static;
    z-index: 1;
}

.selection-tip:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 43, 43, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(204, 43, 43, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(204, 43, 43, 0);
    }
}

.category-card {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    height: 150px;
    width: 100%;
    max-width: 450px;
    margin-top: 20px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

#coatingCard {
    background-image: url('../images/conformal-bar.png');
}

#inkCard {
    background-image: url('../images/ink-bar.png');
}

#pottingCard {
    background-image: url('../images/potting-bar.png');
}

/* 显示产品名称 */
.category-name, .category-brand {
    display: block;
    text-align: center;
    color: #fff;
    font-weight: bold;
    padding-left: 0;
}
.category-name {
    font-size: 24px;
    margin-top: 20px;
}
.category-brand {
    font-size: 32px;
}

/* 筛选条件区域 */
.filter-section {
    background-color: #fff4f4;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    display: none; /* 初始隐藏 */
}

.filter-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #ffebe8;
    cursor: pointer;
    background-color: #fff4f4;
}

.filter-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    flex: 1;
}

.filter-arrow-green {
    color: #cc2b2b;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.filter-content {
    padding: 0 15px;
}

/* 新的筛选组样式 */
.filter-group {
    margin: 15px 0;
}

.filter-label {
    font-size: 15px;
    color: #333;
    font-weight: bold;
    margin-bottom: 8px;
}

.filter-item {
    position: relative;
    padding: 10px 0;
    border-bottom: 1px solid #ffebe8;
    cursor: pointer;
}

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

.filter-item-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.select-arrow {
    color: #999;
    font-size: 14px;
}

/* 查询按钮 */
.query-button-container {
    padding: 15px 0;
    margin-top: 15px;
}

.query-button {
    width: 100%;
    height: 45px;
    background: #cc2b2b;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.query-button:hover {
    opacity: 0.9;
}

.cancel-button-container {
    padding: 8px 0;
}

.cancel-button {
    width: 100%;
    height: 45px;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    margin-top: 0;
    cursor: pointer;
}

.cancel-button:hover {
    background: #eee;
}

/* 预计结果数量提示 */
.result-preview {
    text-align: center;
    padding: 15px 0;
    position: relative;
    color: #e31f0c;
}

.result-preview-text {
    color: #cc2b2b;
    font-size: 14px;
    font-weight: bold;
}

/* 产品卡片样式 */
.product-section {
    background-color: #fff4f4;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    display: none; /* 初始隐藏 */
}

.cards {
    margin: 10px 0;
}

/* 产品卡片和详情样式 */
.card {
    background-color: #fff;
    margin-bottom: 10px;
    border-bottom: 1px solid #ffebe8;
    padding-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.card:hover {
    background-color: #fff8f7;
}

.card:active {
    background-color: #fff0ee;
}

.card-content {
    display: flex;
    padding: 10px;
}

.product-image-container {
    width: 60px;
    height: 60px;
    margin-right: 10px;
    border-radius: 4px;
    overflow: hidden;
}

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

.info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.code {
    font-size: 14px;
    color: #cc2b2b;
    margin-bottom: 0;
}

.product-detail-row {
    display: flex;
    margin-bottom: 4px;
    font-size: 13px;
}

.detail-label {
    color: #666;
    min-width: 70px;
    flex-shrink: 0;
}

.detail-value {
    color: #333;
}

.desc {
    font-size: 14px;
    color: #666;
    margin-top: 6px;
    line-height: 1.3;
}

.links {
    display: flex;
    gap: 10px;
    padding: 0 10px 10px;
}

.link {
    background: #cc2b2b;
    color: #fff;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    flex: 1;
}

.link:hover {
    opacity: 0.9;
}

.tds {
    background: #fff;
    color: #cc2b2b;
    border: 1px solid #cc2b2b;
}

/* 选项选择器 */
.option-picker-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.option-picker {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    z-index: 1001;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.option-picker.show {
    transform: translateY(0);
}

.option-picker-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.option-picker-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.option-picker-content {
    flex: 1;
    overflow-y: auto;
}

.option-picker-cancel {
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.option-cancel-text {
    font-size: 16px;
    color: #cc2b2b;
    font-weight: bold;
}

.option-cancel-bottom {
    color: #999;
    font-weight: normal;
}

.option-picker-item {
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.option-item-text {
    font-size: 16px;
    color: #333;
}

.option-item-active {
    color: #cc2b2b;
    font-weight: bold;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .category-name {
        font-size: 20px;
    }
    
    .category-brand {
        font-size: 12px;
        min-width: 100px;
        padding: 6px 8px;
    }
}

/* 产品分类颜色定制 */
.coating-brand .query-button, 
.coating-brand .filter-arrow-green,
.coating-brand .option-cancel-text,
.coating-brand .option-item-active,
.coating-brand .result-preview-text {
    color: #cc2b2b;
}

.ink-brand .query-button, 
.ink-brand .filter-arrow-green,
.ink-brand .option-cancel-text,
.ink-brand .option-item-active,
.ink-brand .result-preview-text {
    color: #cc2b2b;
}

.potting-brand .query-button, 
.potting-brand .filter-arrow-green,
.potting-brand .option-cancel-text,
.potting-brand .option-item-active,
.potting-brand .result-preview-text {
    color: #cc2b2b;
}

/* 品牌颜色按钮 */
.coating-brand .query-button {
    background: #cc2b2b;
    color: #fff;
}

.ink-brand .query-button {
    background: #cc2b2b;
    color: #fff;
}

.potting-brand .query-button {
    background: #cc2b2b;
    color: #fff;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
} 

/* 油墨分类卡片 */
.ink-categories {
    padding: 10px 0;
}

.ink-category-card {
    background: #0f5b54;
    border-radius: 6px;
    padding: 28px 24px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ink-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.ink-category-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-align: center;
} 

/* 颜色选项样式 */
.color-option {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.color-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
}

.color-transparent {
    background-color: white;
    border: 1px solid #999;
    position: relative;
}

.color-transparent::after {
    content: '×';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 12px;
    font-weight: bold;
}

.color-yellow {
    background-color: #F6BE00;
}

.color-blue {
    background-color: #0080FF;
}

.color-dark-blue {
    background-color: #005a9e;
}

.color-light-blue {
    background-color: #40a0ff;
}

.color-black {
    background-color: #000;
}

.color-white {
    background-color: #fff;
    border: 1px solid #999;
}

.color-brown {
    background-color: #8B4513;
}

.color-light-brown {
    background-color: #bc8f5f;
}

.color-gray {
    background-color: #888;
}

.color-light-gray {
    background-color: #bbb;
}

.color-text {
    margin-left: 5px;
    vertical-align: middle;
} 

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .category-card {
        height: 120px;
        width: 90%;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .category-name {
        font-size: 20px;
        margin-top: 15px;
    }
    
    .category-brand {
        font-size: 26px;
    }
    
    .selection-tip {
        max-width: 90%;
        font-size: 15px;
        padding: 10px;
        bottom: 70px;
    }
}

@media screen and (max-width: 480px) {
    .category-card {
        height: 100px;
        width: 95%;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .category-name {
        font-size: 18px;
        margin-top: 10px;
    }
    
    .category-brand {
        font-size: 22px;
    }
    
    .selection-tip {
        max-width: 95%;
        font-size: 14px;
        padding: 8px;
        bottom: 60px;
    }
} 