/* 
 * 主样式文件
 * Yi.Chongdong.Store 
 */

:root {
    --primary-color: #8b5a2b;
    --secondary-color: #d2b48c;
    --accent-color: #f0e68c;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-color: #333;
    --light-bg: #f9f6f0;
    --dark-bg: #2c1e0f;
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: #fff;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

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

/* 头部视频 */
.header-video-container {
    position: relative;
    height: 75vh;
    min-height: 500px;
    overflow: hidden;
}

.header-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.header-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    padding: 15px 0;
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.navbar.scrolled {
    padding: 10px 0;
    background-color: rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand.scrolled img {
    max-height: 35px;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

.nav-link {
    position: relative;
    padding: 8px 15px !important;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* 卡片 */
.card {
    border: none;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border-radius: 10px;
    overflow: hidden;
}

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

.card-title {
    font-weight: 600;
}

/* 按钮 */
.btn {
    border-radius: 5px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3a5590;
    border-color: #3a5590;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 页脚 */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1.5rem;
}

footer a {
    color: rgba(255,255,255,0.8);
}

footer a:hover {
    color: white;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1.2rem;
}

/* 服务特色部分 */
.service-feature {
    text-align: center;
    padding: 2rem;
}

.service-feature i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 关于我们页面 */
.team-member {
    text-align: center;
    margin-bottom: 2rem;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 5px solid #f8f9fa;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 产品列表 */
.product-item {
    margin-bottom: 2rem;
}

.product-item img {
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .header-video-container {
        height: 60vh;
        min-height: 400px;
    }
    
    .service-feature {
        padding: 1.5rem;
    }
}

/* 工具页面样式 */
.tool-form-container {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.form-control {
    border-radius: 5px;
    padding: 0.6rem 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 107, 175, 0.25);
}

/* 结果页面 */
.result-container {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.result-section {
    margin-bottom: 2rem;
}

.result-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 管理后台 */
.admin-sidebar {
    background-color: #343a40;
    color: white;
    min-height: 100vh;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.8rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.3rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.admin-sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.admin-content {
    padding: 2rem;
}

.admin-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.admin-card .card-body {
    flex: 1;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 1s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 语言切换器 */
.language-switcher {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.language-switcher a {
    padding: 5px 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.language-switcher a:hover,
.language-switcher a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.language-switcher a.active {
    font-weight: bold;
}

/* 英雄区增强 */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 80vh;
    min-height: 500px;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: transform 8s ease;
}

.hero-slide:hover .image-slide img {
    transform: scale(1.05);
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
}

.hero-text-wrapper {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.9);
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border-radius: 50px;
}

.hero-buttons .btn-light {
    background-color: rgba(255,255,255,0.9);
    border: none;
}

.hero-buttons .btn-light:hover {
    background-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* 产品卡片增强 */
.product-card {
    position: relative;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.product-badge.sale {
    background-color: #ff6b6b;
    color: #fff;
}

.product-badge.new {
    background-color: #51cf66;
    color: #fff;
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-bottom: 100%;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px;
    background-color: rgba(255,255,255,0.9);
    transition: var(--transition);
    z-index: 2;
}

.product-card:hover .product-actions {
    bottom: 0;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-price {
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.btn-add-cart {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #ddd;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .hero-slide {
        height: 60vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-slide {
        height: 50vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .product-card {
        margin-bottom: 20px;
    }
}

/* 品牌区域增强 */
.brands-section {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.brands-carousel {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.brand-item {
    width: 200px;
    height: 120px;
    margin: 15px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.brand-item img {
    max-width: 100%;
    max-height: 60px;
    filter: grayscale(100%);
    transition: var(--transition);
}

.brand-item:hover img {
    filter: grayscale(0%);
}

.brand-name {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

/* 博客区域增强 */
.blog-section {
    padding: 60px 0;
}

.blog-card {
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    height: 100%;
}

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

.blog-image {
    position: relative;
    overflow: hidden;
    padding-bottom: 60%;
}

.blog-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 20px;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.btn-read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-right: 20px;
    transition: var(--transition);
}

.btn-read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
}

.btn-read-more:hover {
    color: var(--primary-color);
    padding-right: 25px;
}

.btn-read-more:hover::after {
    right: -5px;
}

/* 语言切换器 */
.language-switcher {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

.language-switcher a {
  padding: 5px 8px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.language-switcher a:hover,
.language-switcher a.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.language-switcher a.active {
  font-weight: bold;
}

/* 英雄区增强 */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-slide {
  position: relative;
  height: 80vh;
  min-height: 500px;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

.image-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
  transition: transform 8s ease;
}

.hero-slide:hover .image-slide img {
  transform: scale(1.05);
}

.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
}

.hero-text-wrapper {
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,0.9);
}

.hero-buttons .btn {
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border-radius: 50px;
}

.hero-buttons .btn-light {
  background-color: rgba(255,255,255,0.9);
  border: none;
}

.hero-buttons .btn-light:hover {
  background-color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* 产品卡片增强 */
.product-card {
  position: relative;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

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

/* 响应式调整 */
@media (max-width: 991.98px) {
  .hero-slide {
    height: 60vh;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 767.98px) {
  .hero-slide {
    height: 50vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .product-card {
    margin-bottom: 20px;
  }
}
