/**
 * product-banner.css
 * 控制产品详情页 Hero Banner 区域
 * 布局：左侧文字 + 右侧产品图片卡片
 */

/* ===== Hero Banner 主容器 ===== */
.hero {
  /* 背景设置 - 保留植物背景 */
  background-image: url('/assets/imgs/products/banner.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: transparent;
  
  /* 尺寸与布局 */
  min-height: 520px;
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}

/* 当背景图为空时的回退渐变 */
.hero:not([style*="background-image"]),
.hero[style*="background-image: url('')"] {
  background: linear-gradient(135deg, #f5fbf7 0%, #e8f4ee 40%, #d4ece0 100%);
}

/* 背景遮罩层 - 左侧白色保护文字，右侧渐变透明 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.88) 30%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.20) 70%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* ===== Hero 内部容器 - Flex 布局 ===== */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

/* ===== 左侧文字区域 ===== */
.hero-left {
  flex: 0 0 46%;
  max-width: 46%;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-secondary, #6b7280);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--green-main, #2d6a4f);
}

.breadcrumb .sep {
  color: #d1d5db;
}

.breadcrumb .current {
  color: var(--green-main, #2d6a4f);
  font-weight: 500;
}

/* 标题行 */
.hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 700;
  color: var(--green-dark, #1a4d32);
  margin: 0;
  line-height: 1.3;
}

/* INCI 名称 */
.hero-inci {
  font-size: 15px;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 16px;
  font-weight: 500;
}

/* 产品描述 */
.hero-desc {
  font-size: 14px;
  color: var(--text-secondary, #6b7280);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 580px;
}

/* 操作按钮区域 */
.hero-actions {
  display: flex;
  gap: 12px;
}

/* 按钮样式 */
.hero-actions .btn {
  background: var(--green-main, #2d6a4f);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-actions .btn:hover {
  background: var(--green-dark, #1a4d32);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

/* ===== 右侧产品图片区域 ===== */
.hero-right {
  flex: 0 0 42%;
  max-width: 42%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 产品图片卡片容器 - 玻璃质感高级感 */
.product-banner-image-box {
  width: 100%;
  height: 350px;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 28px;
  border: none;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(45, 106, 79, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* 卡片内部微渐变增加层次 */
.product-banner-image-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(248, 252, 249, 0.25) 50%,
    rgba(255, 255, 255, 0.3) 100%
  );
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 0;
}

/* 产品图片 - 充盈展示 */
.product-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transform: scale(1.06);
  transition: transform 0.35s ease;
}

/* 图片悬停微动效 */
.product-banner-image-box:hover .product-banner-img {
  transform: scale(1.12);
}

/* 隐藏图片加载失败图标 */
.product-banner-img[src=""],
.product-banner-img:not([src]) {
  opacity: 0;
}

/* ===== 图片放大预览弹窗 (Lightbox) ===== */
.product-image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.78);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.product-image-lightbox.active {
  display: flex;
}

.product-image-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

.lightbox-close {
  position: absolute;
  right: 36px;
  top: 28px;
  color: #fff;
  font-size: 36px;
  font-weight: 300;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  z-index: 10001;
}

.lightbox-close:hover {
  opacity: 0.7;
}

/* 移动端 Lightbox 适配 */
@media (max-width: 768px) {
  .product-image-lightbox img {
    max-width: 94vw;
    max-height: 80vh;
    border-radius: 12px;
  }
  
  .lightbox-close {
    right: 16px;
    top: 16px;
    font-size: 28px;
    width: 40px;
    height: 40px;
  }
}

/* ===== 响应式：平板 (1024px - 1100px) ===== */
@media (max-width: 1100px) {
  .hero {
    min-height: 480px;
    padding: 40px 0;
  }
  
  .hero-inner {
    gap: 50px;
  }
  
  .hero-left {
    flex: 0 0 48%;
    max-width: 48%;
  }
  
  .hero-right {
    flex: 0 0 44%;
    max-width: 44%;
  }
  
  .product-banner-image-box {
    height: 340px;
  }
  
  .hero-title {
    font-size: clamp(22px, 2.8vw, 32px);
  }
}

/* ===== 响应式：平板 (768px - 1024px) ===== */
@media (max-width: 1024px) {
  .hero {
    min-height: 440px;
    padding: 32px 0;
  }
  
  .hero-inner {
    gap: 40px;
  }
  
  .hero-left {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .hero-right {
    flex: 0 0 44%;
    max-width: 44%;
  }
  
  .product-banner-image-box {
    height: 300px;
    border-radius: 24px;
  }
  
  .hero-desc {
    max-width: 480px;
  }
}

/* ===== 响应式：移动端 (≤768px) ===== */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 24px 0 32px;
  }
  
  /* 移动端背景遮罩 - 全白色 */
  .hero::before {
    background: rgba(255, 255, 255, 0.92);
  }
  
  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 16px;
  }
  
  /* 左侧文字区域 - 全宽 */
  .hero-left {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
  
  .breadcrumb {
    font-size: 12px;
    margin-bottom: 12px;
  }
  
  .hero-title {
    font-size: clamp(20px, 5vw, 28px);
  }
  
  .hero-inci {
    font-size: 13px;
    margin-bottom: 12px;
  }
  
  .hero-desc {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 100%;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
  }
  
  /* 右侧图片卡片 - 全宽，移动端放在文字下方 */
  .hero-right {
    flex: none;
    width: 100%;
    max-width: 100%;
    margin-top: 24px;
  }
  
  .product-banner-image-box {
    width: 100%;
    height: 280px;
    border-radius: 20px;
  }
}

/* ===== 响应式：小型移动端 (≤480px) ===== */
@media (max-width: 480px) {
  .hero {
    padding: 20px 0 28px;
  }
  
  .hero-inner {
    gap: 0;
  }
  
  .hero-title {
    font-size: clamp(18px, 5vw, 24px);
  }
  
  .product-banner-image-box {
    height: 240px;
    border-radius: 16px;
    margin-top: 0;
  }
  
  .hero-actions .btn {
    padding: 10px 18px;
    font-size: 13px;
  }
}
