/* 文件路径：/client/css/service-carousel.css */
/* 环形服务轮播组件样式 - 独立模块（回退版本） */

/* 容器 */
.customer-theme .carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.customer-theme .carousel-viewport {
  perspective: 1200px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
  cursor: grab;
}
.customer-theme .carousel-viewport:active {
  cursor: grabbing;
}

.customer-theme .carousel-rotate {
  position: relative;
  width: 100%;
  height: 300px;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  will-change: transform;
}

/* 卡片 */
.customer-theme .carousel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 270px;
  padding: 1.8rem 1.5rem;
  margin: -150px 0 0 -135px;
  background: rgba(30, 30, 45, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  color: #e0e0e0;
  text-align: center;
  backface-visibility: hidden;
  transition: none;
}

/* 卡片内部元素 */
.customer-theme .carousel-card .card-icon {
  margin-bottom: 0.8rem;
}
.customer-theme .carousel-card .icon-placeholder {
  width: 76px;
  height: 76px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 42%, rgba(39, 102, 188, 0.18), transparent 62%),
    linear-gradient(145deg, rgba(8, 24, 48, 0.96), rgba(4, 14, 30, 0.98));
  border: 1px solid rgba(79, 137, 216, 0.52);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #edf4ff;
  box-shadow:
    inset 0 0 22px rgba(45, 105, 196, 0.08),
    0 0 18px rgba(43, 114, 224, 0.1);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.customer-theme .carousel-card .service-icon {
  width: 48px;
  height: 48px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.customer-theme .carousel-card .service-icon-accent {
  stroke: #5ec3ff;
}
.customer-theme .carousel-card .service-icon-accent-fill {
  fill: #5ec3ff;
  stroke: none;
}
.customer-theme .carousel-card:hover .icon-placeholder {
  transform: translateY(-2px);
  border-color: rgba(91, 172, 255, 0.82);
  box-shadow:
    inset 0 0 24px rgba(45, 105, 196, 0.12),
    0 0 22px rgba(55, 139, 255, 0.22);
}
.customer-theme .carousel-card .card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f0f0f0;
}
.customer-theme .carousel-card .card-desc {
  font-size: 0.9rem;
  color: #b0b0c0;
  line-height: 1.5;
  margin: 0;
}

/* 箭头按钮（初始版本） */
.customer-theme .carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  line-height: 1;
}
.customer-theme .carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 12px rgba(79, 172, 254, 0.4);
}
.customer-theme .carousel-arrow-left {
  left: -10px;
}
.customer-theme .carousel-arrow-right {
  right: -10px;
}

/* 手机与小平板：单卡居中的触控轮播，保留桌面端的切换感 */
@media (max-width: 900px) {
  .customer-theme .carousel-container {
    width: 100%;
    padding: 0 0.35rem;
    box-sizing: border-box;
  }
  .customer-theme .carousel-viewport {
    --mobile-card-width: min(78vw, 320px);
    perspective: none;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 1rem 0 1.25rem;
    cursor: default;
  }
  .customer-theme .carousel-viewport::-webkit-scrollbar {
    display: none;
  }
  .customer-theme .carousel-rotate {
    display: flex;
    gap: 0.9rem;
    height: auto;
    transform: none !important;
    will-change: auto;
    width: auto;
    padding: 0 calc((100% - var(--mobile-card-width)) / 2);
    box-sizing: content-box;
  }
  .customer-theme .carousel-card {
    position: static;
    flex: 0 0 var(--mobile-card-width);
    width: var(--mobile-card-width);
    min-height: 280px;
    margin: 0;
    transform: none !important;
    opacity: 1 !important;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }
  .customer-theme .carousel-arrow {
    display: flex;
    width: 42px;
    height: 42px;
    top: 50%;
    background: rgba(8, 11, 18, 0.9);
    border-color: rgba(127, 104, 255, 0.45);
    box-shadow: 0 0 16px rgba(81, 116, 255, 0.16);
  }
  .customer-theme .carousel-arrow-left {
    left: 0;
  }
  .customer-theme .carousel-arrow-right {
    right: 0;
  }
}
