.pano360-no-scroll {
  overflow: hidden;
}

.pano360-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: 1.5rem 0 2rem;
}

.pano360-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  background: #ffffff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.pano360-card:hover,
.pano360-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
}

.pano360-card:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 4px;
}

.pano360-card__image-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
}

.pano360-card__image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.pano360-card:hover .pano360-card__image-wrap img,
.pano360-card:focus-visible .pano360-card__image-wrap img {
  transform: scale(1.04);
}

.pano360-card__badge {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.pano360-card__title {
  display: block;
  padding: 0 1rem 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.pano360-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  background: rgba(2, 6, 23, 0.82);
}

.pano360-modal.pano360-modal--open {
  display: flex;
}

.pano360-modal__panel {
  width: min(1180px, 100%);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  border-radius: 1.4rem;
  background: #ffffff;
  color: #0f172a;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.pano360-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.pano360-modal__title {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.25;
}

.pano360-modal__actions {
  display: inline-flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pano360-modal__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pano360-modal__button:hover,
.pano360-modal__button:focus-visible {
  background: #1e293b;
}

.pano360-modal__button:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

.pano360-modal__button--close {
  width: 2.5rem;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.pano360-modal__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: clamp(0.75rem, 1.8vw, 1rem);
  background: #0b1120;
}

.pano360-viewer-wrap {
  position: relative;
  width: 100%;
  height: min(78vh, 760px);
  border-radius: 1rem;
  background: #020617;
  overflow: hidden;
}

.pano360-viewer {
  width: 100%;
  height: 100%;
}

.pano360-loading,
.pano360-error {
  position: absolute;
  inset: 1rem;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 0.85rem;
  text-align: center;
}

.pano360-loading {
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
}

.pano360-error {
  background: rgba(127, 29, 29, 0.92);
  color: #ffffff;
  font-weight: 700;
}

.pano360-loading.pano360-is-visible,
.pano360-error.pano360-is-visible {
  display: flex;
}

.pano360-modal:fullscreen,
.pano360-modal__panel:fullscreen,
.pano360-viewer-wrap:fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
}

.pano360-modal.pano360-modal--fullscreen {
  padding: 0;
  background: #020617;
}

.pano360-modal.pano360-modal--fullscreen .pano360-modal__panel {
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
}

.pano360-modal.pano360-modal--fullscreen .pano360-modal__body {
  padding: 0;
}

.pano360-modal.pano360-modal--fullscreen .pano360-viewer-wrap {
  height: calc(100vh - 4.4rem);
  border-radius: 0;
}

@media (max-width: 900px) {
  .pano360-viewer-wrap {
    height: 70vh;
  }
}

@media (max-width: 640px) {
  .pano360-modal {
    padding: 0.5rem;
  }

  .pano360-modal__panel {
    max-height: 96vh;
    border-radius: 1rem;
  }

  .pano360-modal__header {
    align-items: flex-start;
    padding: 0.75rem;
  }

  .pano360-modal__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .pano360-modal__button {
    min-height: 2.25rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
  }

  .pano360-modal__button--close {
    width: 2.25rem;
  }

  .pano360-viewer-wrap {
    height: 62vh;
  }
}

.pano360-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(0.85rem, 2vw, 1.25rem);
  margin: 0;
}

.pano360-card {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius, 1.25rem);
  background: #e7eef2;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(6, 32, 51, 0.075);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.pano360-card:hover,
.pano360-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(6, 32, 51, 0.13);
}

.pano360-card__image-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.pano360-card__image-wrap img,
.pano360-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pano360-card__badge {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(3, 36, 54, 0.82);
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
  backdrop-filter: blur(8px);
}

.pano360-card__title {
  display: none;
}
