:root {
  --bg: #090906;
  --panel: #171711;
  --panel-2: #202016;
  --text: #f6f3eb;
  --muted: #b8b2a7;
  --soft: #827b70;
  --line: rgba(255, 255, 255, .14);
  --accent: #dfff22;
  --accent-2: #ff4db8;
  --accent-3: #42e8ff;
  --danger: #ff5b5b;
  --radius: 8px;
  --pill: 999px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(223, 255, 34, .08), transparent 26rem),
    radial-gradient(circle at 90% 20%, rgba(66, 232, 255, .07), transparent 24rem),
    radial-gradient(circle at 74% 74%, rgba(255, 77, 184, .06), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: .022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shop-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  display: flex;
  width: min(calc(100% - 32px), var(--max));
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(9, 9, 6, .82);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand img {
  width: 118px;
}

.shop-header nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.shop-header nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: var(--pill);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
}

.shop-header nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--text);
}

.back-home {
  position: fixed;
  top: 96px;
  left: max(16px, calc((100vw - var(--max)) / 2));
  z-index: 31;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(9, 9, 6, .72);
  color: var(--text);
  backdrop-filter: blur(16px);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.back-home:hover {
  transform: translateX(-3px);
  border-color: rgba(223, 255, 34, .5);
  background: rgba(223, 255, 34, .1);
}

.shop-hero {
  position: relative;
  min-height: 76svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 150px max(24px, calc((100vw - var(--max)) / 2)) 48px;
}

.shop-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 9, 6, .93), rgba(9, 9, 6, .55), rgba(9, 9, 6, .84)),
    linear-gradient(0deg, rgba(9, 9, 6, .9), rgba(9, 9, 6, .14));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  display: inline-block;
  width: 36px;
  height: 2px;
  margin-left: 10px;
  vertical-align: middle;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: .92;
  font-weight: 900;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: .98;
  font-weight: 900;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  line-height: 1.1;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: var(--pill);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #090906;
}

.btn-secondary,
.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.btn-ghost {
  width: 100%;
}

.shop-layout {
  width: min(calc(100% - 32px), var(--max));
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
  margin: 0 auto;
  padding: 86px 0 110px;
}

.filters,
.cart-panel {
  position: sticky;
  top: 110px;
}

.filter-card,
.cart-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(23, 23, 17, .88);
}

.filter-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

.products-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.products-top p:last-child {
  margin-bottom: 12px;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.product-card:hover,
.product-card.is-open {
  transform: translateY(-4px);
  border-color: rgba(223, 255, 34, .48);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .3);
}

.product-media {
  position: relative;
  overflow: hidden;
  background: #111;
}

.product-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(.92) contrast(1.06);
  transition: transform .4s ease;
}

.product-card:hover .product-media img,
.product-card.is-open .product-media img {
  transform: scale(1.04);
}

.badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  padding: 6px 8px;
  border-radius: var(--pill);
  background: rgba(9, 9, 6, .78);
  color: var(--accent);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.product-overlay {
  position: absolute;
  inset: auto 10px 70px;
  z-index: 3;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: rgba(9, 9, 6, .86);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
}

.product-card:hover .product-overlay,
.product-card.is-open .product-overlay {
  opacity: 1;
  transform: translateY(0);
}

.product-overlay p {
  margin: 0;
  color: var(--text);
  font-size: .86rem;
}

.add-btn {
  width: 48px;
  height: 48px;
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: #090906;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.add-btn:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.price {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 900;
}

.availability {
  width: fit-content;
  padding: 6px 8px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.availability.available { color: var(--accent); }
.availability.limited { color: var(--accent-3); }
.availability.ask { color: var(--accent-2); }
.availability.unavailable { color: var(--danger); }

.empty {
  grid-column: 1 / -1;
  padding: 42px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.cart-panel {
  max-height: calc(100svh - 126px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-head h2 {
  font-size: 1.6rem;
}

.cart-close {
  width: 38px;
  height: 38px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
  font-size: 1.3rem;
}

.cart-items {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .2);
}

.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
}

.cart-item strong {
  display: block;
  margin-bottom: 4px;
}

.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty button,
.remove-btn {
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
}

.remove-btn {
  min-width: auto;
  padding: 0 9px;
  color: var(--danger);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cart-summary {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.cart-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-summary strong {
  color: var(--accent);
  font-size: 1.3rem;
}

.cart-summary small {
  color: var(--soft);
  line-height: 1.45;
}

.checkout-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: auto;
  padding: 0 16px 16px;
}

.wide {
  grid-column: 1 / -1;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.floating-cart {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  min-height: 50px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: var(--pill);
  background: var(--accent);
  color: #090906;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.floating-cart span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #090906;
  color: var(--accent);
}

body.cart-open {
  overflow: hidden;
}

@media (max-width: 1120px) {
  .shop-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 38;
    width: min(420px, 100vw);
    height: 100svh;
    max-height: none;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform .25s ease;
  }

  body.cart-open .cart-panel {
    transform: translateX(0);
  }

  .cart-close {
    display: grid;
    place-items: center;
  }

  .floating-cart {
    display: inline-flex;
  }
}

@media (max-width: 860px) {
  .shop-layout {
    grid-template-columns: 1fr;
    padding-top: 58px;
  }

  .filters {
    position: static;
  }

  .filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-card .eyebrow,
  .filter-card .btn {
    grid-column: 1 / -1;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shop-header {
    top: 12px;
    width: min(calc(100% - 20px), var(--max));
    min-height: 60px;
  }

  .brand img {
    width: 92px;
  }

  .shop-header nav {
    gap: 4px;
  }

  .shop-header nav a {
    min-height: 36px;
    padding: 0 8px;
    font-size: .72rem;
  }

  .back-home {
    top: 82px;
    left: 12px;
    min-height: 36px;
    padding: 0 10px;
    font-size: .68rem;
  }

  .shop-hero {
    min-height: 70svh;
    padding: 116px 16px 28px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero-copy > p:not(.eyebrow),
  p {
    font-size: .94rem;
    line-height: 1.55;
  }

  .shop-layout {
    width: min(calc(100% - 24px), var(--max));
    padding-bottom: 88px;
  }

  .hero-actions,
  .products-top {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .filter-card,
  .checkout-form {
    grid-template-columns: 1fr;
  }

  .product-grid {
    gap: 12px;
  }

  .product-body {
    padding: 12px;
  }

  .product-overlay {
    position: static;
    margin: 0 12px 12px;
    opacity: 1;
    transform: none;
    display: none;
  }

  .product-card.is-open .product-overlay {
    display: grid;
  }

  .add-btn {
    width: 42px;
    height: 42px;
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
