/* Font Imports */
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;600;700&display=swap");

/* CSS Variables - Theme */
html.theme-outlaw {
  --primary-color: hsl(210, 25%, 15%);
  --text-on-primary: #fefefe;
  --text-heading: var(--text-on-primary);
  --accent-color: hsl(35, 65%, 55%);
  --highlight-color: hsl(0, 0%, 98%);
  --neutral-color: hsl(40, 15%, 85%);
  --border-color: hsl(0, 0%, 25%);
  --shadow-color: hsla(210, 25%, 5%, 0.7);
  --font-body: "Inter", sans-serif;
  --font-display: "Orbitron", sans-serif;
  --card-bg: rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.05);
}

/* Layout-level override - kept from original merch.css */
body.merch {
  background-color: var(--surface-bg);
  color: var(--text-on-primary);
}

/* Main Page Layout */
.merch-page {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    hsl(210, 25%, 8%) 25%,
    hsl(210, 30%, 12%) 50%,
    hsl(35, 20%, 10%) 75%,
    hsl(35, 25%, 8%) 100%
  );
  color: var(--text-on-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ===========================================
   BACKGROUND ANIMATIONS
   =========================================== */

.background-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.floating-element {
  position: absolute;
  font-size: 2rem;
  opacity: 0.1;
  animation: float 15s ease-in-out infinite;
  color: var(--accent-color);
  text-shadow: 0 0 20px var(--accent-color);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-30px) rotate(90deg) scale(1.1);
  }
  50% {
    transform: translateY(-60px) rotate(180deg) scale(1.2);
  }
  75% {
    transform: translateY(-30px) rotate(270deg) scale(1.1);
  }
}

/* ===========================================
   HERO SECTION
   =========================================== */

.merch-hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--highlight-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  background: linear-gradient(
    45deg,
    var(--highlight-color),
    var(--accent-color),
    var(--highlight-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroGlow 3s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  from {
    text-shadow: 0 0 30px var(--accent-color);
    filter: drop-shadow(0 0 30px var(--accent-color));
  }
  to {
    text-shadow: 0 0 50px var(--accent-color);
    filter: drop-shadow(0 0 50px var(--accent-color));
  }
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--neutral-color);
  max-width: 600px;
  margin: 0 auto;
}

/* ===========================================
   MAIN CONTENT CONTAINER
   =========================================== */

.container {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* Main Merch Layout - Legacy Section (likely overridden) */
.merch-section {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.merch-item {
  max-width: 700px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 24px var(--shadow-color, rgba(0, 0, 0, 0.4));
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-on-primary, #fefefe);
}

/* ===========================================
   PRODUCT GRID & CARDS
   =========================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
  align-items: stretch;
}

.product-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  padding: 2rem;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-color),
    transparent
  );
  opacity: 0.1;
  transition: left 0.6s ease;
}

.product-card:hover::before {
  left: 100%;
}

.product-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 80px var(--shadow-color), 0 0 40px var(--accent-color);
}

/* ===========================================
   PRODUCT IMAGES
   =========================================== */

.product-image-container {
  position: relative;
  margin-bottom: 2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.product-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  border: 2px solid var(--border-color);
  transition: all 0.4s ease;
  filter: brightness(0.9);
}

.product-image:hover {
  filter: brightness(1.1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
}

/* Legacy shirt image styles (likely overridden by product-image) */
.shirt-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  padding: 0.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shirt-image:hover {
  transform: scale(1.03);
  box-shadow: 0 0 16px var(--accent-color);
}

.zoom-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color);
  color: var(--primary-color);
  padding: 0.5rem;
  border-radius: 50%;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-image-container:hover .zoom-indicator {
  opacity: 1;
}

/* ===========================================
   PRODUCT INFO
   =========================================== */

.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
}

.product-info h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--highlight-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.product-description {
  color: var(--neutral-color);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  min-height: 120px;
}

/* Legacy merch info (likely overridden) */
.merch-info h2 {
  font-size: var(--font-size-heading, 1.8rem);
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.merch-info p {
  font-size: var(--font-size-base, 1rem);
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* ===========================================
   SIZE SELECTOR
   =========================================== */

.size-selector {
  margin-bottom: 2rem;
  flex-shrink: 0;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.size-label {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.size-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
}

.size-option {
  background: var(--glass-bg);
  border: 2px solid var(--border-color);
  color: var(--neutral-color);
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.size-option:hover,
.size-option.selected {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 165, 0, 0.3);
}

/* Legacy size list (likely overridden) */
.sizes {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.sizes li {
  background: var(--gray-800, #2a2a2a);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  color: var(--gray-100, #f5f5f5);
}

/* ===========================================
   BUY BUTTONS
   =========================================== */

.buy-button {
  background: linear-gradient(135deg, var(--accent-color), hsl(35, 65%, 45%));
  color: var(--primary-color);
  border: none;
  padding: 1.2rem 3rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
}

.buy-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
}

.buy-button:hover::before {
  left: 100%;
}

.buy-button:hover {
  background: linear-gradient(
    135deg,
    var(--highlight-color),
    var(--accent-color)
  );
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-color);
}

.buy-button:active {
  transform: translateY(-1px) scale(1.02);
}

/* Legacy Payhip Button (likely overridden) */
.payhip-button button {
  background-color: var(--accent-color);
  color: #000;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 0 10px rgba(255, 170, 50, 0.4);
  transition: all 0.2s ease-in-out;
}

.payhip-button button:hover {
  background-color: var(--highlight-color);
  box-shadow: 0 0 14px rgba(255, 170, 50, 0.6);
  transform: scale(1.03);
}

/* ===========================================
   MODAL
   =========================================== */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.modal-image {
  max-width: 90%;
  max-height: 90%;
  border-radius: 15px;
  box-shadow: 0 25px 100px rgba(0, 0, 0, 0.8);
  animation: modalZoom 0.3s ease-out;
}

@keyframes modalZoom {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--accent-color);
  color: var(--primary-color);
  border: none;
  padding: 1rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--highlight-color);
  transform: scale(1.1);
}

/* Legacy shirt modal (likely overridden) */
.shirt-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.shirt-modal img.modal-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 0 24px var(--accent-color);
}

/* ===========================================
   FEATURES SECTION
   =========================================== */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 4rem 0;
  padding: 3rem 0;
  border-top: 2px solid var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
}

.feature {
  text-align: center;
  padding: 1.5rem;
  background: var(--glass-bg);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px var(--accent-color));
}

.feature h3 {
  font-family: var(--font-display);
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.feature p {
  color: var(--neutral-color);
}

/* ===========================================
   SCROLL ANIMATIONS
   =========================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 768px) {
  .merch-hero {
    padding: 4rem 1rem 2rem;
  }

  .container {
    padding: 0 1rem 2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-card {
    padding: 1.5rem;
    min-height: auto;
  }

  .product-description {
    min-height: 100px;
  }

  .size-options {
    justify-content: center;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
