/**
 * 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: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
  padding: 1.5rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 70px;
  z-index: 100;
  border-bottom: 1px solid #e0e0e0;
}

/* Search Bar */
.filter-search-wrapper {
  margin-bottom: 1rem;
}

.filter-search {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.filter-search .search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  transition: color 0.3s ease;
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 3.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  color: #333;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--honey);
  box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1);
}

.filter-search input:focus + .search-icon,
.filter-search input:not(:placeholder-shown) + .search-icon {
  color: var(--honey);
}

.search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #666;
}

.search-clear:hover {
  background: #e0e0e0;
  color: var(--bee-black);
  transform: translateY(-50%) scale(1.1);
}

/* Filter Controls */
.filters-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters-left,
.filters-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

/* Filter Dropdowns */
.filter-dropdown {
  position: relative;
}

.filter-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.filter-dropdown-btn:hover {
  border-color: var(--honey);
  background: #fffef8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-dropdown-btn.active {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--bee-black);
}

.filter-dropdown-btn .filter-icon {
  font-size: 1.1rem;
}

.filter-dropdown-btn .dropdown-arrow {
  transition: transform 0.3s ease;
  width: 16px;
  height: 16px;
}

.filter-dropdown-btn[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
}

.filter-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-dropdown-item {
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-size: 0.95rem;
  border-bottom: 1px solid #f5f5f5;
}

.filter-dropdown-item:last-child {
  border-bottom: none;
}

.filter-dropdown-item:hover {
  background: #fffef8;
  color: var(--bee-black);
  padding-left: 1.5rem;
}

.filter-dropdown-item:active {
  background: var(--honey);
}

/* Active Filters */
.active-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

.active-filters-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
}

.active-filters-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, var(--honey) 0%, #FFD54F 100%);
  border: 2px solid var(--bee-black);
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bee-black);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.filter-chip-remove {
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  color: var(--bee-black);
}

.filter-chip-remove:hover {
  background: var(--bee-black);
  color: var(--honey);
  transform: scale(1.15);
}

.clear-all-filters {
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.clear-all-filters:hover {
  background: #f44336;
  border-color: #f44336;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .filters-section {
    padding: 1rem 0;
  }

  .filters-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-left,
  .filters-right {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-dropdown {
    flex: 1;
    min-width: 0;
  }

  .filter-dropdown-btn {
    width: 100%;
    justify-content: space-between;
  }

  .filter-dropdown-menu {
    left: 0;
    right: 0;
    min-width: auto;
  }

  .active-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .active-filters-list {
    width: 100%;
  }

  .clear-all-filters {
    width: 100%;
  }
}

/* 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 - Modern Design */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.pagination-btn,
.pagination-page {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  color: #333;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  user-select: none;
}

.pagination-btn:hover:not(:disabled),
.pagination-page:hover:not(.active):not(.dots) {
  background: #fffef8;
  border-color: var(--honey);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.pagination-page.active {
  background: linear-gradient(135deg, var(--honey) 0%, #FFD54F 100%);
  border-color: var(--honey);
  color: var(--bee-black);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
  transform: translateY(-2px);
}

.pagination-page.dots {
  border: none;
  background: transparent;
  cursor: default;
  pointer-events: none;
  color: #999;
  min-width: auto;
  padding: 0 0.5rem;
}

.pagination-btn.prev,
.pagination-btn.next {
  padding: 0 1.25rem;
  background: white;
  border-color: var(--honey);
  color: var(--bee-black);
}

.pagination-btn.prev:hover:not(:disabled),
.pagination-btn.next:hover:not(:disabled) {
  background: var(--honey);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
}

.pagination-info {
  display: none; /* Hidden in modern design, page numbers show everything */
}

/* Responsive Pagination */
@media (max-width: 640px) {
  .pagination {
    gap: 0.375rem;
  }

  .pagination-btn,
  .pagination-page {
    min-width: 40px;
    height: 40px;
    font-size: 0.875rem;
    padding: 0 0.75rem;
  }

  .pagination-btn.prev,
  .pagination-btn.next {
    padding: 0 1rem;
  }

  /* Hide some page numbers on mobile */
  .pagination-page.hide-mobile {
    display: none;
  }
}

/* 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);
}

