KunWeb/ciyon/web/css/product_detail.css

330 lines
6.4 KiB
CSS

/* 产品详情页专属样式 */
.product-detail-wrap {
display: grid;
grid-template-columns: 3fr 1fr;
gap: 24px;
margin: 40px 0 60px;
align-items: flex-start;
}
/* 左侧主内容区 */
.product-detail-main {
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(22, 93, 255, 0.08);
padding: 30px;
}
body.night-mode .product-detail-main {
background-color: #2C3036;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.product-detail-main h2 {
font-size: 28px;
color: #2c3e50;
margin: 0 0 24px;
font-weight: 700;
padding-bottom: 12px;
border-bottom: 2px solid #165DFF;
}
body.night-mode .product-detail-main h2 {
color: #fff;
border-bottom-color: #4080FF;
}
.product-section {
margin-bottom: 32px;
}
.product-section h3 {
font-size: 20px;
color: #D32F2F;
margin: 0 0 16px;
font-weight: 600;
padding-left: 12px;
border-left: 4px solid #D32F2F;
}
body.night-mode .product-section h3 {
color: #FF6B6B;
border-left-color: #FF6B6B;
}
.product-section ul {
margin: 0;
padding-left: 24px;
}
.product-section li {
font-size: 15px;
color: #4E5969;
line-height: 1.8;
margin-bottom: 8px;
list-style-type: disc;
}
body.night-mode .product-section li {
color: #E5E6EB;
}
/* 左侧返回按钮 */
.product-return-link {
display: inline-block;
margin-top: 120px;
padding: 11px 24px;
background-color: #9b7070;
color: #fff !important; /* 强制覆盖a标签默认颜色 */
font-size: 15px;
font-weight: 500;
text-decoration: none !important; /* 移除a标签默认下划线 */
border-radius: 6px;
transition: background-color 0.2s ease;
text-align: center;
}
body.night-mode .product-return-link {
background-color: #4E5969;
color: #E5E6EB !important;
}
.product-return-link:hover {
background-color: #805858;
text-decoration: none !important; /* hover时也无下划线 */
}
body.night-mode .product-return-link:hover {
background-color: #6B7280;
}
/* 右侧侧边栏容器 */
.product-sidebar {
display: flex;
flex-direction: column;
gap: 20px;
}
/* 推荐产品模块 */
.product-recommend-sidebar {
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(22, 93, 255, 0.08);
padding: 20px;
}
body.night-mode .product-recommend-sidebar {
background-color: #2C3036;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.recommend-title {
font-size: 18px;
color: #2c3e50;
margin: 0 0 16px;
font-weight: 600;
padding-bottom: 8px;
border-bottom: 1px solid #e5e6eb;
}
body.night-mode .recommend-title {
color: #fff;
border-bottom-color: #4E5969;
}
.recommend-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.recommend-item {
display: block;
padding: 10px 14px;
color: #165DFF;
text-decoration: none;
font-size: 14px;
font-weight: 500;
border-radius: 6px;
background-color: #f9fafb;
border: 1px solid #e5e6eb;
transition: all 0.2s ease;
}
body.night-mode .recommend-item {
background-color: #373B41;
border-color: #4E5969;
color: #4080FF;
}
.recommend-item:hover {
color: #fff;
background-color: #165DFF;
border-color: #165DFF;
}
body.night-mode .recommend-item:hover {
background-color: #4080FF;
border-color: #4080FF;
}
.recommend-empty {
font-size: 14px;
color: #4E5969;
padding: 10px 0;
text-align: center;
}
body.night-mode .recommend-empty {
color: #E5E6EB;
}
/* 预约表单模块 */
.product-form {
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 12px rgba(22, 93, 255, 0.08);
padding: 24px;
border-top: 2px solid #165DFF;
}
body.night-mode .product-form {
background-color: #2C3036;
border-top-color: #4080FF;
}
.product-form h4 {
font-size: 18px;
color: #000;
margin: 0 0 20px;
font-weight: 600;
}
body.night-mode .product-form h4 {
color: #fff;
}
.product-form h4 span {
color: #165DFF;
font-weight: 700;
background-color: #e8f3ff;
padding: 2px 6px;
border-radius: 4px;
}
body.night-mode .product-form h4 span {
color: #4080FF;
background-color: #2C3E50;
}
.form-row {
display: flex;
flex-direction: column;
gap: 16px;
margin-bottom: 20px;
}
.form-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.form-group label {
font-size: 14px;
color: #4E5969;
font-weight: 500;
}
body.night-mode .form-group label {
color: #E5E6EB;
}
.form-group input {
padding: 10px 14px;
border: 1px solid #DCDFE6;
border-radius: 6px;
font-size: 14px;
transition: all 0.2s ease;
}
body.night-mode .form-group input {
background-color: #2C3036;
border-color: #4E5969;
color: #fff;
}
.form-group input:focus {
border-color: #165DFF;
outline: none;
box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}
.form-btn-group {
display: flex;
flex-direction: column;
gap: 12px;
}
.form-btn {
padding: 11px 0;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 15px;
font-weight: 500;
transition: all 0.2s ease;
text-align: center;
text-decoration: none;
}
.btn-reserve {
background-color: #D32F2F;
color: #fff;
}
.btn-reserve:hover {
background-color: #B71C1C;
}
.btn-cancel {
background-color: #F5F5F5;
color: #4E5969;
}
body.night-mode .btn-cancel {
background-color: #4E5969;
color: #E5E6EB;
}
.btn-cancel:hover {
background-color: #E0E0E0;
}
body.night-mode .btn-cancel:hover {
background-color: #6B7280;
}
.form-tip {
font-size: 13px;
color: #D32F2F;
height: 20px;
line-height: 20px;
margin-bottom: 12px;
}
body.night-mode .form-tip {
color: #FF6B6B;
}
/* 移动端适配 */
@media (max-width: 768px) {
.product-detail-wrap {
grid-template-columns: 1fr;
gap: 20px;
margin: 20px 0 40px;
}
.product-detail-main,
.product-recommend-sidebar,
.product-form {
padding: 20px;
}
.product-detail-main h2 {
font-size: 24px;
}
.product-section h3 {
font-size: 18px;
}
/* 移动端返回按钮占满宽度 */
.product-return-link {
width: 100%;
padding: 11px 0;
}
.recommend-list {
flex-direction: row;
flex-wrap: wrap;
gap: 8px;
}
.recommend-item {
padding: 6px 12px;
font-size: 12px;
}
}