/* 配光与仿真 — /service/photometrics/ */

.sph-page {
  padding: 0 0 72px;
  --sph-blue: #1d5198;
  --sph-border: rgba(29, 81, 152, 0.18);
}

.sph-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 0.72fr);
  gap: 24px 32px;
  align-items: start;
  margin: 36px 0 28px;
  padding: 28px 30px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef3fa 100%);
}

.sph-hero__lead {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.8;
  color: #495057;
  max-width: none;
}

.sph-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  font-size: 14px;
}

.sph-hero__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--sph-blue);
  text-decoration: none;
}

.sph-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sph-stats li {
  padding: 16px 14px;
  border: 1px solid var(--sph-border);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.sph-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 28px;
  line-height: 1.1;
  color: #0f2744;
}

.sph-stats span {
  font-size: 13px;
  line-height: 1.4;
  color: #6c757d;
}

.sph-section-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  padding-left: 14px;
  border-left: 4px solid var(--sph-blue);
}

.sph-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 18px;
}

.sph-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
  max-width: 420px;
  padding: 0 14px;
  border: 1px solid #c5d4ea;
  border-radius: 8px;
  background: #fff;
}

.sph-search i {
  color: #6c757d;
  font-size: 18px;
}

.sph-search input {
  width: 100%;
  border: 0;
  padding: 11px 0;
  font-size: 14px;
  background: transparent;
  outline: none;
}

.sph-count {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.sph-count strong {
  color: #1a1a1a;
}

.sph-advanced-filters {
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid #e1e5ea;
  border-radius: 3px;
  background: #f8f9fb;
}

.sph-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.sph-filter-row__label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(12, 20, 36, 0.72);
  white-space: nowrap;
}

.sph-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sph-filter {
  padding: 8px 16px;
  border: 1px solid #c5d4ea;
  border-radius: 3px;
  background: #fff;
  color: var(--sph-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sph-filter:hover {
  background: #ebf3ff;
  border-color: var(--sph-blue);
}

.sph-filter.is-active {
  background: var(--sph-blue);
  border-color: var(--sph-blue);
  color: #fff;
}

.sph-product-filter {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.sph-product-select {
  width: min(18rem, 100%);
  min-width: 10rem;
  padding: 8px 36px 8px 12px;
  border: 1px solid #c5d4ea;
  border-radius: 3px;
  font-size: 14px;
  color: #212529;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231d5198' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.sph-product-select:focus {
  outline: none;
  border-color: #1d5198;
  box-shadow: 0 0 0 3px rgba(29, 81, 152, 0.12);
}

.sph-filter-reset {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--sph-blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sph-filter-reset[hidden] {
  display: none;
}

.sph-filter-reset:hover {
  background: #ebf3ff;
}

.sph-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.sph-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e1e5ea;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}

.sph-card:hover {
  box-shadow: 0 10px 28px rgba(15, 39, 68, 0.08);
  transform: translateY(-2px);
}

.sph-card.is-hidden {
  display: none;
}

.sph-card__media-wrap {
  position: relative;
}

.sph-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: #eef3fa;
  cursor: zoom-in;
}

.sph-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sph-card__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  top: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--sph-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.2s;
}

.sph-card__media:hover .sph-card__zoom,
.sph-card__media:focus-visible .sph-card__zoom {
  opacity: 1;
}

.sph-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.sph-card__sku {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: #6c757d;
}

.sph-card__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  color: #1a1a1a;
}

.sph-card__desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: #6c757d;
  flex: 1;
}

.sph-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sph-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.sph-card__btn--ghost {
  border: 1px solid #c5d4ea;
  background: #fff;
  color: var(--sph-blue);
}

.sph-card__btn--ghost:hover {
  background: #ebf3ff;
}

.sph-card__btn--primary {
  border: 1px solid var(--sph-blue);
  background: var(--sph-blue);
  color: #fff;
}

.sph-card__btn--primary:hover {
  background: #163d72;
  border-color: #163d72;
  color: #fff;
}

.sph-empty {
  display: none;
  margin-top: 8px;
  padding: 48px 24px;
  text-align: center;
  color: #6c757d;
  font-size: 15px;
  border: 1px dashed #c5d4ea;
  border-radius: 8px;
  background: #f8f9fb;
}

.sph-empty[hidden] {
  display: none !important;
}

.sph-empty:not([hidden]) {
  display: block;
}

.sph-cta {
  margin-top: 48px;
  padding: 32px 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7faff 0%, #ebf3ff 100%);
  border: 1px solid #dbe6f5;
  text-align: center;
}

.sph-cta h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #1e3a5f;
}

.sph-cta p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.65;
  color: #555;
}

.sph-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  background: #e05a00;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.sph-cta__btn:hover {
  background: #c44f00;
  color: #fff;
}

/* Lightbox */
.sph-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000000001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.sph-lightbox[hidden] {
  display: none !important;
}

.sph-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.sph-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.sph-lightbox__close,
.sph-lightbox__nav {
  position: absolute;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
}

.sph-lightbox__close {
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.sph-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.sph-lightbox__nav--prev {
  left: 12px;
}

.sph-lightbox__nav--next {
  right: 12px;
}

.sph-lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sph-lightbox__img {
  width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  background: #111;
}

.sph-lightbox__caption {
  margin: 0;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  background: #0a0a0a;
}

.sph-lightbox__counter {
  margin: 0;
  padding: 0 18px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  background: #0a0a0a;
}

.sph-lightbox__counter[hidden] {
  display: none;
}

@media (max-width: 1100px) {
  .sph-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sph-hero {
    grid-template-columns: 1fr;
    padding: 22px 20px;
  }

  .sph-stats {
    grid-template-columns: 1fr;
  }

  .sph-grid {
    grid-template-columns: 1fr;
  }

  .sph-product-filter {
    margin-left: 0;
    width: 100%;
  }

  .sph-product-select {
    flex: 1;
  }
}
