:root {
  --bg: #fbf8ff;
  --surface: #ffffff;
  --surface-soft: #f2ebff;
  --surface-lilac: #e9ddfb;
  --surface-deep: #371449;
  --text: #24182d;
  --muted: #74647e;
  --accent: #7b3fc5;
  --accent-strong: #572084;
  --line: #e4d6f2;
  --success: #20745a;
  --warning: #9a5d13;
  --shadow: 0 20px 50px rgba(61, 23, 82, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 360px),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

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

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

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(123, 63, 197, 0.13);
  background: rgba(251, 248, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 208px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.9), transparent 18%),
    linear-gradient(145deg, #8d50d4, var(--surface-deep));
  color: #fff;
  font-weight: 850;
  box-shadow: 0 14px 28px rgba(58, 20, 73, 0.2);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vw, 26px);
  color: #4f3d5f;
  font-size: 0.94rem;
}

.main-nav a,
.nav-item > a {
  position: relative;
  padding: 10px 1px;
}

.main-nav a.is-current,
.nav-item > a.is-current {
  color: var(--accent-strong);
  font-weight: 760;
}

.main-nav a.is-current::after,
.nav-item > a.is-current::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -14px;
  z-index: 30;
  display: none;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--surface-deep);
  font-weight: 720;
}

