/* Rating Styles */
.rating-input {
    display: none;
}

.rating-label {
    cursor: pointer;
    font-size: 2rem;
    color: #ddd;
    transition: color 0.2s;
}

.rating-label:hover,
.rating-label.active {
    color: #ffc107;
}

/* Gallery Styles */
.gallery-img {
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

/* Menu Item Styles */
.menu-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

/* Review Card Styles */
.review-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.profile-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

/* APP-Style Stall Detail Styles */

/* 摊位屋顶装饰效果 */
.stall-roof-decoration {
    position: relative;
    height: 40px;
    margin-top: -20px;
    margin-bottom: 0;
    overflow: hidden;
    z-index: 10;
    animation: roofSway 6s ease-in-out infinite;
}

.stall-roof-decoration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 200px solid transparent;
    border-right: 200px solid transparent;
    border-bottom: 40px solid #667eea;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.stall-roof-decoration::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 180px solid transparent;
    border-right: 180px solid transparent;
    border-bottom: 35px solid #764ba2;
    z-index: 1;
    transition: all 0.3s ease;
}

/* 屋顶边缘装饰条纹 */
.stall-roof-stripes {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 40px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.15) 0px,
        rgba(255, 255, 255, 0.15) 20px,
        transparent 20px,
        transparent 40px
    );
    clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
    z-index: 2;
    animation: stripeShimmer 4s ease-in-out infinite;
}

/* 屋顶装饰动画效果 */
@keyframes roofSway {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

@keyframes stripeShimmer {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* 悬停效果 */
.stall-roof-decoration:hover {
    animation-duration: 2s;
}

.stall-roof-decoration:hover::before {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.stall-roof-decoration:hover .stall-roof-stripes {
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.25) 0px,
        rgba(255, 255, 255, 0.25) 20px,
        transparent 20px,
        transparent 40px
    );
}

/* Profile Avatar Section */
.stall-profile-section {
    /* 现代化APP风格渐变背景 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* 添加现代化的玻璃态效果 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* 添加微妙的边框和阴影 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    padding: 50px 20px;
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    
    /* 移除上方圆角，保持下方圆角 */
    border-radius: 0 0 30px 30px;
}

/* 现代化APP风格装饰效果 */
.stall-profile-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
    animation: modernFloat 8s ease-in-out infinite;
    pointer-events: none;
}

.stall-profile-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes modernFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.stall-profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.stall-avatar-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.stall-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stall-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stall-avatar-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.stall-profile-info {
    color: white;
}

.stall-profile-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.verified-badge {
    width: 20px;
    height: 20px;
    background: #28a745;
    border-radius: 50%;
    padding: 2px;
    filter: none;
}

.stall-profile-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 1rem;
    opacity: 0.9;
}

.stall-profile-number i {
    font-size: 1.1rem;
}

.stall-profile-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stall-profile-rating .rating-stars {
    color: #ffd700;
    font-size: 1.2rem;
    display: flex;
    gap: 3px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stall-profile-rating .rating-text {
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

.stall-profile-description {
    max-width: 400px;
    margin: 20px auto 0;
    opacity: 0.9;
    line-height: 1.5;
}

.description-title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    letter-spacing: 1px;
    position: relative;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.description-title::before,
.description-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, white, transparent);
    opacity: 0.6;
    margin: 0 15px;
}

.description-title::before {
    margin-right: 15px;
}

.description-title::after {
    margin-left: 15px;
}

