/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    background-color: #fff;
}

/* 轮播图样式 */
.banner {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.banner-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.banner-item {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-text {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.banner-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.banner-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease;
}

.banner-indicator.active {
    background-color: #fff;
}

/* 分享按钮样式 */
.share-btn-container {
    padding: 15px;
    background: transparent;
    border-bottom: none;
}

/* 固定顶部分享按钮 */
.share-btn-container.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 15px;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom: none;
}

/* 固定底部分享按钮 */
.share-btn-container.fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 10px 15px;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-top: none;
}

/* 顶部固定logo */
.top-logo-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: white;
    padding: 5px 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-logo {
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

/* 轮播图顶部留出logo的空间 */
.banner {
    margin-top: 70px;
    margin-top: 0;
    padding-top: 70px;
}



.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: transparent;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.share-icon {
    font-size: 18px;
}

.share-text {
    font-size: 14px;
}

/* 商品列表样式 */
.product-section {
    padding: 15px;
    padding-bottom: 80px;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-card {
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

.product-card::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 8px;
    background: linear-gradient(90deg, #409EFF 0%, #66b1ff 100%);
    border-radius: 8px 0 8px 0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
    flex-shrink: 0;
}

.product-info {
    padding: 15px;
    flex: 1;
}

.product-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-product-info .product-desc {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.6;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    color: #ff5722;
    margin-bottom: 8px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.tag-green {
    background-color: #4caf50;
}

.tag-orange {
    background-color: #ff9800;
}

.tag-blue {
    background-color: #2196f3;
}

.tag-red {
    background-color: #f44336;
}

.tag-purple {
    background-color: #9c27b0;
}

.tag-gold {
    background-color: #ffc107;
    color: #333;
}

/* 详情页样式 */
.main-image {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    font-weight: bold;
}

.main-image-label {
    font-size: 18px;
    font-weight: bold;
}

.detail-section {
    padding: 15px;
    border-top: 10px solid #f5f5f5;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.detail-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-image {
    width: 100%;
    border-radius: 8px;
}

/* 预约表单样式 */
.reservation-section {
    padding: 15px;
    border-top: 10px solid #f5f5f5;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    color: #333;
}

.required {
    color: #ff5722;
}

.form-input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
}

.address-wrapper {
    display: flex;
    gap: 10px;
}

.address-input {
    flex: 1;
}

.location-btn {
    padding: 0 15px;
    background-color: #2196f3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 提交按钮样式 */
.submit-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2196f3;
    padding: 15px;
    text-align: center;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.submit-btn-inner {
    display: inline-block;
}

.bottom-placeholder {
    height: 60px;
}

/* 底部固定按钮容器 */
.bottom-buttons-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 8px 15px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

/* 底部按钮样式 */
.bottom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    box-shadow: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.bottom-btn:hover {
    transform: translateY(-2px);
}

.bottom-btn svg {
    color: #389BFF;
    width: 24px;
    height: 24px;
}

/* 分享按钮样式 */
.bottom-btn.share-btn {
    background-color: transparent;
    box-shadow: none;
}

.bottom-btn.share-btn svg {
    color: #389BFF;
}

/* 管理按钮样式 */
.admin-btn-bottom {
    display: none;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .product-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .banner {
        height: 300px;
    }

    .main-image {
        height: 350px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }

    .product-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .banner {
        height: 400px;
    }

    .main-image {
        height: 400px;
    }
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 80%;
    max-width: 400px;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.modal-btn-cancel {
    background-color: #ddd;
    color: #333;
}

.modal-btn-confirm {
    background-color: #2196f3;
    color: #fff;
}

/* 下拉刷新样式 */
.pull-refresh {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    transition: transform 0.3s ease;
    z-index: 10;
}

.pull-refresh-icon {
    width: 24px;
    height: 24px;
    border: 3px solid #409EFF;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.pull-refresh-icon.loading {
    display: block;
}

.pull-refresh-text {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 页面容器相对定位 */
.container {
    position: relative;
    overflow: hidden;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #409EFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}