/* =========================================================
   Single Meta — 详情页自定义属性
   =========================================================
   用途：
   - 信息卡（消费水平 / 地址 / 营业时间 / 参考价格等字段）
   - 操作按钮（在地图中查看 / 复制地址）
   - 老司机评分（环形 + 5 维度）
   - 店铺环境图集
   - 技师资料图集
   - 灯箱
   - 特色标签
   - 属性相关移动端
   
   说明：
   - 这里放「metabox 自定义字段」的样式
   - 详情页骨架 + 正文在 single.css
   ========================================================= */

/* =========================================================
   1. 信息卡（属性字段列表）
   ========================================================= */
.tn-info-card {
    position: sticky;
    top: 100px;
    background: var(--tn-bg-3);
    border: 1px solid var(--tn-line);
    border-radius: var(--tn-radius);
    padding: 26px;
}

.tn-info-title {
    font-family: var(--tn-serif);
    font-size: 18px;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tn-line);
    letter-spacing: 1px;
}

.tn-info-list { list-style: none; margin: 0; padding: 0; }

.tn-info-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--tn-line);
    font-size: 14px;
}

.tn-info-list li:last-child { border-bottom: none; }

.tn-info-list span { color: var(--tn-text-mute); flex-shrink: 0; }

.tn-info-list strong {
    color: var(--tn-text);
    font-weight: 500;
    text-align: right;
}

.tn-info-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.tn-info-actions .tn-btn {
    width: 100%;
    padding: 12px 18px;
    font-size: 13px;
}

.tn-copy-addr { position: relative; }

.tn-copy-addr.is-copied::after {
    content: "已复制";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--tn-gold-2);
}

/* =========================================================
   2. 老司机评分
   ========================================================= */
.tn-rating-block { margin: 50px 0 0; }

.tn-rating-card {
    padding: 24px;
    background: var(--tn-bg-3);
    border: 1px solid var(--tn-line);
    border-radius: var(--tn-radius);
    display: flex;
    align-items: center;
    gap: 32px;
}

.tn-rating-overall {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tn-rating-ring {
    position: relative;
    width: 112px;
    height: 112px;
}

.tn-rating-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tn-ring-bg { color: rgba(255,255,255,0.08); }
.tn-ring-fg { color: var(--tn-gold); }

.tn-rating-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tn-serif);
    font-size: 30px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-rating-label { font-size: 13px; color: var(--tn-text-mute); }

.tn-rating-dims {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px 24px;
}

.tn-rating-dim { display: flex; flex-direction: column; gap: 6px; }
.tn-dim-label { font-size: 13px; color: var(--tn-text-dim); }
.tn-dim-value { display: flex; align-items: center; gap: 8px; }
.tn-dim-num { font-size: 14px; font-weight: 600; color: var(--tn-text); }

.tn-stars-precise {
    position: relative;
    display: inline-block;
    font-size: var(--star-size, 16px);
    line-height: 1;
    white-space: nowrap;
}

.tn-star-bg { color: rgba(201,162,74,0.2); }

.tn-star-fg {
    position: absolute;
    top: 0; left: 0;
    overflow: hidden;
    color: var(--tn-gold);
    white-space: nowrap;
}

.tn-rating-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--tn-text-mute);
    text-align: left;
}

/* =========================================================
   3. 店铺环境图集
   ========================================================= */
.tn-env-block { margin: 50px 0 0; }

.tn-env-single {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--tn-radius-sm);
    overflow: hidden;
    border: 1px solid var(--tn-line);
}

.tn-env-single .tn-env-item {
    display: block;
    width: 100%;
    height: 100%;
}

.tn-env-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: 0.3s;
}

.tn-env-single:hover img { transform: scale(1.02); }

.tn-env-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tn-env-double .tn-env-item {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--tn-radius-sm);
    overflow: hidden;
    border: 1px solid var(--tn-line);
    cursor: zoom-in;
    transition: 0.3s;
}

.tn-env-double .tn-env-item:hover {
    border-color: var(--tn-gold);
    transform: translateY(-3px);
}

.tn-env-double img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-env-scroll-wrap { position: relative; }

.tn-env-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.tn-env-scroll::-webkit-scrollbar { height: 6px; }
.tn-env-scroll::-webkit-scrollbar-thumb {
    background: var(--tn-line-strong);
    border-radius: 3px;
}
.tn-env-scroll::-webkit-scrollbar-thumb:hover { background: var(--tn-gold); }

