
 :root {
  /* Bas-typografi & skuggor */
  --text: #223038;
  --muted: #687883;
  --border: rgba(0, 0, 0, .08);
  --shadow: 0 8px 22px rgba(20, 30, 35, .05);

  /* Basfärger – neutral, funkar som vuxen/allmän */
  --bg: #f7fbf9;
  --panel: #eff6f2;
  --brand: #2b8c68;
  --brand-2: #a6dac5;
  --focus: #a7d7ff;

  /* Fält & UI */
  --field: color-mix(in srgb, white 90%, var(--bg));
  --field-border: rgba(30, 50, 40, .12);

  /* Radier & effekter */
  --r-xl: 22px;
  --r: 16px;
  --r-sm: 10px;
  --lock-blur: 6px;
}

/* 💚 Barn – lite ljusare, mer lekfull variant av root */
body[data-theme="kids"] {
  --bg: #f6fbf7;
  --panel: #eef6f1;
  --brand: #3fb88c;
  --brand-2: #9fd8c4;
  --focus: #a6dcff;
  --field: color-mix(in srgb, white 94%, var(--bg));
}

/* 💙 Husdjur – samma struktur men blå ton */
body[data-theme="pets"] {
  --bg: #cfeafc;
  --panel: #c6e0f2;
  --brand: #5f79f2;
  --brand-2: #c3cffd;
  --focus: #c6d7ff;
  --field: color-mix(in srgb, white 94%, var(--bg));
}

/* 🧡 Vuxen – varm, lite mer “presentbok till vuxen”-känsla */
body[data-theme="adult"] {
  --bg: #fff7f0;
  --panel: #ffeede;
  --brand: #d86b4a;   /* varm terrakotta/orange */
  --brand-2: #ffd0b8;
  --focus: #ffcfa2;
  --field: color-mix(in srgb, white 94%, var(--bg));
}


/* =========================================================
   Reset & grundtypografi
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Quicksand", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* mjuk bakgrundsglow */
body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto 50%;
  transform: translateX(-50%);
  width: 130vw;
  z-index: -1;
  background:
    radial-gradient(
      60% 60% at 30% 20%,
      color-mix(in srgb, var(--brand-2) 18%, transparent) 0%,
      transparent 65%
    ),
    radial-gradient(
      50% 50% at 80% -10%,
      color-mix(in srgb, white 12%, var(--panel)) 0%,
      transparent 60%
    );
  filter: blur(8px) saturate(1.05);
  pointer-events: none;
}

/* Fokus */
:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--focus),
    0 0 0 6px color-mix(in srgb, var(--focus) 30%, transparent) !important;
  border-radius: 12px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--panel) 70%, white);
  backdrop-filter: blur(8px) saturate(1.05);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(10, 30, 40, 0.06);
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .2s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

.header-inner {
  width: 100%;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 56px;
  height: auto;
  object-fit: contain;
  display: block;
}

.brand span {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  color: inherit;
  opacity: .88;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   Layout container
   ========================================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

/* =========================================================
   HERO – mobil först
   ========================================================= */
.hero {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Textdel över bilden */
.hero-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
  z-index: 2;
}

.hero-kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  opacity: 0.9;
  margin: 0;
  color: #f9fafb;
}

.hero-title {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.6rem);
  line-height: 1.15;
  margin: 0;
  color: #f9fafb;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* Gradient-highlightad text */
.hero-highlight {
  display: inline-block;
  background: linear-gradient(90deg, #ff8fa3, #ffd37a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Mobil-bild direkt under titeln, centrerad */
.hero-image-mobile {
  margin: 12px auto 8px;
  max-width: 680px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.35);
}

.hero-image-mobile .hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center center;
}

/* Desktop-bilden (hero-media) är dold på mobil */
.hero-media {
  display: none;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 26px 55px rgba(15, 23, 42, 0.4);
  background: radial-gradient(circle at top, #ffe4ec, #f3f4ff);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* CTA-knapp – under texten, centrerad */
.hero-cta-row {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding-bottom: 0;
}

.hero-cta-row .btn-cta {
  font-size: 1.1rem;
  padding: 16px 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 80%, black));
  box-shadow:
    0 10px 28px rgba(0,0,0,.25),
    0 0 18px rgba(60, 200, 140, 0.45);
  transform: translateY(0);
  transition: all .22s ease;
}

