/* ============================================
   STREET MARKETPLACE STYLES
   First-person street view with billboards
   ============================================ */

:root {
  --street-bg-primary: #000000;
  --street-bg-secondary: #1a1a1a;
  --street-text-primary: #d0d0d0;
  --street-text-secondary: #b0b0b0;
  --street-accent: #FFC700;
  --street-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* ============================================
   MARKETPLACE LIST VIEW (like Blog module)
   ============================================ */

.marketplace-list-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  background: #000000;
  min-height: 100%;
  overflow-y: visible;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.marketplace-list-header {
  text-align: center;
  padding: 20px 10px;
  background: #000000; /* White like Blog */
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.marketplace-list-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 700;
  color: #d0d0d0;
}

.marketplace-list-header p {
  font-size: 1.1rem;
  color: #b0b0b0;
  margin: 0;
}

/* Category tabs like Blog */
.marketplace-categories {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 30px 0;
  flex-wrap: nowrap;
  padding: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 50px;
  align-items: center;
}

/* Desktop - center and wrap */
@media (min-width: 769px) {
  .marketplace-categories {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.marketplace-category-tab {
  padding: 10px 24px;
  background: #FFC700;
  color: #000;
  border: 2px solid #000;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.marketplace-category-tab:hover {
  background: #FFD700;
  color: #000;
  border-color: #000;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 199, 0, 0.3);
}

.marketplace-category-tab.active {
  background: #FFC700;
  color: #000;
  border: 3px solid #000;
  box-shadow: 0 0 0 2px #FFC700;
}

/* Grid of marketplace cards - 2 COLUMNS like Blog */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 0 10px;
  width: 100%;
  max-width: 100%;
}

/* Individual marketplace card */
.marketplace-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  border: 1px solid #333333;
  position: relative;
}

.marketplace-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 199, 0, 0.2);
  border-color: #FFC700;
}

/* Card image container */
.marketplace-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #FFC700 0%, #764ba2 100%);
}

.marketplace-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.marketplace-card:hover .marketplace-card-image img {
  transform: scale(1.1);
}

/* Emoji overlay on image */
.marketplace-card-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

/* Card content */
.marketplace-card-content {
  padding: 24px;
}

.marketplace-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #d0d0d0; /* Blog text color */
}

