/* Modern styling for premium bike gallery */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #0b0f19;
  --panel-bg: rgba(22, 28, 45, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent-color: #f59e0b; /* Amber/copper accent */
  --accent-hover: #fbbf24;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background grid pattern */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

/* Header & Intro */
header {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 0 20px;
}

.brand-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

/* Bike Specs Info Card */
.specs-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.spec-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.spec-card .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.spec-card .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Gallery Grid */
.gallery-container {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  background: #111827;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(245, 158, 11, 0.4);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Image count badge */
.image-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

/* Lightbox Content Area */
.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.lightbox-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.lightbox-viewport:active {
  cursor: grabbing;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  user-select: none;
  pointer-events: none; /* Let parent handle touch/drag events */
  transition: transform 0.1s ease-out;
  transform-origin: center center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Controls */
.lightbox-btn {
  position: absolute;
  background: rgba(22, 28, 45, 0.8);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1010;
  transition: all 0.2s ease;
}

.lightbox-btn:hover {
  background: var(--accent-color);
  color: #000;
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.lightbox-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.btn-close {
  top: 20px;
  right: 20px;
}

.btn-prev {
  left: 20px;
}

.btn-next {
  right: 20px;
}

/* Toolbar for zoom, reset, count */
.lightbox-toolbar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 28, 45, 0.85);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1010;
  box-shadow: var(--shadow-lg);
}

.toolbar-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s, background-color 0.2s;
}

.toolbar-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.toolbar-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background-color: var(--panel-border);
}

.toolbar-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

/* Zoom feedback popup */
.zoom-feedback {
  position: absolute;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1020;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  .lightbox-btn {
    width: 40px;
    height: 40px;
  }
  .btn-prev {
    left: 10px;
  }
  .btn-next {
    right: 10px;
  }
  .lightbox-toolbar {
    bottom: 16px;
    padding: 6px 12px;
    gap: 8px;
  }
}
