/* =============================
   css/style.css
   ============================= */

/* ---------- CSS Variables ---------- */
:root {
  --clr-purple: #7c3aed;          /* Primary accent */
  --clr-purple-light: #a855f7;    /* Hover / gradients */
  --clr-black: #000000;
  --clr-black-900: #0a0a0a;       /* Background */
  --clr-black-800: #161616;       /* Surfaces */
  --clr-white: #ffffff;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-glow: 0 0 12px rgba(124, 58, 237, 0.8);
  --shadow-card: 0 0 0 2px rgba(124, 58, 237, 0.4),
                 0 4px 20px rgba(0, 0, 0, 0.6);

  --trans-fast: 150ms;
  --trans-med: 300ms;

  --max-w: 1200px;

  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Roboto', sans-serif;
}

/* ---------- Global Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  background: var(--clr-black-900);
  color: var(--clr-white);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--clr-purple-light);
  text-decoration: none;
}
a:hover,
a:focus {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--clr-purple);
  color: var(--clr-white);
  z-index: 1000;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--clr-purple);
  border-bottom: 2px solid var(--clr-purple-light);
  box-shadow: var(--shadow-glow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--clr-white);
  letter-spacing: 0.5px;
}
.logo span {
  color: var(--clr-black);
}

.primary-nav { position: relative; }

.nav-toggle {
  display: inline-block;
  background: none;
  border: none;
  color: var(--clr-white);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25em 0.5em;
}

.nav-menu {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 1rem;
  background: var(--clr-black-800);
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  padding: 1rem;
  border: 1px solid var(--clr-purple-light);
  border-radius: var(--radius-md);
  min-width: 200px;
}
.nav-menu.open { display: flex; }

.nav-menu a {
  color: var(--clr-white);
  font-weight: 500;
}

.cart-link .cart-count {
  margin-left: 0.25rem;
  font-weight: 700;
  color: var(--clr-purple-light);
}

@media (min-width: 640px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    gap: 2rem;
    background: none;
    border: none;
    padding: 0;
    min-width: auto;
  }
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  padding-block: 8rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, var(--clr-purple-light) 0%, rgba(124, 58, 237, 0.4) 25%, rgba(0, 0, 0, 0.9) 70%),
              url('https://win.gg/wp-content/uploads/2022/08/Late-Game-Arena.webp.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin-inline: auto;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(124, 58, 237, 0.9);
}
.hero-title span { color: var(--clr-purple-light); }

.hero-tagline {
  font-size: 1.25rem;
  max-width: 40ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.75em 1.5em;
  transition: all var(--trans-fast) ease;
}

.btn-primary {
  background: var(--clr-purple);
  color: var(--clr-white);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--clr-purple-light);
  transform: translateY(-2px);
}

.btn-lg {
  font-size: 1.125rem;
  padding: 1em 2em;
}

.btn-add {
  background: var(--clr-purple-light);
  color: var(--clr-white);
  font-size: 0.95rem;
  padding: 0.6em 1.25em;
}
.btn-add:hover,
.btn-add:focus {
  background: var(--clr-white);
  color: var(--clr-black);
}

/* ---------- Chips (Filters) ---------- */
.quick-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 2rem;
  flex-wrap: wrap;
}

.chip {
  padding: 0.5em 1em;
  font-size: 0.9rem;
  border: 1px solid var(--clr-purple-light);
  background: transparent;
  color: var(--clr-white);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--trans-fast);
}
.chip.active,
.chip:hover,
.chip:focus {
  background: var(--clr-purple-light);
  color: var(--clr-white);
}

/* ---------- Products Grid ---------- */
.products-section {
  padding-block: 4rem;
  background: var(--clr-black-900);
}

.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--clr-purple-light);
}

.product-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.product-card {
  background: var(--clr-black-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--trans-med) ease,
              box-shadow var(--trans-med) ease;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.9);
}

.card-media { position: relative; }
.card-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--clr-purple-light);
  color: var(--clr-white);
  padding: 0.25em 0.75em;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
}
.badge-hot { background: #ff007a; }
.badge-new { background: #00d4ff; color: var(--clr-black); }

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}
.product-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}
.product-desc {
  font-size: 0.95rem;
  color: #d1d1d1;
  line-height: 1.4;
  min-height: 3.5em;
}
.price-row {
  margin-top: auto;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-purple-light);
}
.price { display: inline-block; }

/* ---------- Info Sections ---------- */
.info-section {
  padding-block: 4rem;
  text-align: center;
}
.info-section.alt-bg { background: var(--clr-black-800); }

.info-content {
  max-width: 700px;
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
}
.info-content p { color: #d1d1d1; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal.hidden { display: none; }

.modal-content {
  background: #fff;
  padding: 20px;
  max-width: 400px;
  border-radius: 10px;
  text-align: center;
  position: relative;
}
.modal img {
  max-width: 100%;
  margin-bottom: 10px;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
}
.modal-price-qty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

/* ---------- Filtered Products ---------- */
.product-card.active-filter { color: var(--clr-black); }
.product-card.active-filter .product-name,
.product-card.active-filter .product-desc,
.product-card.active-filter .price-row {
  color: var(--clr-black);
}

/* ---------- Contact Form ---------- */
.contact-form {
  display: grid;
  gap: 1.5rem;
  max-width: 480px;
  margin-inline: auto;
  text-align: left;
}
.contact-form label span {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75em 1em;
  border-radius: var(--radius-md);
  border: 2px solid var(--clr-purple-light);
  background: var(--clr-black-900);
  color: var(--clr-white);
  font-size: 1rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--clr-purple-light);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--clr-purple);
  padding-block: 2rem;
  text-align: center;
  border-top: 2px solid var(--clr-purple-light);
}
.footer-inner p {
  max-width: 600px;
  margin-inline: auto;
  font-size: 0.9rem;
  color: var(--clr-white);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