.marketplace-card-description {
  font-size: 0.95rem;
  color: #b0b0b0; /* Blog secondary text color */
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Card footer stats */
.marketplace-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.marketplace-listings-count {
  font-size: 0.9rem;
  color: var(--street-accent);
  font-weight: 600;
}

.marketplace-enter-btn {
  background: linear-gradient(135deg, #FFC700 0%, #764ba2 100%);
  color: #000;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.marketplace-enter-btn:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Responsive for marketplace list */
@media (max-width: 768px) {
  .marketplace-list-header h2 {
    font-size: 2rem;
  }

  .marketplace-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .marketplace-card-image {
    height: 140px;
  }

  .marketplace-card-emoji {
    font-size: 3rem;
  }

  .marketplace-categories {
    gap: 8px;
    padding: 0 10px;
  }

  .marketplace-category-tab {
    padding: 8px 16px;
  }
}

/* Tablet - 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .marketplace-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

/* ============================================
   STREET NAVIGATION (back button)
   ============================================ */

.street-navigation {
  padding: 20px 0;
  position: relative;
  z-index: 10;
}

.street-back-btn {
  background: rgba(45, 45, 45, 0.95);
  color: #d0d0d0;
  border: 2px solid var(--street-accent);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
  margin-left: 200px;
}

.street-back-btn:hover {
  background: var(--street-accent);
  color: #000;
  transform: translateX(-4px);
  box-shadow: 0 4px 16px rgba(255, 199, 0, 0.4);
}

.street-back-btn i {
  transition: transform 0.3s ease;
}

.street-back-btn:hover i {
  transform: translateX(-4px);
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

/* Marketplace container - FULL WIDTH for billboard street */
.street-marketplace-container {
  width: 100%;  /* Full width! */
  margin: 0;
  padding: 0;
  background: var(--street-bg-primary);
  height: 100%;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Header */
.street-header {
  text-align: center;
  padding: 20px 10px;
  background: linear-gradient(135deg, #FFC700 0%, #764ba2 100%);
  color: #000;
  position: relative;
  z-index: 10;
}

.street-header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.street-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

/* ============================================
   STREET BACKGROUND (Parallax)
   ============================================ */

.street-background-wrapper {
  position: relative;
  min-height: 3000px; /* Will expand with content */
  overflow: hidden;
}

.street-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 0;

  /* Reali Palangos Basanavičiaus gatvės nuotrauka */
  /* Naudokite /uploads/palanga-street.jpg arba išorinį URL */
  background:
    linear-gradient(to bottom,
      rgba(26, 26, 26, 0.6) 0%,
      rgba(26, 26, 26, 0.4) 50%,
      rgba(26, 26, 26, 0.6) 100%
    ),
    url('/uploads/palanga-basanavicius-street.jpg') center top/cover repeat-y;

  /* Fallback - jei nuotrauka nekraunasi */
  background-color: #2a3a4a;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 100px,
      rgba(255, 199, 0, 0.05) 100px,
      rgba(255, 199, 0, 0.05) 200px
    ),
    linear-gradient(
      180deg,
      #1a2332 0%,
      #2a3a4a 50%,
      #1a2332 100%
    );
}

/* ============================================
   BILLBOARDS CONTAINER
   ============================================ */

.billboards-container {
  position: relative;
  z-index: 1;
  padding: 20px 10px;
  min-height: 2000px;
}

/* ============================================
   BILLBOARD CARDS
   ============================================ */

.billboard {
  position: absolute;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--street-shadow);
  opacity: 0;
  transform: scale(0.8);
  background: var(--street-bg-secondary);
}

.billboard.billboard-visible {
  opacity: 1;
  transform: scale(1);
}

.billboard:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 12px 32px rgba(255, 199, 0, 0.4);
  z-index: 100;
}

/* Positioning - Grid based (no more left/right) */
.billboard {
  position: absolute;
  /* left and top set via JavaScript */
  transform-origin: center center;
}

/* ============================================
   BILLBOARD SIZES - 5 TIERS (100 positions)
   ============================================ */

/* XXL - Premium Spots - 33% MAŽESNI! */
.billboard-xxl {
  width: 240px;  /* was 360px */
  height: 187px; /* was 280px */
}

/* XL - Large - 33% MAŽESNI! */
.billboard-xl {
  width: 200px;  /* was 300px */
  height: 147px; /* was 220px */
}

/* M - Medium - 33% MAŽESNI! */
.billboard-medium {
  width: 160px;  /* was 240px */
  height: 120px; /* was 180px */
}

/* S - Small - 33% MAŽESNI! */
.billboard-small {
  width: 120px;  /* was 180px */
  height: 87px;  /* was 130px */
}

/* XS - Emoji Only - APVALŪS su nuotrauka (€10/mėn) */
.billboard-xs.has-image {
  width: 67px;
  height: 67px;
  border-radius: 50%;
  overflow: hidden;
}

/* TINY - Keturkampiai maži BE nuotraukos (€5/mėn - PIGIAUSIA!) */
.billboard-tiny {
  width: 50px;   /* Dar mažesni nei XS */
  height: 50px;
  border-radius: 8px; /* Keturkampis, ne apvalus! */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* Default XS (if no specific class) */
.billboard-xs {
  width: 67px;
  height: 67px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

/* Special emoji billboard styling - MAŽESNI! */
.billboard-xs .billboard-emoji {
  font-size: 28px;  /* was 40px */
  margin-bottom: 2px;
}

.billboard-xs .billboard-title {
  font-size: 8px;  /* was 10px */
  text-align: center;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
}

.billboard-xs:hover {
  transform: scale(1.2) !important;
}

/* ============================================
   BILLBOARD CONTENT
   ============================================ */

/* Image billboards */
.billboard-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.billboard-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.billboard:hover .billboard-image img {
  transform: scale(1.1);
}

/* Overlay with text */
.billboard-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  padding: 15px;
  color: #000;
}

.billboard-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #000;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.billboard-price {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--street-accent);
}

/* Gradient fallback billboards */
.billboard-gradient {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  position: relative;
}

.billboard-emoji {
  font-size: 48px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.billboard-gradient .billboard-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #000;
}

.billboard-gradient .billboard-price {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 12px;
  border-radius: 12px;
}

/* ============================================
   LOADING & END STATES
   ============================================ */

.street-loading {
  text-align: center;
  padding: 20px 10px;
  color: var(--street-text-secondary);
  position: relative;
  z-index: 10;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 199, 0, 0.2);
  border-top-color: var(--street-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.street-end {
  text-align: center;
  padding: 60px 20px;
  color: var(--street-text-secondary);
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.end-marker {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.street-end h3 {
  font-size: 1.5rem;
  color: var(--street-text-primary);
  margin-bottom: 10px;
}

.street-end p {
  color: var(--street-text-secondary);
  font-size: 1rem;
}

/* ============================================
   ERROR STATE
   ============================================ */

.street-error {
  text-align: center;
  padding: 60px 20px;
  background: var(--street-bg-secondary);
  border-radius: 12px;
  margin: 20px;
  color: var(--street-text-primary);
}

.street-error h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.street-error p {
  color: var(--street-text-secondary);
}

/* ============================================
   RESPONSIVE - MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
  .street-header h2 {
    font-size: 1.5rem;
  }

  .street-subtitle {
    font-size: 0.9rem;
  }

  /* Smaller billboards on mobile - 5 tiers */
  .billboard-xxl {
    width: 280px;
    height: 210px;
  }

  .billboard-xl {
    width: 240px;
    height: 180px;
  }

  .billboard-medium {
    width: 200px;
    height: 150px;
  }

  .billboard-small {
    width: 150px;
    height: 110px;
  }

  .billboard-xs {
    width: 80px;
    height: 80px;
  }

  .billboard-left {
    left: 2%;
  }

  .billboard-right {
    right: 2%;
  }

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

  .billboard-price {
    font-size: 11px;
  }

  .billboard-emoji {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  /* Even smaller on very narrow screens */
  .billboard-xxl {
    width: 220px;
    height: 170px;
  }

  .billboard-xl {
    width: 190px;
    height: 140px;
  }

  .billboard-medium {
    width: 160px;
    height: 120px;
  }

  .billboard-small {
    width: 130px;
    height: 100px;
  }

  .billboard-xs {
    width: 70px;
    height: 70px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.billboard:focus {
  outline: 3px solid var(--street-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .billboard,
  .billboard-image img,
  .end-marker {
    animation: none;
    transition: none;
  }
}
