/* ===================================================
   SOFIA'S PAWFECT PRINTS — ULTRA-ANIMATED REDESIGN
   Palette: Rosa #F72585, Arancione #FF8C42, Viola #C77DFF
   Font: Fredoka One (brand) + Nunito (body)
   =================================================== */

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* === HEADER HEIGHTS === */
  --header-height: calc(188px + env(safe-area-inset-top, 0px));
  --header-height-scrolled: calc(114px + env(safe-area-inset-top, 0px));

  /* === BRAND PALETTE (PASTEL REDESIGN) === */
  --pink: #FADBD8;
  --pink-hot: #F5B7B1;
  --pink-light: #FDEDEC;
  --pink-pale: #FEF9E7;
  --orange: #FDEBD0;
  --orange-dark: #F5CBA7;
  --yellow: #FCF3CF;
  --purple: #E8DAEF;
  --purple-dark: #D2B4DE;
  --black: #5D4037;

  /* === VIVID ACCENT (for CTAs and high-contrast elements) === */
  --vivid-pink: #D91A5E;
  --vivid-pink-dark: #B5154E;
  --vivid-pink-light: #F5337A;
  --border-strong: #E8B8C0;

  /* === FUNCTIONAL === */
  --primary: #FADBD8;
  --primary-dark: #F5B7B1;
  --primary-light: #FDEDEC;
  --secondary: #FDEBD0;
  --accent: #F5B7B1;
  --bg: #FEF9E7;
  --surface: #FFFFFF;
  --surface-2: #FDEDEC;
  --text: #2E150F;
  --text-mid: #3A2018;
  --text-muted: #6B4230;
  --border: #E8C4C4;
  --border-focus: #D91A5E;
  --success: #27AE60;
  --success-light: #A9DFBF;
  --error: #E74C3C;
  --warning: #F9E79F;

  /* === GRADIENTS === */
  --grad-pink: linear-gradient(135deg, #E8356D 0%, #C7185A 100%);
  --grad-pink-pastel: linear-gradient(135deg, #FADBD8 0%, #F5B7B1 100%);
  --grad-text: linear-gradient(135deg, #C7185A 0%, #D4572A 50%, #B8860B 100%);
  --grad-hero: linear-gradient(135deg, #FDEDEC 0%, #FDEBD0 50%, #FEF9E7 100%);
  --grad-surface: linear-gradient(180deg, #FEF9E7 0%, #FFFFFF 100%);

  /* === GLASSMORPHISM === */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-blur: blur(24px);

  /* === RADIUS === */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 999px;

  /* === SHADOWS === */
  --shadow-sm: 0 2px 8px rgba(245, 183, 177, 0.15);
  --shadow: 0 8px 24px rgba(245, 183, 177, 0.20);
  --shadow-md: 0 16px 40px rgba(245, 183, 177, 0.25);
  --shadow-lg: 0 24px 64px rgba(245, 183, 177, 0.35);
  --shadow-glow: 0 0 30px rgba(245, 183, 177, 0.5), 0 0 60px rgba(253, 235, 208, 0.4);

  /* === TRANSITIONS === */
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* === LAYOUT === */
  --max-width: 1100px;
  --container-pad: clamp(1rem, 5vw, 2.5rem);
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Noise texture sottile */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  /* x/y/width/height on <filter> prevent the feTurbulence region from bleeding
     outside each 300px tile, eliminating visible tile-edge overflow artifacts */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 1;
  /* Own compositing layer → browser won't repaint this when other elements
     change (e.g. scroll-lock toggling scrollbar width) */
  will-change: transform;
  transform: translateZ(0);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
}

/* ===== TYPOGRAPHY ===== */
.playfair {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
}

/* ===== UTILITY ===== */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Gradient text utility */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== GLOBAL KEYFRAMES ===== */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(120%);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmerSlide {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes rippleExpand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes stepSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(217, 26, 94, 0.5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(217, 26, 94, 0);
  }
}

@keyframes rainbowSlide {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 200% 0%;
  }
}

@keyframes logoPawBounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-5px) scale(1.03);
  }
}

@keyframes blobMorph {
  0% {
    transform: scale(1) translate(0, 0);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  33% {
    transform: scale(1.05) translate(20px, -20px);
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }

  66% {
    transform: scale(0.97) translate(-15px, 10px);
    border-radius: 50% 60% 30% 60% / 40% 50% 60% 50%;
  }

  100% {
    transform: scale(1.02) translate(10px, 5px);
    border-radius: 60% 40% 50% 30% / 30% 60% 70% 40%;
  }
}


@keyframes heartbeatPulse {
  0% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.06);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.06);
  }

  70% {
    transform: scale(1);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes stepBounceIn {
  from {
    transform: scale(0.6);
    opacity: 0.5;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes ringPulseActive {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes selectedPop {
  0% {
    transform: scale(0.96) translateY(-4px);
  }

  60% {
    transform: scale(1.06) translateY(-9px);
  }

  100% {
    transform: scale(1.02) translateY(-5px);
  }
}

@keyframes checkBadgePop {
  from {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }

  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes corePulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(247, 37, 133, 0.5);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(247, 37, 133, 0.8);
  }
}

@keyframes particleBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 0.5;
  }

  100% {
    transform: translate(var(--tx, 20px), var(--ty, -20px)) scale(0);
    opacity: 0;
  }
}

@keyframes dotBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

@keyframes productSelectPop {
  0% {
    transform: translateX(0) scale(0.98);
  }

  60% {
    transform: translateX(9px) scale(1.02);
  }

  100% {
    transform: translateX(6px) scale(1);
  }
}

@keyframes successIconPop {
  from {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }

  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes burstPulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.2;
  }
}

@keyframes confettiExplode {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.3);
    opacity: 0;
  }
}

@keyframes selectedGlow {
  from {
    opacity: 0.2;
    filter: blur(4px);
  }

  to {
    opacity: 0.5;
    filter: blur(10px);
  }
}

@keyframes connectorShine {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@keyframes uploadPulse {

  0%,
  100% {
    border-color: var(--border-strong);
    box-shadow: none;
  }

  50% {
    border-color: var(--vivid-pink);
    box-shadow: 0 0 0 4px rgba(217, 26, 94, 0.1);
  }
}

@keyframes superConfettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(350px) rotate(720deg);
    opacity: 0;
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, background 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--grad-pink);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(199, 24, 90, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 36px rgba(199, 24, 90, 0.5);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-mid);
  border: 2px solid var(--border-strong);
  font-weight: 800;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--vivid-pink);
  color: var(--vivid-pink);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 26, 94, 0.12);
}

.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 2px solid var(--border-strong);
  font-weight: 700;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--vivid-pink);
  color: var(--vivid-pink);
  background: rgba(217, 26, 94, 0.06);
  transform: translateY(-1px);
}

.btn-back {
  gap: 10px;
}

.btn-back::before {
  content: "\2190";
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}

.btn-back svg {
  display: none;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 16px;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-hero {
  padding: 18px 42px;
  font-size: 18px;
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #E8356D 0%, #C7185A 100%);
  color: #ffffff;
  box-shadow: 0 8px 32px rgba(199, 24, 90, 0.45), 0 2px 8px rgba(199, 24, 90, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: heartbeatPulse 2.5s infinite;
}

.btn-hero:hover:not(:disabled) {
  animation: none;
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 18px 50px rgba(199, 24, 90, 0.6), 0 4px 16px rgba(199, 24, 90, 0.35);
}

/* Shimmer sweep sui button */
.btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: 200% 0;
  animation: shimmerSlide 3s ease infinite;
  pointer-events: none;
  border-radius: inherit;
}

/* Ripple (creato via JS) */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleExpand 0.6s ease-out forwards;
  pointer-events: none;
}

/* ===== HEADER ===== */
.site-header {
  --site-header-safe-area-bg: var(--bg);
  background: transparent;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 0 24px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
}

/* Header background now covers safe area naturally by being at top: 0 */
/* No ::before pseudo-element needed for separate safe area coloring */

/* Fallback for browsers without scroll-timeline support: use JS .scrolled class */
@supports not (animation-timeline: scroll()) {
  .site-header {
    transition: background 0.35s ease-in-out,
                padding 0.35s ease-in-out,
                box-shadow 0.35s ease-in-out,
                border-color 0.35s ease-in-out;
  }

  .site-header.scrolled,
  .site-header.always-scrolled {
    background: rgba(254, 249, 231, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(247, 37, 133, 0.1);
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 0 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
  }

  .site-header .logo-icon-wrap {
    transition: width 0.35s ease-in-out, height 0.35s ease-in-out;
  }

  .site-header.scrolled .logo-icon-wrap,
  .site-header.always-scrolled .logo-icon-wrap {
    width: 90px;
    height: 90px;
  }

  .site-header .italian-flag-bar {
    transition: height 0.35s ease-in-out,
                width  0.35s ease-in-out,
                opacity 0.35s ease-in-out;
  }

  .site-header.scrolled .italian-flag-bar,
  .site-header.always-scrolled .italian-flag-bar {
    height: 8px;
    width: 40%;
    opacity: 1;
  }
}

/* Modern browsers: scroll-driven animation — header morphs linearly with scroll position */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: headerScrollMorph 1s linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 200px;
  }

  .site-header .logo-icon-wrap {
    animation: headerLogoMorph 1s linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 200px;
  }

  .site-header .italian-flag-bar {
    animation: headerFlagMorph 1s linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 200px;
  }
}

