/* ========================================
   智能POS专题页面样式 (ydpos-page.css)
   ======================================== */

/* 滚动容器 */
.ydpos-scroll-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
}

/* 滚动轨道 */
.ydpos-scroll-track {
  display: flex;
  gap: 24px;
  animation: ydpos-scroll 40s linear infinite;
  will-change: transform;
}

/* 暂停动画（鼠标悬停） */
.ydpos-scroll-track:hover {
  animation-play-state: paused;
}

/* 产品列表 */
.ydpos-products-list {
  display: flex;
  gap: 24px;
  flex-shrink: 0;
}

/* 产品卡片 */
.ydpos-product-card {
  width: 320px;
  flex-shrink: 0;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.ydpos-product-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* 产品图片区域 */
.ydpos-product-card .relative {
  position: relative;
}

.ydpos-product-card img {
  transition: transform 0.3s ease;
}

.ydpos-product-card:hover img {
  transform: scale(1.05);
}

/* 产品标签容器 */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

/* 产品标签样式 */
.product-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 9999px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.product-tag:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

/* 滚动动画 */
@keyframes ydpos-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* 按钮悬停效果增强 */
.ydpos-product-card a {
  position: relative;
  overflow: hidden;
}

.ydpos-product-card a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ydpos-product-card a:hover::before {
  width: 300px;
  height: 300px;
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
  .ydpos-product-card {
    width: 300px;
  }

  .ydpos-scroll-track {
    animation-duration: 35s;
  }
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
  .ydpos-scroll-container {
    padding: 15px 0;
  }

  .ydpos-product-card {
    width: 280px;
  }

  .ydpos-scroll-track {
    gap: 16px;
    animation-duration: 30s;
  }

  .ydpos-products-list {
    gap: 16px;
  }

  .product-tag {
    font-size: 11px;
    padding: 3px 10px;
  }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
  .ydpos-product-card {
    width: 260px;
  }

  .ydpos-scroll-track {
    animation-duration: 25s;
  }
}

/* 性能优化 */
.ydpos-scroll-track,
.ydpos-product-card {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

/* 无障碍支持 */
.ydpos-products-list[aria-hidden="true"] {
  pointer-events: none;
}

/* 加载状态 */
.ydpos-scroll-container.loading .ydpos-scroll-track {
  animation-play-state: paused;
  opacity: 0.5;
}

/* 打印样式 */
@media print {
  .ydpos-scroll-track {
    animation: none;
    flex-wrap: wrap;
  }

  .ydpos-product-card {
    page-break-inside: avoid;
  }
}

/* ========================================
   便携式移动收款设备 - 右侧特性面板样式
   ======================================== */

/* 特性面板容器 */
.ydpos-feature-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #6366f1; /* indigo-500 */
  padding: 2rem 1.5rem 0;
}

@media (min-width: 640px) {
  .ydpos-feature-panel {
    margin-left: auto;
    margin-right: auto;
    max-width: 42rem;
    padding-top: 4rem;
    padding-right: 0;
    padding-left: 4rem;
  }
}

@media (min-width: 1024px) {
  .ydpos-feature-panel {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }
}

/* 斜切装饰背景 */
.ydpos-feature-skew {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -0.75rem;
  z-index: -10;
  width: 100%;
  transform-origin: bottom left;
  transform: skewX(-30deg);
  background-color: #e0e7ff; /* indigo-100 */
  opacity: 0.2;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
  --tw-ring-inset: inset;
  --tw-ring-color: white;
}

/* 特性卡片 */
.ydpos-feature-card {
  width: 100%;
  max-width: none;
  background-color: #1f2937; /* gray-800 */
  padding: 2rem;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
  --tw-ring-color: rgb(255 255 255 / 0.1);
  border-radius: 4px;
}

.ydpos-feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
}

.ydpos-feature-card .space-y-3 > * + * {
  margin-top: 0.75rem;
}

.ydpos-feature-card p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: white;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .ydpos-feature-panel {
    margin-top: 2rem;
  }
}

@media (max-width: 640px) {
  .ydpos-feature-card {
    padding: 1.5rem;
  }

  .ydpos-feature-card h3 {
    font-size: 1.125rem;
  }

  .ydpos-feature-card p {
    font-size: 0.8125rem;
  }
}
