/* Merch Page Styling */
.merch-hero {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
  background: linear-gradient(180deg, var(--bg-color) 0%, var(--amodei-ivory-dark) 100%);
  border-bottom: 1px solid var(--border-color);
  border-radius: 8px;
}

body.dark-mode .merch-hero {
  background: linear-gradient(180deg, var(--bg-color) 0%, var(--amodei-slate-medium) 100%);
}

.merch-hero h1 {
  margin-bottom: 0.5rem;
}

.merch-filters {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--secondary-text);
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.merch-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.merch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

body.dark-mode .merch-card:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.merch-image-container {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
}

.merch-image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.merch-card:hover .merch-image img {
  transform: scale(1.05);
}

/* Thumbnail Carousel */
.merch-thumbnails {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem;
  scrollbar-width: thin; /* Firefox */
  background: #f9f9f9;
}

.merch-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.merch-thumbnails::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.thumb-item {
  flex: 0 0 60px;
  height: 60px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.thumb-item:hover, .thumb-item.active {
  opacity: 1;
  border-color: var(--amodei-orange);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.merch-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.merch-info h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.merch-desc {
  font-size: 0.95rem;
  color: var(--secondary-text);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.merch-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--amodei-orange);
  margin-bottom: 1rem;
}

.merch-actions {
  display: flex;
  gap: 0.8rem;
}

.merch-size {
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  font-family: var(--font-body);
  flex-grow: 1;
  cursor: pointer;
}

.buy-now-btn {
  flex-grow: 2;
  text-align: center;
  padding: 0.5rem 1rem;
}

.buy-now-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.merch-about {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 3rem;
  text-align: center;
}

.merch-about h2 {
  margin-top: 0;
}

/* Variant Selectors */
.merch-variants {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.swatch-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-btn.active {
  border-color: var(--amodei-orange);
  box-shadow: 0 0 0 2px var(--amodei-orange);
}

.size-container select {
  width: 100%;
}

/* Info Modal */
.info-btn {
  background: none;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
}

.info-btn:hover {
  color: var(--amodei-orange);
  background-color: var(--border-color);
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: var(--bg-color);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: translateY(0);
  transition: transform 0.3s;
}

.modal-overlay.hidden .modal-content {
  transform: translateY(20px);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  line-height: 1.6;
  color: var(--text-color);
}

.modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.modal-body th, .modal-body td {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  text-align: left;
}

