/* ============================================
   农场主页样式
   ============================================ */

.farm-detail-page {
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* 封面 */
.farm-hero img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}
.farm-hero-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

/* 农场信息 */
.farm-info { background: #fff; padding: 16px; margin-bottom: 8px; }
.farm-info-top { display: flex; align-items: center; gap: 12px; }
.farm-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.farm-info-text h1 { font-size: 1.15rem; margin: 0; }
.farm-slogan { font-size: 0.8rem; color: #999; margin-top: 2px; }
.farm-type-tag { display: inline-block; font-size: 0.7rem; background: #e8f5e9; color: #2d6a4f; padding: 2px 10px; border-radius: 10px; margin-top: 8px; }
.farm-location { font-size: 0.85rem; color: #999; margin-top: 6px; }
.farm-stats { display: flex; gap: 16px; margin-top: 8px; font-size: 0.78rem; color: #999; }

/* 分区卡片 */
.farm-section { background: #fff; padding: 14px 16px; margin-bottom: 8px; }
.farm-section h3 { font-size: 0.95rem; margin: 0 0 10px; }
.farm-section p { font-size: 0.85rem; color: #666; line-height: 1.6; margin: 0; }

/* 农场特性 */
.feature-list { display: flex; flex-direction: column; gap: 8px; }
.feature-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; }
.feature-icon { font-size: 1.2rem; flex-shrink: 0; }
.feature-desc { font-size: 0.75rem; color: #999; margin-top: 2px; }

/* 物联数据 */
.iot-section { background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%); }
.iot-data-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.iot-data-card { flex: 1; min-width: 80px; text-align: center; background: #fff; border-radius: 8px; padding: 10px 6px; }
.iot-card-icon { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.iot-card-name { font-size: 0.7rem; color: #666; display: block; }
.iot-card-status { font-size: 0.65rem; font-weight: 600; }
.iot-card-status.online { color: #52c41a; }
.iot-card-status.offline { color: #999; }
.iot-update-time { font-size: 0.65rem; color: #999; text-align: center; margin-top: 8px; }

/* AI智能监测 */
.ai-section { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.ai-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.82rem; }
.ai-icon { font-size: 1rem; }
.ai-icon.warning { color: #e65100; }
.ai-icon.ok { color: #52c41a; }
.ai-type { font-weight: 600; }
.ai-time { font-size: 0.7rem; color: #999; margin-left: 8px; }

/* 设备动态 */
.event-section { background: #fafafa; }
.event-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 0.82rem; }
.event-dot { flex-shrink: 0; }
.event-type { font-weight: 600; }
.event-time { font-size: 0.7rem; color: #999; margin-left: 8px; }
.event-desc { font-size: 0.72rem; color: #999; margin-top: 2px; margin-left: 20px; }

/* 在售产品 */
.farm-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.farm-product-card { text-decoration: none; background: #f9f9f9; border-radius: 8px; overflow: hidden; }
.farm-product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.farm-product-placeholder { width: 100%; aspect-ratio: 1; background: #e8f5e9; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.farm-product-info { padding: 6px 8px 8px; }
.farm-product-name { font-size: 0.75rem; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.farm-product-meta { font-size: 0.72rem; color: #666; }
.farm-product-price { font-weight: 700; color: #dc3545; }
.farm-product-unit { color: #999; font-size: 0.65rem; }
.farm-product-stock { color: #999; font-size: 0.7rem; }
.farm-product-stage { font-size: 0.65rem; color: #2d6a4f; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.farm-product-stage .stage-dot { width: 6px; height: 6px; border-radius: 50%; background: #52c41a; display: inline-block; }

/* 产品列表（纵向） */
.farm-product-list { display: flex; flex-direction: column; gap: 4px; }
.farm-product-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; text-decoration: none; color: #333; }
.farm-product-row:last-child { border-bottom: none; }
.farm-product-thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #f5f5f5; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.farm-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.farm-product-detail { flex: 1; min-width: 0; }
.farm-product-detail .farm-product-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.farm-product-meta { font-size: 0.72rem; color: #666; margin-bottom: 4px; }
.farm-product-price { color: #dc3545; font-weight: 600; }
.farm-product-stock { color: #999; }
.farm-product-stages { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 0.6rem; color: #bbb; }
.farm-product-stages .stage-step { white-space: nowrap; }
.farm-product-stages .stage-step.current { color: #2d6a4f; font-weight: 600; }
.farm-product-stages .stage-arrow { color: #ddd; margin: 0 1px; }
.farm-product-arrow { color: #ccc; font-size: 1.2rem; flex-shrink: 0; }

.farm-follow-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #e65100;
    background: #fff;
    color: #e65100;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

/* ========== Swiper 主轮播 ========== */
.farm-swiper {
    width: 100%;
    height: 375px;
    background: #f5f5f5;
}
.farm-swiper .swiper-wrapper,
.farm-swiper .swiper-slide {
    height: 100%;
}
.farm-swiper .swiper-slide {
    height: 375px;
}
.farm-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.farm-swiper .swiper-pagination-bullet {
    background: rgba(255,255,255,0.6);
    opacity: 1;
}
.farm-swiper .swiper-pagination-bullet-active {
    background: #198754;
    width: 20px;
    border-radius: 4px;
}
.farm-swiper .swiper-button-next,
.farm-swiper .swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    --swiper-navigation-size: 16px;
}
.farm-swiper .farm-hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    position: absolute;
    top: 0;
    left: 0;
}

/* ========== 缩略图导航条 ========== */
.farm-thumb-swiper {
    width: 100%;
    height: 60px;
    background: #fff;
    padding: 6px 0;
}
.farm-thumb-swiper .swiper-slide {
    width: 60px;
    opacity: 0.5;
    cursor: pointer;
}
.farm-thumb-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.farm-thumb-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #198754;
    border-radius: 6px;
}

/* ========== 远程参观卡片 ========== */
.farm-visit-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 12px;
    margin: 10px 16px;
}
.farm-visit-card .visit-icon {
    font-size: 2rem;
}
.farm-visit-card .visit-text {
    flex: 1;
}
.farm-visit-card .visit-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a237e;
}
.farm-visit-card .visit-desc {
    font-size: 0.7rem;
    color: #5c6bc0;
    margin-top: 2px;
}
.farm-visit-card .visit-btn {
    padding: 8px 16px;
    background: #198754;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* ========== 底部操作栏 ========== */
.detail-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    display: flex;
    height: 52px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.detail-bottom-nav .bn-left {
    flex: 2;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.detail-bottom-nav .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.65rem;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    min-width: 0;
    padding: 0;
}
.detail-bottom-nav .bn-item i {
    font-size: 1.2rem;
}