﻿/* ============================================
   /portal/assets/css/banner.css
   PC 端首页布局样式（彻底隔离版）
============================================ */

/* ============================
   顶部 Banner（容器）
============================ */
.home-banner {
    width: 100%;
    height: 500px;      /* 容器高度原320 （下面有个图片高度也需要调整到一样高）*/
    /*background: #f5f5f5; 改成下吗这个变量颜色变    /* ⭐ 原来默认背景颜色浅灰色#f5f5f5 */
	background: var(--home-banner-bg-color, #f5f5f5);   /* ⭐ 默认浅灰色 */
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 0px;	 
}

/* Banner 文案区域 */
/* ⭐ 标题区域宽度限制 + 自动换行（防止长文字撑满整个 Banner） */
.banner-content {
    max-width: 30%;        /* 标题区域最多占 Banner 左侧 % 宽度 */
    word-wrap: break-word; /* 长字自动换行 */
    overflow-wrap: break-word;
}

.banner-title {
    font-size: 28px;       /* 可根据你需求调整 */
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 10px;
}

.banner-desc {
    font-size: 16px;
    line-height: 1.4;
}

/* ============================
   顶部 Banner（淡入淡出轮播）
============================ */
.banner-images {
    position: relative;
    width: 100%;
    height: 500px;     /* 图片高度原320（需调整到和容器一样高） */
    overflow: hidden;
}

.banner-images .banner-box {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: none;
}
.banner-images .banner-box.active {
    display: block;
}

/* ⭐ 新增：兜底保证 <img.active> 也能显示 */
.banner-images .banner-box img.active {
    display: block;
}

.banner-images .banner-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ⭐ 方案A：标题浮层叠加在每张轮播图上 */
.banner-box .banner-content {
    position: absolute;
    top: 40px;
    left: 50px;
    z-index: 10;
    /*color: #fff;换成下面对主副标题设置颜色的代码*/  
    pointer-events: none; /* 让标题不影响点击图片跳转 */
}

.banner-box .banner-title {
    font-size: 36px;   /* ← 主标题文字大小 */
    font-weight: 600;  /* ← 主标题文字粗细 */
}

.banner-box .banner-desc {
    font-size: 18px;   /* ← 副标题文字大小 */
    margin-top: 10px;
    font-weight: 500;  /* 新增：副标题粗细 */
}

.banner-box .banner-title,
.banner-box .banner-desc {
    /*color: #111;  改成下面变量版  /* 默认色，你可以改成黑色#444或其他 */
	color: var(--banner-text-color, #111);   /* 默认深灰色#111 */
}

/* ============================
   Banner 占位兜底容器
   当没有图片时显示后台配置的背景色
============================ */
.banner-placeholder {
    width: 100%;
    height: 100%;
    background: var(--home-banner-bg-color, #f5f5f5);
    display: block;
}

/* 小圆点指示器 */
.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 25px;
    position: relative;
    z-index: 55;
    margin: 10px 0;
}

.banner-dots span {
    width: 10px;
    height: 10px;
    background: #d5d5d5;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
}

.banner-dots span.active {
    background: #333;
}

/* ==============================================
   首页与类目页 Banner 间距差异化控制
   （放末尾，覆盖前面）
============================================== */

/* 首页专用：Banner 往上贴近导航栏 */
.home-page .home-banner {
    margin-top: -60px;   /* 首页拉近距离 */ /* 负值让 Banner 向上贴近导航栏 */
}

/* 类目页专用：保持正常，不遮挡标题 */
.category-page .home-banner {
    margin-top: 0;       /* 类目页不动 */
}