@keyframes headerScrollMorph {
  from {
    background: rgba(254, 249, 231, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom-color: rgba(247, 37, 133, 0);
    padding: calc(env(safe-area-inset-top, 0px) + 24px) 0 24px;
    box-shadow: none;
  }
  to {
    background: rgba(254, 249, 231, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: rgba(247, 37, 133, 0.1);
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 0 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
  }
}

@keyframes headerLogoMorph {
  from { width: 140px; height: 140px; }
  to   { width: 90px;  height: 90px; }
}

@keyframes headerFlagMorph {
  from { width: 55%; height: 14px; opacity: 0.75; }
  to   { width: 40%; height: 8px;  opacity: 1; }
}

/* always-scrolled: non-hero pages, always compact */
.site-header.always-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(247, 37, 133, 0.1);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 0 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
  animation: none;
}

.site-header.always-scrolled .logo-icon-wrap {
  width: 90px;
  height: 90px;
  animation: none;
}

.site-header.always-scrolled .italian-flag-bar {
  height: 8px;
  width: 40%;
  opacity: 1;
  animation: none;
}

.site-header .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 55px;
}

.site-header .logo {
  grid-column: 2;
  justify-self: center;
}

.header-blog-link {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(58, 32, 24, 0.74);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.84;
  transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

.header-blog-link:hover {
  color: var(--vivid-pink);
  opacity: 1;
  transform: translateX(2px);
}

.header-blog-link-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(217, 26, 94, 0.85), rgba(245, 140, 66, 0.7));
  box-shadow: 0 0 0 5px rgba(245, 183, 177, 0.22);
  flex-shrink: 0;
}

body.flow-active .header-blog-link {
  display: none;
}

.site-header .cart-btn {
  grid-column: 3;
  justify-self: end;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon-wrap {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
  padding: 0;
  margin: 0;
  display: block;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  align-items: flex-start;
}

.logo-text-sofia {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 900;
  color: var(--vivid-pink);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2px;
}

.logo-text-brand {
  font-family: 'Fredoka One', sans-serif;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: font-size 0.4s ease;
}

.site-header.scrolled .logo-text-brand,
.site-header.always-scrolled .logo-text-brand {
  font-size: 20px;
}

/* ===== ITALIAN FLAG DIVIDER ===== */
.italian-flag-bar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 14px;
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 0, 0, 0.10);
  opacity: 0.75;
}

/* Fallback only: these rules are overridden in the @supports not block above,
   but .always-scrolled needs them regardless (non-hero pages, no scroll) */

.ifb-green,
.ifb-white,
.ifb-red {
  flex: 1;
  position: relative;
}

.ifb-green { background: #009246; }
.ifb-white { background: #FFFFFF; }
.ifb-red   { background: #CE2B37; }

/* Shimmer wave sweeping across the entire bar */
@keyframes italianFlagShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}


.italian-flag-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  animation: italianFlagShimmer 2.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

/* ===== HERO ===== */
.hero {
  padding: clamp(14rem, 16vw, 18rem) 0 clamp(3rem, 7vw, 6rem);
  background: var(--grad-surface);
  overflow: hidden;
  position: relative;
}

/* Blob decorativi */
.hero-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: blobMorph 14s ease-in-out infinite alternate;
  will-change: transform;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #FADBD8, #FDEDEC);
  top: -200px;
  left: -150px;
  animation-duration: 16s;
}

.blob-2 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, #FDEBD0, #FADBD8);
  top: 0;
  right: -120px;
  animation-duration: 20s;
  animation-delay: -5s;
}

.blob-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #FADBD8, #FCF3CF);
  bottom: -100px;
  left: 40%;
  animation-duration: 9s;
  animation-delay: -5s;
}


.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 800;
  color: var(--vivid-pink);
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 12px rgba(217, 26, 94, 0.12);
  animation: fadeInDown 0.6s ease both;
  letter-spacing: 0.02em;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vivid-pink);
  animation: badgePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-content h1 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-content h1 em {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 440px;
  line-height: 1.7;
  font-weight: 600;
  animation: fadeInUp 0.7s ease 0.2s both;
  opacity: 0.85;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.75);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
}

.trust-paw {
  font-size: 16px;
}

/* Hero visual */
.hero-visual {
  position: relative;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-samples {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.sample-card {
  position: absolute;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: white;
  border: 6px solid white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.sample-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

.sample-card svg {
  display: block;
}

.sample-1 {
  width: 65%;
  height: 65%;
  top: 5%;
  right: 0;
  z-index: 2;
  transform: rotate(3deg);
}

.sample-2 {
  width: 55%;
  height: 55%;
  bottom: 0;
  left: 5%;
  z-index: 3;
  transform: rotate(-4deg);
}

.sample-3 {
  width: 50%;
  height: 50%;
  top: 35%;
  left: 35%;
  z-index: 1;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.sample-card:hover {
  transform: scale(1.08) rotate(0deg) !important;
  box-shadow: var(--shadow-glow);
  z-index: 10;
}

.sample-3:hover {
  transform: translate(-50%, -50%) scale(1.08) rotate(0deg) !important;
}

.sample-glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  height: 60px;
  background: radial-gradient(ellipse, rgba(247, 37, 133, 0.22), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

@media (max-width: 720px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content p {
    max-width: none;
  }

  .hero-samples {
    justify-content: center;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .blob-1 {
    width: 300px;
    height: 300px;
  }

  .blob-2 {
    width: 260px;
    height: 260px;
  }

  .blob-3 {
    display: none;
  }
}

/* ===== HOME WIZARD SECTION ===== */
.home-styles-section {
  padding: clamp(3rem, 7vw, 6rem) 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--surface-2) 50%, #FFFFFF 100%);
  border-top: 2px solid var(--border-strong);
  box-shadow: 0 -4px 20px rgba(217, 26, 94, 0.04);
}

.home-styles-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(217,26,94,0.1), rgba(255,105,180,0.12));
  border: 1px solid rgba(217,26,94,0.25);
  color: var(--vivid-pink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.home-styles-header h2 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.home-styles-header p {
  font-size: 16px;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Wizard Steps */
.wizard-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 160px;
  max-width: 220px;
}

.wizard-step-bubble {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(217,26,94,0.08), rgba(255,105,180,0.12));
  border: 2px solid rgba(217,26,94,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--vivid-pink);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.wizard-step:hover .wizard-step-bubble {
  transform: translateY(-4px) scale(1.06);
  border-color: var(--vivid-pink);
  box-shadow: 0 10px 28px rgba(217,26,94,0.2);
}

.wizard-step-num {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--vivid-pink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  box-shadow: 0 2px 8px rgba(217,26,94,0.4);
}

.wizard-step h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}

.wizard-step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.wizard-step-connector {
  display: flex;
  align-items: center;
  padding-top: 28px;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Style subheader */
.home-styles-subheader {
  text-align: center;
  margin-bottom: 1.75rem;
}

.home-styles-subheader h2 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}

.home-styles-subheader p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 500px;
}

.home-styles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.home-style-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-strong);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: default;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.home-style-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(217, 26, 94, 0.14);
  border-color: var(--vivid-pink);
}

.home-style-image-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--style-bg, var(--surface-2));
  border-radius: var(--radius-xl);
  margin: 12px auto;
  width: 80%;
}

.home-style-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(0.88);
  transition: transform 0.4s ease;
  border-radius: var(--radius-xl);
}

.home-style-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--style-bg, transparent);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.home-style-card:hover .home-style-image-wrapper img {
  transform: scale(1);
}

.home-style-card:hover .home-style-overlay {
  opacity: 0;
}

.home-style-info {
  padding: 12px 14px 14px;
}

.home-style-info h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
  font-family: 'Nunito', sans-serif;
}

.home-style-info p {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.45;
  font-weight: 600;
}

.home-style-card-add {
  padding: 0;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  display: flex;
  flex-direction: column;
  height: auto;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 230, 241, 0.95) 40%, rgba(255, 204, 224, 0.95) 100%);
}

.home-style-card-add:focus-visible {
  outline: 3px solid rgba(217, 26, 94, 0.45);
  outline-offset: 2px;
}

.home-style-add-visual {
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.home-style-add-plus {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--vivid-pink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(217, 26, 94, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-style-add-info {
  padding: 12px 14px 14px;
  background: var(--surface);
  flex: 1 1 auto;
}

.home-style-add-info h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
  font-family: 'Nunito', sans-serif;
}

.home-style-add-info p {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.45;
  font-weight: 600;
}

.home-style-card-add:hover .home-style-add-plus {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 14px 34px rgba(217, 26, 94, 0.25);
}

/* Home products showcase */
.home-products-section {
  padding: 0 0 clamp(3.5rem, 7vw, 6rem);
  background:
    radial-gradient(circle at top left, rgba(250, 219, 216, 0.45), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fff7f2 55%, #ffffff 100%);
}

.home-products-header {
  text-align: center;
  margin-bottom: 2rem;
}

.home-products-header h2 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.home-products-header p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-mid);
  font-size: 15px;
}

.home-products-grid {
  display: grid;
  gap: 1.4rem;
}

.home-product-showcase {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.2rem, 2vw, 1.6rem);
  border-radius: 28px;
  border: 1px solid rgba(217, 26, 94, 0.14);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 48px rgba(217, 26, 94, 0.08);
}

