/* FILE: css/posters.css */
/* Styles specific to the posters.html page */

/* Ensure content starts below fixed header */
.poster-gallery {
  padding-top: 120px; /* Adjust based on header height */
  position: relative;
  z-index: 1; /* Ensure content is above background canvas */
}

/* Inherit general page header styles from pages.css */
/* Add specific adjustments if needed */
.page-header h1 {
  margin-bottom: 25px; /* Space below title */
}

.poster-search-bar-container {
  position: relative;
  margin-bottom: 30px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Input stays blurred */
#posterSearchInput {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 12px 5px 12px 45px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

/* Icon floats ABOVE blur */
.poster-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;              /* 🔥 KEY FIX */
}
/* Hover effect – Posters search (same as stickers) */
.poster-search-bar-container:hover #posterSearchInput {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.18);
}






/* Category Tabs Styling */
.category-tabs {
  display: flex;
  gap: 15px; /* Space between tabs */
  justify-content: center;
  margin-bottom: 50px; /* Space below tabs */
  flex-wrap: wrap; /* Allow tabs to wrap on smaller screens */
}

.tab {
  padding: 10px 25px; /* Tab padding */
  border-radius: 50px; /* Pill shape */
  border: 1px solid var(--border-color); /* Subtle border */
  background: rgba(255, 255, 255, 0.05); /* Slight glass effect */
  color: var(--text-secondary); /* Dimmer text for inactive */
  font-family: var(--font-body); /* Body font */
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.tab:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.tab.active {
  background: linear-gradient(90deg, var(--neon-cyan), #00b7ff); /* Active gradient */
  color: var(--bg); /* Black text */
  border-color: transparent;
  font-weight: 600;
  box-shadow: var(--glow-shadow-primary);
}

/* Poster Grid Styling */
.poster-grid {
  display: grid;
  /* Responsive columns: min 220px, max 1fr */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px; /* Grid gap */
}

.poster-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-light); /* Panel background */
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.poster-item img {
  width: 100%;
  aspect-ratio: 1 / 1.4; /* Maintain aspect ratio */
  object-fit: cover;
  display: block; /* Remove extra space */
  transition: transform 0.4s ease, opacity 0.4s ease; /* Add opacity transition */

  /* --- FIXES for Visibility --- */
  opacity: 1 !important; /* Force full opacity */
  filter: none !important; /* Remove any unwanted filters */
  mix-blend-mode: normal !important; /* Ensure normal blending */
  backface-visibility: hidden; /* Can sometimes help rendering */
  /* Optional: Add a very subtle border to define edges */
  /* border: 1px solid rgba(255, 255, 255, 0.05); */
}

.poster-item:hover img {
  transform: scale(1.06); /* Keep zoom effect */
}

/* --- LIGHTBOX & CART STYLES (Copied/Adjusted from stickers.css) --- */

/* Simple Lightbox Styles (Container) */
.vibe-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92); /* Dark overlay */
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px; 
  cursor: pointer;
}
.vibe-lightbox.visible {
  opacity: 1;
  visibility: visible;
}

/* Lightbox Content Container (New detailed structure) */
.lightbox-content { 
    background: var(--panel-dark); 
    border-radius: var(--radius); 
    border: 1px solid var(--border-color); 
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); 
    display: flex; 
    max-width: 800px; 
    width: 90%; 
    max-height: 85vh; 
    overflow: hidden; 
    cursor: default; 
    position: relative; 
    transform: scale(0.95); 
    transition: transform 0.3s ease; 
}
.vibe-lightbox.visible .lightbox-content { transform: scale(1); }

/* Close Button */
.lightbox-close { 
    position: absolute; top: 10px; right: 10px; 
    background: rgba(0,0,0,0.3); border: none; 
    border-radius: 50%; color: var(--text-primary); 
    font-size: 1.5rem; line-height: 1; 
    width: 30px; height: 30px; 
    cursor: pointer; display: flex; 
    align-items: center; justify-content: center; 
    z-index: 10; transition: background 0.3s ease; 
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* Image Side */
.lightbox-image-container { 
    flex: 1 1 60%; display: flex; 
    align-items: center; justify-content: center; 
    background-color: rgba(0,0,0,0.2); 
    padding: 20px; 
}

.poster-size-options {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.size-option {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  text-align: center;
  transition: var(--transition);
}

.size-option input {
  display: none;
}

.size-option span {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.size-option:hover {
  border-color: var(--neon-cyan);
}

.size-option input:checked + span {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0,255,255,0.6);
}



#lightboxImage { 
    max-width: 100%; max-height: 75vh; 
    height: auto; display: block; 
    object-fit: contain; border-radius: 4px; 
    user-select: none; pointer-events: none; 
    -webkit-user-drag: none; 
}


.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.page-link {
  display: inline-block;
  min-width: 35px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(5px);
  line-height: 1;
}

.page-link:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.1);
}

.page-link.active {
  background: linear-gradient(90deg, var(--neon-cyan), #00b7ff);
  color: var(--bg);
  border-color: transparent;
  font-weight: 600;
  box-shadow: var(--glow-shadow-primary);
  cursor: default;
}


/* Details Side */
.lightbox-details { 
    flex: 1 1 40%; 
    padding: 30px; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
}
#lightboxTitle { 
    font-size: 1.6rem; 
    color: var(--text-primary); 
    margin-bottom: 15px; 
    line-height: 1.3; 
}
#lightboxDescription { 
    font-size: 0.95rem; 
    color: var(--text-secondary); 
    margin-bottom: 20px; 
    flex-grow: 1; 
}
#lightboxPrice { 
    font-size: 1.8rem; 
    font-weight: 700; 
    color: var(--neon-cyan); 
    margin-bottom: 20px; 
    text-shadow: 0 0 10px var(--neon-cyan); 
}
.btn-add-cart { /* Style for the "Add to Cart" button in lightbox */
    width: 100%; text-align: center; padding: 10px 20px; font-size: 0.9rem;
    margin-top: 15px; /* Use global .btn.btn-secondary styles */
}
.btn-add-cart i { margin-right: 8px; }
.btn-add-cart.added { /* Style for when item is already in cart */
    background: #1EAD54; /* Green */
    color: white; border-color: #1EAD54;
    cursor: default; pointer-events: none;
    transform: none; box-shadow: none;
}
.btn-add-cart.added::before { display: none; } /* Hide shine effect */



/* Responsive adjustments for posters page */
@media (max-width: 768px) {
  .poster-grid {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Smaller columns */
      gap: 15px;
  }
  .lightbox-content { flex-direction: column; width: 95%; max-height: 90vh; } 
  .lightbox-image-container { max-height: 50vh; padding: 15px; } 
  .lightbox-details { padding: 20px; flex-grow: 1; } 
  #lightboxTitle { font-size: 1.4rem; } 
  #lightboxDescription { font-size: 0.9rem; margin-bottom: 15px; } 
  #lightboxPrice { font-size: 1.6rem; margin-bottom: 15px; }
}

@media (max-width: 480px) {
  .poster-grid {
      grid-template-columns: repeat(2, 1fr); /* Force 2 columns */
      gap: 10px;
  }
  .tab {
      padding: 8px 18px; /* Smaller tabs */
      font-size: 0.9rem;
  }
}