.partspc360-shell {
  margin: 16px 0;
}

.partspc360-gallery-shell {
  height: 100%;
  margin: 0;
  width: 100%;
}

.partspc360-viewer {
  background: #fff;
  border: 1px solid #d9dfe7;
  border-radius: 8px;
  color: #161a1f;
  overflow: hidden;
  position: relative;
}

.partspc360-gallery-mode {
  border: 0;
  border-radius: 0;
  height: 100%;
}

.partspc360-gallery-mode .partspc360-topbar,
.partspc360-gallery-mode .partspc360-controls {
  display: none;
}

.partspc360-gallery-mode .partspc360-stage {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.partspc360-gallery-mode:not(.is-poster) .partspc360-stage {
  touch-action: none;
}

.partspc360-gallery-slide {
  align-items: stretch;
}

.partspc360-gallery-thumb-button {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #161a1f;
  border: 1px solid #d9dfe7;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  width: 100%;
}

.partspc360-gallery-thumb.swiper-slide-thumb-active .partspc360-gallery-thumb-button,
.partspc360-gallery-thumb-button:hover {
  background: #e30613;
}

.partspc360-gallery-active .product-main-images__modal-trigger-layer {
  display: none !important;
}

.partspc360-topbar,
.partspc360-controls {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
}

.partspc360-topbar {
  border-bottom: 1px solid #e7ebf0;
}

.partspc360-badge {
  align-items: center;
  background: #e30613;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 42px;
}

.partspc360-title {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.partspc360-icon-button,
.partspc360-step {
  align-items: center;
  background: #f5f7fa;
  border: 1px solid #cbd3dd;
  border-radius: 6px;
  color: #161a1f;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 8px;
}

.partspc360-icon-button:hover,
.partspc360-step:hover {
  background: #e9edf3;
}

.partspc360-close-button {
  display: none;
}

.partspc360-viewer.is-expanded .partspc360-close-button {
  display: inline-flex;
}

.partspc360-stage {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #fff 0%, #f3f5f8 100%);
  cursor: grab;
  display: flex;
  justify-content: center;
  min-height: 220px;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  user-select: none;
}

.partspc360-viewer.is-poster .partspc360-topbar,
.partspc360-viewer.is-poster .partspc360-controls {
  display: none;
}

.partspc360-viewer.is-poster .partspc360-stage {
  cursor: pointer;
}

.partspc360-viewer.is-dragging .partspc360-stage {
  cursor: grabbing;
}

.partspc360-image {
  -webkit-user-drag: none;
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  pointer-events: none;
  width: 100%;
}

.partspc360-start {
  align-items: center;
  background: rgba(22, 26, 31, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  bottom: 12px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  line-height: 1;
  padding: 10px 12px;
  position: absolute;
  right: 12px;
}

.partspc360-start:hover {
  background: rgba(227, 6, 19, 0.92);
}

.partspc360-start strong {
  font-size: 16px;
  line-height: 1;
}

.partspc360-viewer:not(.is-poster) .partspc360-start {
  display: none;
}

.partspc360-hint {
  background: rgba(22, 26, 31, 0.76);
  border-radius: 999px;
  bottom: 12px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  position: absolute;
  right: 12px;
  transition: opacity 180ms ease;
}

.partspc360-viewer.is-poster .partspc360-hint {
  display: none;
}

.partspc360-viewer.is-dragging .partspc360-hint {
  opacity: 0;
}

.partspc360-controls {
  border-top: 1px solid #e7ebf0;
}

.partspc360-range {
  flex: 1 1 auto;
  min-width: 80px;
}

.partspc360-admin-preview {
  margin: 16px 0 0;
  max-width: 720px;
}

.partspc360-admin-preview .partspc360-stage {
  min-height: 360px;
}

.partspc360-admin-quality {
  margin: 8px 0 0;
}

.partspc360-admin-quality ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.partspc360-admin-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin: 16px 0;
}

.partspc360-admin-frame {
  border: 1px solid #d9dfe7;
  border-radius: 6px;
  cursor: grab;
  overflow: hidden;
  transition: box-shadow 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.partspc360-admin-frame.is-dragging {
  box-shadow: 0 12px 32px rgba(22, 26, 31, 0.22);
  cursor: grabbing;
  opacity: 0.72;
  transform: scale(0.98);
}

.partspc360-admin-frame img {
  aspect-ratio: 4 / 3;
  background: #f3f5f8;
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.partspc360-admin-frame-meta {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.partspc360-admin-frame-meta strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.partspc360-admin-drag-handle {
  background: #eef2f6;
  border: 1px solid #d9dfe7;
  border-radius: 999px;
  color: #4b5663;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  line-height: 1;
  padding: 6px 8px;
}

.partspc360-admin-frame-meta label {
  align-items: center;
  display: flex;
  font-size: 12px;
  gap: 8px;
  margin: 0;
}

.partspc360-admin-frame-meta input {
  max-width: 72px;
}

.partspc360-open {
  overflow: hidden;
}

.partspc360-viewer.is-expanded {
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  inset: 4vh 4vw;
  max-height: 92vh;
  position: fixed;
  z-index: 10000;
}

.partspc360-viewer.is-expanded .partspc360-stage {
  aspect-ratio: auto;
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 575px) {
  .partspc360-topbar,
  .partspc360-controls {
    gap: 8px;
    padding: 8px;
  }

  .partspc360-stage {
    min-height: 260px;
  }

  .partspc360-title {
    font-size: 13px;
  }

  .partspc360-viewer.is-expanded {
    inset: 10px;
    max-height: calc(100vh - 20px);
  }
}
