/* 
 * That's Sweet 主样式文件
 * That's Sweet Main Style File
 */

/* 基本样式 / Basic Styles */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; display: block; }
picture { display: block; }
iframe { max-width: 100%; }
:root {
    --primary-color: #009FE8;
    --secondary-color: #4ECDC4;
    --dark-color: #292F36;
    --light-color: #F7FFF7;
    --danger-color: #FF6B6B;
    --success-color: #6BFF8C;
    --warning-color: #FFD166;
    --info-color: #4ECDC4;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
    margin: 0;
    padding: 0;
    position: relative;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 107, 107, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 40% 70%, rgba(255, 209, 102, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 90% 80%, rgba(255, 107, 107, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 10% 90%, rgba(78, 205, 196, 0.1) 2px, transparent 2px);
    background-size: 100px 100px, 150px 150px, 80px 80px, 120px 120px, 90px 90px;
    background-position: 0 0, 50px 50px, 25px 25px, 75px 75px, 10px 10px;
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #ff4f4f;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* 布局 / Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-fluid {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏 / Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0 !important;
    position: relative;
    z-index: 1000;
}

.navbar-brand {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 3rem;
    position: relative;
    z-index: 1001;
}

.navbar-brand img {
    max-height: 60px !important;
    width: auto;
}

.navbar-nav {
    gap: 20px;
    margin-left: auto;
}

.navbar-nav.me-auto {
    margin-right: 0;
    margin-left: 0;
}

.navbar-nav:last-child {
    margin-left: auto;
}

/* 导航链接悬停颜色 */
.navbar-nav .nav-link:hover {
    color: #CEDA00 !important;
}

/* 动态菜单美化 */
.navbar-nav {
    gap: 20px !important;
    flex-direction: row !important;
    align-items: center !important;
    margin-left: auto !important;
}
.nav-item {
    margin: 0 !important;
}
.navbar {
    padding: 0.5rem 0 !important;
}
.navbar-brand img {
    max-height: 40px !important;
}
.dropdown-menu {
    min-width: 150px !important;
    padding: 0.5rem 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}
.dropdown-menu li {
    list-style: none !important;
    margin: 0 !important;
}
.dropdown-item {
    color: #333 !important;
    padding: 0.5rem 1rem !important;
}
.dropdown-item:hover {
    background: #f8f9fa !important;
    color: #CEDA00 !important;
}
.navbar-nav .dropdown-menu {
    position: absolute !important;
}
.navbar-nav .dropdown:hover > .dropdown-menu {
    display: block !important;
    margin-top: 0 !important;
}
.navbar-nav .dropdown-menu {
    display: none;
}
.navbar-nav .dropdown.show .dropdown-menu {
    display: block !important;
}

/* 页头 / Header */
.header {
    background-color: var(--light-color);
    padding: 4rem 0;
    text-align: center;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.header p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 主内容 / Main Content */
.main {
    padding: 3rem 0;
}

/* 产品卡片 / Product Cards */
.product-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.product-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.product-card .card-text {
    color: #6c757d;
}

.product-card .btn {
    background-color: var(--primary-color);
    border: none;
    padding: 0.5rem 1.5rem;
}

.product-card .btn:hover {
    background-color: #ff4f4f;
}

/* 分类图片展示 / Category Image Display */
.categories-section {
    padding: 3rem 0;
}

.category-image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    aspect-ratio: 1089 / 513;
    width: 100%;
    max-width: 1089px;
}

.category-image-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    color: #6c757d;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.category-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.category-image-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.3s, filter 0.3s;
}

.category-image-link:hover .category-image-container {
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.25), 0 8px 25px rgba(0,0,0,0.2);
    filter: brightness(1.08) saturate(1.1);
}

.category-image-link:hover .category-title {
    color: var(--primary-color);
}

/* 页脚 / Footer */
.footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 3rem 0;
}

.footer h4 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer ul li a {
    color: #adb5bd;
}

.footer ul li a:hover {
    color: #fff;
}

.footer-bottom {
    background-color: #1a1e24;
    padding: 1rem 0;
    color: #adb5bd;
    text-align: center;
}

