/* 主容器 */
.baichen-product-custom-section {
  /* width: 100vw; */
  /* min-height: 100vh; */
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 10px;
}

.baichen-product-custom-section .full-container {
  width: 100%;
  max-width: 1440px;
}

@media (max-width: 1500px) {
  .baichen-product-custom-section .full-container {
    width: 100%;
    /* max-width: 1200px; */
    padding: 0 40px;
  }

  .custom-attributes .option-group {
    gap: 10px;
  }
}



@media (max-width: 1200px) {
  .baichen-product-custom-section .full-container {
    padding: 0 20px;
  }
}

@media (max-width: 991px) {
  .baichen-product-custom-section .full-container {
    padding: 0 15px;
  }
}

/* 标题 */
.baichen-product-custom-title {
  padding-top: 60px;
  padding-bottom: 29px;
  text-align: center;
}

.baichen-product-custom-title h2 {
  color: #000;
}

/* 产品类型切换 */
.product-type-tabs {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 40px;
  width: 100%;
}

.product-type-tab {
  padding: 8px 12px;
  border-radius: 24px;
  background: #222;
  color: #fff;
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  outline: none;
  flex: 1;
  text-align: center;
}

.product-type-tab.active, 
.product-type-tab:hover {
  background: var(--color-primary);
}

@media (max-width: 480px) {
  .product-type-tabs {
    gap: 6px;
    margin-bottom: 25px;
  }

  .product-type-tab {
    font-size: 13px;
    padding: 8px 6px;
    flex: 0 0 calc(50% - 3px);
    min-height: 44px; /* 确保触摸目标足够大 */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .baichen-product-custom-title {
    padding-top: 30px;
    padding-bottom: 20px;
  }
}

@media (max-width: 991px) {
  .product-type-tabs {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
  }

  .product-type-tab {
    font-size: 14px;
    flex: 0 0 calc(50% - 4px); /* 计算精确宽度，减去间距 */
    padding: 10px 8px;
    text-align: center;
    word-break: break-word; /* 长文本自动换行 */
    line-height: 1.2;
  }
}

/* 主内容区域 */
.baichen-product-custom-content {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: stretch;
  gap: 30px;
  min-height: 680px;
  height: auto;
}

/* 左侧属性选择区域 */
.custom-attributes {
  /* width: 400px; */
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  height: 680px;
  min-height: 680px;
  animation: fadeInLeft 0.7s;
}

.custom-attributes .option-group {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.custom-attributes .option-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.custom-attributes .circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.custom-attributes .circle img {
  width: 50%;
  height: auto;
  filter: brightness(0);
}
.custom-attributes .option-item:hover .circle img ,
.custom-attributes .option-item.active .circle img {
  filter: brightness(0) invert(1);
}
.custom-attributes .option-item:hover .circle,
.custom-attributes .option-item.active  .circle {
  background-color: var(--color-primary);
}

.custom-attributes .label {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  text-align: center;
}



.custom-attributes .option-item.active .label {
  color: var(--color-primary);
}

/* 属性组 */
.custom-attributes .attribute-group {
  background: #F7F7F7;
  padding: 35px 30px;
  border-radius: 20px;
  display: none;
  flex: 1;
  overflow: hidden;
  flex-direction: column;
}

.custom-attributes .attribute-group:first-of-type {
  display: flex;
}

.custom-attributes .attribute-group.active {
  display: flex;
}

.attribute-group .attribute-title {
  font-weight: bold;
  margin-bottom: 14px;
  font-size: 30px;
  color: #222;
  flex-shrink: 0;
}

.attribute-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 12px;
  margin-right: -2px;
}

/* 属性选项项目 */
.attribute-option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  color: #404040;
  background: rgba(19, 19, 19, 0.05);
  padding: 6px 6px 6px 30px;
  border-radius: 29px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  flex-shrink: 0;
  min-height: 58px;
  cursor: pointer;
}

.attribute-option-item.active {
  color: #fff;
}

.attribute-option-item .color-fill {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(.7,0,.3,1);
  pointer-events: none;
  opacity: 1;
  will-change: transform;
}

.attribute-option-item.active .color-fill {
  transform: scaleX(1);
}

.attribute-option-title, 
.color-box {
  position: relative;
  z-index: 1;
}

.attribute-option-item .color-box {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

/* 滚动条样式 */
.attribute-options::-webkit-scrollbar {
  width: 8px;
}

.attribute-options::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  margin: 10px 0;
}