.home-product-copy h3 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--text);
  margin-bottom: 0.55rem;
}

.home-product-copy p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.home-product-meta {
  margin-top: 0.7rem;
  color: var(--vivid-pink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.home-product-kind {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(217, 26, 94, 0.08);
  color: var(--vivid-pink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.home-product-flow {
  display: grid;
  grid-template-columns: minmax(150px, 190px) auto minmax(220px, 300px);
  gap: 1rem;
  align-items: center;
}

.home-product-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.home-product-stage-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.72rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 26, 94, 0.16);
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-product-flow-arrow {
  color: var(--vivid-pink);
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-product-art-card {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 24px;
  overflow: hidden;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,245,240,0.92));
  border: 1px solid rgba(217, 26, 94, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 12px 28px rgba(217, 26, 94, 0.08);
}

.home-product-art-card img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 18px;
}

.home-product-stage-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  overflow: hidden;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,245,240,0.92));
  border: 1px solid rgba(217, 26, 94, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 12px 28px rgba(217, 26, 94, 0.08);
}

.home-product-stage-media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 18px;
  transform-origin: center center;
}

.home-product-stage-media--mockup {
  max-width: 320px;
  background: radial-gradient(circle at top, #fffdfb 0%, #f7e7de 68%, #f2ddd3 100%);
}

.home-product-stage-media--mockup img {
  filter: drop-shadow(0 18px 30px rgba(93, 64, 55, 0.18));
}

.home-product-stage-media--canvas img {
  width: 88%;
}

.home-product-stage-media--mug img {
  width: 94%;
}

.home-product-stage-media--phone img {
  width: 74%;
}

.home-product-stage-media--error {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.home-product-art-card--cat {
  background: linear-gradient(180deg, #fff2e8 0%, #fff9f4 100%);
}

.home-product-art-card--cat img {
  width: 90%;
}

.home-product-art-card--hamster {
  background: linear-gradient(180deg, #fff0e3 0%, #fff8f0 100%);
}

.home-product-art-card--hamster img {
  width: 84%;
}

.home-product-art-card--dog {
  background: linear-gradient(180deg, #f4efe8 0%, #fbf7f3 100%);
}

.home-product-art-card--dog img {
  width: 92%;
}

.home-products-grid .loading-state {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 28px;
  border: 1px dashed rgba(217, 26, 94, 0.2);
  background: rgba(255, 255, 255, 0.72);
}

.home-product-mockup {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.home-product-mockup--canvas {
  max-width: 255px;
  aspect-ratio: 600 / 750;
}

.home-product-mockup--mug {
  max-width: 295px;
  aspect-ratio: 680 / 560;
}

.home-product-mockup--phone {
  max-width: 220px;
  aspect-ratio: 460 / 920;
}

.home-product-base,
.home-product-print {
  position: absolute;
}

.home-product-base {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 18px 24px rgba(93, 64, 55, 0.16));
}

.home-product-print {
  z-index: 1;
  box-shadow: 0 8px 20px rgba(93, 64, 55, 0.1);
}

.home-product-print--canvas {
  inset: 4% 5%;
  width: 90%;
  height: 92%;
  object-fit: cover;
  border-radius: 10px;
}

.home-product-print--mug {
  left: 18.5%;
  top: 28%;
  width: 48%;
  height: 36.33%;
  object-fit: cover;
  border-radius: 18px;
}

.home-product-print--phone {
  left: 10.87%;
  top: 5.22%;
  width: 78.26%;
  height: 89.57%;
  object-fit: cover;
  border-radius: 34px;
}

@media (max-width: 600px) {
  .home-styles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wizard-steps {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .wizard-step-connector {
    transform: rotate(90deg);
    padding-top: 0;
    padding: 0;
    margin: -4px 0;
  }
  .wizard-step {
    max-width: 280px;
  }
}

@media (max-width: 900px) {
  .home-product-showcase {
    grid-template-columns: 1fr;
  }

  .home-product-copy {
    text-align: center;
  }

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

  .home-product-flow-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 560px) {
  .home-products-section {
    padding-bottom: 3.5rem;
  }

  .home-product-showcase {
    padding: 1rem;
    border-radius: 22px;
  }

  .home-product-art-card {
    max-width: 180px;
  }

  .home-product-mockup--canvas {
    max-width: 220px;
  }

  .home-product-mockup--mug {
    max-width: 245px;
  }

  .home-product-mockup--phone {
    max-width: 190px;
  }
}

/* ===== STEP PROGRESS ===== */
.step-progress {
  --step-bubble-size: 56px;
  --step-label-size: 0.74rem;
  --step-track-height: 6px;
  --step-progress-max-width: 760px;
  padding: 24px 0;
  transition: all 0.3s ease;
  background: transparent;
  border-bottom: none;
  position: relative;
}

.step-progress .container {
  position: relative;
}

/* Liquid progress track */
.progress-liquid-track {
  position: absolute;
  top: calc((var(--step-bubble-size) / 2) - (var(--step-track-height) / 2));
  left: 0;
  width: 0;
  height: var(--step-track-height);
  background: rgba(247, 37, 133, 0.22);
  border-radius: var(--radius-full);
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(247, 37, 133, 0.08);
}

.progress-liquid-fill {
  height: 100%;
  background: #de226d;
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.25rem, 1vw, 0.75rem);
  position: relative;
  z-index: 2;
  width: min(100%, var(--step-progress-max-width));
  margin: 0 auto;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: default;
  position: relative;
  flex: 1;
  min-width: 0;
}

.step-bubble {
  width: var(--step-bubble-size);
  height: var(--step-bubble-size);
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.step-bubble svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.step span {
  display: block;
  max-width: 100%;
  font-size: var(--step-label-size);
  font-weight: 800;
  color: var(--text-muted);
  transition: color 0.3s ease;
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.step.active .step-bubble {
  background: linear-gradient(135deg, #f76b9d, #de226d);
  /* Pink gradient */
  border-color: transparent;
  color: white;
  /* White icon for active */
  box-shadow: 0 0 30px rgba(247, 37, 133, 0.4);
  /* Glow effect */
  transform: scale(1.1);
}

.step.active span {
  color: var(--vivid-pink);
  font-weight: 900;
}

.step.completed .step-bubble {
  background: linear-gradient(135deg, var(--success), #04b082);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(6, 214, 160, 0.25);
}

.step.completed .step-bubble svg {
  display: none;
}

.step.completed .step-bubble::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 7px;
  border-left: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(-45deg) translate(2px, -2px);
  animation: checkReveal 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes checkReveal {
  0% {
    opacity: 0;
    transform: rotate(-45deg) translate(2px, -2px) scale(0.5);
  }

  100% {
    opacity: 1;
    transform: rotate(-45deg) translate(2px, -2px) scale(1);
  }
}

.step.completed span {
  color: var(--success);
}

.step.completed .step-bubble {
  border-color: var(--success);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.step-connector {
  display: none;
  /* Hide default connectors, liquid track handles it! */
}

@media (max-width: 480px) {
  .step-progress {
    --step-bubble-size: 38px;
    --step-label-size: 0.62rem;
    --step-track-height: 5px;
  }

  .step-progress {
    padding: 20px 0 18px;
  }

  .steps {
    gap: 0;
  }

  .step span {
    letter-spacing: 0.01em;
  }

  .step-bubble {
    border-width: 2px;
  }

  .step-bubble svg {
    width: 13px;
    height: 13px;
  }
}

/* ===== MAIN CONTENT ===== */
/* Prevent overlap below the fixed header */
.main-content {
  display: none;
}

body.flow-active .main-content {
  display: block;
  flex: 1;
  padding: calc(var(--header-height-scrolled) + 30px) 0 4rem;
  min-height: calc(100vh - (var(--header-height-scrolled) + 30px));
  background: var(--bg);
}

/* ===== STEP PANELS ===== */
.step-panel {
  display: none;
  max-width: 820px;
  margin: 0 auto;
  animation: stepSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-panel.active {
  display: block;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

/* ===== STEP 1 UPLOAD WIZARD MODAL ===== */
#step1 {
  max-width: none;
  margin: 0;
}

#step1.active {
  display: none; /* only visible when flow is active */
}

body.flow-active #step1.active {
  display: block;
  min-height: calc(100vh - 80px);
  padding: 2.5rem clamp(1rem, 5vw, 3rem) 3rem;
  background: var(--grad-surface);
  animation: stepSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

body.flow-active .hero,
body.flow-active #homeStyles,
body.flow-active #homeProducts {
  display: none;
}


.upload-modal-close {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  grid-column: 1;
  justify-self: start;
}

body.flow-active .upload-modal-close {
  display: flex;
}

.upload-modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--vivid-pink);
}


@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.step-header {
  margin-bottom: 2rem;
  padding: 1.75rem 2rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.step-header h2 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(1.7rem, 3.8vw, 2.3rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}

.step-header p {
  color: var(--text-mid);
  font-size: 15px;
}

.step-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

/* ===== STEP 1: UPLOAD ===== */
.step-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.upload-area {
  border: 2.5px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: var(--surface);
  animation: uploadPulse 3s ease-in-out infinite;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--pink-hot);
  background: rgba(245, 183, 177, 0.1);
  box-shadow: 0 0 0 6px rgba(245, 183, 177, 0.2), var(--shadow);
  transform: scale(1.01);
  animation: none;
}

.upload-area.drag-over {
  border-style: solid;
  border-color: var(--pink-hot);
  background: rgba(245, 183, 177, 0.15);
  box-shadow: 0 0 0 10px rgba(245, 183, 177, 0.25), var(--shadow-md);
}

.upload-area.has-image,
.upload-area.uploading {
  animation: none;
}

.upload-area.uploading {
  pointer-events: none;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 2rem;
  text-align: center;
}

.upload-icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), rgba(210, 180, 222, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink-hot);
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.upload-area:hover .upload-icon-wrap {
  background: linear-gradient(135deg, rgba(245, 183, 177, 0.25), rgba(210, 180, 222, 0.3));
  transform: scale(1.1) rotate(-5deg);
}

.upload-title {
  font-weight: 700;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}

.upload-hint {
  font-size: 13px;
  color: var(--text-muted);
}

.upload-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-mid);
  font-size: 14px;
}

.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius-xl) - 2px);
}

.upload-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #06d6a0, #05c090);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  box-shadow: 0 4px 16px rgba(6, 214, 160, 0.35);
  align-self: center;
}

