:root {
  --bg: #0d0718;
  --panel: #1a1030;
  --card: #201339;
  --text: #f7f2ff;
  --muted: #b5a8d6;
  --line: #3c2a62;
  --accent: #8a4dff;
  --accent-2: #bb63ff;
  --danger: #ff5e78;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  background: radial-gradient(circle at top, #29174a, #0d0718 48%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 9, 28, 0.82);
  backdrop-filter: blur(14px);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.logo {
  font-weight: 800;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-btn {
  border: 1px solid var(--line);
  background: #1a112f;
  color: var(--text);
  border-radius: 12px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.cart-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.menu-btn,
.icon-btn {
  border: 1px solid var(--line);
  background: #1a112f;
  color: var(--text);
  border-radius: 12px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.menu-btn {
  display: none;
}

.hero {
  padding: 92px 0 90px;
  background:
    linear-gradient(95deg, rgba(13, 7, 24, 0.9), rgba(13, 7, 24, 0.36)),
    url("https://images.unsplash.com/photo-1490481651871-ab68de25d43d?auto=format&fit=crop&w=1600&q=80")
    center / cover no-repeat;
}

.hero-content {
  max-width: 700px;
}

.badge {
  display: inline-block;
  background: rgba(172, 96, 255, 0.2);
  border: 1px solid rgba(189, 110, 255, 0.5);
  color: #ead7ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-text {
  color: #d6d8e9;
  max-width: 620px;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.btn {
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.btn.ghost {
  border-color: #5a3f8d;
  color: #f0e9ff;
  background: rgba(36, 18, 62, 0.62);
}

.btn.full {
  width: 100%;
}

.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.link {
  color: var(--muted);
}

.categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  background: linear-gradient(145deg, #21133d, #180f2c);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.category-card p {
  margin-top: 6px;
  color: var(--muted);
}

.products-section {
  background: radial-gradient(circle at 30% 20%, rgba(136, 77, 255, 0.16), rgba(14, 8, 26, 0.88) 60%);
  position: relative;
  overflow: hidden;
}

.filters {
  display: flex;
  gap: 8px;
}

.chip {
  border: 1px solid #6847a8;
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.chip.active {
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: #7f58c8;
}

.product-image-wrap {
  position: relative;
  cursor: pointer;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.view-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  background: rgba(22, 11, 40, 0.85);
  border: 1px solid #6c48af;
  border-radius: 999px;
  padding: 4px 8px;
}

.product-body {
  padding: 14px;
}

.product-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.product-meta {
  color: var(--muted);
  font-size: 13px;
}

.product-price {
  margin-top: 10px;
  margin-bottom: 12px;
  font-weight: 800;
}

.add-btn {
  width: 100%;
}

.sale-box {
  border: 1px solid #6e4db3;
  background: linear-gradient(125deg, #2d1b4f, #1a1230);
  border-radius: 18px;
  padding: 34px;
}

.sale-box p {
  color: #c6cbe3;
  margin: 10px 0 16px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}

.about p {
  color: var(--muted);
  margin-top: 10px;
}

.newsletter {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #1c1232;
  padding: 20px;
  display: grid;
  gap: 10px;
}

.newsletter input {
  border: 1px solid #5d3d96;
  background: #120a22;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 14px;
  color: var(--muted);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 45;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: min(380px, 92vw);
  height: 100vh;
  background: #140d26;
  border-left: 1px solid var(--line);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease;
}

.cart-drawer.open {
  right: 0;
}

.cart-header,
.cart-footer {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-footer {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.cart-items {
  padding: 10px 16px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #1c1234;
}

.cart-item h4 {
  font-size: 14px;
}

.cart-row {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #434860;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.remove-btn {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 55;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(880px, 100%);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #1a1030;
  position: relative;
  padding: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal-content {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

.modal-content img {
  width: 100%;
  border-radius: 14px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.modal-type {
  color: var(--muted);
  margin: 8px 0;
}

.modal-desc {
  color: #dbceff;
  margin: 10px 0 16px;
}

.empty-cart {
  color: var(--muted);
  text-align: center;
  padding: 30px 0;
}

@media (max-width: 960px) {
  .categories,
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid,
  .modal-content {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #12121b;
    padding: 14px 4%;
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .products,
  .categories {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.product-top-meta {
  position: absolute;
  z-index: 3;
  left: 10px;
  top: 10px;
  display: flex;
  gap: 8px;
}

.pill {
  border: 1px solid rgba(165, 176, 255, 0.45);
  background: rgba(37, 21, 64, 0.88);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  color: #e9dcff;
}

.product-card {
  position: relative;
}

.product-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.old-price {
  color: #8086a2;
  text-decoration: line-through;
  font-size: 13px;
}

.add-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(115, 103, 255, 0.38);
}

.add-btn.added {
  animation: addPulse 0.35s ease;
}

@keyframes addPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.cart-count.bump {
  animation: badgeBump 0.35s ease;
}

@keyframes badgeBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.flying-dot {
  position: fixed;
  z-index: 80;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 8px rgba(166, 101, 255, 0.22);
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.5s ease;
}

.floating-lights {
  position: absolute;
  left: 0;
  right: 0;
  top: 130px;
  bottom: 20px;
  z-index: 0;
  pointer-events: none;
}

.light {
  position: absolute;
  bottom: 0;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.36;
  background: radial-gradient(circle, rgba(201, 141, 255, 0.92) 0%, rgba(146, 75, 255, 0.48) 50%, rgba(146, 75, 255, 0) 70%);
  animation: floatAcross 14s linear infinite;
}

.light.one {
  width: 120px;
  height: 120px;
  left: -10%;
  animation-duration: 18s;
}

.light.two {
  width: 75px;
  height: 75px;
  left: 12%;
  bottom: 22%;
  animation-duration: 13s;
  animation-delay: -3s;
}

.light.three {
  width: 98px;
  height: 98px;
  left: 38%;
  bottom: 8%;
  animation-duration: 16s;
  animation-delay: -7s;
}

.light.four {
  width: 70px;
  height: 70px;
  left: 60%;
  bottom: 30%;
  animation-duration: 12s;
  animation-delay: -5s;
}

.light.five {
  width: 135px;
  height: 135px;
  left: 82%;
  bottom: 5%;
  animation-duration: 20s;
  animation-delay: -9s;
}

@keyframes floatAcross {
  0% {
    transform: translateX(0) translateY(0) scale(0.7);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  50% {
    transform: translateX(80px) translateY(-90px) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translateX(180px) translateY(-180px) scale(0.85);
    opacity: 0;
  }
}

.products,
.section-head {
  position: relative;
  z-index: 2;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c7cce4;
  margin-bottom: 8px;
}

.cart-summary-row.total {
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  margin-bottom: 12px;
  font-size: 17px;
  color: #f4f6ff;
}