.attribute-options::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  transition: background 0.3s;
}

.attribute-options::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.4);
}

/* 中间产品图片 */
.custom-product-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* min-width: 350px;
  height: 680px; */
  animation: fadeIn 0.7s;
  position: relative;
}

.custom-product-image .product-image-wrapper {
  /* position: absolute;
  top: 0;
  left: 0; */
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-product-image .product-image-wrapper.active {
  display: flex;
  opacity: 1;
}

.custom-product-image .product-image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}



/* 右侧表单 */
.custom-form {
  width: 398px;
  display: flex;
  flex-direction: column;
  height: 680px;
  animation: fadeInRight 0.7s;
}

.custom-form .custom-form-title {
  margin-bottom: 20px;
}

.custom-form .custom-form-title h3 {
  font-size:clamp(22px, 2.1vw, 40px);
  color: #000;
}

.custom-form .custom-form-title p {
  color: var(--text-color);
  font-size: 20px;
}

.custom-form .custom-form-content {
  background: #F7F7F7;
  padding: 40px 20px;
  border-radius: 20px;
}

.custom-form .form-input {
  position: relative;
}

.custom-form .crmFormVali-error {
  top: auto;
  left: 12px;
  bottom: 0;
}
.custom-form input::placeholder {
  color: #848484; /* 修改为你想要的颜色 */
}

.custom-form input,
.custom-form button,
.custom-form .custom-form-input {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  outline: none;
}

.baichen-product-custom-section .custom-form .create-form-submit {
  position: relative;
  background: rgba(0,0,0,0);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 16px;
  margin-bottom: 0;
  height: 48px;
  overflow: hidden;
}
.baichen-product-custom-section .custom-form .create-form-submit:hover::before{
  content:attr(data-text);
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  width: 100%;
  height: 48px;
  left: 0;
  top: 0;
  background: var(--color-primary);
  border-radius: 20px;
  animation: animation_btn2 .3s ease-in-out;
}
.baichen-product-custom-section .custom-form .create-form-submit.leaving::before{
  content:attr(data-text);
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  width: 100%;
  height: 48px;
  left: 0;
  top: 0;
  background: var(--color-primary);
  border-radius: 20px;
  animation: animation_btn2_leaving .3s ease-in-out;
}
.baichen-product-custom-section .custom-form .create-form-submit:hover{
  color: #fff;
  transition: all .3s;
}
@keyframes animation_btn2_leaving{
  0% {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    transform: translate(0%, 0%);
  }
  70% {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 0 0;
  }
  100% {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 0 0;
    transform: translate(0%, 100%);
  }
}
@keyframes animation_btn2{
  0% {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 0 0;
    transform: translate(0%, 100%);
  }
  30% {
    width: 100%;
    height: 100%;
    border-radius: 50% 50% 0 0;
  }
  100% {
    width: 100%;
    height: 48px;
    border-radius: 24px;
    transform: translate(0%, 0%);
  }
}
.custom-form .custom-form-input {
  position: relative;
  cursor: pointer;
}

.custom-form .custom-form-input .form-inner {
  display: flex;
  position: relative;
  align-items: center;
  gap: 10px;
  height: 24px;
}

.custom-form .custom-form-input .form-inner .form-inner-img {
  max-height: 24px;
  max-width: 24px;
  filter: grayscale(100%) invert(0.6);
}

.custom-form .custom-form-input .form-inner .form-inner-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s;
}

.custom-form .custom-form-input.active .form-inner .form-inner-icon {
  transform: translateY(-50%) rotate(180deg);
}

.custom-form .custom-form-input .form-inner .form-inner-icon i {
  font-size: 14px;
}

.custom-form .custom-form-input .inner-list {
  display: none;
  gap: 6px;
  background-color: var(--bg-color);
  padding: 28px 18px;
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  border-radius: 14px;
  grid-template-columns: repeat(4, 1fr);
  animation: fadeIn 0.3s;
  z-index: 100;
}

.custom-form .custom-form-input.active .inner-list {
  display: grid;
}

.custom-form .custom-form-input .inner-list::after {
  content: '';
  position: absolute;
  top: -10px;
  right: 26px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--bg-color);
}

.custom-form .custom-form-input .inner-list .inner-list-title {
  font-size: 14px;
  color: #fff;
  word-break: break-word;
  display: none;
}

.custom-form .custom-form-input .inner-list .text-active {
  display: inline-block;
  background: #fff;
  border-radius: 8px;
  color: #000;
  padding: 8px;
}