.success-check {
  color: white;
}

/* Spinners */
.spinner-small {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Nunito', sans-serif;
}

.form-label svg {
  color: var(--pink);
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  transition: all 0.25s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--vivid-pink);
  box-shadow: 0 0 0 4px rgba(217, 26, 94, 0.1), var(--shadow-sm);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
  font-family: 'Nunito', sans-serif;
}

.tips-box {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.tips-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--grad-pink);
  border-radius: 4px 0 0 4px;
}

.tips-box h4 {
  font-size: 11px;
  font-weight: 800;
  color: var(--pink);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Nunito', sans-serif;
}

.tips-box ul {
  list-style: none;
}

.tips-box li {
  font-size: 13px;
  color: var(--text-mid);
  padding: 3px 0;
  padding-left: 22px;
  position: relative;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
}

.tips-box li::before {
  content: '🐾';
  position: absolute;
  left: 0;
  font-size: 12px;
}

/* ===== STEP 2: STYLES ===== */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1 / -1;
  font-family: 'Nunito', sans-serif;
}

.product-loading-experience {
  margin-bottom: 1rem;
}

.product-loading-card {
  position: relative;
  display: grid;
  gap: 20px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(255, 220, 228, 0.72) 0%, rgba(255, 220, 228, 0) 34%),
    radial-gradient(circle at right bottom, rgba(255, 220, 190, 0.72) 0%, rgba(255, 220, 190, 0) 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 239, 0.97));
  border: 1px solid rgba(232, 184, 192, 0.78);
  box-shadow:
    0 24px 64px rgba(175, 102, 132, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.product-loading-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.28), transparent 45%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.42), transparent 28%);
  pointer-events: none;
}

.product-loading-copy,
.product-loading-game-shell,
.product-loading-progress {
  position: relative;
  z-index: 1;
}

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

.product-loading-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(232, 53, 109, 0.1);
  color: var(--vivid-pink-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-loading-copy h3 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  color: var(--text);
}

.product-loading-copy p {
  max-width: 700px;
  font-size: 15px;
  color: var(--text-muted);
}

.product-loading-game-shell {
  display: grid;
  gap: 12px;
  padding: clamp(14px, 2vw, 20px);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 251, 247, 0.94), rgba(255, 243, 233, 0.96));
  border: 1px solid rgba(232, 184, 192, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.product-loading-game-topline,
.product-loading-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-loading-game-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(232, 184, 192, 0.62);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 800;
}

.product-loading-game-score {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--vivid-pink-dark);
}

.product-loading-canvas {
  width: 100%;
  height: clamp(210px, 36vw, 260px);
  display: block;
  border-radius: 24px;
  border: 1px solid rgba(232, 184, 192, 0.44);
  background: linear-gradient(180deg, #fff8f0, #ffe9d9);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.product-loading-game-hint {
  font-size: 12px;
  font-weight: 700;
  color: rgba(58, 32, 24, 0.72);
}

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

.product-loading-progress-meta {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-mid);
}

.product-loading-progress-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(232, 184, 192, 0.28);
  box-shadow: inset 0 1px 2px rgba(93, 64, 55, 0.08);
}

.product-loading-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #e8356d 0%, #ff9e7a 50%, #f6d365 100%);
  background-size: 180% 100%;
  animation: rainbowSlide 2.8s linear infinite;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(232, 53, 109, 0.22);
}

@media (max-width: 640px) {
  .product-loading-card {
    border-radius: 28px;
    gap: 16px;
  }

  .product-loading-game-shell {
    border-radius: 24px;
    padding: 12px;
  }

  .product-loading-canvas {
    height: 200px;
    border-radius: 20px;
  }
}

/* Style Cards */
.style-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transform-origin: center bottom;
  display: flex;
  flex-direction: column;
}

.style-card:hover {
  border-color: var(--vivid-pink);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 40px rgba(217, 26, 94, 0.18);
  z-index: 5;
}

.style-card.selected {
  border-color: var(--vivid-pink);
  box-shadow: 0 0 0 3px var(--vivid-pink), 0 16px 40px rgba(217, 26, 94, 0.2);
  transform: translateY(-5px) scale(1.02);
  animation: selectedPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.style-card.selected::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  background: var(--grad-pink);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 15px;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.4);
  animation: checkBadgePop 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Glow pulsante card selezionata */
.style-card.selected::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  z-index: -1;
  animation: selectedGlow 2s ease-in-out infinite alternate;
}

.style-card-image-wrapper {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--style-card-bg, var(--surface-2));
  border-radius: var(--radius-xl);
}

.community-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  z-index: 9;
}

.style-example-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--radius-xl);
}

.style-hover-overlay {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.style-card:hover .style-hover-overlay {
  opacity: 0;
}

.style-card:hover .style-example-image {
  transform: scale(1.05);
}

.style-card-info {
  padding: 12px 14px 16px;
  background: var(--surface);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.style-card-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  font-family: 'Nunito', sans-serif;
}

.style-card.selected .style-card-info h3 {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.style-card-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 10px;
}

.style-start-btn {
  margin-top: auto;
  width: 100%;
}

.style-card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
}

.style-card-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--vivid-pink);
  text-decoration: none;
  text-align: center;
}

.style-card-link:hover {
  text-decoration: underline;
}

/* ===== STEP 3: GENERATE + PRODUCTS ===== */
.step3-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 640px) {
  .step3-body {
    grid-template-columns: 1fr;
  }
}

.generated-preview-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(16px, 2vw, 22px);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(255, 214, 226, 0.96) 0%, rgba(255, 214, 226, 0) 34%),
    radial-gradient(circle at bottom right, rgba(255, 230, 200, 0.8) 0%, rgba(255, 230, 200, 0) 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 246, 0.95) 100%);
  border: 1px solid rgba(232, 184, 192, 0.7);
  box-shadow:
    0 24px 60px rgba(232, 116, 150, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.generated-preview-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 45%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.45), transparent 26%);
  pointer-events: none;
}

.preview-main-stage {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.preview-stage-topbar,
.preview-stage-footer {
  position: relative;
  z-index: 2;
}

.preview-stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-stage-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(232, 184, 192, 0.75);
  box-shadow: 0 12px 28px rgba(209, 26, 94, 0.08);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-mid);
}

.preview-stage-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8356D, #FF9E7A);
  box-shadow: 0 0 0 4px rgba(232, 53, 109, 0.14);
}

.preview-stage-zoom-hint {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(58, 32, 24, 0.68);
}

.preview-stage-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(253, 244, 238, 0.94) 52%, rgba(251, 236, 222, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 16px 36px rgba(107, 66, 48, 0.14);
}

.preview-stage-spotlight {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.8;
  pointer-events: none;
}

.preview-stage-spotlight-a {
  width: 160px;
  height: 160px;
  top: -28px;
  left: -12px;
  background: rgba(255, 204, 224, 0.56);
}

.preview-stage-spotlight-b {
  width: 140px;
  height: 140px;
  right: -22px;
  bottom: -24px;
  background: rgba(255, 218, 177, 0.55);
}

/* AI Loader Elaborato */
.generating-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 240, 245, 0.96) 0%, rgba(245, 230, 255, 0.95) 54%, rgba(255, 245, 230, 0.96) 100%);
  z-index: 3;
}

.ai-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 2rem;
  text-align: center;
}

.ai-loader-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(247, 37, 133, 0.5);
  animation: corePulse 2s ease-in-out infinite;
}

