/* ─── Hardware Integration Section ──────────────────────────────────────────── */
.hardware-section {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  background: radial-gradient(circle at center 0%, #f8fafc 0%, #ffffff 100%);
  padding: var(--space-16) 0;
}

/* Decorative Backgrounds */
.hardware-bg-pattern {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  height: 300px;
  background-image: radial-gradient(circle, #cbd5e1 2.5px, transparent 2.5px);
  background-size: 24px 24px;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

.pattern-left {
  left: -100px;
}

.pattern-right {
  right: -100px;
}

.hardware-header-wrap {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  margin-bottom: var(--space-16);
  position: relative;
  z-index: 2;
}

/* Underline for heading */
.hardware-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hardware-heading-underline {
  display: flex;
  gap: 6px;
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}

.hardware-heading-underline span {
  display: block;
  height: 4px;
  border-radius: 4px;
}

.hl-red { background-color: #ef4444; width: 40px; box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4); }
.hl-yellow { background-color: #facc15; width: 40px; box-shadow: 0 2px 10px rgba(250, 204, 21, 0.4); }
.hl-blue { background-color: #3b82f6; width: 40px; box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4); }

/* ─── Apple-style Floating Grid ────────────────────────────────────────────── */
.hardware-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap; /* Single line layout */
  justify-content: center;
  gap: var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: var(--space-16);
  padding: 0 var(--space-4);
}

.hardware-card {
  flex: 1 1 0; /* Distribute space equally */
  min-width: 120px; /* Minimum width before breaking */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  cursor: default;
  padding: 0;
  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.hardware-card:hover {
  transform: translateY(-5px);
}

.hardware-card_img-wrap {
  width: 100%;
  height: 180px; /* Big vertical space for the image */
  display: flex;
  align-items: flex-end; /* Bottom align so they sit on the same "floor" */
  justify-content: center;
  margin-bottom: var(--space-6);
  position: relative;
}

.hardware-card_img-wrap img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.08));
  transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
  position: relative;
  z-index: 1;
  transform-origin: bottom center;
}

/* Hover Effects */
.hardware-card:hover .hardware-card_img-wrap img {
  transform: scale(1.08) translateY(-5px);
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.12));
}

/* New Label Design */
.hardware-card_label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 6px 6px 6px 6px;
  background: white;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  position: relative;
  transition: all 0.3s ease;
  z-index: 2;
}

/* Animated gradient border for the label */
.hardware-card_label::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #ec4899, #f59e0b, #3b82f6);
  background-size: 300% 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: moveGradient 3s linear infinite;
}

/* Inner mask to cut out the center for border effect */
.hardware-card_label::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: white;
  border-radius: inherit;
  z-index: -1;
}

.hardware-card:hover .hardware-card_label {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.hardware-card:hover .hardware-card_label::before {
  opacity: 1;
}

@keyframes moveGradient {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 0%; }
}

.hardware-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hardware-icon.icon-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.hardware-icon.icon-orange {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.hardware-icon.icon-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.hardware-icon svg {
  width: 22px;
  height: 22px;
}

.hardware-card_title {
  font-size: var(--font-size-base);
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

/* Brands Box */
.hardware-brands-box {
  background: white;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius-xl);
  padding: var(--space-3) 0;
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  text-align: center;
  overflow: hidden;
}

.hardware-brands-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: var(--space-8);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hardware-brands-scroll-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  /* Add subtle fade masks to left and right edges */
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.hardware-brands-logos {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  padding-left: var(--space-12);
  animation: scrollBrands 20s linear infinite;
}

.hardware-brands-logos:hover {
  animation-play-state: paused;
}

@keyframes scrollBrands {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.brand-text {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

.brand-text.epson { color: #002D8B; }
.brand-text.tvs { color: #003B75; font-style: italic; }
.brand-text.zebra { color: #000; }
.brand-text.honeywell { color: #E0301E; }
.brand-text.rongta { color: #F26522; }
.brand-text.xprinter { color: #005A9C; }
.brand-text.tsc { color: #E3000F; text-decoration: underline; }
.brand-text.citizen { color: #0033A0; }

/* Responsive */
@media (max-width: 768px) {
  .hardware-grid {
    flex-wrap: wrap;
    gap: var(--space-8) var(--space-4);
  }
  .hardware-card {
    flex: 0 0 calc(50% - var(--space-4) / 2);
  }
  .hardware-brands-box {
    padding: var(--space-6) var(--space-4);
  }
  .hardware-brands-logos {
    gap: var(--space-4);
  }
}

@media (max-width: 480px) {
  .hardware-grid {
    gap: var(--space-6) var(--space-2);
  }
  .hardware-card {
    flex: 0 0 calc(50% - var(--space-2) / 2); /* 2 items per row on mobile */
  }
  .hardware-card_img-wrap {
    height: 110px;
    margin-bottom: var(--space-3);
  }
  .hardware-card_label {
    flex-direction: row;
    padding: 4px 10px 4px 4px;
    width: auto;
    text-align: left;
    gap: 6px;
  }
  .hardware-card_title {
    font-size: 11px;
    white-space: nowrap;
  }
  .hardware-icon {
    width: 24px;
    height: 24px;
  }
  .hardware-icon svg {
    width: 14px;
    height: 14px;
  }
  .brand-text {
    font-size: 1.2rem;
  }
}
