.detail-page {
  min-height: calc(100vh - 74px);
  background: var(--surface);
}

.detail-hero {
  color: #ffffff;
  background-image: linear-gradient(90deg, rgba(20, 33, 38, 0.9), rgba(20, 33, 38, 0.42)), var(--detail-image);
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0;
}

.detail-back {
  width: fit-content;
  margin-bottom: 28px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-weight: 900;
}

.detail-hero h1 {
  max-width: 820px;
  margin: 10px 0 16px;
  font-size: 3.6rem;
  line-height: 1.02;
}

.detail-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.08rem;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.detail-body {
  padding: 72px 0;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 12px;
}

.detail-gallery img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  background: var(--line);
  border-radius: var(--radius);
}

.detail-gallery img:first-child {
  grid-row: span 2;
  min-height: 492px;
}

.detail-system-head {
  margin-top: 42px;
}

.detail-system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.detail-system-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  margin: 0;
  color: #ffffff;
  background: var(--panel-dark);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(20, 33, 38, 0.13);
}

.detail-system-card img {
  width: 100%;
  height: 100%;
  min-height: 270px;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 420ms ease, opacity 220ms ease, filter 220ms ease;
}

.detail-system-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(12, 22, 27, 0.04), rgba(12, 22, 27, 0.82));
  pointer-events: none;
}

.detail-system-card figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.24;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.detail-system-card:hover img {
  filter: saturate(1.12);
  opacity: 1;
  transform: scale(1.04);
}

.detail-cta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 28px;
  padding: 26px;
  color: #ffffff;
  background: var(--panel-dark);
  border-radius: var(--radius);
}

.detail-cta h2 {
  margin: 0 0 8px;
}

.detail-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 900px) {
  .detail-hero h1 {
    font-size: 2.6rem;
  }

  .detail-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .detail-gallery img:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 320px;
  }

  .detail-system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-cta {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .detail-hero-inner {
    min-height: 360px;
    padding: 54px 0;
  }

  .detail-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(1.86rem, 9.2vw, 2.24rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .detail-hero p {
    font-size: 0.96rem;
  }

  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .detail-gallery img,
  .detail-gallery img:first-child {
    min-height: 220px;
  }

  .detail-gallery-suggestion {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
  }

  .detail-gallery-suggestion a {
    width: 100%;
  }

  .detail-system-grid {
    grid-template-columns: 1fr;
  }

  .detail-system-card,
  .detail-system-card img {
    min-height: 220px;
  }

  .detail-body {
    padding: 48px 0;
  }

  .detail-cta {
    gap: 14px;
    padding: 18px;
  }

  .detail-cta h2 {
    font-size: 1.22rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .detail-cta p {
    font-size: 0.94rem;
  }
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(96deg, rgba(11, 17, 19, 0.94), rgba(8, 88, 82, 0.58), rgba(52, 95, 116, 0.32)),
    var(--detail-image);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  opacity: 0.42;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.detail-back {
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.detail-back:hover,
.detail-back:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.detail-gallery img {
  box-shadow: 0 14px 32px rgba(20, 33, 38, 0.12);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.detail-gallery img:hover {
  filter: saturate(1.12);
  box-shadow: var(--shadow-strong);
  transform: translateY(-5px);
}

.detail-gallery-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(10, 168, 150, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(10, 168, 150, 0.1), rgba(255, 255, 255, 0.58)),
    var(--panel);
  box-shadow: 0 14px 32px rgba(20, 33, 38, 0.1);
}

.detail-gallery-suggestion span {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: #087b70;
  background: rgba(10, 168, 150, 0.12);
  font-size: 0.78rem;
  font-weight: 950;
}

.detail-gallery-suggestion p {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.5;
}

.detail-gallery-suggestion a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-weight: 900;
  white-space: nowrap;
}

body.ui-theme-dark .detail-gallery-suggestion {
  border-color: rgba(130, 244, 232, 0.16);
  background:
    linear-gradient(135deg, rgba(10, 168, 150, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(8, 22, 26, 0.86);
}

body.ui-theme-dark .detail-gallery-suggestion span {
  color: #83f4ea;
  background: rgba(130, 244, 232, 0.1);
}

body.ui-theme-dark .detail-gallery-suggestion p {
  color: rgba(232, 248, 246, 0.72);
}

.detail-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-dark), var(--panel-teal));
  box-shadow: var(--shadow-strong);
}

.detail-cta::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  pointer-events: none;
  transform: translateX(-120%);
  transition: transform 520ms ease;
}

.detail-cta:hover::before {
  transform: translateX(120%);
}

.cctv-showcase {
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  padding: clamp(20px, 3vw, 34px);
  color: #ffffff;
  border: 1px solid rgba(99, 231, 218, 0.16);
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 0%, rgba(82, 205, 191, 0.22), transparent 30%),
    radial-gradient(circle at 92% 12%, rgba(222, 179, 77, 0.14), transparent 26%),
    linear-gradient(135deg, #071719, #0b2b2f 48%, #081417);
  box-shadow: 0 22px 54px rgba(8, 18, 22, 0.2);
}

.cctv-showcase::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.38;
  pointer-events: none;
}