/* 表单 / Forms */
.form-control {
    border-radius: 0;
    border: 1px solid #ced4da;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0088CC;
}

/* 联系表单 / Contact Form */
.contact-form {
    background-color: #fff;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-info {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2rem;
}

.contact-info h3 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-info i {
    margin-right: 0.5rem;
}

/* 关于我们 / About Us */
.about-section {
    padding: 4rem 0;
}

.about-section h2 {
    margin-bottom: 2rem;
}

.about-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* 客服聊天 / Live Chat */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chat-button i {
    font-size: 24px;
}

.chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 400px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h5 {
    margin: 0;
}

.chat-close {
    cursor: pointer;
    color: #fff;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.chat-input {
    border-top: 1px solid #e9ecef;
    padding: 15px;
    display: flex;
}

.chat-input input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    margin-right: 10px;
}

.chat-input button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.agent {
    align-items: flex-start;
}

.chat-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
}

.chat-message.user .chat-bubble {
    background-color: var(--primary-color);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message.agent .chat-bubble {
    background-color: #f1f3f5;
    color: var(--dark-color);
    border-bottom-left-radius: 4px;
}

.chat-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Banner */
.home-banner {
    background-color: #f8fff8;
    padding: 0;
    text-align: center;
    margin: 0;
    width: 100%;
}

.banner-content {
    max-width: 800px;
    margin: 0 auto;
}

.banner-title {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.banner-slogan {
    font-size: 1.25rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* 横幅图片 */
.banner-image-container {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/6;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
}

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

/* 大图菜单 */
.big-menu-section {
    padding: 1rem 0 2rem 0;
    background: #fff;
    margin-top: 0;
}

.big-menu-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 1rem;
}

.big-menu-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
    margin: 0 auto;
    max-width: 1089px;
    width: 100%;
}

.big-menu-image-container {
    width: 100%;
    max-width: 1089px;
    aspect-ratio: 1089 / 536;
    height: auto;
    overflow: hidden;
    margin: 0 auto;
}

.big-menu-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.big-menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.big-menu-title {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    background: #fff;
}

/* 响应式设计 / Responsive Design */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    /* 安卓浏览器适配：标题区域确保不被固定导航遮挡，并垂直居中 */
    .product-hero { padding: 120px 0 40px 0; min-height: 280px; }
    .product-hero h1 { font-size: 2rem; }
    .navbar-collapse {
        background-color: #fff;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }
    
    .header {
        padding: 2rem 0;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .chat-container {
        width: 90vw;
        height: 60vh;
        right: 5vw;
        bottom: 80px;
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-slogan {
        font-size: 1rem;
    }
    
    .banner-image-container {
        height: 200px;
    }
    
    /* 移动设备上隐藏装饰元素 */
    .candy-decoration {
        display: none;
    }
    
    /* 移动设备上减少主内容padding */
    .main {
        padding: 1rem 0;
    }
    
    /* 移动设备上调整大图菜单间距 */
    .big-menu-grid {
        gap: 1rem;
    }
    
    .big-menu-image-container {
        height: 300px;
    }
}

@media (max-width: 576px) {
    /* 更小屏适配 */
    .product-hero { padding: 110px 0 32px 0; min-height: 240px; }
    .product-hero h1 { font-size: 1.75rem; }
    .header h1 {
        font-size: 1.75rem;
    }
    
    .chat-container {
        width: 280px;
        height: 320px;
        right: 10px;
        bottom: 70px;
    }
    
    .chat-button {
        width: 50px;
        height: 50px;
        right: 10px;
    }
}

/* 证书展示样式 */
.about-certificates .row {
    margin: 0 -8px;
}

.about-certificates .col-6,
.about-certificates .col-md-3 {
    padding: 0 8px;
}

.certificate-card {
    background: white;
    border-radius: 8px;
    padding: 6px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.certificate-image-wrapper {
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    width: 100%;
    overflow: hidden;
}

.certificate-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.certificate-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.certificate-title {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin: 0 0 2px 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.certificate-desc {
    font-size: 9px;
    color: #666;
    margin: 0;
    line-height: 1.3;
    word-wrap: break-word;
}

/* 证书响应式调整 */
@media (max-width: 768px) {
    .certificate-card {
        padding: 5px 3px;
    }
    
    .certificate-image-wrapper {
        height: 90px;
        margin-bottom: 4px;
    }
    
    .certificate-title {
        font-size: 10px;
        margin-bottom: 1px;
    }
    
    .certificate-desc {
        font-size: 8px;
    }
}

@media (max-width: 576px) {
    .certificate-card {
        padding: 4px 2px;
    }
    
    .certificate-image-wrapper {
        height: 75px;
        margin-bottom: 3px;
    }
    
    .certificate-title {
        font-size: 9px;
        margin-bottom: 1px;
    }
    
    .certificate-desc {
        font-size: 7px;
    }
} 

/* 装饰性背景元素 / Decorative Background Elements */
/* 暂时注释掉，避免影响布局 */
/*
body {
    position: relative;
    overflow-x: hidden;
}
*/

/* 波浪装饰 */
.wave-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(45deg, 
        rgba(255, 107, 107, 0.1) 0%, 
        rgba(78, 205, 196, 0.1) 25%, 
        rgba(255, 209, 102, 0.1) 50%, 
        rgba(107, 255, 140, 0.1) 75%, 
        rgba(255, 107, 107, 0.1) 100%);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 70%);
    z-index: -1;
}

/* 点状装饰 */
.dot-decoration {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 4s ease-in-out infinite;
}

.dot-decoration:nth-child(1) { top: 15%; left: 20%; animation-delay: 0s; }
.dot-decoration:nth-child(2) { top: 25%; right: 25%; animation-delay: 1s; }
.dot-decoration:nth-child(3) { bottom: 35%; left: 30%; animation-delay: 2s; }
.dot-decoration:nth-child(4) { bottom: 25%; right: 20%; animation-delay: 3s; }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

/* 首页特殊装饰 */
.homepage-decoration {
    position: relative;
}

.homepage-decoration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(78, 205, 196, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 209, 102, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 关于我们页面装饰 */
.about-page-decoration {
    position: relative;
}

.about-page-decoration::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(255, 107, 107, 0.03) 0%, transparent 50%),
        linear-gradient(45deg, transparent 50%, rgba(78, 205, 196, 0.03) 100%);
    pointer-events: none;
    z-index: -1;
}

/* 响应式装饰调整 */
@media (max-width: 768px) {
    .candy-decoration {
        width: 40px;
        height: 40px;
    }
    
    .dot-decoration {
        width: 6px;
        height: 6px;
    }
    
    .wave-decoration {
        height: 60px;
    }
}

@media (max-width: 576px) {
    .candy-decoration {
        width: 30px;
        height: 30px;
    }
    
    .dot-decoration {
        width: 4px;
        height: 4px;
    }
    
    .wave-decoration {
        height: 40px;
    }
} 

/* 通讯订阅样式 */
.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-form .input-group {
    justify-content: center;
}

.newsletter-form .form-control {
    max-width: 300px;
}

.newsletter-form .btn {
    min-width: 120px;
}

/* 语言切换优化 */
.navbar-nav.ms-auto .dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

/* 大图菜单图片间隙优化 */
.big-menu-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px !important;
    justify-content: center;
}
.big-menu-item {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 1 220px;
    max-width: 220px;
}
.big-menu-image-container {
    padding: 0 !important;
    margin: 0 !important;
}
.big-menu-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

@media (max-width: 992px) {
    .big-menu-grid {
        gap: 10px !important;
    }
    .big-menu-item {
        flex: 0 1 48%;
        max-width: 48%;
    }
    .big-menu-image {
        height: 120px;
    }
}

@media (max-width: 576px) {
    .big-menu-grid {
        gap: 6px !important;
    }
    .big-menu-item {
        flex: 0 1 100%;
        max-width: 100%;
    }
    .big-menu-image {
        height: 90px;
    }
} 