.tn-env-scroll .tn-env-item {
    flex: 0 0 auto;
    width: 320px;
    aspect-ratio: 4 / 3;
    border-radius: var(--tn-radius-sm);
    overflow: hidden;
    border: 1px solid var(--tn-line);
    cursor: zoom-in;
    scroll-snap-align: start;
    transition: 0.3s;
}

.tn-env-scroll .tn-env-item:hover {
    border-color: var(--tn-gold);
    transform: translateY(-3px);
}

.tn-env-scroll img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-env-scroll-wrap::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 14px;
    width: 40px;
    background: linear-gradient(270deg, var(--tn-bg), transparent);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s;
}

.tn-env-scroll-wrap.at-end::after { opacity: 0; }

/* =========================================================
   4. 技师资料图集
   ========================================================= */
.tn-staff-block { margin: 50px 0 0; }

.tn-staff-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.tn-staff-item {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: var(--tn-radius-sm);
    overflow: hidden;
    border: 1px solid var(--tn-line);
    cursor: zoom-in;
    transition: 0.3s;
}

.tn-staff-item:hover {
    border-color: var(--tn-gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.tn-staff-item.tn-hidden { display: none; }

.tn-staff-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.tn-staff-item:hover img { transform: scale(1.05); }

.tn-staff-more-wrap {
    margin-top: 20px;
    text-align: center;
}

.tn-staff-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: transparent;
    border: 1px solid var(--tn-line-strong);
    border-radius: 999px;
    color: var(--tn-text);
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.25s;
}

.tn-staff-more-btn:hover {
    border-color: var(--tn-gold);
    color: var(--tn-gold-2);
}

.tn-staff-more-btn .tn-arrow { transition: transform 0.3s; }
.tn-staff-more-btn.expanded .tn-arrow { transform: rotate(180deg); }

/* =========================================================
   5. 灯箱
   ========================================================= */
.tn-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
    animation: tnFadeIn 0.2s;
}

.tn-lightbox.active { display: flex; }

@keyframes tnFadeIn { from { opacity: 0; } to { opacity: 1; } }

.tn-lightbox-content {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--tn-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: tnZoomIn 0.25s;
}

@keyframes tnZoomIn {
    from { transform: scale(0.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.tn-lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    display: block;
    object-fit: contain;
}

.tn-lightbox-close,
.tn-lightbox-nav {
    position: absolute;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--tn-line-strong);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10;
    border-radius: 50%;
}

.tn-lightbox-close {
    top: 24px; right: 28px;
    width: 44px; height: 44px;
    font-size: 22px;
}

.tn-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    font-size: 22px;
}

.tn-lightbox-prev { left: 24px; }
.tn-lightbox-next { right: 24px; }

.tn-lightbox-close:hover,
.tn-lightbox-nav:hover {
    background: rgba(201,162,74,0.2);
    border-color: var(--tn-gold);
    color: var(--tn-gold-2);
}

.tn-lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--tn-text-dim);
    font-size: 13px;
    letter-spacing: 2px;
}

/* =========================================================
   6. 详情页特色标签
   ========================================================= */
.tn-tags-block { margin: 50px 0 0; }

.tn-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tn-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(201, 162, 74, 0.08);
    border: 1px solid rgba(201, 162, 74, 0.3);
    border-radius: 999px;
    font-size: 13px;
    color: var(--tn-gold-2);
    letter-spacing: 1px;
}

/* =========================================================
   7. 移动端
   ========================================================= */
@media (max-width: 992px) {
    .tn-info-card { position: static; }
}

@media (max-width: 768px) {
    .tn-rating-card {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    .tn-rating-ring { width: 96px; height: 96px; }
    .tn-rating-num { font-size: 26px; }

    /* 手机端评分项固定两列：auto-fit 在窄屏会退化成单列，显得修长 */
    .tn-rating-dims {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 16px;
    }

    .tn-env-scroll .tn-env-item { width: 260px; }
    .tn-env-double { grid-template-columns: 1fr; }

    .tn-staff-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

    .tn-lightbox { padding: 20px; }
    .tn-lightbox-content img { max-width: 92vw; max-height: 60vh; }
    .tn-lightbox-nav { width: 40px; height: 40px; }
    .tn-lightbox-prev { left: 10px; }
    .tn-lightbox-next { right: 10px; }
    .tn-lightbox-close { top: 14px; right: 14px; width: 38px; height: 38px; }
}