.hero-cta-row .btn-cta:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 40px rgba(0,0,0,.28),
    0 0 26px rgba(60, 200, 140, 0.55);
}

/* =========================================================
   Textblocket UNDER bilden (tagline, pills, lista, pris)
   ========================================================= */
.hero-details {
  max-width: 1100px;
  width: 100%;
  margin: 56px auto 0;
  padding: 0 16px;          /* matchar .container */
  color: #2b3135;
}

.hero-details .hero-tagline {
  margin: 0 0 8px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #3a4248;
}

.hero-details .hero-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 4px 0 12px;
}

.hero-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #2b2f33;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(6px);
}

.hero-details .hero-list {
  list-style: disc;
  margin: 0 0 0.75rem 1.2rem;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #4a5258;
}

.hero-details .hero-pricing {
  margin: 0;
  font-size: 0.95rem;
  color: #374045;
}

.hero-details .hero-pricing strong {
  color: var(--text);
}

/* =========================================================
   Paneler & formulär
   ========================================================= */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 920px;
  margin: 32px auto 0;
}

form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field.col-span-2 {
  grid-column: span 2;
}

.field.col-span-3 {
  grid-column: span 3;
}

label {
  font-weight: 700;
  font-size: .98rem;
}

.hint {
  color: var(--muted);
  font-size: .9rem;
  margin: 4px 0 0;
}

/* Skärmläsare-only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Inputs */
input,
select,
textarea {
  appearance: none;
  background: var(--field);
  border: 1px solid var(--field-border);
  border-radius: 18px;
  padding: 12px 14px;
  font: inherit;
  color: inherit;
  width: 100%;
  max-width: 100%;
  transition:
    box-shadow .18s ease,
    border-color .18s ease,
    transform .06s ease,
    background .18s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .65) inset,
    0 2px 6px rgba(0, 0, 0, .03),
    0 10px 22px rgba(0, 0, 0, .04);
}

textarea {
  resize: vertical;
  min-height: 96px;
  border-radius: 16px;
}

input:hover,
select:hover,
textarea:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .70) inset,
    0 3px 8px rgba(0, 0, 0, .04),
    0 12px 26px rgba(0, 0, 0, .06);
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--brand) 70%, black 0%);
  background: color-mix(in srgb, var(--field) 85%, white);
  transform: translateY(-1px);
}

/* Segmented toggles */
.seg {
  background: color-mix(in srgb, var(--field) 86%, white);
  border: 1px solid var(--field-border);
  border-radius: 999px;
  padding: 5px;
  display: inline-flex;
  gap: 6px;
  align-self: flex-start;
}

.seg-btn {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  transition:
    box-shadow .18s ease,
    transform .07s ease,
    background .18s ease,
    color .18s ease;
}

.seg-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, white 88%, var(--panel));
  box-shadow: 0 6px 16px rgba(0, 0, 0, .05);
}

.seg-btn.active {
  background: white;
  color: var(--text);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, .06),
    inset 0 0 0 1px var(--border);
}

/* Upload preview */
.upload-preview {
  background: var(--field);
  border: 1px dashed var(--field-border);
  border-radius: var(--r);
  padding: 10px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-preview img {
  max-height: 140px;
  max-width: 100%;
  border-radius: var(--r-sm);
}

/* =========================================================
   Buttons
   ========================================================= */
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  background: white;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  transition:
    box-shadow .18s ease,
    transform .07s ease,
    opacity .15s ease,
    background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand) 24%, transparent);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 20%, transparent);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 85%, black));
  transform: translateY(-1px);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.18),
    0 12px 32px color-mix(in srgb, var(--brand) 45%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 60%, black);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 26px rgba(0,0,0,0.2),
    0 16px 40px color-mix(in srgb, var(--brand) 50%, transparent);
}

.btn-secondary {
  background: color-mix(in srgb, white 92%, var(--panel));
  border: 1px solid var(--border);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
}

.btn-accent {
  background: linear-gradient(180deg, #f8b54c, #f18b1b);
  color: #442400;
  border: 1px solid color-mix(in srgb, #f18b1b 70%, #774000);
  box-shadow: 0 10px 22px rgba(241, 139, 27, 0.3);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(241, 139, 27, .35);
}

.checkout-actions {
  justify-content: flex-start;
  gap: 12px;
}

/* =========================================================
   Preview / galleri
   ========================================================= */
#preview {
  margin-top: 22px;
  max-width: 920px;
  margin-inline: auto;
}

.preview-note {
  color: var(--muted);
}

.thumb-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}