.ai-progress-track {
  width: 220px;
  height: 6px;
  background: rgba(247, 37, 133, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.ai-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #F72585, #C77DFF);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(247, 37, 133, 0.4);
}

.ai-canvas {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-orbit {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}

.ai-orbit-1 {
  width: 130px;
  height: 130px;
  border-top-color: rgba(247, 37, 133, 0.75);
  border-right-color: rgba(247, 37, 133, 0.15);
  animation: orbitSpin 2s linear infinite;
}

.ai-orbit-2 {
  width: 95px;
  height: 95px;
  border-top-color: rgba(199, 125, 255, 0.75);
  border-left-color: rgba(199, 125, 255, 0.15);
  animation: orbitSpin 1.4s linear infinite reverse;
}

.ai-orbit-3 {
  width: 62px;
  height: 62px;
  border-top-color: rgba(255, 140, 66, 0.75);
  border-right-color: rgba(255, 140, 66, 0.15);
  animation: orbitSpin 1.8s linear infinite;
}

.ai-orbit-dot {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ai-orbit-1 .ai-orbit-dot {
  background: #F72585;
  box-shadow: 0 0 10px #F72585, 0 0 20px rgba(247, 37, 133, 0.5);
}

.ai-orbit-2 .ai-orbit-dot {
  background: #C77DFF;
  box-shadow: 0 0 10px #C77DFF, 0 0 20px rgba(199, 125, 255, 0.5);
}

.ai-orbit-3 .ai-orbit-dot {
  background: #FF8C42;
  box-shadow: 0 0 10px #FF8C42, 0 0 20px rgba(255, 140, 66, 0.5);
}

.ai-core {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(247, 37, 133, 0.6), 0 0 60px rgba(247, 37, 133, 0.3);
  animation: corePulse 2s ease-in-out infinite;
  position: relative;
  z-index: 5;
  color: white;
}

.ai-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: particleBurst 2.4s ease-in-out infinite;
}

.ai-p1 {
  background: #F72585;
  top: 10%;
  left: 50%;
  animation-delay: 0s;
  --tx: 0px;
  --ty: -30px;
}

.ai-p2 {
  background: #C77DFF;
  top: 50%;
  right: 5%;
  animation-delay: -0.6s;
  --tx: 25px;
  --ty: 0px;
}

.ai-p3 {
  background: #FF8C42;
  bottom: 10%;
  left: 30%;
  animation-delay: -1.2s;
  --tx: -18px;
  --ty: 22px;
}

.ai-p4 {
  background: #FFD60A;
  top: 50%;
  left: 5%;
  animation-delay: -1.8s;
  --tx: -25px;
  --ty: -12px;
}

/* Compatibilità con vecchio markup .ai-rings */
.ai-rings {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: orbitSpin 2s linear infinite;
}

.ring-1 {
  width: 80px;
  height: 80px;
  border-top-color: rgba(247, 37, 133, 0.7);
}

.ring-2 {
  width: 60px;
  height: 60px;
  border-top-color: rgba(199, 125, 255, 0.7);
  animation-direction: reverse;
  animation-duration: 1.4s;
}

.ring-3 {
  width: 40px;
  height: 40px;
  border-top-color: rgba(255, 140, 66, 0.7);
  animation-duration: 1.8s;
}

.ai-icon {
  color: var(--pink);
  position: relative;
  z-index: 1;
}

.ai-loader-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}

.ai-loader-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
}

.ai-loader p {
  font-weight: 700;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}

.ai-loader span {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
}

.ai-dots {
  display: flex;
  gap: 6px;
}

.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.ai-dot:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--purple);
}

.ai-dot:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--orange);
}

/* Errore generazione */
.generation-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2rem;
  text-align: center;
  background: rgba(255, 240, 245, 0.97);
  color: var(--error);
  z-index: 4;
}

.generation-error p {
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
}

.generated-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-in;
}

.preview-stage-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.preview-stage-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.preview-stage-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(58, 32, 24, 0.56);
}

.preview-stage-copy strong {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.05;
  color: var(--text);
}

.preview-stage-copy span:last-child {
  font-size: 14px;
  color: var(--text-muted);
}

.preview-stage-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.preview-stage-tag {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(232, 184, 192, 0.72);
  box-shadow: 0 10px 24px rgba(209, 26, 94, 0.07);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-mid);
}

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

.preview-insight-card {
  min-width: 0;
  padding: 18px 18px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(232, 184, 192, 0.52);
  box-shadow: 0 16px 30px rgba(209, 26, 94, 0.06);
}

.preview-insight-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(58, 32, 24, 0.52);
}

.preview-insight-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
  color: var(--text);
}

.preview-insight-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}


/* Product mockup preview overlay */
.product-mockup-preview {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius-xl) - 2px);
  overflow: hidden;
  background: var(--surface);
}

.mockup-product-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Lightbox overlay (click on mockup) */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
  animation: fadeInLightbox 0.2s ease;
}

.lightbox-overlay.hidden {
  display: none;
}

@keyframes fadeInLightbox {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img {
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  object-fit: contain;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
  animation: scaleInLightbox 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  padding: 12px;
}

@keyframes scaleInLightbox {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background 0.2s;
  z-index: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.mockup-overlay-img {
  position: absolute;
  object-fit: cover;
  border-radius: 4px;
}

.product-mockup-preview:hover .mockup-overlay-img {
  z-index: 10 !important;
}

.generated-actions {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  z-index: 5;
}

.generated-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(232, 184, 192, 0.75);
  font-size: 13px;
  padding: 9px 16px;
  box-shadow: 0 12px 26px rgba(58, 32, 24, 0.12);
}

/* Preview cards grid (step 4) */
.preview-cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.9fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.preview-selector-panel {
  position: sticky;
  top: calc(var(--header-height-scrolled) + 28px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(18px, 2vw, 24px);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 247, 242, 0.92) 100%);
  border: 1px solid rgba(232, 184, 192, 0.72);
  box-shadow: 0 24px 50px rgba(209, 26, 94, 0.08);
}

.preview-selector-header h3 {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  margin-bottom: 8px;
  color: var(--text);
}

.preview-selector-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.preview-selector-eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: rgba(245, 183, 177, 0.14);
  color: var(--vivid-pink-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#productMockupCards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-product-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 244, 0.96));
  border-radius: 24px;
  border: 1px solid rgba(232, 184, 192, 0.62);
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
  text-align: left;
  color: inherit;
  font: inherit;
}

.preview-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(209, 26, 94, 0.12);
}

.preview-product-card--selected {
  background: linear-gradient(180deg, rgba(255, 237, 243, 0.98), rgba(255, 247, 242, 0.98));
  border-color: rgba(217, 26, 94, 0.34);
  box-shadow:
    0 0 0 4px rgba(217, 26, 94, 0.1),
    0 20px 38px rgba(209, 26, 94, 0.14);
}

.preview-product-card-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.96), rgba(252, 243, 236, 0.94));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.preview-product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.preview-product-card-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 60px;
}

.preview-product-card-loading {
  position: absolute;
  inset: auto 8px 8px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(58, 32, 24, 0.74);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.preview-product-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-product-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preview-product-card-state {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(58, 32, 24, 0.55);
}

.preview-product-card-pulse {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(217, 26, 94, 0.2);
}

.preview-product-card-pulse.is-active {
  background: linear-gradient(135deg, #E8356D, #FF9E7A);
  box-shadow: 0 0 0 4px rgba(232, 53, 109, 0.14);
}

.preview-product-card-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-product-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-product-card-arrow {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(232, 184, 192, 0.78);
  color: var(--vivid-pink-dark);
  box-shadow: 0 10px 22px rgba(209, 26, 94, 0.08);
}

@media (max-width: 920px) {
  .preview-cards-grid {
    grid-template-columns: 1fr;
    max-width: 760px;
  }

  .preview-selector-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 640px) {
  .preview-stage-topbar,
  .preview-stage-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-stage-tags {
    justify-content: flex-start;
  }

  .preview-insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .preview-cards-grid {
    max-width: 100%;
  }

  .generated-preview-wrapper {
    padding: 14px;
    border-radius: 28px;
  }

  .preview-selector-panel {
    padding: 16px;
    border-radius: 24px;
  }

  #productMockupCards {
    gap: 10px;
  }

  .preview-product-card {
    grid-template-columns: 76px minmax(0, 1fr);
    padding: 10px;
  }

  .preview-product-card-arrow {
    display: none;
  }

  .generated-actions {
    left: 12px;
    right: 12px;
    justify-content: stretch;
  }

  .generated-actions .btn-ghost {
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .preview-product-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }
}

/* Products */
.products-section h3 {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  position: relative;
  background: transparent;
  border-radius: var(--radius-xl);
  padding: 0;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border: none;
  overflow: visible;
  /* Animazione di apparizione */
  animation: cardFadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.product-card--static {
  cursor: default;
}

@keyframes cardFadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card-bg {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 2px solid var(--border-strong);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.product-card:hover .product-card-bg {
  border-color: rgba(247, 37, 133, 0.4);
  box-shadow: 0 15px 35px rgba(247, 37, 133, 0.12), 0 5px 15px rgba(0, 0, 0, 0.05);
  transform: translateY(-6px);
}

.product-card.selected .product-card-bg {
  background: var(--surface);
  border-color: var(--pink);
  box-shadow: 0 0 0 2px var(--pink), 0 20px 40px rgba(247, 37, 133, 0.15);
  transform: translateY(-6px) scale(1.02);
}

.product-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card-content,
.product-card.selected .product-card-content {
  transform: translateY(-6px);
}

.product-card.selected .product-card-content {
  transform: translateY(-6px) scale(1.02);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  padding: 40px 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, rgba(247, 37, 133, 0.04) 0%, transparent 100%);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  overflow: hidden;
}

.product-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: var(--pink);
  filter: blur(50px);
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: 50%;
  pointer-events: none;
}

.product-card:hover .product-bg-glow {
  opacity: 0.15;
}

.product-card.selected .product-bg-glow {
  opacity: 0.25;
}

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: white;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
  font-family: 'Nunito', sans-serif;
  z-index: 5;
}

