/* 商家页面专用样式 - 响应式图库设计 */

/* 商家Hero区域 - 响应式图库设计 */
.merchant-hero-responsive {
    background: #f7f7f8;
    padding: 2rem 0;
    min-height: auto;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面标题 */
.merchant-page-title {
    font-size: clamp(24px, 4vw, 32px);
    margin: 8px 0 24px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #111;
}

/* 响应式布局：桌面端左右分栏，移动端上下堆叠 */
.merchant-hero-grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 900px) {
    .merchant-hero-grid {
        grid-template-columns: 400px 1fr;
    }
}

/* 左侧信息卡 */
.merchant-info-card-wrapper {
    position: relative;
}

@media (min-width: 900px) {
    .merchant-info-card-wrapper {
        position: sticky;
        top: 20px;
        align-self: start;
    }
}

.merchant-info-card-main {
    background: #fff;
    border: 1px solid #ececee;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(0,0,0,.08);
    padding: 18px;
}

/* 通用组件样式 */
.merchant-status-tags {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.merchant-status-tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.merchant-status-tag-open {
    background: #e6f8ef;
    color: #16a34a;
}

.merchant-status-tag-featured {
    background: #e6f0ff;
    color: #2563eb;
}

.merchant-description {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.5;
}

.merchant-meta-info {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.merchant-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 14px;
}

.merchant-rating-stars {
    display: flex;
    color: #fbbf24;
    margin-right: 8px;
}

.star {
    font-size: 14px;
}

.star.filled {
    color: #fbbf24;
}

/* 操作按钮 */
.merchant-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .merchant-actions {
        flex-direction: row;
    }
}

.merchant-btn {
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.merchant-btn:hover {
    transform: translateY(-1px);
}

.merchant-btn-primary {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
    border: none;
    color: #fff;
}

.merchant-btn-primary:hover {
    filter: brightness(0.98);
    color: #fff;
}

.merchant-btn-secondary {
    background: #fff;
    color: #111;
    border: 1px solid #ccc;
}

.merchant-btn-secondary:hover {
    background: #f0f0f0;
    color: #111;
}

/* 移动端轮播图样式 */
.mobile-carousel {
    display: block;
    margin-bottom: 16px;
}

@media (min-width: 900px) {
    .mobile-carousel {
        display: none;
    }
}

.carousel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 12px;
}

.slides {
    display: flex;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slides::-webkit-scrollbar {
    display: none;
}

.slide {
    min-width: 100%;
    aspect-ratio: 3 / 4;
    scroll-snap-align: start;
    max-height: 70vh;
    margin: 0 auto;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f6f6f6;
}

.dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ccc;
    opacity: 0.5;
    cursor: pointer;
}

.dot.active {
    opacity: 1;
    background: #333;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    border: 1px solid #ddd;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

.prev {
    left: 8px;
}

.next {
    right: 8px;
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 12px;
}

.thumbs img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: opacity 0.2s;
}

.thumbs img:hover {
    opacity: 0.8;
}

/* 桌面端店铺封面 */
.store-cover {
    border-radius: 14px;
    overflow: hidden;
    background: #f2f3f5;
    border: 1px solid #ececee;
    margin-bottom: 16px;
}

.store-cover img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.desktop-only {
    display: none;
}

@media (min-width: 900px) {
    .desktop-only {
        display: block;
    }
}

/* 桌面端图库样式 */
.desktop-gallery {
    display: none;
}

@media (min-width: 900px) {
    .desktop-gallery {
        display: grid;
        gap: 16px;
        grid-template-columns: minmax(300px, 600px);
        justify-content: center;
    }
}

.gallery-item {
    background: #fff;
    border: 1px solid #ececee;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,.08);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-caption {
    padding: 12px 16px;
    color: #444;
    font-size: 14px;
}

/* Lightbox 大图预览 */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    display: none;
    place-items: center;
    padding: 20px;
    z-index: 50;
}

.lightbox.open {
    display: grid;
}

.lb-inner {
    max-width: min(900px, 92vw);
    max-height: 92vh;
}

.lb-inner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

.lb-close {
    position: fixed;
    top: 14px;
    right: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .merchant-info-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .merchant-info-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .merchant-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .merchant-info-item {
        padding: 1.25rem;
    }

    .merchant-info-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .merchant-info-label {
        font-size: 1rem;
    }

    .merchant-info-list li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .merchant-info-card {
        margin: 0 0.5rem;
        padding: 1rem;
    }

    .merchant-info-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .merchant-info-icon {
        align-self: center;
    }
}