.nav-dropdown a:hover {
  background: var(--surface-soft);
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  display: grid;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-select {
  display: inline-flex;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.language-select select {
  min-height: 30px;
  width: 58px;
  border: 0;
  padding: 0;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--surface-deep);
  cursor: pointer;
}

.icon-button.plain {
  border: 0;
  background: transparent;
}

.bag-icon {
  position: relative;
  width: 16px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px 4px 6px 6px;
}

.bag-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -8px;
  width: 7px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.page-view {
  display: none;
}

.page-view.is-active {
  display: block;
}

.section-band {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.section-narrow {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(230px, 0.48fr) minmax(280px, 0.44fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  min-height: calc(86vh - 76px);
  background:
    radial-gradient(circle at 76% 28%, rgba(219, 199, 252, 0.82), transparent 28%),
    linear-gradient(100deg, #ffffff 0%, #fbf8ff 52%, #efe5ff 100%);
}

.hero-copy {
  min-width: 0;
  max-width: 740px;
}

.hero h1 {
  margin: 0;
  max-width: 800px;
  color: var(--surface-deep);
  font-size: clamp(2.9rem, 5.9vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero p,
.section-heading p,
.auth-layout p,
.support-shell p,
.intro-grid p,
.home-feature-grid p {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.hero p {
  max-width: 590px;
  margin: 25px 0 0;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-media {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px solid rgba(123, 63, 197, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.hero-media img {
  width: min(100%, 380px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 28px 34px rgba(58, 23, 79, 0.22));
}

.hero-media.image-unavailable img {
  display: none;
}

.hero-media.image-unavailable::after {
  content: "Originalbilder werden aus dem Scentsy-Shop geladen";
  width: min(80%, 320px);
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 760;
  line-height: 1;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 26px rgba(123, 63, 197, 0.22);
}

.button.secondary,
.button.ghost {
  background: var(--surface);
  color: var(--surface-deep);
  border-color: var(--line);
}

.button.small,
.small-action {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.88rem;
}

.button.small {
  background: var(--surface-deep);
  color: #fff;
}

.button.full {
  width: 100%;
}

.hero-panel,
.auth-card,
.profile-card,
.orders-card,
.settings-card,
.support-card,
.legal-grid article,
.product-card,
.category-panel,
.admin-tabs,
.notice,
.checkout-shell,
.thanks-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.panel-label,
.product-category,
.form-note,
.order-row small,
.admin-row small,
.support-thread small {
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-panel strong {
  color: var(--surface-deep);
  font-size: 1.52rem;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.intro-grid,
.home-feature-grid,
.auth-layout,
.support-shell {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(22px, 5vw, 72px);
  align-items: start;
}

.home-feature-grid {
  grid-template-columns: 1.2fr 0.72fr 0.72fr;
}

.home-feature-grid article:not(.notice) {
  min-height: 180px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.home-feature-grid .notice {
  grid-column: 1 / -1;
}

.notice {
  margin: 0;
  padding: 22px 24px;
  color: #4f3d5e;
  line-height: 1.62;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

h2 {
  margin: 0;
  color: var(--surface-deep);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

h3 {
  margin: 0;
  color: var(--surface-deep);
}

.shop-shell {
  padding-top: 42px;
}

.controls {
  display: grid;
  grid-template-columns: 170px minmax(180px, 1fr) 150px;
  gap: 12px;
  min-width: min(680px, 100%);
}

label {
  display: grid;
  gap: 7px;
  color: var(--surface-deep);
  font-size: 0.88rem;
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.category-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.category-panel {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
  padding: 18px;
  box-shadow: none;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #4f3d5f;
  font-weight: 700;
}

.category-link.is-active,
.category-link:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--accent-strong);
}

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

.product-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}

.product-image-link {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--surface-lilac);
}

.product-image-link.image-fallback {
  padding: 18px;
  color: var(--surface-deep);
  font-weight: 760;
  line-height: 1.35;
  text-align: center;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
}

.product-body h3 {
  min-height: 46px;
  margin-top: 7px;
  font-size: 1rem;
  line-height: 1.25;
}

.description {
  display: -webkit-box;
  min-height: 58px;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-meta {
  display: grid;
  gap: 10px;
}

.shop-qty {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
  align-items: center;
}

.shop-qty button {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--surface-deep);
  cursor: pointer;
  font-weight: 850;
}

.shop-qty strong {
  text-align: center;
}

.price {
  color: var(--success);
  font-weight: 800;
}

.auth-card,
.profile-card,
.orders-card,
.settings-card,
.support-card,
.admin-tabs {
  padding: 24px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--surface-deep);
  cursor: pointer;
  font-weight: 760;
  padding: 0 14px;
}

.segmented button.is-active {
  background: #fff;
  box-shadow: 0 8px 20px rgba(61, 23, 82, 0.1);
}

.auth-card form,
.support-card,
.profile-form,
.checkout-form {
  display: grid;
  gap: 16px;
}

.auth-card form {
  margin-top: 18px;
}

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

.account-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: start;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 22px;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.summary-list span {
  color: var(--muted);
}

.accordion {
  display: grid;
  gap: 10px;
}

.accordion-trigger {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--surface-deep);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 0 14px;
}

.accordion-trigger::after {
  content: "+";
  float: right;
}

.accordion-trigger.is-open::after {
  content: "-";
}

.accordion-panel {
  display: none;
}

.accordion-panel.is-open {
  display: grid;
  gap: 12px;
}

.order-row,
.admin-row,
.support-thread,
.cart-row,
.ordered-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-row p,
.admin-row span {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ordered-items {
  display: grid;
  gap: 8px;
}

.ordered-item {
  grid-template-columns: 44px 1fr;
  align-items: center;
  padding: 8px;
  box-shadow: none;
}

.ordered-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-lilac);
}

.status-pill {
  width: fit-content;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 10px;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.tile-grid,
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.data-tile,
.kpi-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.data-tile strong,
.kpi-card strong {
  color: var(--surface-deep);
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.data-tile span,
.kpi-card span,
.kpi-card small {
  color: var(--muted);
  line-height: 1.45;
}

.kpi-card.large {
  grid-column: span 2;
  grid-row: span 2;
}

.kpi-card canvas {
  width: min(180px, 100%);
  height: auto;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.admin-panel {
  display: none;
  margin-top: 18px;
}

.admin-panel.is-active {
  display: block;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.thread-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.chat-log {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.chat-log p {
  margin: 0;
  line-height: 1.5;
}

.chat-reply {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

.legal-grid article {
  padding: 22px;
  box-shadow: none;
}

.legal-grid p {
  color: var(--muted);
  line-height: 1.58;
}

.cart-dialog {
  width: min(620px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.cart-dialog::backdrop {
  background: rgba(36, 25, 44, 0.36);
}

#goCart {
  margin-top: 16px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cart-items {
  display: grid;
  gap: 10px;
}

.cart-row {
  grid-template-columns: 52px 1fr auto;
  align-items: center;
}

.cart-row img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-lilac);
}

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

.qty-control button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.checkout-view {
  min-height: calc(100vh - 76px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(251, 248, 255, 0.96)),
    var(--bg);
}

.checkout-shell,
.thanks-shell {
  display: grid;
  gap: 22px;
  margin-top: 44px;
  margin-bottom: 44px;
  padding: clamp(24px, 4vw, 36px);
}

.checkout-head {
  display: grid;
  gap: 10px;
}

.checkout-head span,
.thanks-mark {
  width: fit-content;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 820;
  padding: 8px 10px;
}

.checkout-head p,
.thanks-shell p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.checkout-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.identity-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: start;
}

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

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-option input {
  width: 18px;
  min-height: 18px;
}

.payment-option.disabled {
  background: #faf8fd;
  color: var(--muted);
}

.checkout-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-total span {
  color: var(--muted);
}

.checkout-total strong:last-child {
  color: var(--accent-strong);
  font-size: 1.2rem;
}

.thanks-shell {
  max-width: 760px;
  justify-items: start;
  text-align: left;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.cookie-banner p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cookie-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 1040px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .intro-grid,
  .home-feature-grid,
  .auth-layout,
  .support-shell,
  .account-grid,
  .legal-grid,
  .identity-grid,
  .payment-grid,
  .tile-grid,
  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card.large {
    grid-column: auto;
    grid-row: auto;
  }

  .category-layout {
    grid-template-columns: 1fr;
  }

  .category-panel {
    position: static;
  }

  .category-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .category-link {
    flex: 0 0 auto;
  }

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

  .controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .section-narrow {
    width: min(100% - 24px, 1220px);
    padding: 38px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  .hero-actions,
  .form-grid,
  .controls,
  .inline-form,
  .chat-reply {
    grid-template-columns: 1fr;
    display: grid;
  }

  .button,
  .segmented,
  .segmented button {
    width: 100%;
  }

  .segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .thread-head,
  .order-head {
    align-items: start;
    flex-direction: column;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .checkout-actions,
  .cookie-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
}
