/**
 * Printables Page - Modern Design
 * Beautiful, modern styling for the printables catalog
 */

/* Hero Section */
.printables-hero {
  background: linear-gradient(135deg, var(--honey) 0%, #FFD54F 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--bee-black);
}

.printables-hero::before {
  content: '🐝';
  position: absolute;
  top: 20%;
  right: 10%;
  font-size: 5rem;
  opacity: 0.2;
  transform: rotate(15deg);
  animation: float 6s ease-in-out infinite;
}

.printables-hero::after {
  content: '📚';
  position: absolute;
  bottom: 20%;
  left: 10%;
  font-size: 4rem;
  opacity: 0.2;
  transform: rotate(-10deg);
  animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(15deg); }
  50% { transform: translateY(-20px) rotate(15deg); }
}

.printables-hero .hero-title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--bee-black);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

.printables-hero .hero-subtitle {
  font-size: 1.3rem;
  color: #333;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .printables-hero .hero-title {
    font-size: 2rem;
  }

  .printables-hero .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* Filters Section */
.filters-section {
  background: white;
  padding: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 70px;
  z-index: 100;
}

.filters-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .filters-container {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .filters-container {
    grid-template-columns: 1fr;
  }
}

.filter-search {
  position: relative;
}

.filter-search input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f8f8;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--honey);
  background: white;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.filter-search::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

.filter-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  background: #f8f8f8;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #333;
}

.filter-select:hover {
  border-color: var(--honey);
  background: white;
}

.filter-select:focus {
  outline: none;
  border-color: var(--honey);
  background: white;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 2px solid var(--honey);
}

.results-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: #666;
}

.results-count strong {
  color: var(--bee-black);
  font-size: 1.3rem;
}

.hive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--honey) 0%, #FFD54F 100%);
  border-radius: 50px;
  font-weight: 700;
  color: var(--bee-black);
  border: 2px solid var(--bee-black);
}

/* Printables Grid */
.printables-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 640px) {
  .printables-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Printable Card */
.printable-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
  display: flex !important;
  flex-direction: column;
  height: 100%;
  position: relative;
  opacity: 1 !important;
  visibility: visible !important;
}

.printable-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
  border-color: var(--honey);
}

.printable-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.printable-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.printable-card-badge.free {
  background: #4CAF50;
  color: white;
}

.printable-card-badge.premium {
  background: linear-gradient(135deg, var(--honey) 0%, #FFD54F 100%);
  color: var(--bee-black);
  border: 2px solid var(--bee-black);
}

.printable-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.printable-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bee-black);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.printable-card-category {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.printable-card-category::before {
  content: '📁';
}

.printable-card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.printable-card-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--honey);
  color: var(--bee-black);
  text-align: center;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.printable-card-btn:hover {
  background: var(--bee-black);
  color: var(--honey);
  border-color: var(--honey);
  transform: translateY(-2px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
}

.pagination-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid var(--honey);
  border-radius: 50px;
  color: var(--bee-black);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--honey);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-weight: 600;
  color: #666;
  font-size: 1rem;
}

/* Upgrade CTA */
.upgrade-cta {
  background: linear-gradient(135deg, var(--honey) 0%, #FFD54F 100%);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--bee-black);
  border-bottom: 4px solid var(--bee-black);
}

.upgrade-cta::before {
  content: '🎁';
  position: absolute;
  top: 20%;
  left: 5%;
  font-size: 6rem;
  opacity: 0.15;
  transform: rotate(-15deg);
}

.upgrade-cta::after {
  content: '⭐';
  position: absolute;
  bottom: 20%;
  right: 5%;
  font-size: 5rem;
  opacity: 0.15;
  transform: rotate(15deg);
}

.upgrade-cta h2 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--bee-black);
  margin-bottom: 1rem;
}

.upgrade-cta p {
  font-size: 1.2rem;
  color: #333;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.upgrade-cta .btn-secondary {
  background: var(--bee-black);
  color: var(--honey);
  border: 3px solid var(--bee-black);
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.upgrade-cta .btn-secondary:hover {
  background: white;
  color: var(--bee-black);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Loading State */
.skeleton-card {
  background: #f0f0f0;
  border-radius: 20px;
  height: 400px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.8rem;
  color: var(--bee-black);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2rem;
}

.empty-state .btn {
  background: var(--honey);
  color: var(--bee-black);
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  border: 2px solid var(--bee-black);
  transition: all 0.3s ease;
}

.empty-state .btn:hover {
  background: var(--bee-black);
  color: var(--honey);
  transform: translateY(-2px);
}

/* Active Filter Chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--honey);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bee-black);
}

.filter-chip-close {
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.filter-chip-close:hover {
  transform: scale(1.2);
}
