:root {
  --bg-a: #101525;
  --bg-b: #24385f;
  --bg-c: #f6d8ff;
  --glass: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(255, 255, 255, 0.24);
  --border: rgba(255, 255, 255, 0.32);
  --text: #f8fbff;
  --muted: rgba(248, 251, 255, 0.72);
  --ink: #172033;
  --accent: #9bf0d1;
  --accent-2: #b9c8ff;
  --danger: #ffd0d0;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(155, 240, 209, 0.42), transparent 28rem),
    radial-gradient(circle at 85% 4%, rgba(185, 200, 255, 0.42), transparent 26rem),
    radial-gradient(circle at 70% 86%, rgba(246, 216, 255, 0.34), transparent 28rem),
    linear-gradient(135deg, var(--bg-a), var(--bg-b) 58%, #654b83);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 82%);
}

button, input { font: inherit; }

a { color: inherit; }

.page-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 46px 0 72px;
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  font-size: 0.84rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 5.8rem);
  line-height: .9;
  letter-spacing: -0.075em;
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.sync-card {
  min-width: 210px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22);
}

.sync-label {
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  font-weight: 800;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.tabs-wrap {
  position: sticky;
  top: 14px;
  z-index: 10;
  margin: 28px 0 26px;
  display: flex;
  justify-content: center;
}

.tabs {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.tab-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 20px;
  color: rgba(255,255,255,.78);
  background: transparent;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.tab-button:hover { transform: translateY(-1px); color: white; }

.tab-button.active {
  color: var(--ink);
  background: rgba(255,255,255,.88);
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.count-pill {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 99px;
  color: var(--ink);
  background: rgba(155,240,209,.95);
  font-size: .78rem;
}

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

.gift-card {
  display: grid;
  grid-template-columns: 205px 1fr;
  min-height: 255px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.24);
  background: linear-gradient(145deg, rgba(255,255,255,.20), rgba(255,255,255,.09));
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  box-shadow: 0 22px 70px rgba(0,0,0,.18);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.gift-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 28px 90px rgba(0,0,0,.24);
}

.image-panel {
  min-height: 100%;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 18px;
}

.image-panel img {
  width: 100%;
  height: 205px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 14px 20px rgba(17,24,39,.14));
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.order-badge {
  flex: 0 0 auto;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.16);
  color: rgba(255,255,255,.8);
  font-weight: 900;
  font-size: .82rem;
}

.card-title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.price {
  display: inline-flex;
  align-self: flex-start;
  padding: 7px 11px;
  border-radius: 999px;
  color: #0f2630;
  background: linear-gradient(135deg, var(--accent), #e0fff5);
  font-weight: 900;
  font-size: .9rem;
}

.description {
  margin: 0;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
  font-size: .96rem;
}

.actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.buy-link, .plain-purchase {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 999px;
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: .88rem;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
}

.buy-link:hover { background: rgba(255,255,255,.24); }
.buy-link::after { content: "↗"; opacity: .72; }

.button-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
}

.plain-purchase {
  color: rgba(255,255,255,.72);
  font-weight: 700;
}

.purchase-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  color: rgba(255,255,255,.86);
  font-weight: 850;
  white-space: nowrap;
}

.purchase-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  pointer-events: none;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: transparent;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.32);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.purchase-toggle:hover .custom-check { transform: scale(1.04); }
.purchase-toggle input:checked + .custom-check {
  color: #12332a;
  background: var(--accent);
  border-color: rgba(255,255,255,.55);
}

.special-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  color: #102034;
  background: rgba(255,255,255,.84);
  font-weight: 850;
  font-size: .88rem;
}

.empty-state {
  display: none;
  padding: 54px 24px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.32);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
}

.empty-state.show { display: block; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 50px rgba(0,0,0,.26);
  font-weight: 850;
  transform: translateY(120px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .sync-card { width: 100%; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .page-shell { width: min(100% - 24px, 1180px); padding-top: 20px; }
  .hero { padding: 24px; border-radius: 26px; }
  .tabs-wrap { top: 8px; }
  .tabs { width: 100%; }
  .tab-button { flex: 1; padding-inline: 10px; }
  .gift-card { grid-template-columns: 1fr; }
  .image-panel { min-height: 220px; }
  .image-panel img { height: 210px; }
  .card-body { padding: 20px; }
  .actions { align-items: stretch; }
  .purchase-toggle { width: 100%; justify-content: space-between; }
}