.product-badge--preview {
  background: linear-gradient(135deg, #ff9ec4, #ffd6a5);
  color: #7b3653;
  box-shadow: 0 4px 12px rgba(255, 158, 196, 0.28);
}

.portrait-preview-card:hover .product-card-bg,
.portrait-preview-card:hover .product-card-content,
.portrait-preview-card:hover .product-mockup,
.portrait-preview-card.selected .product-card-bg,
.portrait-preview-card.selected .product-card-content,
.portrait-preview-card.selected .product-mockup {
  transform: none;
}

.portrait-preview-card:hover .product-card-bg {
  border-color: var(--border-strong);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

.portrait-preview-card:hover .product-bg-glow {
  opacity: 0.12;
}

.portrait-preview-card {
  grid-column: 1 / -1;
}

.portrait-preview-card .product-card-bg {
  background:
    radial-gradient(circle at top left, rgba(255, 210, 228, 0.7) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(135deg, rgba(255, 248, 250, 0.98) 0%, rgba(255, 252, 246, 0.98) 100%);
  border-color: rgba(221, 157, 184, 0.45);
  box-shadow: 0 18px 42px rgba(175, 102, 132, 0.12), 0 4px 16px rgba(0, 0, 0, 0.05);
}

.portrait-preview-card .product-card-content {
  flex-direction: column;
  align-items: stretch;
}

.portrait-preview-card .product-image-wrap {
  width: 100%;
  min-height: 0;
  padding: 18px 18px 8px;
  border-top-right-radius: var(--radius-xl);
  border-bottom-left-radius: 0;
  background: linear-gradient(180deg, rgba(247, 37, 133, 0.08) 0%, rgba(255, 232, 202, 0.18) 100%);
}

.portrait-preview-card-wrap {
  width: min(100%, 25vh);
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 auto;
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 247, 250, 0.95) 100%);
  box-shadow: inset 0 0 0 1px rgba(199, 149, 171, 0.18);
}

.portrait-preview-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.12));
}

.portrait-preview-card-info {
  justify-content: center;
  align-items: center;
  padding: 0 18px 18px;
  text-align: center;
  background: linear-gradient(
    180deg,
    rgba(255, 232, 202, 0.18) 0%,
    rgba(255, 244, 247, 0.88) 52%,
    rgba(255, 252, 246, 0.96) 100%
  );
}

.portrait-preview-card-info h3 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0;
}

@media (max-width: 760px) {
  .portrait-preview-card .product-image-wrap {
    width: 100%;
    padding: 14px 14px 8px;
  }

  .portrait-preview-card-wrap {
    width: min(100%, 25vh);
  }

  .portrait-preview-card-info {
    padding: 0 14px 16px;
  }
}

/* Wrapper that holds both mockup image and the art overlay */
.product-mockup-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  overflow: clip;
  /* clip > hidden: catches filter effects & 3D-context overflow */
  isolation: isolate;
  /* isolate stacking context so art z-index stays behind mockup SVG */
}

.product-mockup {
  width: 140px;
  height: 140px;
  object-fit: contain;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.08));
  position: relative;
  z-index: 2;
  cursor: zoom-in;
}

.product-card:hover .product-mockup {
  transform: translateY(-10px) scale(1.12) rotate(-4deg);
  filter: drop-shadow(0 20px 25px rgba(247, 37, 133, 0.15));
}

/* Canvas art: anchor to bottom so pet fills from the bottom of the print area */
.product-card[data-product-id='canvas'] .product-card-art,
.product-card[data-product-id='canvas'] .product-hover-img {
  object-position: bottom center;
}

/* Canvas frame starts close to wrap top — gentler hover to avoid overflow */
.product-card[data-product-id='canvas']:hover .product-mockup {
  transform: translateY(-6px) scale(1.08);
  filter: drop-shadow(0 16px 22px rgba(247, 37, 133, 0.15));
}

.product-card.selected .product-mockup {
  transform: translateY(-5px) scale(1.08);
  filter: drop-shadow(0 15px 20px rgba(247, 37, 133, 0.2));
}

.portrait-preview-card .portrait-preview-card-wrap {
  width: min(100%, 25vh);
  height: min(100%, 25vh);
}

.portrait-preview-card .portrait-preview-card-image {
  width: 100%;
  height: 100%;
}

.portrait-preview-card:hover .portrait-preview-card-image,
.portrait-preview-card.selected .portrait-preview-card-image {
  transform: none;
}

/* Art image stretched into the printable area of the mockup */
.product-card-art {
  position: absolute;
  object-fit: cover;
  z-index: 1;
  /* behind the mockup outline (z-index: 2) */
  pointer-events: none;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Show art once src is set (non-empty) */
.product-card-art[src]:not([src='']) {
  opacity: 1;
}

/* Hover preview aligned to the same print-area coordinates as product-card-art */
.product-hover-preview {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10;
}

.product-card:hover .product-hover-preview {
  opacity: 1;
}


.product-hover-img {
  position: absolute;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  display: block;
}

/* Hide hover preview when no image loaded yet */
.product-hover-preview:not(:has(img[src]:not([src='']))) {
  display: none;
}


/* Gelato generation spinner (absolute inside product-mockup-wrap) */
.product-mockup-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  z-index: 20;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.product-mockup-spinner.hidden {
  display: none;
}

.product-mockup-spinner-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--pink);
  text-align: center;
  padding: 0 12px;
  font-family: 'Nunito', sans-serif;
}

/* When Gelato preview replaces SVG: smooth fade + sizing */
.product-card.gelato-ready .product-mockup {
  border-radius: 8px;
  object-fit: contain;
}

.product-info {
  padding: 0 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  transition: color 0.3s ease;
  line-height: 1.2;
}

.product-card:hover .product-info h3,
.product-card.selected .product-info h3 {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-info p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
  flex: 1;
  font-family: 'Nunito', sans-serif;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1.5px dashed var(--border);
}

.product-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  transition: color 0.3s ease;
}

.product-card:hover .product-price,
.product-card.selected .product-price {
  color: var(--pink);
}

.product-select-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pink);
  background: rgba(247, 37, 133, 0.08);
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Nunito', sans-serif;
  border: none;
  cursor: pointer;
}

.product-select-btn:focus-visible {
  outline: 3px solid rgba(247, 37, 133, 0.2);
  outline-offset: 2px;
}

.product-card:hover .product-select-btn {
  background: var(--pink);
  color: white;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
}

.product-card.selected .product-select-btn {
  background: linear-gradient(135deg, var(--success), #04b082);
  color: white;
  box-shadow: 0 4px 12px rgba(6, 214, 160, 0.3);
}

.product-card.selected .product-select-btn span {
  display: none;
}

.product-card.selected .product-select-btn::before {
  content: 'Selezionato';
}

.product-card.selected .product-select-btn svg {
  display: none;
}

/* ===== STEP 4: CHECKOUT ===== */
.checkout-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 640px) {
  .checkout-body {
    grid-template-columns: 1fr;
  }
}

.order-summary {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--glass-border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.order-summary-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--pink-pale), rgba(199, 125, 255, 0.15));
}

.order-summary-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.order-summary-details {
  padding: 1.25rem;
}

.order-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.order-detail-row svg {
  color: var(--pink);
  margin-top: 2px;
  flex-shrink: 0;
}

.order-detail-row .detail-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
}

.order-detail-row strong {
  font-size: 15px;
  color: var(--text);
  font-family: 'Nunito', sans-serif;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(247, 37, 133, 0.06), rgba(199, 125, 255, 0.06));
  border-radius: var(--radius);
}

.order-total-row span {
  font-weight: 700;
  color: var(--text-mid);
  font-family: 'Nunito', sans-serif;
}

.total-amount {
  font-size: 26px;
  font-weight: 900;
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.paypal-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #1A7A45;
  padding: 12px 16px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: var(--radius);
  border: 1.5px solid rgba(39, 174, 96, 0.35);
  font-family: 'Nunito', sans-serif;
}

.secure-badge svg {
  color: #1A7A45;
  flex-shrink: 0;
}

#paypalButtonContainer {
  min-height: 50px;
}

