:root {
    --primary: rgba(248, 6, 6, 0.97);
    --primary-light: rgba(248, 71, 71, 0.97);
    --secondary: #FF6584;
    --dark: #2A2D43;
    --light: #F8F9FA;
    --gray: #8C8CA1;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #F5F7FF;
    color: var(--dark);
    line-height: 1.6;
}

.hide {
    display: none;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

}

.logo i {
    margin-right: 10px;
    font-style: normal;
    font-size: 32px;
    font-weight: 700;
}

.logo p {
    font-style: normal;
    font-size: 32px;
    font-weight: 700;
}

.search-bar {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 30px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 50px;
    outline: none;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.search-bar input:focus {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--primary-light);
}

.user-actions {
    display: flex;
    gap: 20px;
}

.user-actions a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.user-actions a:hover {
    transform: translateY(-2px);
}

.favorite-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

/* 平台导航样式 */
.platform-tabs {
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    z-index: 999;
}

.tabs-container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 5px 0;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
}

.tab:hover {
    background-color: rgba(108, 99, 255, 0.05);
    color: var(--primary);
}

.tab i {
    font-size: 18px;
}

/* 商品网格样式 */
.products-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.section-subtitle {
    color: var(--gray);
    margin-top: 5px;
}

.filter-options {
    display: flex;
    gap: 15px;
}

.filter-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary);
    color: white;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-image-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
    font-weight: 600;
}

.activity-title {
    font-size: 16px;
    margin-top: 0em;
    display: -webkit-box;
    /*-webkit-line-clamp: 2;*/
    /*-webkit-box-orient: vertical;*/
    overflow: hidden;
    color: #000000;
    font-weight: 600;
}

.activity-description {
    font-size: 14px;
    margin-top: 1em;
    display: -webkit-box;
    /*-webkit-line-clamp: 2;*/
    /*-webkit-box-orient: vertical;*/
    overflow: hidden;
    color: #333333;
    font-weight: 500;
}

.activity-use-guide {
    font-size: 18px;
    margin-top: 1em;
    display: -webkit-box;
    overflow: hidden;
    color: #000000;
    font-weight: 600;
}

.product-price {
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.product-original-price {
    color: var(--gray);
    text-decoration: line-through;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-discount {
    background-color: rgba(255, 101, 132, 0.1);
    color: var(--secondary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.btn_detail {
    text-align: center;
    width: 10em;
    height: 2em;
    font-size: 24px;
    round-clip: 10px;
    margin-top: 2em;
    margin-bottom: 2em;
}

.btn_variation {
    width: 100%;
    height: 2.5em;
    border-radius: 0.3em;
    border: none;
    cursor: pointer;
    font-size: 24px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 1.5em;
    margin-bottom: 1em;
}

.btn_variation:hover {
    transform: translateY(-3px);
}

.btn_variation:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.variation1 {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.variation2 {
    background: linear-gradient(135deg, #ff9a8b 0%, #ff6b6b 100%);
    color: white;
}

.variation3 {
    background: linear-gradient(135deg, #ff7676 0%, #f54ea2 100%);
    color: white;
}


.product-platform {
    display: flex;
    align-items: center;
    margin-top: 15px;
    font-size: 14px;
    color: var(--gray);
}

.platform-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.jd-icon {
    background-color: #e31436;
}

.tb-icon {
    background-color: #ff5000;
}

.mt-icon {
    background-color: #ffd100;
    color: #333;
}

.ele-icon {
    background-color: #00B6F9;
    color: #333;
}

.dd-icon {
    background-color: #FF6224;
}

.alp-icon {
    background-color: #0076FA;
}

.pdd-icon {
    background-color: #e02e24;
}

.dy-icon {
    background: linear-gradient(135deg, #FE2C55 0%, #25F4EE 100%);
}

/* 底部样式 */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #B0B0C0;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #8C8CA1;
    font-size: 14px;
}


.width-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    z-index: 1000;
    text-align: center;
    transition: all 0.3s ease;
}

.width-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.width-label {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.size-indicator {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 5px;
    transition: all 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}


@media (max-width: 1080px) {

    .favorite-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }

    .filter-options {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    header {
        padding: 12px 0; /* 减少上下内边距 */
    }

    .header-content {
        gap: 10px;
    }

    .logo i {
        font-size: 18px;
    }

    .logo p {
        font-size: 18px;
    }

    .search-bar {
        flex-grow: 1;
        max-width: 80%;
        margin: 0;
        position: relative;
    }

    .search-bar input {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
    }

    .search-bar button {
        position: absolute;
        right: 6px;
        transform: translateY(-50%);
        border-radius: 50%;
        width: 30px;
        height: 30px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .tab {
        padding: 12px 20px;
    }

    .user-actions a {
        gap: 5px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 12px;
    }

    .product-info {
        padding: 6px;
    }

    .product-card {
        border-radius: 4px;
    }

    .activity-title {
        font-size: 15px;
    }

    .activity-description {
        font-size: 13px;
    }

    .activity-use-guide {
        font-size: 16px;
    }

    .btn_variation {
        font-size: 16px;
        font-weight: 500;
        margin-top: 1.5em;
        margin-bottom: 1em;
    }


    .tab {
        padding: 10px 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 390px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .product-info {
        padding: 4px;
    }

    .product-card {
        border-radius: 4px;
    }

    .activity-title {
        font-size: 14px;
    }

    .activity-description {
        font-size: 12px;
    }

    .activity-use-guide {
        font-size: 114px;
    }

    .btn_variation {
        font-size: 15px;
        font-weight: 500;
        margin-top: 1.5em;
        margin-bottom: 1em;
    }


    .tab {
        padding: 8px 12px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}