/* 全局样式 */
/* 顶部栏 */
#homePage .top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(28px) saturate(120%);
    -webkit-backdrop-filter: blur(28px) saturate(120%);
    padding: 20px 16px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

#homePage .top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

#homePage .logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

#homePage .logo-img {
    width: 52px;
    height: 52px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#homePage .logo-img:hover {
    transform: scale(1.05) rotate(5deg);
    animation: none;
}

#homePage .title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#homePage .app-title {
    font-size: 22px;
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    letter-spacing: 0.5px;
}

#homePage .building-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 12px;
    font-size: 12px;
    color: #FFFFFF;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

#homePage .building-selector:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#homePage .arrow {
    font-size: 10px;
    opacity: 0.8;
}

#homePage .cart-btn {
    position: relative;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: all 0.3s;
}

#homePage .cart-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

#homePage .cart-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

#homePage .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: rgba(255, 255, 255, 0.92);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    color: #111111;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

/* 分享按钮 */
#homePage .share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 48px;
    background: rgba(7, 193, 96, 0.15);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 12px 36px rgba(7, 193, 96, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(7, 193, 96, 0.3);
    transition: all 0.3s;
}

#homePage .share-btn:hover {
    background: rgba(7, 193, 96, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(7, 193, 96, 0.35);
}

#homePage .share-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

#homePage .share-text {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

#homePage .search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    border-radius: 24px;
    padding: 0 18px;
    height: 48px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: all 0.3s;
}

#homePage .search-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

#homePage .search-row .search-bar {
    flex: 1;
    min-width: 0;
}

#homePage .search-bar:focus-within {
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

#homePage .search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    filter: brightness(0) invert(1);
}

#homePage .search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #FFFFFF;
}

#homePage .search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 内容区 */
#homePage .content {
    position: fixed;
    top: 156px;
    left: 0;
    right: 0;
    bottom: 90px;
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

#homePage .home-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

#homePage .hero-carousel {
    width: 100%;
    height: 132px;
    margin-top: 6px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

#homePage .hero-track {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#homePage .hero-track::-webkit-scrollbar {
    display: none;
}

#homePage .hero-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
    position: relative;
}

#homePage .hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.05) 55%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

#homePage .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(0.9);
}

/* 公告 */
#homePage .announcement {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    height: 48px;
    overflow: hidden;
}

#homePage .announcement.announcement-inline {
    width: 148px;
    padding: 10px 12px;
}

#homePage .announcement.announcement-inline .announce-content {
    height: 28px;
}

#homePage .announce-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30);
}

#homePage .announce-content {
    flex: 1;
    overflow: hidden;
    height: 28px;
    position: relative;
}

#homePage .announce-slider {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease-in-out;
}

#homePage .announce-item {
    height: 28px;
    line-height: 28px;
    font-size: 13px;
    color: #FFFFFF;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* 分类 */
#homePage .category-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#homePage .category-row::-webkit-scrollbar {
    display: none;
}

#homePage .category-item {
    flex-shrink: 0;
    padding: 0 20px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-radius: 18px;
    font-size: 14px;
    color: #FFFFFF;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.30);
}

#homePage .category-item.active {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    color: #111111;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

#homePage .category-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.45);
}

/* 商品网格 */
#homePage .product-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#homePage .product-card {
    height: 246px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#homePage .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.00) 55%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

#homePage .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 78px rgba(0, 0, 0, 0.70);
}

#homePage .product-card:hover::before {
    opacity: 1;
}

#homePage .product-card:active {
    transform: translateY(-4px) scale(0.98);
}

#homePage .product-img-area {
    width: 100%;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#homePage .product-img-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}

/* 楼栋标签 */
#homePage .building-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 11px;
    color: #FFFFFF;
    font-weight: 600;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#homePage .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    filter: saturate(0.9) contrast(1.05);
}

#homePage .product-card:hover .product-img {
    transform: scale(1.1);
}

#homePage .product-info {
    height: 96px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}

#homePage .product-name {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    letter-spacing: 0.3px;
    line-height: 1.25;
    min-height: 38px;
}

#homePage .product-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.70);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

#homePage .product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

#homePage .product-price {
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF;
}

#homePage .add-btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 17px;
    border: none;
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.add-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.60);
}

.add-btn:active {
    transform: scale(0.92);
}

/* 底部导航 */
#homePage .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    width: 100%;
}

#homePage .nav-pill {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(28px) saturate(120%);
    -webkit-backdrop-filter: blur(28px) saturate(120%);
    border-radius: 32px;
    padding: 6px;
    display: flex;
    box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#homePage .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    border-radius: 26px;
    text-decoration: none;
    transition: all 0.3s;
}

#homePage .nav-text {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.70);
}

#homePage .nav-item.active .nav-text {
    color: #FFFFFF;
}

#homePage .nav-item.active {
    background: rgba(255, 255, 255, 0.14);
}

#homePage .nav-icon {
    width: 20px;
    height: 20px;
}

#homePage .nav-item:not(.active) .nav-icon {
    filter: brightness(0) saturate(0) opacity(0.6);
}

#homePage .nav-item.active .nav-icon {
    filter: brightness(0) invert(1);
}

#homePage .nav-label {
    font-size: 11px;
    font-weight: 700;
    color: #999999;
}

#homePage .nav-item.active .nav-label {
    color: #FFFFFF;
}

/* 弹窗 */
#homePage .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

#homePage .modal.show {
    display: block;
}

#homePage .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
}

#homePage .modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    border-radius: 24px 24px 0 0;
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.70);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    font-size: 24px;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.building-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.building-option {
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 16px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.building-option:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

/* 商品详情弹窗 */
.product-detail {
    max-height: 80vh;
}

.product-large-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 20px;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-detail-name {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
}

.product-detail-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.product-detail-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.product-detail-price {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
}

.add-to-cart-btn {
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: none;
    border-radius: 24px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.60);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #FFFFFF;
    font-size: 14px;
}