/* ===== SUCCESS ===== */
.success-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(247, 37, 133, 0.05) 0%, rgba(199, 125, 255, 0.05) 50%, rgba(255, 140, 66, 0.05) 100%);
  border-radius: var(--radius-xl);
  border: 2px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.success-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(247, 37, 133, 0.14) 0%, transparent 70%);
  animation: burstPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

.success-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  border-radius: 2px;
  animation: superConfettiFall 3s ease-in infinite;
}

.confetti-piece:nth-child(1) {
  left: 10%;
  background: var(--pink);
  animation-delay: 0s;
}

.confetti-piece:nth-child(2) {
  left: 30%;
  background: var(--orange);
  animation-delay: 0.4s;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.confetti-piece:nth-child(3) {
  left: 50%;
  background: var(--purple);
  animation-delay: 0.8s;
}

.confetti-piece:nth-child(4) {
  left: 70%;
  background: var(--success);
  animation-delay: 0.2s;
  width: 12px;
  height: 6px;
}

.confetti-piece:nth-child(5) {
  left: 85%;
  background: var(--yellow);
  animation-delay: 0.6s;
  border-radius: 50%;
}

.success-icon-wrap {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--grad-pink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 32px rgba(247, 37, 133, 0.4);
  animation: successIconPop 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  position: relative;
  z-index: 1;
}

.success-message h3 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  animation: fadeInUp 0.5s ease 0.3s both;
  position: relative;
  z-index: 1;
}

.success-message p {
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s ease 0.4s both;
  position: relative;
  z-index: 1;
  font-family: 'Nunito', sans-serif;
}

.order-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 8px 20px;
  margin-bottom: 1.5rem;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
  font-family: 'Nunito', sans-serif;
}

.order-id-badge span {
  color: var(--text-muted);
}

.order-id-badge code {
  font-family: 'Courier New', monospace;
  color: var(--pink);
  font-size: 12px;
}

/* ===== TOAST ===== */
#toastContainer {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius-full);
  color: white;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 420px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
}

.toast.toast-hiding {
  animation: toastOut 0.3s ease-in forwards;
}

.toast-error {
  background: #C0392B;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast-success {
  background: var(--vivid-pink);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.toast-info {
  background: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--black);
  border-top: none;
  padding: 2rem 0;
  text-align: center;
}

.site-footer p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'Nunito', sans-serif;
}

.footer-italy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 1.2rem;
}

.footer-italy-text {
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Footer variant: static, not absolute-positioned */
.footer-flag-bar {
  position: relative !important;
  left: auto !important;
  transform: none !important;
  bottom: auto !important;
  width: 120px !important;
  height: 10px !important;
  opacity: 0.85 !important;
  border-color: rgba(255,255,255,0.15) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .styles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .styles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .step-actions {
    flex-wrap: wrap;
  }

  .step-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ===== PREVIEW GALLERY & NAME ===== */
.preview-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: stepSlideIn 0.4s ease forwards;
  position: relative;
  padding-bottom: 3.5rem;
  margin-top: 2rem;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
}

.gallery-header h3 {
  font-family: 'Fredoka One', sans-serif;
  color: var(--text);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.gallery-header .gallery-actions {
  gap: 8px;
}

.photo-grouping-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.photo-grouping-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.photo-grouping-copy strong {
  font-size: 14px;
  color: var(--text);
}

.photo-grouping-copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.photo-grouping-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-grouping-option {
  border: 1px solid rgba(247, 37, 133, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.photo-grouping-option:hover {
  transform: translateY(-1px);
  border-color: rgba(247, 37, 133, 0.35);
}

.photo-grouping-option.is-active {
  background: linear-gradient(135deg, rgba(247, 37, 133, 0.12), rgba(114, 9, 183, 0.08));
  border-color: rgba(247, 37, 133, 0.42);
  color: var(--vivid-pink);
}

.photo-previews-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.25rem;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  min-height: 160px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.photo-preview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  animation: stepBounceIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.photo-preview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(247, 37, 133, 0.12);
  border-color: rgba(247, 37, 133, 0.25);
}

.photo-previews-container .photo-preview-card:nth-child(2) {
  animation-delay: 0.1s;
}

.photo-previews-container .photo-preview-card:nth-child(3) {
  animation-delay: 0.2s;
}

.photo-previews-container .photo-preview-card:nth-child(4) {
  animation-delay: 0.3s;
}

.photo-previews-container .photo-preview-card:nth-child(5) {
  animation-delay: 0.4s;
}

.photo-preview-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.photo-preview-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.delete-photo-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--error);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: transform 0.15s, background 0.15s;
  backdrop-filter: blur(4px);
}

.delete-photo-btn:hover {
  transform: scale(1.15);
  background: var(--error);
  color: white;
}

.photo-name-input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  transition: all 0.2s ease;
  outline: none;
}

.photo-name-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(247, 37, 133, 0.1);
  background: var(--surface);
}

/* ===== PHOTO THUMB CARDS ===== */
.photo-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  animation: stepBounceIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.photo-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(247, 37, 133, 0.13);
  border-color: rgba(247, 37, 133, 0.3);
}

.photo-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.photo-thumb-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(247, 37, 133, 0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.photo-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--error);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
  transition: transform 0.15s, background 0.15s;
}

.photo-thumb-remove:hover {
  transform: scale(1.15);
  background: var(--error);
  color: #fff;
}

.photo-thumb-label {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  text-align: center;
  background: var(--surface);
  border: none;
  border-top: 1px solid var(--border);
  outline: none;
  box-sizing: border-box;
  transition: background 0.15s, color 0.15s;
}

.photo-thumb-label:focus {
  background: var(--bg);
  color: var(--vivid-pink, #f72585);
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

  .blob,
  .ai-orbit,
  .ai-core,
  .confetti-piece,
  .btn-shimmer,
  .badge-dot,
  .logo-icon-wrap,
  .step.active .step-bubble-ring {
    animation: none !important;
  }

  .step-panel {
    animation: none;
  }

  .photo-grouping-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

/* =========================================
   STYLE LIBRARY MODAL
========================================= */
.style-library-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  z-index: 10000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.style-library-modal.hidden {
  display: none;
}

.style-library-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.style-library-header h2 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: 1.8rem;
  margin: 0;
  color: var(--text);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background: var(--bg);
  color: var(--text);
}

.style-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.style-tab {
  padding: 0.75rem 1.5rem;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.style-tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.style-tab.active {
  background: var(--vivid-pink);
  color: white;
  box-shadow: 0 4px 15px rgba(217, 26, 94, 0.3);
}

.style-tab-content {
  display: none;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.style-tab-content.active {
  display: block;
  animation: fadeInUp 0.4s ease forwards;
}

/* =========================================
   COMMUNITY SEARCH — PILL REDESIGN
========================================= */
.community-search {
  max-width: 560px;
  margin: 0 auto 2rem auto;
}

/* Pill wrapper */
.search-pill {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  padding: 0 12px 0 16px;
  gap: 10px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-pill:focus-within {
  border-color: var(--vivid-pink);
  box-shadow:
    0 0 0 4px rgba(217, 26, 94, 0.12),
    0 0 20px rgba(217, 26, 94, 0.10),
    var(--shadow);
  transform: translateY(-2px);
}

/* Animated search icon */
.search-pill-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-pill:focus-within .search-pill-icon {
  color: var(--vivid-pink);
  transform: scale(1.15) rotate(-8deg);
}

/* The actual input */
.search-pill-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 14px 0;
  outline: none;
  min-width: 0;
}

.search-pill-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

/* Clear (×) button */
.search-pill-clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--border-strong);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.search-pill-clear:hover {
  background: var(--vivid-pink);
  color: white;
  transform: scale(1.1);
}

.search-pill-clear.hidden {
  display: none;
}

/* Result meta bar */
.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 8px;
  animation: fadeInUp 0.25s ease forwards;
}

.search-meta.hidden {
  display: none;
}

.search-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--vivid-pink);
  background: rgba(217, 26, 94, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(217, 26, 94, 0.2);
}

.search-result-badge svg {
  color: var(--vivid-pink);
}

.search-meta-reset {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-meta-reset:hover {
  color: var(--vivid-pink);
  background: rgba(217, 26, 94, 0.06);
  text-decoration: none;
}

.create-style-flow {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.create-style-flow h3 {
  font-family: 'Fredoka One', 'Nunito', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.create-style-flow p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.generated-style-preview {
  margin-top: 2rem;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 2px dashed var(--border);
  position: relative;
}

.generated-style-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== PHONE CASE VARIANT SELECTOR ===== */
.product-variant-selector {
  margin: 10px 0 4px;
  animation: fadeInUp 0.25s ease forwards;
}

.variant-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--vivid-pink);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.variant-select-wrap {
  position: relative;
}

.variant-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  color: var(--vivid-pink);
}

.variant-select {
  width: 100%;
  padding: 8px 28px 8px 10px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.variant-select:focus {
  border-color: var(--vivid-pink);
  box-shadow: 0 0 0 3px rgba(217, 26, 94, 0.12);
}

.variant-select:hover {
  border-color: var(--vivid-pink);
}

/* ===================================================
   CART BUTTON (header)
   =================================================== */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.cart-btn:hover {
  background: var(--pink);
  border-color: var(--border-strong);
  transform: scale(1.08);
  box-shadow: var(--shadow);
}

.site-header.scrolled .cart-btn,
.site-header.always-scrolled .cart-btn {
  width: 42px;
  height: 42px;
}

.cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  background: var(--vivid-pink);
  color: white;
  font-size: 11px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid white;
  animation: badgePulse 2s infinite;
  pointer-events: none;
}

@keyframes cartBadgeBounce {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.4); }
  70% { transform: scale(0.9); }
}

