:root {
  --cfa-red: #e31837;
  --cfa-white: #ffffff;
  --collected-green: #b0b904;
  --collected-border: #8a8a00;
  --wishlist-yellow: #fffde7;
  --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --accent-yellow: #ffd200;
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  background: var(--bg-gradient);
}

header {
  background: var(--cfa-red);
  color: white;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.brand-text {
  color: var(--cfa-white);
  font-family: "Montserrat", sans-serif;
}

.collection-stats {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-yellow);
  background: rgba(0, 0, 0, 0.15);
  padding: 6px 12px;
  border-radius: 4px;
}

/* Search */
.search-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.search-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 5px;
  transition: var(--transition-smooth);
}

.search-container.active {
  background: white;
}

.search-container.active .search-btn {
  color: var(--cfa-red);
}

#searchInput {
  width: 0;
  border: none;
  outline: none;
  background: transparent;
  transition: width 0.4s ease;
}

.search-container.active #searchInput {
  width: 140px;
  padding: 0 10px;
}

/* Gallery & Categories */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.category-section {
  grid-column: 1 / -1;
  margin-top: 40px;
  margin-bottom: 10px;
}

.category-section h2 {
  font-family: "Montserrat", sans-serif;
  color: var(--cfa-red);
  border-bottom: 3px solid var(--cfa-red);
  padding-bottom: 5px;
  text-transform: uppercase;
  font-size: 1.4rem;
}

/* 3D Cards */
.card {
  height: 420px;
  perspective: 1200px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 15px;
  box-sizing: border-box;
}

.card-front {
  background: white;
  border: 1px solid #ddd;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-back {
  background: #333;
  color: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.card-front.collected {
  background: var(--collected-green);
  border: 2px solid var(--collected-border);
}

.shirt-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  background: #f0f0f0;
}

.location-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.05);
  color: var(--cfa-red);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 10px;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Footer & Other */
.main-footer {
  background: #1a1a1a;
  color: white;
  padding: 40px 20px;
  border-top: 5px solid var(--cfa-red);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}

.footer-brand h2 span {
  color: var(--cfa-red);
}

.social-icons a {
  color: white;
  text-decoration: none;
  margin-right: 10px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 4px;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 80%;
  max-height: 70%;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .header-actions {
    justify-content: center;
  }
}