.thumb {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    transform .12s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .08);
  border-color: color-mix(in srgb, var(--brand-2) 26%, var(--border));
}

.thumb .txt {
  padding: 12px;
  font-size: .98rem;
}

.thumb .imgwrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f7f7fb;
  border-radius: 12px;
}

/* skeleton */
.skeleton,
.skeleton-box {
  background: linear-gradient(
    90deg,
    #e7e3f1 0%,
    #f3f0fa 50%,
    #e7e3f1 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 12px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Bildfade */
.thumb .imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.thumb .imgwrap img.is-ready {
  animation: imageFadeIn .45s ease forwards;
}

@keyframes imageFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.img-fallback {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 12px;
  background: #fff7f7;
  color: #b3261e;
  font-size: .95rem;
  padding: 16px;
  text-align: center;
}

/* Regenerate overlay */
.regen-overlay {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(20, 20, 20, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.imgwrap:hover .regen-overlay {
  opacity: 1;
  display: flex;
}

.regen-btn {
  background: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.regen-btn:hover {
  background: #f2f2f8;
}

/* Statusbar */
#statusBar {
  margin-top: 16px;
  background: #f6f0ff;
  border: 1px solid #e2d9fa;
  color: #4a3578;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 3px 6px rgba(80, 0, 150, 0.08);
}

#statusBar .progress-track {
  background: #e8defc;
  border-radius: 8px;
  height: 7px;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7b4ce3, #a18af7);
  animation: stripe 1.2s linear infinite;
  transition: width .35s ease;
}

@keyframes stripe {
  to { background-position: 40px 0; }
}

/* =========================================================
   About & footer
   ========================================================= */
.about {
  margin-top: 28px;
  color: var(--muted);
}

.site-footer {
  margin-top: 40px;
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
}

/* =========================================================
   Hjälpklasser
   ========================================================= */
.hidden {
  display: none !important;
}

/* =========================================================
   Responsivitet
   ========================================================= */

/* Lite tajtare padding */
@media (max-width: 1100px) {
  .container {
    padding: 24px 12px 56px;
  }
}

/* Bildgrid 3 kolumner */
@media (max-width: 980px) {
  .thumb-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobil: header + formulär */
@media (max-width: 760px) {
  .header-inner {
    padding: 12px 10px;
    gap: 12px;
  }
  

  .brand img { width: 48px; }
  .brand span { font-size: 0.95rem; }

  .main-nav { gap: 12px; }
  .main-nav a { font-size: 0.9rem; }

  /* bara hem + orderstatus */
  .main-nav a[data-nav="create"],
  .main-nav a[data-nav="examples"] {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .field.col-span-2,
  .field.col-span-3 {
    grid-column: auto;
  }

  .thumb-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-cta {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
   .container {
    padding-top: 8px; /* mindre padding mot headern */
  }

  .hero {
    margin-top: 4px; /* eller 0 om du vill ha det supertight */
  }

}
.regen-btn-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
}
.regen-btn {
  width: 100%;
  justify-content: center;
}


/* Mindre mobiljusteringar */
@media (max-width: 600px) {
  .thumb-grid {
    grid-template-columns: 1fr;
  }

  .checkout-actions .btn-cta {
    width: 100%;
  }
}

/* Desktop / större skärmar – overlay-hero */
@media (min-width: 900px) {
  .hero {
    position: relative;
    margin-top: 32px;
  }

  /* Visa desktop-bilden, göm mobilvarianten */
  .hero-media {
    display: block;
  }

  .hero-image-desktop {
    display: block;
  }

  .hero-image-mobile {
    display: none;
  }

  .hero-media .hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.45);
    z-index: 1;
  }

  /* Lägg texten ovanpå bilden */
  .hero-main {
    position: absolute;
    inset: 0;
    padding: 2.5rem 3rem;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 2;
    pointer-events: none;
  }

  .hero-main > * {
    pointer-events: auto;
  }

  /* Knapparna – absolut centrerade nära nederkanten av bilden */
  .hero-cta-row {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    margin-top: 0;
    padding-bottom: 0;
  }
}

/* =========================================================
   Utskrift & reduced motion
   ========================================================= */
@media print {
  .site-header,
  .main-nav,
  .actions,
  #statusBar {
    display: none !important;
  }

  .panel {
    border: 0;
    box-shadow: none;
    background: white;
  }

  .thumb {
    page-break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