.cart-badge-bounce {
  animation: cartBadgeBounce 0.4s ease;
}

/* ===================================================
   CART DRAWER
   =================================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100dvh;
  background: var(--surface);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 48px rgba(46, 21, 15, 0.14);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.cart-drawer--open {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-drawer-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fredoka One', sans-serif;
  font-size: 20px;
  color: var(--text);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-drawer-footer {
  padding: 16px 24px 28px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: white;
}

.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
}

.cart-drawer-total strong {
  font-size: 24px;
  color: var(--vivid-pink);
  font-family: 'Fredoka One', sans-serif;
  letter-spacing: -0.02em;
}

/* ===== CART DRAWER ITEMS ===== */
.cart-drawer-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.cart-drawer-item:hover {
  border-color: var(--border-strong);
}

.cart-drawer-item-img {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.cart-drawer-item-info {
  flex: 1;
  min-width: 0;
}

.cart-drawer-item-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-drawer-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.cart-drawer-item-price {
  font-weight: 800;
  font-size: 15px;
  color: var(--vivid-pink);
  font-family: 'Fredoka One', sans-serif;
}

.cart-drawer-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.cart-drawer-item-remove:hover {
  color: var(--error);
  background: rgba(231, 76, 60, 0.08);
}

.cart-drawer-empty {
  text-align: center;
  padding: 48px 20px 32px;
  color: var(--text-muted);
}

.cart-drawer-empty svg {
  margin: 0 auto 16px;
  opacity: 0.25;
}

.cart-drawer-empty p:first-of-type {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text);
}

.cart-drawer-empty p:last-of-type {
  font-size: 13px;
}

/* ===== CART ITEM QUANTITY CONTROLS ===== */
.cart-drawer-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 6px;
}

.cart-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--vivid-pink);
  background: transparent;
  color: var(--vivid-pink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.cart-qty-btn:hover {
  background: var(--vivid-pink);
  color: #fff;
}

.cart-qty-val {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

/* ===== CART PAYPAL BUTTON ===== */
.cart-paypal-secure {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  justify-content: center;
}

.btn-paypal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Fredoka One', sans-serif;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #003087 0%, #009cde 100%);
  color: #fff;
  transition: opacity 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 48, 135, 0.28);
}

.btn-paypal:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-paypal:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== CART SUCCESS STATE ===== */
.cart-success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 28px;
  text-align: center;
  background: var(--surface);
  gap: 12px;
  z-index: 10;
}

.cart-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 4px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.cart-success h3 {
  font-family: 'Fredoka One', sans-serif;
  font-size: 22px;
  color: var(--text);
}

.cart-success p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.cart-success-order {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cart-success-order code {
  font-family: monospace;
  color: var(--vivid-pink);
  font-weight: 700;
}

/* ===== STEP 3 PURCHASE PANEL ===== */
.step3-purchase-panel {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.98)),
    radial-gradient(circle at top left, rgba(244, 114, 182, 0.08), transparent 44%);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.step3-purchase-panel.is-ready {
  border-color: rgba(34, 197, 94, 0.25);
  box-shadow: 0 20px 44px rgba(34, 197, 94, 0.12);
}

.step3-purchase-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 280px;
}

.step3-purchase-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vivid-pink);
}

.step3-purchase-copy strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.step3-purchase-copy span:last-child {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.step3-quantity-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: fit-content;
  align-self: flex-start;
}

.step3-quantity-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.step3-quantity-stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.step3-qty-btn,
.step3-qty-input {
  border: 0;
  background: transparent;
  height: 48px;
}

.step3-qty-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 48px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.step3-qty-btn:first-child {
  border-radius: 999px 0 0 999px;
}

.step3-qty-btn:last-child {
  border-radius: 0 999px 999px 0;
}

.step3-qty-btn:hover:not(:disabled) {
  background: rgba(236, 72, 153, 0.08);
  color: var(--vivid-pink);
}

.step3-qty-btn:focus {
  outline: none;
}

.step3-qty-btn:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(236, 72, 153, 0.35);
}

.step3-qty-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.step3-qty-input {
  width: 72px;
  padding: 0 8px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  appearance: textfield;
}

.step3-qty-input::-webkit-outer-spin-button,
.step3-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.step3-qty-input:focus {
  outline: none;
}

/* ===== CART ADDED BAR (in step 3) ===== */
.cart-added-bar {
  margin-top: 16px;
  background: #f0faf4;
  border: 2px solid var(--success-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.3s ease forwards;
}

.cart-added-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--success);
  font-size: 15px;
}

.cart-added-confirm svg {
  stroke: var(--success);
  flex-shrink: 0;
}

.cart-added-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.step3-order-panel {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.step3-order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.step3-order-eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.step3-order-header strong:last-child {
  font-family: 'Fredoka One', sans-serif;
  color: var(--vivid-pink);
}

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

.step3-order-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.step3-order-item-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.step3-order-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.step3-order-item-main strong {
  font-size: 14px;
  color: var(--text);
}

.step3-order-item-main span {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.step3-order-item-remove {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
  cursor: pointer;
}

/* ===== CART ORDER SUMMARY (step 4) ===== */
.cart-summary-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.cart-summary-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cart-summary-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.cart-summary-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.cart-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.4;
}

.cart-item-price {
  font-weight: 800;
  color: var(--vivid-pink);
  font-size: 15px;
  font-family: 'Fredoka One', sans-serif;
}

@media (max-width: 480px) {
  .header-blog-link {
    font-size: 11px;
    letter-spacing: 0.08em;
    gap: 6px;
  }

  .header-blog-link-dot {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 0 4px rgba(245, 183, 177, 0.18);
  }

  .step3-purchase-panel {
    padding: 16px;
  }

  .step3-quantity-block {
    width: fit-content;
  }

  .step3-quantity-stepper {
    width: auto;
  }

  .step3-qty-input {
    flex: 0 0 72px;
  }

  .step3-order-header,
  .step3-order-item {
    grid-template-columns: 1fr;
    display: grid;
  }

  .step3-order-item-remove {
    justify-self: start;
  }

  .cart-added-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .cart-added-actions {
    width: 100%;
  }
  .cart-added-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ===================================================
   PWA & MOBILE ENHANCEMENTS
   =================================================== */

/* Safe area insets for notched phones */
.site-header {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.cart-drawer {
  padding-bottom: env(safe-area-inset-bottom);
}

.cart-drawer-footer {
  padding-bottom: max(28px, calc(16px + env(safe-area-inset-bottom)));
}

/* Prevent zoom on input focus (iOS) — inputs must be at least 16px */
input,
select,
textarea,
.variant-select {
  font-size: max(16px, 1rem);
}

/* Smooth momentum scroll in overflow areas */
.cart-drawer-body,
.style-grid,
.products-grid {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Better tap targets on mobile */
@media (max-width: 640px) {
  /* Minimum 44px touch targets */
  .btn {
    min-height: 44px;
  }

  .cart-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-blog-link {
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
  }

  body.flow-active .upload-modal-close {
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
  }

  /* Larger close/remove buttons in cart */
  .cart-drawer-item-remove {
    min-width: 36px;
    min-height: 36px;
  }

  /* Hero: tighter spacing on small screens */
  .hero {
    padding-top: calc(var(--header-height) + 1rem);
  }

  /* Style grid: 2 columns on small mobile */
  .styles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Wizard steps: 2x2 grid on mobile instead of row */
  .wizard-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .wizard-step-connector {
    display: none;
  }

  /* Product cards: single column */
  .products-grid {
    grid-template-columns: 1fr;
  }

  /* Cart drawer: full width + slide from bottom on very small screens */
  .cart-drawer {
    width: 100vw;
  }

  /* Upload area: larger tap zone */
  .upload-area {
    min-height: 160px;
  }

  /* Prevent horizontal scroll */
  .home-styles-section,
  .hero,
  .products-section {
    overflow-x: hidden;
  }
}

/* Extra small (< 380px) */
@media (max-width: 380px) {
  .hero h1 {
    font-size: clamp(1.6rem, 9vw, 2.2rem);
  }

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

  .wizard-steps {
    grid-template-columns: 1fr;
  }
}

body.pwa-standalone .site-header {
  /* Inherit default safe area behavior */
}

/* PWA standalone mode: remove extra padding since there's no browser bar */
@media (display-mode: standalone) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }
}

/* Disable hover animations on touch devices to avoid sticky states */
@media (hover: none) {
  .style-card:hover,
  .product-card:hover {
    transform: none;
    box-shadow: none;
  }

  .btn:hover {
    transform: none;
  }
}
