/* 菜品详情页样式 */

.detail-page {
    background: var(--bg-secondary);
    padding-bottom: 80px;
}

/* 1. 顶部导航区（透明渐变） */
.detail-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
    transition: background 0.3s ease;
}

.detail-header.scrolled {
    background: white;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.detail-header.scrolled .nav-btn,
.detail-header.scrolled .header-title {
    color: var(--text-primary);
}

.nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.back-btn {
    font-size: 18px;
}

.share-btn {
    font-size: 12px;
    width: auto;
    padding: 0 12px;
}

.header-title {
    font-size: 17px;
    font-weight: 600;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-title.visible {
    opacity: 1;
}

/* 2. 大图展示区（240px轮播） */
.image-carousel {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-slide.active {
    opacity: 1;
    position: relative;
}

.dish-image {
    width: 100%;
    height: 100%;
    font-size: 120px;
    border-radius: 0;
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    width: 20px;
    border-radius: 4px;
}

/* 3. 菜品信息区 */
.dish-info-section {
    background: white;
    padding: 20px 16px;
    margin-bottom: 8px;
}

.dish-header {
    margin-bottom: 12px;
}

.dish-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.dish-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    font-size: 14px;
}

.rating-score {
    font-size: 15px;
    font-weight: 600;
    color: #FF9500;
}

.rating-count {
    font-size: 13px;
    color: var(--text-light);
}

.dish-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.dish-tags .tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.dish-tags .tag.signature {
    background: rgba(196, 18, 48, 0.1);
    color: var(--primary-color);
}

.dish-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-symbol {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.price-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.price-unit {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 2px;
}

.original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 8px;
}

/* 4. 计价方式说明区 */
.pricing-notice {
    background: white;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.notice-icon {
    font-size: 16px;
}

.notice-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 5. 份量/数量选择器 */
.portion-selector {
    background: white;
    padding: 16px;
    margin-bottom: 8px;
}

.selector-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 20px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:active {
    background: var(--bg-secondary);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 40px;
    text-align: center;
}

/* 6. 菜品故事区 */
.dish-story {
    background: white;
    padding: 16px;
    margin-bottom: 8px;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.story-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.story-toggle {
    font-size: 13px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.story-toggle.expanded {
    transform: rotate(180deg);
}

.story-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.story-content.expanded {
    max-height: 1000px;
    padding-top: 16px;
}

.story-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

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

/* 7. 搭配推荐区 */
.pairing-section {
    background: white;
    padding: 16px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.pairing-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.pairing-scroll::-webkit-scrollbar {
    display: none;
}

.pairing-card {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
}

.pairing-img {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    margin-bottom: 8px;
    font-size: 40px;
}

.pairing-name {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pairing-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 8. 用户评价区 */
.reviews-section {
    background: white;
    padding: 16px;
    margin-bottom: 8px;
}

.review-count {
    font-size: 13px;
    color: var(--text-light);
    margin-left: 8px;
    font-weight: 400;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-card {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reviewer-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.review-rating {
    font-size: 12px;
}

.review-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.review-date {
    font-size: 12px;
    color: var(--text-light);
}

.view-more-btn {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-more-btn:active {
    background: var(--bg-secondary);
}

/* 底部留白 */
.bottom-spacer {
    height: 100px;
}

/* 9. 底部操作栏 */
.detail-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.price-summary {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.total-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.total-price .symbol {
    font-size: 16px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-buttons .btn {
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-buttons .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-buttons .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(196, 18, 48, 0.3);
}

.action-buttons .btn:active {
    transform: scale(0.95);
}

.btn-icon {
    font-size: 16px;
}