.cctv-showcase > * {
  position: relative;
  z-index: 1;
}

.cctv-showcase-head {
  display: grid;
  max-width: 860px;
  gap: 10px;
}

.cctv-showcase-head h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.cctv-showcase-head p {
  max-width: 720px;
  margin: 0;
  color: rgba(234, 249, 247, 0.72);
  font-weight: 750;
  line-height: 1.65;
}

.cctv-brand-panel {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(130, 244, 232, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.cctv-brand-panel h3,
.cctv-device-head h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
}

.cctv-brand-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cctv-brand-logo {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(145, 245, 234, 0.16);
  border-radius: 18px;
  color: rgba(235, 255, 252, 0.9);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.12);
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-align: center;
}

.cctv-device-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
}

.cctv-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cctv-specs span {
  padding: 7px 10px;
  border: 1px solid rgba(130, 244, 232, 0.14);
  border-radius: 999px;
  color: rgba(231, 248, 246, 0.7);
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.78rem;
  font-weight: 850;
}

.cctv-device-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.cctv-device-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 240px 1fr;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(130, 244, 232, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    #081719;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.cctv-card-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  background-position: center;
  background-size: cover;
  filter: brightness(1.14) contrast(1.06) saturate(1.04);
  overflow: hidden;
}

.cctv-card-photo img {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cctv-device-card img {
  transition:
    opacity 220ms ease,
    transform 520ms ease,
    filter 220ms ease;
}

.cctv-device-card::after {
  display: none;
}

.cctv-device-card-1 .cctv-card-photo {
  background-position: 72% 18%;
}

.cctv-device-card-2 .cctv-card-photo {
  background-position: 52% 34%;
}

.cctv-device-card-3 .cctv-card-photo {
  background-color: #d7d3ca;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: contain;
}

.cctv-device-card-4 .cctv-card-photo {
  background-position: 50% 48%;
}

.cctv-device-card div {
  position: relative;
  z-index: 2;
  padding: 16px;
}

.cctv-device-card span {
  display: inline-flex;
  min-height: 28px;
  margin-bottom: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(130, 244, 232, 0.2);
  border-radius: 999px;
  color: #87fff4;
  background: rgba(0, 0, 0, 0.24);
  font-size: 0.72rem;
  font-weight: 950;
}

.cctv-device-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1.16;
}

.cctv-device-card p {
  margin: 0;
  color: rgba(235, 249, 247, 0.72);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.45;
}

.cctv-device-card:hover .cctv-card-photo {
  filter: saturate(1.12);
  opacity: 1;
  transform: scale(1.05);
}

@media (max-width: 980px) {
  .cctv-brand-wall,
  .cctv-device-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .cctv-showcase {
    margin-top: 22px;
    padding: 16px;
    border-radius: 24px;
  }

  .cctv-brand-wall,
  .cctv-device-grid {
    grid-template-columns: 1fr;
  }

  .cctv-brand-logo {
    min-height: 46px;
    font-size: 0.82rem;
  }

  .cctv-device-card {
    grid-template-rows: 210px 1fr;
  }

  .cctv-device-card h3 {
    font-size: 1.02rem;
  }

  .cctv-device-card p {
    font-size: 0.8rem;
  }
}