/* 动画效果 */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@media (max-width:1500px) {
.custom-attributes,.custom-form{width:350px;}
.custom-attributes .circle{width:70px;height:70px;}
}



/* 响应式设计 */

@media screen and (max-width:1441px) {
.custom-form .custom-form-title p{font-size:19px;}
}

@media screen and (max-width:1367px) {
.custom-form .custom-form-title p{font-size:18px;}
}

@media screen and (max-width:1281px){
.custom-form .custom-form-title p{font-size:17px;}
}


@media (max-width: 1200px) {
  .baichen-product-custom-content {
    min-height: 500px;
    flex-wrap: wrap;
  }
  
  .custom-attributes,
  .custom-form {
    height: 500px;
  }
  
  .custom-attributes {
    width: 350px;
  }
  
  .custom-form {
    width: 100%;
    padding: 30px;
    height: 100%;
  }

  .custom-form .custom-form-title h3 {
    font-size: 36px;
  }
}

@media (max-width: 992px) {
  .baichen-product-custom-content {
    flex-direction: column;
    align-items: center;
    min-height: auto;gap:10px;
  }
  
  .baichen-product-custom-content .custom_class {flex-direction: column;width: 100%;}

  .custom-attributes,
  .custom-form {
    width: 100%;
    max-width: 700px;margin:0 auto;
    height: auto;
    min-height: auto;
  }
  .custom-form{order:3;padding:0;margin:30px auto 0;}
  .custom-attributes {order:2;}
  
  .attribute-options {
    max-height: 300px;
  }
.custom-attributes .option-group{justify-content:center;}
  .custom-attributes .circle {
    width: 80px;
    height: 80px;
  }

  .custom-attributes .attribute-group {
    padding: 30px 20px;
    min-width: auto;
  }

  .custom-form .custom-form-title h3 {
    font-size: 28px;
  }
  .attribute-group .attribute-title {
    font-size: 24px;
  }

  .attribute-option-item .color-box {
    width: 36px;
    height: 36px;
  }
  
  .custom-product-image {
    width: 100%;
    max-width: 700px;
    height: 400px;
    min-width: auto;
    margin: 30px auto;order:1;
  }

.custom-form .custom-form-title p{font-size:16px;}

}

@media (max-width: 768px) {

  .attribute-option-item {
    font-size: 14px;
    min-height: initial;
  }

  .attribute-option-item .color-box {
    width: 32px;
    height: 32px;
  }
  
  .custom-form{padding:0;}
  
  .attribute-options {
    max-height: 250px;
  }

  .custom-attributes .circle {
    width: 60px;
    height: 60px;
  }

  .custom-attributes .label {
    font-size: 14px;
  }
  
  .custom-form .custom-form-title h3 {
    font-size: 24px;
  }
  
  .custom-product-image {
    height: 300px;
    margin: 20px 0;
  }
  
  .custom-product-image .product-image-wrapper:hover img {
    transform: none; /* 移动端禁用hover效果 */
  }

.custom-form .custom-form-title p{font-size:15px;}

.attribute-group .attribute-title{font-size:22px;}
.custom-form .custom-form-title h3{font-size:22px;}


.custom-attributes .attribute-group{padding:20px 15px;}
.custom-form .custom-form-content{padding:20px 15px;}

}


@media screen and (max-width:576px) {
.custom-attributes .circle{display:none;}
.custom-attributes .label{margin-top:0;}
.custom-attributes .option-group{gap:8px;flex-wrap: wrap;}
.custom-attributes .option-item{border-radius:60px;border:1px solid #E5E5E5;padding:6px 8px;width: calc(50% - 8px);}
.custom-attributes .option-item.active{background:#135EA9;border-color:#135EA9;}
.custom-attributes .option-item.active .label{color:#fff;}

.product-type-tab{padding:9px 8px;min-height:0;}

.attribute-options{gap:5px;}
.attribute-option-item .color-box{width:28px;height:28px;}
.attribute-option-item{padding:6px 6px 6px 20px;}

.custom-form input, .custom-form button, .custom-form .custom-form-input{margin-bottom:10px;padding:8px 20px;font-size:14px;}

}

@media screen and (max-width:480px) {
.custom-form .custom-form-title p{font-size:14px;}

.attribute-group .attribute-title{font-size:20px;}
.custom-form .custom-form-title h3{font-size:20px;}

}	






