/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Comic Sans MS", "Microsoft Yahei", sans-serif;
    background-color: #fef6e4;
    color: #333;
    overflow-x: hidden;
}

/* 头部图片样式 */
.header-image {
    width: 92%;
    height: auto;
    max-height: 200px;
    margin: 15px auto 20px;
    position: relative;
    z-index: 1;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(255, 165, 0, 0.3);
    overflow: hidden;
}

.header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播样式 */
#headerCarousel {
    width: 92%;
    height: auto;
    max-height: none;
    margin: 15px auto 25px;
    position: relative;
    z-index: 1;
    border-radius: 25px;
    box-shadow: 0 8px 16px rgba(255, 165, 0, 0.3);
    overflow: hidden;
}

/* 头部轮播图片样式 */
#headerCarousel .carousel-inner img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 轮播指示器样式 - 将横线改为小点 */
#headerCarousel .carousel-indicators button {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    border: none !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.3s ease !important;
    margin: 0 5px !important;
}

#headerCarousel .carousel-indicators button.active {
    background-color: #fff !important;
    width: 12px !important;
    height: 12px !important;
}

/* 分类按钮样式 */
.category-buttons {
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    margin-bottom: 25px;
    position: relative;
    z-index: 10;
    flex-wrap: nowrap;
    gap: 10px;
}

.category-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    border: 3px solid #fff;
    padding: 8px 10px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(237, 148, 48, 0.7);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: all 0.2s ease;
    min-width: 75px;
    text-align: center;
    position: relative;
}

.category-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(237, 148, 48, 0.7);
}

/* 栏目标题样式 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    margin: 0 15px 20px;
    background-color: #fff;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #ffd93d;
}

.section-title h2 {
    font-size: 22px;
    font-weight: bold;
    color: #ff6b6b;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.section-title a {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    background-color: #fff;
    padding: 6px 12px;
    border-radius: 15px;
    border: 2px solid #4ecdc4;
    box-shadow: 0 2px 4px rgba(78, 205, 196, 0.3);
}

.section-title a:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(78, 205, 196, 0.3);
}

/* 图片滑动区域样式 */
.image-slider {
    padding: 0 10px;
    margin-bottom: 30px;
}

.image-slider .swiper-slide {
    width: 200px;
    margin-right: 15px;
}

.image-slider .swiper-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 特色专题栏目样式 */
.featured-section {
    padding: 0 15px;
    margin-bottom: 30px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.featured-item {
    position: relative;
    width: 100%;
    display: block;
    text-align: center;
}

.featured-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    border: 4px solid #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.featured-item img:active {
    transform: scale(0.95);
}

/* 底部间距 */
.bottom-space {
    height: 80px;
}

/* 图片展示区域样式 */
.image-gallery {
    margin-bottom: 30px;
}

.image-gallery img {
    border: 4px solid #fff;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.image-gallery img:active {
    transform: scale(0.95);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-image {
        max-height: 180px;
    }
    
    .category-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
    
    .section-title {
        padding: 10px 15px;
    }
    
    .section-title h2 {
        font-size: 20px;
    }
    
    .featured-item img {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .header-image {
        max-height: 140px;
    }
    
    .category-buttons {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-btn {
        flex: 0 0 auto;
        font-size: 12px;
        padding: 7px 8px;
        min-width: 70px;
    }
    
    .section-title {
        padding: 8px 12px;
        margin: 0 10px 15px;
    }
    
    .section-title h2 {
        font-size: 18px;
    }
    
    .section-title a {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .featured-grid {
        gap: 10px;
    }
    
    .featured-item img {
        height: 180px;
    }
}

/* 图片名称样式 */
.image-container {
    position: relative;
    margin-bottom: 10px;
    width: 100%;
    display: block;
    text-align: center;
}

.image-name {
    position: relative;
    text-align: center !important;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    margin-top: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    display: block;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.image-name:active {
    transform: scale(0.95);
}

/* 大图轮播样式 */
#mainCarousel {
    width: 95%;
    max-width: 600px;
    margin: 20px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 图片标题样式 */
.image-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 20px auto 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
}

/* 参数输入区域样式 - 默认居中 */
.parameter-input {
    display: flex;
    gap: 10px;
    width: 80%;
    max-width: 400px;
    margin: 100px auto 20px;
    padding: 0 10px;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

/* 参数输入区域样式 - 有参数时置顶 */
.parameter-input.top-aligned {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .parameter-input {
        flex-direction: row;
        gap: 10px;
        margin-top: 60px;
        width: 95%;
        max-width: none;
    }
    
    .parameter-input.top-aligned {
        margin-top: 15px;
    }
    
    .parameter-input .form-control {
        width: 65%;
        max-width: none;
    }
    
    .parameter-input .btn-primary {
        width: 35%;
        max-width: none;
        padding: 10px;
    }
}

.parameter-input .form-control {
    width: 200px;
    border-radius: 15px;
    border: 2px solid #ffd93d;
    padding: 10px 15px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parameter-input .btn-primary {
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

#mainCarousel .carousel-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    min-height: 300px;
}

/* 缩略图轮播样式 */
#thumbCarousel {
    width: 95%;
    max-width: 600px;
    margin: 15px auto;
}

#thumbCarousel .carousel-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

#thumbCarousel .carousel-item img {
    width: calc(25% - 10px);
    height: auto;
    max-height: 120px;
    min-height: 60px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-color: #f8f8f8;
    display: block;
    margin: 0 auto;
}

#thumbCarousel .carousel-item img.active {
    opacity: 1;
    border-color: #ff6b35;
    transform: scale(1.05);
}

/* 脉动动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 按钮容器样式 */
.button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 100;
    align-items: flex-end;
}

/* 返回按钮样式 */
.back-button {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(108, 117, 125, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid #495057;
    white-space: nowrap;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(108, 117, 125, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 10px rgba(108, 117, 125, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid #495057;
}

/* 支付按钮样式 */
.pay-button {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 100;
    animation: pulse 2s infinite;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    border-bottom: 3px solid #e65c00;
}

.pay-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(255, 107, 53, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.3);
    animation: pulse 1.5s infinite;
}

.pay-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        0 2px 10px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #e65c00;
    animation: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #mainCarousel .carousel-item img {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    #mainCarousel .carousel-item img {
        min-height: 200px;
    }
    
    .button-container {
        bottom: 15px;
        right: 15px;
        gap: 10px;
        flex-direction: row;
    }
    
    .back-button {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .pay-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}