:root {
    --primary-color: #007BFF;
    --background-color: #f4f4f4;
    --border-color: #ddd;
    --text-color: #333;
    --header-background: rgba(243, 212, 35, 0.8); /* 半透明的黄色背景 */
    --header-text-color: white;
    --footer-background: rgba(51, 51, 51, 0.8); /* 半透明的黑色背景 */
    --footer-text-color: white;
}

/* 基础样式 */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

header {
    background-color: var(--header-background);
    color: var(--header-text-color);
    padding: 1rem 0;
    text-align: center;
    position: fixed; /* 固定在页面顶部 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* 确保它在其他内容之上 */
}

/* 新增Logo样式 */
header img#logo {
    width: 150px; /* 根据实际需求调整Logo大小 */
    height: auto; /* 保持原始比例 */
    margin-right: 20px; /* 右侧边距 */
    vertical-align: middle; /* 垂直对齐方式 */
}

main {
    max-width: 1200px;
    margin: 70px auto 20px; /* 调整顶部边距，以避免被固定的header遮挡 */
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.product {
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 图片占1份，文字内容占2份 */
    gap: 20px;
}

.product-figure {
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image {
    max-width: 100%;
    height: auto;
    max-height: 300px; /* 限制图片的最大高度 */
    object-fit: contain; /* 保持图片的宽高比 */
}

.product-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-details p {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.5;
}

.size-chart table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.size-chart th, .size-chart td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
}

.size-chart th {
    background-color: lightgray;
    font-weight: bold;
}

footer {
    background-color: var(--footer-background);
    color: var(--footer-text-color);
    text-align: center;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 1000; /* 确保它在其他内容之上 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        padding: 10px;
        margin-top: 80px; /* 调整顶部边距，以适应较小的屏幕 */
    }

    .product {
        padding: 15px;
    }

    .product-content {
        grid-template-columns: 1fr; /* 在小屏幕上堆叠显示 */
    }

    .product-figure {
        margin-bottom: 1rem;
    }

    .size-chart {
        overflow-x: auto; /* 允许水平滚动 */
    }

    .size-chart table {
        width: 100%;
        display: block;
    }

    .size-chart thead,
    .size-chart tbody,
    .size-chart tr,
    .size-chart td,
    .size-chart th {
        display: block;
    }

    .size-chart thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .size-chart th {
        border-bottom: 2px solid #ddd;
    }

    .size-chart td {
        border: none;
        border-bottom: 1px solid #ddd;
        position: relative;
        padding-left: 50%;
    }

    .size-chart td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 0;
        width: 50%;
        padding-right: 10px;
        font-weight: bold;
    }

    /* 在响应式设计中调整Logo样式 */
    header img#logo {
        width: 100px; /* 在小屏幕设备上减小Logo大小 */
        margin-right: 10px;
    }
}