.description-content {
    position: relative;
    background: transparent;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.description-text {
    margin: 0;
    font-size: 0.95rem;
    max-height: 4.5em;
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: relative;
    color: white;
    line-height: 1.5;
}

.description-text.expanded {
    max-height: none;
}

.description-expand-btn {
    background: linear-gradient(135deg, #FF8C42, #FF6B35);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin: 10px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
    width: fit-content;
}

.description-expand-btn:hover {
    background: linear-gradient(135deg, #FF6B35, #FF5722);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.description-expand-btn i {
    transition: transform 0.3s ease;
}

.description-expand-btn.expanded i {
    transform: rotate(180deg);
}

.stall-profile-description p {
    margin: 0;
    font-size: 0.95rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* 移动端屋顶装饰调整 */
    .stall-roof-decoration {
        height: 30px;
    }
    
    .stall-roof-decoration::before {
        border-left: 150px solid transparent;
        border-right: 150px solid transparent;
        border-bottom: 30px solid #667eea;
    }
    
    .stall-roof-decoration::after {
        top: 3px;
        border-left: 135px solid transparent;
        border-right: 135px solid transparent;
        border-bottom: 27px solid #764ba2;
    }
    
    .stall-roof-stripes {
        width: 270px;
        height: 30px;
    }
    
    .stall-profile-section {
        padding: 30px 15px;
    }
    
    .stall-avatar,
    .stall-avatar-placeholder {
        width: 130px;
        height: 130px;
        border-width: 3px;
    }
    
    .stall-avatar-placeholder {
        font-size: 2.5rem;
    }
    
    .stall-profile-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .verified-badge {
        width: 18px;
        height: 18px;
    }
    
    .stall-profile-number {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    /* 修复移动端verified商家摊位号偏移问题 */
    .stall-profile-title {
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        text-align: center !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .stall-profile-title .verified-badge {
        flex-shrink: 0 !important;
        margin-left: 4px !important;
    }
    
    /* 确保摊位号码在移动端始终居中显示 */
    .stall-profile-number {
        clear: both !important;
        width: 100% !important;
        text-align: center !important;
        position: static !important;
        transform: none !important;
        margin: 0 auto 12px auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 确保整个profile info区域居中 */
    .stall-profile-info {
        text-align: center !important;
    }
    
    .stall-profile-rating .rating-stars {
        font-size: 1.1rem;
    }
    
    .stall-profile-rating .rating-text {
        font-size: 0.85rem;
        color: white;
    }
    
    .stall-profile-description p {
        font-size: 0.9rem;
        color: white;
    }
    
    .description-title {
        font-size: 13px;
        margin-bottom: 12px;
        color: white;
        padding: 0 30px;
    }
    
    .description-title::before,
    .description-title::after {
        margin: 0 10px;
    }
    
    .description-content {
        padding: 12px;
    }
    
    .description-text {
        font-size: 0.9rem;
        max-height: 4em;
        color: white;
        line-height: 1.4;
    }
    
    .description-expand-btn {
        font-size: 11px;
        padding: 6px 12px;
        margin: 8px auto 0;
    }
}

@media (max-width: 480px) {
    /* 小屏幕屋顶装饰调整 */
    .stall-roof-decoration {
        height: 25px;
    }
    
    .stall-roof-decoration::before {
        border-left: 120px solid transparent;
        border-right: 120px solid transparent;
        border-bottom: 25px solid #667eea;
    }
    
    .stall-roof-decoration::after {
        top: 2px;
        border-left: 108px solid transparent;
        border-right: 108px solid transparent;
        border-bottom: 23px solid #764ba2;
    }
    
    .stall-roof-stripes {
        width: 216px;
        height: 25px;
    }
    
    .stall-profile-section {
        padding: 25px 10px;
    }
    
    .stall-avatar,
    .stall-avatar-placeholder {
        width: 90px;
        height: 90px;
    }
    
    .stall-profile-title {
        font-size: 1.3rem;
    }
    
    .stall-profile-rating {
        flex-direction: column;
        gap: 8px;
    }
}

/* Removed old overlay styles - replaced with new profile avatar section */

/* Option 1: Fixed Top Navigation Bar (Recommended)
Add a minimal, translucent navigation bar at the top:
```css
/* Replace the existing back button styles with this */

/* Fixed Top Navigation */
.stall-top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 60px;
}

.stall-top-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stall-nav-content {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    padding: 0;
}

.stall-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 40px;
    height: 40px;
    position: fixed;
    left: 15px;
    top: 10px;
    z-index: 1001;
}

.stall-back-btn:hover {
    background: rgba(0,0,0,0.05);
    color: #007bff;
}

.stall-back-btn span {
    display: none;
}

.stall-title-preview {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 120px);
    text-align: center;
}

.stall-top-nav.scrolled .stall-title-preview {
    opacity: 1;
}

/* Adjust hero section to account for fixed nav */
.stall-hero-section {
    position: relative;
    margin-top: 0; /* Remove negative margin */
    margin-bottom: 0;
}

/* Remove the old overlay styles */
.stall-cover-overlay {
    display: none;
}

/* Add padding to body to account for fixed nav */
* {
    box-sizing: border-box;
}

body {
    padding-top: 80px;
    overflow-x: hidden;
}
```

/* Content Container */
.stall-content {
    margin-top: 0;
    position: relative;
    z-index: 10;
    padding-top: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Stall Info Card */
.stall-info-card {
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 30px 25px 25px;
    margin-bottom: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    position: relative;
}

.stall-info-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
}

.stall-header {
    margin-bottom: 20px;
}

.stall-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .stall-title {
        font-size: 1.5rem;
    }
}

.stall-meta {
    margin-bottom: 15px;
}

.stall-number {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.stall-number i {
    margin-right: 6px;
    font-size: 0.9rem;
}

/* Rating Display */
.stall-rating {
    margin-bottom: 20px;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    color: #ffc107;
    font-size: 1.1rem;
}

.rating-stars .bi-star {
    color: #dee2e6;
}

.rating-text {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
}

/* Description */
.stall-description {
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Section Styles */
.stall-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 30px; /* 进一步增加与内容的间距 */
    margin-top: 10px; /* 增加与上方内容的间距 */
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #007bff;
    font-size: 1.2rem;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Enhanced Menu Grid for Different Screen Sizes */
@media (min-width: 1400px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 25px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

.menu-item-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.menu-item-image {
    height: 120px;
    overflow: hidden;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* 确保图片居中显示 */
    background-color: #f8f9fa; /* 为小图片提供背景色 */
    min-height: 120px; /* 确保最小高度 */
}

.menu-item-content {
    padding: 15px;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
}

.menu-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.menu-item-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #007bff;
    white-space: nowrap;
}

.menu-item-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Gallery Styles */
.gallery-count {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

/* Single Image Gallery */
.gallery-single {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.gallery-single-item {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-single-item:hover {
    transform: scale(1.02);
}

.gallery-single-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Small Gallery Grid (2-4 images) */
.gallery-small-grid {
    display: grid;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-2-items {
    grid-template-columns: 1fr 1fr;
}

.gallery-3-items {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.gallery-3-items .gallery-small-item:first-child {
    grid-row: 1 / 3;
}

.gallery-4-items {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.gallery-4-items .gallery-small-item:first-child {
    grid-row: 1 / 3;
}

.gallery-small-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.gallery-small-item:hover {
    transform: scale(1.05);
}

.gallery-small-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-sizing: border-box;
}

/* Large Gallery (5+ images) */
.gallery-large {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    min-height: 300px;
    align-items: stretch;
}

/* Enhanced Gallery for Large Screens */
@media (min-width: 1400px) {
    .gallery-large {
        grid-template-columns: 3fr 2fr;
        gap: 20px;
        min-height: 400px;
    }
    
    .gallery-featured {
        min-height: 400px;
    }
    
    .gallery-thumbnails {
        min-height: 400px;
    }
    
    .gallery-single-item {
        max-width: 700px;
    }
    
    .gallery-small-grid {
        gap: 15px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .gallery-large {
        grid-template-columns: 5fr 3fr;
        gap: 15px;
        min-height: 350px;
    }
    
    .gallery-featured {
        min-height: 350px;
    }
    
    .gallery-thumbnails {
        min-height: 350px;
    }
    
    .gallery-single-item {
        max-width: 600px;
    }
    
    .gallery-small-grid {
        gap: 12px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .gallery-large {
        grid-template-columns: 2fr 1fr;
        gap: 12px;
        min-height: 320px;
    }
    
    .gallery-featured {
        min-height: 320px;
    }
    
    .gallery-thumbnails {
        min-height: 320px;
    }
    
    .gallery-single-item {
        max-width: 500px;
    }
}

.gallery-featured {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.gallery-featured:hover {
    transform: scale(1.02);
}

.gallery-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.gallery-thumbnail {
    flex: 1;
    min-height: 0;
}

.gallery-thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.gallery-thumbnail,
.gallery-more {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
    width: 100%;
    height: auto;
}

.gallery-thumbnail:hover,
.gallery-more:hover {
    transform: scale(1.05);
    opacity: 1;
}

.gallery-thumbnail.active {
    opacity: 1;
    border: 2px solid #007bff;
}

.gallery-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gallery Overlays */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 24px;
}

.gallery-single-item:hover .gallery-overlay,
.gallery-small-item:hover .gallery-overlay,
.gallery-featured:hover .gallery-overlay,
.gallery-thumbnail:hover .gallery-overlay {
    opacity: 1;
}

.gallery-more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background-color 0.3s ease;
}

.gallery-more:hover .gallery-more-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-more-count {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.gallery-more-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-large {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr;
    }
    
    .gallery-3-items,
    .gallery-4-items {
        grid-template-columns: 1fr 1fr;
    }
    
    .gallery-3-items .gallery-small-item:first-child,
    .gallery-4-items .gallery-small-item:first-child {
        grid-row: auto;
    }
    
    .gallery-overlay i {
        font-size: 20px;
    }
    
    .gallery-more-count {
        font-size: 20px;
    }
    
    .gallery-more-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-small-grid {
        gap: 8px;
    }
    
    .gallery-large {
        gap: 8px;
    }
    
    .gallery-thumbnails {
        gap: 8px;
    }
    
    .gallery-2-items,
    .gallery-3-items,
    .gallery-4-items {
        grid-template-columns: 1fr;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Gallery Modal Styles */
.gallery-modal-content {
    background: #000;
    border: none;
    border-radius: 0;
}

.gallery-modal-header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-modal-header .modal-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.gallery-modal-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gallery-counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-modal-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: calc(100vh - 80px);
}

.gallery-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Navigation Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.gallery-nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

.gallery-prev-btn {
    left: 20px;
}

.gallery-next-btn {
    right: 20px;
}

/* Mobile Responsive for Gallery Modal */
@media (max-width: 768px) {
    .gallery-modal-header {
        padding: 10px 15px;
    }
    
    .gallery-modal-header .modal-title {
        font-size: 1rem;
    }
    
    .gallery-counter {
        font-size: 0.8rem;
    }
    
    .gallery-close-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .gallery-prev-btn {
        left: 10px;
    }
    
    .gallery-next-btn {
        right: 10px;
    }
    
    .gallery-image-container {
        padding: 10px;
    }
    
    .gallery-modal-body {
        height: calc(100vh - 60px);
    }
}

@media (max-width: 480px) {
    .gallery-modal-controls {
        gap: 10px;
    }
    
    .gallery-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .gallery-prev-btn {
        left: 5px;
    }
    
    .gallery-next-btn {
        right: 5px;
    }
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; /* 确保图片居中显示 */
    background-color: #f8f9fa; /* 为小图片提供背景色 */
}

/* Review Form */
.review-form-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.review-form-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.rating-input-section {
    margin-bottom: 20px;
}

.rating-container {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-card {
    background: #f8f9fa;
    border: none;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease;
}

.review-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-avatar-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.5rem;
}

.reviewer-details {
    flex: 1;
}

.reviewer-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px 0;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating i {
    color: #ffc107;
    font-size: 0.9rem;
}

.review-rating .bi-star {
    color: #dee2e6;
}

.review-date {
    font-size: 0.85rem;
    color: #6c757d;
    white-space: nowrap;
}

.review-content {
    margin-top: 12px;
}

.review-content p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* No Reviews State */
.no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-reviews i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-reviews p {
    margin: 0;
    font-size: 1rem;
}

/* Advertisements - 现代化APP风格 */
.stall-ads-section {
    margin: 20px 0;
    padding: 0;
}

.stall-top-ads {
    padding: 15px;
    margin: 0;
}

.stall-top-ad-item {
    margin-bottom: 15px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
}

.stall-top-ad-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stall-top-ad-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.stall-top-ad-item:hover .stall-top-ad-image {
    transform: scale(1.05);
}

.ad-link {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ad-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.ad-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-link:hover .ad-image {
    transform: scale(1.05);
}

/* Desktop and Large Screen Optimizations */
@media (min-width: 1200px) {
    .stall-content {
        max-width: 1400px;
        margin: 0 auto;
        padding: 20px 40px 0;
    }
    
    .stall-section {
        padding: 40px;
        margin-bottom: 40px;
    }
    
    .gallery-large {
        grid-template-columns: 3fr 2fr;
        gap: 20px;
    }
    
    .gallery-thumbnails {
        grid-template-rows: repeat(2, 1fr);
        gap: 15px;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 25px;
    }
    
    .social-share-section {
        max-width: 800px;
        margin: 40px auto;
    }
    
    /* Gallery Navigation for Desktop */
    .gallery-nav-btn {
        display: block;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .gallery-prev-btn {
        left: 30px;
    }
    
    .gallery-next-btn {
        right: 30px;
    }
    
    /* Comments and Reviews Optimization */
    .reviews-list {
        max-width: 1000px;
        margin: 0 auto;
        gap: 20px;
    }
    
    .review-card {
        padding: 30px;
    }
    
    .review-form-card {
        max-width: 800px;
        margin: 0 auto 40px;
        padding: 30px;
    }
    
    .rating-container {
        justify-content: center;
        margin: 20px 0;
    }
    
    .rating-label {
        font-size: 2.5rem;
    }
    
    .reviewer-avatar,
    .reviewer-avatar-placeholder {
        width: 55px;
        height: 55px;
    }
    
    .reviewer-name {
        font-size: 1.1rem;
    }
    
    .review-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1199px) {
    .stall-content {
        max-width: 1000px;
        margin: 0 auto;
        padding: 20px 30px 0;
    }
    
    .stall-section {
        padding: 30px;
        margin-bottom: 30px;
    }
    
    .gallery-large {
        grid-template-columns: 2fr 1fr;
        gap: 15px;
        min-height: 300px;
    }
    
    .gallery-featured {
        min-height: 300px;
    }
    
    .gallery-thumbnails {
        min-height: 300px;
    }
    
    .gallery-small-grid {
        gap: 15px;
    }
    
    .gallery-3-items {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .gallery-4-items {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .social-share-section {
        max-width: 700px;
        margin: 30px auto;
    }
    
    .gallery-single-item {
        max-width: 600px;
    }
    
    /* Gallery Navigation for Tablet */
    .gallery-nav-btn {
        display: block;
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .gallery-prev-btn {
        left: 25px;
    }
    
    .gallery-next-btn {
        right: 25px;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .stall-profile-section {
        padding: 40px 15px;
        border-radius: 0 0 25px 25px;
    }
    
    .stall-top-ads {
        padding: 12px;
    }
    
    .stall-top-ad-item {
        margin-bottom: 12px;
        border-radius: 14px;
    }
    
    .stall-top-ad-image {
        height: 120px;
    }
    
    .stall-content {
        padding: 20px 15px 0;
        max-width: 100%;
    }
    
    .stall-info-card {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 20px 20px 0 0;
    }
    
    .stall-section {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #dee2e6;
        padding: 20px 15px;
    }
    
    .section-title {
        margin-bottom: 25px;
        margin-top: 5px;
        font-size: 1.2rem;
    }
    
    .menu-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .menu-item-price {
        align-self: flex-end;
    }
    
    /* Gallery Mobile Optimizations */
     .gallery-small-grid,
     .gallery-large {
         max-width: 100%;
         margin-left: 0;
         margin-right: 0;
         min-height: auto;
     }
     
     .gallery-large {
         grid-template-columns: 1fr;
         gap: 15px;
     }
     
     .gallery-featured {
         min-height: 250px;
         margin-bottom: 10px;
     }
     
     .gallery-thumbnails {
         display: grid;
         grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
         gap: 6px;
         min-height: auto;
         height: auto;
     }
     
     .gallery-thumbnail {
         flex: none;
         aspect-ratio: 1;
     }
     
     .gallery-3-items,
     .gallery-4-items {
         grid-template-columns: 1fr 1fr;
         grid-template-rows: auto;
     }
     
     .gallery-3-items .gallery-small-item:first-child,
     .gallery-4-items .gallery-small-item:first-child {
         grid-row: auto;
     }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Touch improvements */
.gallery-item,
.menu-item-card,
.review-card {
    -webkit-tap-highlight-color: transparent;
}