/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root {
    --primary-color: #4a55fb;
    --secondary-color: #0063e5;
    --accent-color: #ff5b5f;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --background-light: #f8f9fa;
    --border-color: #eaeaea;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --blue-color: #3388ff;
    --price-color: #ff4c4c;
}

body {
    background-color: #f5f5f5;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
}

/* 头部店铺信息 */
.shop-info {
    padding: 15px 15px 0;
    background-color: #fff;
}

.shop-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.shop-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.shop-banner {
    padding: 0 15px 15px;
    background-color: #fff;
}

.banner-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 0;
}

/* 导航栏 */
.nav-bar {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    background-color: #fff;
    margin-top: 1px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-left: 15px;
    margin-right: 15px;
    border-radius: 8px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* 合作伙伴广告 */
.partner-ad {
    margin-top: 10px;
    background: linear-gradient(135deg, #4568dc, #0091ff);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin-left: 15px;
    margin-right: 15px;
}

.ad-content h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.ad-content p {
    font-size: 16px;
    opacity: 0.9;
}

/* 运营商分类 */
.category-section {
    background-color: #fff;
    margin-top: 10px;
    padding: 15px 0;
    box-shadow: var(--shadow);
    margin-left: 15px;
    margin-right: 15px;
    border-radius: 8px;
}

.category-list {
    display: flex;
    justify-content: space-around;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.category-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    position: relative;
    color: var(--text-secondary);
}

.category-item.active {
    color: var(--primary-color);
}

.category-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.category-item i, .operator-icon {
    font-size: 24px;
    margin-bottom: 5px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.operator-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* 商品列表样式 */
.product-list {
    padding: 10px 15px;
}

.product-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-header {
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-title {
    font-size: 15px;
    color: #333;
    margin: 0;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-link {
    color: var(--blue-color);
    font-size: 12px;
    padding-left: 10px;
}

.card-body {
    padding: 10px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

/* 商品图片样式 */
.product-image {
    width: 85px;
    height: 85px;
    border-radius: 5px;
    margin-right: 0;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f0f8ff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    align-self: center;
}

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

/* 左侧内容区域 */
.left-content {
    display: flex;
    flex-direction: column;
    margin-right: 5px;
    width: 100px;
}

/* 商品价格样式 */
.product-price {
    color: #FF5722;
    font-size: 16px;
    font-weight: bold;
    height: 24px;
    line-height: 24px;
    white-space: nowrap;
    padding-left: 5px;
}

.product-price .price-value {
    color: var(--price-color);
}

/* 商品信息样式 */
.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 90px;
    position: relative;
    padding-bottom: 30px;
    padding-left: 0;
    margin-left: 0;
}

.info-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 8px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-left: 0;
    position: relative;
    background: linear-gradient(to right, #f8f9ff, #f0f8ff);
    border-radius: 5px;
    padding: 5px 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.info-grid::after {
    content: none;
}

.info-item {
    text-align: center;
    flex: 1 0 30%;
    white-space: nowrap;
    overflow: hidden;
    padding: 3px 1px;
    min-width: 0;
    margin-right: 0;
    position: relative;
    border-right: 1px dashed rgba(0,0,0,0.05);
}

.info-item:last-child {
    border-right: none;
}

.info-value {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    display: block;
}

.info-item:nth-child(1) .info-value {
    color: #3388ff;
    position: relative;
}

.info-item:nth-child(2) .info-value {
    color: #ff6b6b;
    position: relative;
}

.info-item:nth-child(3) .info-value {
    color: #4caf50;
    position: relative;
}

.info-label {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    opacity: 1;
    display: block;
    position: relative;
}

.info-item:nth-child(1) .info-label::before,
.info-item:nth-child(2) .info-label::before,
.info-item:nth-child(3) .info-label::before {
    content: "";
    display: none;
}

.product-description {
    font-size: 11px;
    color: #666;
    margin: 5px 0 6px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    padding: 0 0 0 5px;
    border-left: 2px solid var(--blue-color);
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
}

.product-description::before {
    content: "";
    display: none;
}

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

.price-action-row {
    display: none;
}

.bottom-row {
    position: absolute;
    bottom: 0;
    left: -105px;
    width: calc(100% + 105px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 24px;
    padding-top: 2px;
}

.promotion-text {
    display: none;
}

.btn-container {
    display: flex;
    justify-content: flex-end;
    margin-right: 5px;
}

.btn-get {
    background-color: var(--blue-color);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 3px 12px;
    font-size: 12px;
    height: 24px;
    line-height: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: bold;
}

.btn-get:hover {
    background-color: #2979ff;
}

/* 加载状态和错误信息 */
.loading, .error-message, .no-data {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    color: var(--accent-color);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 10px 0;
}

.pagination span {
    margin: 0 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pagination button {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination button:hover:not([disabled]) {
    background-color: var(--primary-color);
    color: white;
}

.pagination button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 底部信息 */
.footer {
    background-color: #f8f9fa;
    padding: 20px 15px;
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-info p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .shop-info {
        padding: 20px 15px 0;
    }
    
    .shop-banner {
        padding: 0 15px 20px;
    }
    
    .shop-title {
        font-size: 24px;
    }
    
    .shop-desc {
        font-size: 14px;
    }
    
    .nav-bar {
        padding: 20px 0;
        margin-left: 15px;
        margin-right: 15px;
        border-radius: 8px;
    }
    
    .nav-item {
        font-size: 16px;
    }
    
    .nav-item i {
        font-size: 24px;
    }
    
    .partner-ad {
        padding: 30px;
        border-radius: 8px;
        margin: 20px 15px;
    }
    
    .ad-content h2 {
        font-size: 28px;
    }
    
    .ad-content p {
        font-size: 18px;
    }
    
    .category-section {
        padding: 20px 0;
        margin-left: 15px;
        margin-right: 15px;
        border-radius: 8px;
    }
    
    .product-list {
        padding: 15px;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
    
    .card-header {
        padding: 15px 20px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .card-body {
        padding: 15px 12px;
        gap: 8px;
    }
    
    .product-image {
        width: 100px;
        height: 100px;
        margin-right: 0;
    }
    
    .left-content {
        width: 120px;
        margin-right: 8px;
    }
    
    .info-grid {
        padding: 8px 6px;
        border-radius: 8px;
    }
    
    .info-item {
        padding: 6px 4px;
    }
    
    .info-value {
        font-size: 17px;
        margin-bottom: 4px;
    }
    
    .info-label {
        font-size: 12px;
    }
    
    .product-description {
        font-size: 12px;
        margin: 6px 0 8px;
        line-height: 1.4;
        padding: 0 0 0 6px;
    }
    
    .promotion-text {
        font-size: 11px;
        width: calc(100% - 95px);
        height: 22px;
        line-height: 22px;
    }
    
    .price-action-row {
        margin-top: 8px;
        height: 22px;
    }
    
    .btn-get {
        padding: 4px 14px;
        font-size: 14px;
        height: 26px;
        line-height: 18px;
        border-radius: 16px;
    }
    
    .footer {
        padding: 30px;
    }
    
    .footer-info p {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 18px;
        height: 26px;
        line-height: 26px;
    }
    
    .product-info {
        min-height: 120px;
        padding-bottom: 32px;
    }
    
    .bottom-row {
        height: 30px;
        padding-top: 2px;
        left: -128px;
        width: calc(100% + 128px);
    }
}

@media (min-width: 1024px) {
    .container {
        box-shadow: var(--shadow);
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 10px;
        overflow: hidden;
        max-width: 700px;
    }
    
    .product-card {
    transition: all 0.3s ease;
    }
    
    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

/* 功能开发中提示模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: #fff;
    border-radius: 12px;
    width: 80%;
    max-width: 320px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: all 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #4568dc, #0091ff);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 28px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.modal-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-button {
    background: linear-gradient(135deg, #4568dc, #0091ff);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #999;
    font-size: 14px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #e0e0e0;
    color: #666;
} 