/* ========================================
   商家详细介绍区块样式
   ======================================== */

.merchant-about-section {
    background: #fff;
    padding: 2rem 0;
}

.merchant-about-content {
    line-height: 1.8;
    color: #333;
}

.merchant-about-content p {
    margin-bottom: 1.2rem;
    font-size: 15px;
    text-align: justify;
}

.merchant-about-content p:last-child {
    margin-bottom: 0;
}

.merchant-highlight {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ff6b9d;
    margin-top: 1.5rem !important;
}

.merchant-highlight strong {
    color: #ff6b9d;
    font-weight: 600;
}

/* ========================================
   相关商家推荐区块 V2 - 全新现代化设计
   ======================================== */

.related-merchants-section-v2 {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 4rem 0;
    position: relative;
}

.related-merchants-section-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0 50%, transparent);
}

/* 区块头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.section-header-content {
    flex: 1;
}

.section-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: #111;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    font-size: 1.2em;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.title-text {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff6b9d;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 107, 157, 0.1);
    transition: all 0.3s ease;
}

.view-all-link:hover {
    background: rgba(255, 107, 157, 0.2);
    transform: translateX(4px);
}

.view-all-link .arrow {
    transition: transform 0.3s ease;
}

.view-all-link:hover .arrow {
    transform: translateX(4px);
}

/* 商家网格 */
.merchants-carousel {
    position: relative;
}

.merchants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* 商家卡片 V2 */
.merchant-card-v2 {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.merchant-card-v2:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(255, 107, 157, 0.2);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* 图片区域 */
.card-image-wrapper {
    position: relative;
    overflow: hidden;
}

.card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.merchant-card-v2:hover .card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.merchant-card-v2:hover .image-overlay {
    opacity: 1;
}

/* 评分徽章 */
.rating-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    z-index: 2;
}

.star-icon {
    width: 14px;
    height: 14px;
    color: #333;
}

.rating-value {
    font-size: 13px;
    line-height: 1;
}

/* 类别标签 */
.category-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #ff6b9d;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* 卡片内容 */
.card-content {
    padding: 1.5rem;
}

.merchant-name {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 1rem 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 50px;
}

/* 元信息 */
.merchant-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.meta-icon {
    width: 16px;
    height: 16px;
    color: #999;
    flex-shrink: 0;
}

.meta-text {
    color: #666;
    line-height: 1.4;
}

/* 评分星星 */
.stars-row {
    display: flex;
    gap: 2px;
}

.star-small {
    width: 14px;
    height: 14px;
    color: #e0e0e0;
    transition: color 0.3s ease;
}

.star-small.filled {
    color: #ffc107;
}

.review-count {
    color: #999;
    font-size: 12px;
    margin-left: 4px;
}

.no-rating {
    color: #ccc;
    font-size: 12px;
}

/* 查看详情按钮 */
.card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.action-text {
    font-size: 14px;
    font-weight: 600;
    color: #ff6b9d;
}

.action-arrow {
    width: 18px;
    height: 18px;
    color: #ff6b9d;
    transition: transform 0.3s ease;
}

.merchant-card-v2:hover .action-arrow {
    transform: translateX(4px);
}

/* 底部按钮 */
.section-footer {
    text-align: center;
    margin-top: 3rem;
}

.explore-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
    transition: all 0.3s ease;
}

.explore-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
}

.btn-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.explore-more-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: #999;
    margin-bottom: 1.5rem;
}

.empty-action {
    display: inline-block;
    padding: 10px 24px;
    background: #f0f0f0;
    color: #666;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-action:hover {
    background: #ff6b9d;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .merchants-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .related-merchants-section-v2 {
        padding: 3rem 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .merchants-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.25rem;
    }

    .card-image {
        height: 200px;
    }

    .merchant-about-content p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .related-merchants-section-v2 {
        padding: 2rem 0;
    }

    .merchants-grid {
        grid-template-columns: 1fr;
    }

    .card-image {
        height: 220px;
    }

    .section-title {
        font-size: 24px;
    }

    .merchant-about-section {
        padding: 1.5rem 0;
    }
}
