/* No Tax Closet — minimal streetwear shop */

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --text: #f5f5f5;
  --muted: #888;
  --accent: #3b82f6;
  --border: #222;
  --gap: 1.5rem;
  --radius: 6px;
  --font: "Syne", system-ui, sans-serif;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f8f8f8;
  --surface: #fff;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --border: #e5e5e5;
}

[data-theme="light"] .header {
  background: rgba(248, 248, 248, 0.92);
}

[data-theme="light"] .product-card .card-image-wrap {
  background: #f0f0f0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  contain: layout style;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.nav-ig {
  color: var(--accent);
}

.theme-toggle {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: #333;
}

[data-theme="light"] .theme-toggle:hover {
  border-color: #ccc;
}

.theme-label-dark {
  display: inline;
}

.theme-label-light {
  display: none;
}

[data-theme="light"] .theme-label-dark {
  display: none;
}

[data-theme="light"] .theme-label-light {
  display: inline;
}

/* Promo bar */
.promo-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 0.5rem 0;
  contain: layout style paint;
}

.promo-track {
  display: flex;
  gap: 3rem;
  animation: scroll 25s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.promo-track span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* Main */
.main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-logo {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.hero-logo img {
  width: clamp(200px, 40vw, 320px);
  height: auto;
  object-fit: contain;
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-tab {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.category-tab:hover {
  color: var(--text);
  border-color: #333;
}

.category-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.product-count {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Product grid — scroll-optimized */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  contain: layout style paint;
  content-visibility: auto;
  min-height: 320px;
}

.product-card .card-image-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #161616;
  overflow: hidden;
}

.product-card .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
}

.product-card:hover .card-image-wrap img {
  transform: scale(1.03);
}

.product-card .card-body {
  padding: 1.25rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-card .card-name {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  line-height: 1.3;
}

.product-card .card-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0;
}

.product-card .card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.product-card .card-price {
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0.25rem 0 0;
}

.product-card .card-cta {
  display: inline-block;
  margin-top: auto;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  border: none;
  cursor: default;
  transition: opacity 0.2s;
}

.product-card .card-cta:hover {
  opacity: 0.9;
}

/* About */
.about {
  max-width: 560px;
  margin: 4rem auto 0;
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.about-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.about-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 1rem;
}

.about-cta {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}

.about-cta a {
  font-weight: 600;
  color: var(--accent);
}

.about-cta a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-ig {
  display: inline-block;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.footer-ig:hover {
  text-decoration: underline;
}

.footer-loc {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Product modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.modal {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.is-open .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.modal-image-wrap {
  aspect-ratio: 1;
  background: #161616;
  overflow: hidden;
}

[data-theme="light"] .modal-image-wrap {
  background: #f0f0f0;
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.modal-body {
  padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0;
}

.modal-name {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}

.modal-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.modal-price {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
}

.modal-features {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.modal-features li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
}

.modal-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.modal-cta {
  display: inline-block;
  margin-top: auto;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  transition: opacity 0.2s;
}

.modal-cta:hover {
  opacity: 0.9;
}

@media (max-width: 640px) {
  .modal {
    grid-template-columns: 1fr;
    max-height: 85vh;
  }

  .modal-image-wrap {
    max-height: 220px;
    aspect-ratio: 1;
  }

  .modal-body {
    padding: 1.25rem 1rem;
  }

  .modal-name {
    font-size: 1.2rem;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }

  .logo img {
    height: 36px;
  }

  .nav {
    gap: 1.25rem;
  }

  .nav a {
    font-size: 0.85rem;
  }

  .main {
    padding: 1.5rem 1rem 3rem;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .category-tabs {
    justify-content: center;
  }

  .category-tab {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product-card {
    min-height: 280px;
  }

  .product-card .card-body {
    padding: 1rem 0.75rem;
  }

  .product-card .card-name {
    font-size: 0.9rem;
  }

  .product-card .card-cta {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .about {
    margin-top: 3rem;
    padding: 2rem 1rem;
  }

  .about-title {
    font-size: 1.25rem;
  }

  .about-text,
  .about-cta {
    font-size: 0.95rem;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .promo-track {
    animation: none;
  }

  .product-card .card-image-wrap img {
    transition: none;
  }
}
