:root {
  --bg: #010302;
  --paper: #102016;
  --paper-strong: #173321;
  --ink: #edf8ef;
  --muted: #a5b8aa;
  --brand: #4ade80;
  --brand-soft: #1f5b36;
  --line: #294532;
  --good: #7ee787;
  --warn: #f4c95d;
  --shadow: rgba(0, 0, 0, 0.62);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(74, 222, 128, 0.08), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(20, 83, 45, 0.12), transparent 32%),
    linear-gradient(180deg, #030604 0%, #010302 46%, #000 100%),
    var(--bg);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #86efac; text-decoration: underline; }

.hero {
  padding: 3.25rem 1.25rem 2.25rem;
  text-align: center;
}
.hero h1,
.page-head h1 {
  margin: 0.5rem 0;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}
.site-disclaimer {
  margin: -0.15rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.eyebrow {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.category-nav,
.child-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.child-category-nav {
  margin: -0.25rem 0 1.25rem;
}
.category-nav a,
.child-category-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  background: rgba(16, 32, 22, 0.92);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.category-nav span,
.child-category-nav span {
  color: var(--muted);
  font-size: 0.9rem;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px);
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(23, 51, 33, 0.96), rgba(12, 25, 17, 0.96));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 18px 40px var(--shadow);
}
.filters label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 700;
}
.filters input,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #020503;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.filters input:focus,
.filters select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
  outline: none;
}
.filter-status {
  min-height: 1.4rem;
  color: var(--muted);
}

.category-section {
  margin-bottom: 2rem;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}
.section-head h2 {
  margin: 0;
}
.section-head span {
  color: var(--muted);
  font-size: 0.95rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.product-card, .detail-card {
  background: linear-gradient(180deg, rgba(20, 45, 30, 0.97), rgba(8, 18, 12, 0.99));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 45px var(--shadow);
}

.product-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #020503;
}
.product-media img,
.gallery-stage img,
.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-media picture,
.gallery-stage picture,
.gallery-thumbnail picture {
  display: block;
  width: 100%;
  height: 100%;
}

.product-body {
  padding: 0.9rem;
}
.category-tag {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.category-crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.category-separator {
  color: var(--muted);
  opacity: 0.7;
}
.product-body h3 {
  margin: 0;
  font-size: 1.04rem;
}
.description {
  color: var(--muted);
  margin: 0.6rem 0;
  line-height: 1.45;
}
.detail-description {
  white-space: pre-line;
}
.detail-description a {
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.price {
  font-size: 1.05rem;
  color: #f7fff9;
}
.stock {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
}
.stock.in {
  color: var(--good);
}
.stock.out {
  color: var(--warn);
}

.detail {
  padding-top: 1rem;
}
.page-head {
  margin: 0.75rem 0 1.25rem;
}
.detail-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 400px;
}
.detail-media {
  margin: 0;
  background: #020503;
  min-width: 0;
  align-self: start;
}
.gallery-stage {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.gallery-slide,
.gallery-open,
.video-embed {
  width: 100%;
  height: 100%;
}
.gallery-slide[hidden] {
  display: none;
}
.gallery-open {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.video-embed iframe,
.video-embed video {
  width: 100%;
  height: 100%;
  border: 0;
}
.video-link {
  display: grid;
  place-items: center;
  height: 100%;
}
.gallery-thumbnails {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.7rem;
  border-top: 1px solid var(--line);
  scrollbar-color: var(--brand-soft) #020503;
}
.gallery-thumbnail {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #020503;
  cursor: pointer;
  position: relative;
}
.video-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}
.gallery-thumbnail:hover {
  border-color: var(--muted);
}
.gallery-thumbnail[aria-pressed="true"] {
  border-color: var(--brand);
}
.gallery-thumbnail:focus-visible {
  outline: 3px solid rgba(74, 222, 128, 0.45);
  outline-offset: 2px;
}
.detail-body {
  padding: 1.25rem;
}
.detail-body h1 {
  margin: 0.25rem 0 0.7rem;
}
.meta-list {
  margin: 1rem 0;
  padding: 0;
}
.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.5rem 0;
}
.meta-list dt {
  color: var(--muted);
}
.meta-list dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.lightbox {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}
.lightbox {
  width: min(94vw, 1400px);
  max-width: none;
  height: min(92vh, 1000px);
  padding: 2.75rem 1rem 1rem;
}
.lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .detail-card,
  .filters {
    grid-template-columns: 1fr;
  }
}
