:root {
  --bg: #070716;
  --card: #11122b;
  --ink: #eef2ff;
  --muted: #b3bbe5;
  --line: #303b72;
  --primary: #8d4dff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Outfit", "Segoe UI", "Nirmala UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(141,77,255,.28), transparent 40%),
    radial-gradient(circle at 20% 15%, rgba(0,199,255,.2), transparent 35%),
    var(--bg);
}

.container {
  width: min(1260px, 92%);
  margin: 0 auto;
}

.shop-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7,8,24,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  color: #f4f7ff;
  font-size: 1.5rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: .06em;
}

.shop-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #6a7dff;
  box-shadow: 0 0 26px rgba(121, 113, 255, .55);
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.header-actions a,
.header-actions button {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(28, 33, 68, .72);
  color: #dde6ff;
  padding: 8px 14px;
  cursor: pointer;
}

.header-actions button {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.hero {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(130deg, #141538, #28165b);
  color: #fff;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.eyebrow {
  margin: 0;
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f7c6df;
}

.hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.hero p {
  margin: 0;
  color: #e7e9f6;
  max-width: 760px;
}

.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-badges span {
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(110,92,255,.18);
  font-size: .88rem;
}

.toolbar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 10px;
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #13183a;
  color: #e9eeff;
  min-height: 44px;
  padding: 0 12px;
}

.product-grid {
  margin: 16px 0 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  display: grid;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-body {
  padding: 12px;
}

.product-body h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.product-meta {
  font-size: .84rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.price-row strong {
  font-size: 1.1rem;
}

.price-row s {
  color: #9ca3af;
}

.badge {
  display: inline-block;
  font-size: .72rem;
  border-radius: 999px;
  background: rgba(112, 80, 255, .22);
  color: #c8d1ff;
  padding: 4px 8px;
  margin-bottom: 8px;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.product-actions button {
  flex: 1;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
}

.product-actions .add-btn {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(420px, 94vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 50;
  transition: right .25s ease;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.cart-drawer.open { right: 0; }

.drawer-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-head button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  width: 32px;
  height: 32px;
}

.cart-items {
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.qty-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.qty-row button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.cart-summary {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.checkout-btn {
  margin: 0 12px 12px;
  border: none;
  border-radius: 10px;
  min-height: 44px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 40;
  display: none;
}

.drawer-backdrop.show { display: block; }

.checkout-dialog {
  width: min(480px, 92vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
}

.checkout-dialog form {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.checkout-dialog input,
.checkout-dialog textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.checkout-actions {
  display: flex;
  gap: 8px;
}

.checkout-actions button {
  flex: 1;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.checkout-actions button[type="submit"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 1060px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .toolbar { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
}
