/* ===== 首页样式 ===== */

/* Banner Slider */
.banner {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.banner-slider.dragging {
    cursor: grabbing;
    transition: none;
}

.banner-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    pointer-events: none;
}

.banner-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 渐变背景增加光斑装饰 */
.banner-gradient::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: bannerFloat 8s ease-in-out infinite;
}

.banner-gradient::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 40%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: bannerFloat 10s ease-in-out infinite reverse;
}

@keyframes bannerFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 20px) scale(1.1); }
}

.banner-gradient-0 {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8a80 50%, #ffccbc 100%);
}

.banner-gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.banner-gradient-2 {
    background: linear-gradient(135deg, #f6a821 0%, #fbc531 50%, #ff9f43 100%);
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-slide.active .banner-content {
    animation: bannerContentIn 0.8s ease;
}

@keyframes bannerContentIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.banner-content h1 {
    font-size: 38px;
    font-weight: bold;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
    letter-spacing: 2px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
    text-shadow: 0 1px 8px rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

.banner .btn-primary {
    background: #fff;
    color: #ff6b9d;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    text-shadow: none;
    box-shadow: 0 6px 20px rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    display: inline-block;
}

.banner .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.4);
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.banner-link img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    text-align: left;
}

.banner-overlay h1 {
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.banner-overlay p {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.banner-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot.active {
    width: 32px;
    border-radius: 6px;
    background: #fff;
}

/* ===== Section 标题 ===== */
.section-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding: 0 24px;
}

.section-title::before,
.section-title::after {
    display: none;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    position: relative;
}

.section-head .section-title {
    margin-bottom: 0;
}

.section-sub {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.section-more {
    font-size: 14px;
    color: #999;
    margin-left: auto;
    transition: color 0.3s;
}

.section-more:hover {
    color: #ff6b9d;
}

/* ===== 分类 ===== */
.categories {
    padding: 36px 0;
    background: linear-gradient(180deg, #fff5f8 0%, #fff 100%);
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 8px;
    background: #fff;
    border: 1px solid rgba(255,107,157,0.08);
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(255,107,157,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
}

.category-item:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(255,107,157,0.2);
}

.category-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-initial {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

/* 分类图标渐变配色轮换 */
.cat-c0 .category-icon { background: linear-gradient(135deg, #ff6b9d, #ff8a80); }
.cat-c1 .category-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.cat-c2 .category-icon { background: linear-gradient(135deg, #f6a821, #fbc531); }
.cat-c3 .category-icon { background: linear-gradient(135deg, #16c79a, #11998e); }
.cat-c4 .category-icon { background: linear-gradient(135deg, #4facfe, #00c6fb); }
.cat-c5 .category-icon { background: linear-gradient(135deg, #a367dc, #ec6ead); }

.category-name {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    text-align: center;
}

/* ===== 限时特价 ===== */
.specials {
    padding: 36px 0;
    background: linear-gradient(180deg, #fff 0%, #fff8fa 100%);
}

.specials-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.specials-scroll::-webkit-scrollbar {
    display: none;
}

.specials-list {
    display: flex;
    gap: 14px;
    padding-bottom: 4px;
}

.special-card {
    flex: 0 0 160px;
    width: 160px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    text-decoration: none;
}

.special-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(255,77,79,0.15);
}

.special-image {
    position: relative;
    width: 100%;
    height: 160px;
    background: #fafafa;
    overflow: hidden;
}

.special-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.special-card:hover .special-image img {
    transform: scale(1.08);
}

.special-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff4d4f, #ff7a45);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255,77,79,0.3);
}

.special-info {
    padding: 12px;
}

.special-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.special-price {
    color: #ff4d4f;
    font-size: 17px;
    font-weight: bold;
}

.special-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.special-original {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.pinch-badge {
    background: linear-gradient(135deg, #ff6b9d, #ffa8c5) !important;
    box-shadow: 0 2px 8px rgba(255,107,157,0.3) !important;
}

.pinch-card .special-price {
    color: #ff6b9d;
}

.pinch-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
}
.pinch-icon svg {
    width: 22px;
    height: 22px;
    color: #ff6b9d;
}

.pinch-progress-bar-mini {
    height: 5px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
    position: relative;
}

.pinch-progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #ff4d4f);
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.pinch-progress-fill-mini::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}

.pinch-price-row-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pinch-remaining {
    font-size: 12px;
    color: #ff4d4f;
    font-weight: bold;
}

/* ===== 拼车专区 ===== */
.pinch-section {
    padding: 36px 0;
    background: linear-gradient(180deg, #fff8fa 0%, #f0f5ff 100%);
}

.section-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 热门商品 ===== */
.products {
    padding: 36px 0;
    background: #f8f9fb;
}

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

.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    text-decoration: none;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #fafafa;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-info {
    padding: 14px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    color: #ff6b9d;
    font-size: 17px;
    font-weight: bold;
}

.product-sales {
    font-size: 11px;
    color: #aaa;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%) !important;
}

/* ===== 移动端适配 ===== */
@media screen and (max-width: 768px) {
    .banner {
        height: 260px;
    }

    .banner-content h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .banner-content p {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .banner .btn-primary {
        padding: 10px 28px;
        font-size: 14px;
    }

    .banner-prev,
    .banner-next {
        width: 36px;
        height: 36px;
    }

    .banner-prev { left: 10px; }
    .banner-next { right: 10px; }

    .banner-dots { bottom: 12px; }
    .banner-dot { width: 8px; height: 8px; }
    .banner-dot.active { width: 24px; }

    .section-title {
        font-size: 18px;
        padding: 0 20px;
    }

    .section-title::before,
    .section-title::after {
        width: 14px;
    }

    .categories,
    .specials,
    .pinch-section,
    .products {
        padding: 24px 0;
    }

    .category-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .category-item {
        padding: 14px 4px;
        border-radius: 14px;
    }

    .category-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 8px;
    }

    .category-initial { font-size: 20px; }
    .category-name { font-size: 12px; }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-image { height: 140px; }
    .product-info { padding: 10px; }
    .product-name { font-size: 13px; }
    .product-desc { display: none; }
    .product-price { font-size: 15px; }

    .special-card {
        flex: 0 0 135px;
        width: 135px;
    }

    .special-image { height: 135px; }
    .special-name { font-size: 12px; }
    .special-price { font-size: 15px; }
}

@media screen and (max-width: 375px) {
    .category-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-grid {
        gap: 8px;
    }

    .product-image {
        height: 120px;
    }
}

/* ===== 首页社区精选板块 ===== */
.community-section {
    padding: 40px 0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.community-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.community-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.15);
}

.community-card-cover {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f5f7;
    position: relative;
}

.community-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.community-card:hover .community-card-cover img {
    transform: scale(1.04);
}

.community-card-nocover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff0f5 0%, #ffe8f0 100%);
    color: #ffb3c6;
}

.community-card-nocover svg {
    width: 48px;
    height: 48px;
}

.community-card-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.community-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.community-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
    gap: 6px;
}

.cc-author {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 60%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cc-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cc-avatar-default {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b9d;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.cc-stats {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cc-stats span {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.cc-stats svg {
    color: #bbb;
    flex-shrink: 0;
}

/* 响应式 */
@media screen and (max-width: 992px) {
    .community-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .community-card-title {
        font-size: 13px;
    }

    .community-card-meta {
        font-size: 11px;
    }

    .cc-stats {
        gap: 6px;
    }
}

@media screen and (max-width: 375px) {
    .community-card-body {
        padding: 10px 10px 12px;
    }
}
