:root {
  --teddy-ss-primary: #3b82f6;
  --teddy-ss-bg: #ffffff;
  --teddy-ss-text: #1f2937;
  --teddy-ss-nav-bg: rgba(17, 24, 39, 0.8); /* Solid dark color */
  --teddy-ss-nav-hover: rgba(17, 24, 39, 1);
  --teddy-ss-overlay: rgba(0, 0, 0, 0.85);
  --teddy-ss-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.teddy-ss-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--teddy-ss-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.teddy-ss-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.teddy-ss-adaptive .teddy-ss-viewport {
  aspect-ratio: auto;
  height: 0; /* JS will set this */
}

/* Ensure slides don't force a minimum height when adaptive */
.teddy-ss-adaptive .teddy-ss-track,
.teddy-ss-adaptive .teddy-ss-slide {
  height: auto;
}

.teddy-ss-adaptive .teddy-ss-slide .teddy-ss-img {
  max-height: none;
  height: auto;
  display: block;
}

.teddy-ss-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.teddy-ss-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  flex-direction: column;
}

.teddy-ss-slide .teddy-ss-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.teddy-ss-slide .teddy-ss-img:hover {
  transform: scale(1.02);
}

/* Navigation Arrows */
.teddy-ss-nav {
  --teddy-ss-nav-top: 250px;
  position: absolute;
  top: var(--teddy-ss-nav-top);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--teddy-ss-nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--teddy-ss-transition);
  z-index: 10;
  opacity: 1; /* Permanently visible */
  transform: translateY(-50%); /* Keeps it centered relative to the top offset */
}

.teddy-ss-container .teddy-ss-nav {
  opacity: 1;
}

.teddy-ss-nav:hover {
  background: var(--teddy-ss-nav-hover);
  transform: translateY(-50%) scale(1.1);
}

.teddy-ss-nav svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.teddy-ss-prev { left: 16px; }
.teddy-ss-next { right: 16px; }

/* Caption Section */
.teddy-ss-caption-container {
  padding: 20px 24px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.teddy-ss-caption {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--teddy-ss-text);
  margin: 0;
}

.teddy-ss-counter {
  font-size: 0.9rem;
  color: #6b7280;
  background: #e5e7eb;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Lightbox */
.teddy-ss-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--teddy-ss-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.teddy-ss-lightbox.teddy-ss-active {
  opacity: 1;
  pointer-events: auto;
}

.teddy-ss-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.teddy-ss-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.teddy-ss-lightbox-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.teddy-ss-lightbox-close:hover {
  transform: scale(1.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .teddy-ss-nav {
    width: 40px;
    height: 40px;
    opacity: 1;
  }
  
  .teddy-ss-caption-container {
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
