/* ──────────────────────────────────────────────────────────────
   DEVICE PICKER — Premium 3-step experience
   Brand → Series → Model, met brand-morph aura, 3D tilt en portal-exit.
   ────────────────────────────────────────────────────────────── */

.device-picker-wrap{
  --picker-brand:#1E3A5F;
  --picker-accent:#2A5080;
  --picker-glow:rgba(30,58,95,.28);
  --picker-grad:radial-gradient(circle at 30% 20%, #2A5080 0%, #0a1220 60%);
  position:relative;
  max-width:1080px;
  margin:0 auto 72px;
  padding:0 8px;
}
.picker-header{
  text-align:center;
  margin:0 auto 28px;
  max-width:640px;
}
.picker-eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--picker-brand);
  padding:7px 16px;border-radius:999px;
  background:linear-gradient(90deg, rgba(30,58,95,.08), rgba(30,58,95,.02));
  border:1px solid rgba(30,58,95,.15);
  margin-bottom:14px;
  transition:color .6s, background .6s, border-color .6s;
}
.picker-eyebrow::before{
  content:"";width:6px;height:6px;border-radius:50%;
  background:var(--picker-brand);
  box-shadow:0 0 0 0 var(--picker-brand);
  animation:picker-pulse 2s infinite;
}
@keyframes picker-pulse{
  0%{box-shadow:0 0 0 0 var(--picker-brand);opacity:1}
  70%{box-shadow:0 0 0 10px transparent;opacity:.5}
  100%{box-shadow:0 0 0 0 transparent;opacity:1}
}
.picker-title{
  font-size:clamp(1.5rem,3.5vw,2.2rem);
  font-weight:800;color:#0f172a;
  letter-spacing:-.02em;line-height:1.15;
  margin:0 0 8px;
}
.picker-title em{
  font-style:normal;
  background:linear-gradient(90deg, var(--picker-brand), var(--picker-accent));
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
  transition:all .6s;
}
.picker-sub{
  font-size:1rem;color:#64748b;margin:0;line-height:1.55;
}

/* ---------- STAGE ---------- */
.picker-stage{
  position:relative;
  border-radius:28px;
  padding:36px 28px 40px;
  min-height:520px;
  overflow:hidden;
  background:#fafbfd;
  border:1px solid rgba(226,232,240,.9);
  box-shadow:0 20px 60px -20px rgba(15,23,42,.12);
  perspective:1400px;
  transform-style:preserve-3d;
  transition:background .9s cubic-bezier(.4,0,.2,1);
}
.picker-stage::before{
  /* brand aura glow */
  content:"";position:absolute;inset:-20%;
  background:var(--picker-grad);
  opacity:0;
  filter:blur(60px);
  transition:opacity .9s cubic-bezier(.4,0,.2,1);
  pointer-events:none;
  z-index:0;
}
.picker-stage.brand-active::before{opacity:.55}
.picker-stage.brand-active{
  background:#0d0f18;
  border-color:transparent;
}
.picker-stage::after{
  /* sub-grid */
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:
    linear-gradient(rgba(30,58,95,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,58,95,.04) 1px, transparent 1px);
  background-size:40px 40px;
  mask-image:radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
  opacity:.8;
  transition:opacity .6s;
  z-index:1;
}
.picker-stage.brand-active::after{
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  opacity:.7;
}

/* Ambient floating orbs inside stage */
.picker-orb{
  position:absolute;border-radius:50%;
  background:var(--picker-glow);
  filter:blur(40px);
  pointer-events:none;
  z-index:0;
  opacity:0;
  transition:opacity .9s, transform 2s ease-out;
}
.picker-stage.brand-active .picker-orb{opacity:.9}
.picker-orb-1{width:220px;height:220px;top:-40px;left:-40px;animation:picker-drift-1 18s ease-in-out infinite}
.picker-orb-2{width:280px;height:280px;bottom:-80px;right:-40px;animation:picker-drift-2 22s ease-in-out infinite}
.picker-orb-3{width:140px;height:140px;top:40%;right:20%;animation:picker-drift-3 14s ease-in-out infinite}
@keyframes picker-drift-1{0%,100%{transform:translate(0,0)}50%{transform:translate(40px,60px)}}
@keyframes picker-drift-2{0%,100%{transform:translate(0,0)}50%{transform:translate(-60px,-40px)}}
@keyframes picker-drift-3{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(-30px,-20px) scale(1.3)}}

/* ---------- BREADCRUMB ---------- */
.picker-crumb{
  position:relative;z-index:3;
  display:flex;align-items:center;gap:10px;
  min-height:34px;
  margin-bottom:22px;
  font-size:.84rem;color:#64748b;
  transition:color .6s;
}
.picker-stage.brand-active .picker-crumb{color:rgba(255,255,255,.7)}
.picker-crumb-btn{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 13px;border-radius:999px;
  background:rgba(255,255,255,.7);
  border:1px solid rgba(15,23,42,.08);
  font-weight:600;color:#0f172a;cursor:pointer;
  font-size:.82rem;
  transition:all .3s;
}
.picker-crumb-btn:hover{background:#fff;transform:translateX(-2px)}
.picker-stage.brand-active .picker-crumb-btn{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.18);
  color:#fff;backdrop-filter:blur(10px);
}
.picker-stage.brand-active .picker-crumb-btn:hover{background:rgba(255,255,255,.2)}
.picker-crumb-sep{opacity:.4;font-weight:500}
.picker-crumb-current{color:#0f172a;font-weight:700;transition:color .6s}
.picker-stage.brand-active .picker-crumb-current{color:#fff}

/* ---------- STEPS STACK ---------- */
.picker-steps{
  position:relative;z-index:2;
  min-height:380px;
  transform-style:preserve-3d;
}
.picker-step{
  display:none;
  opacity:0;
  transform:translate3d(40px,0,0);
  transition:opacity .45s cubic-bezier(.4,0,.2,1),
             transform .45s cubic-bezier(.4,0,.2,1);
  pointer-events:none;
}
.picker-step.active{
  display:block;
  opacity:1;
  transform:translate3d(0,0,0);
  pointer-events:auto;
  position:relative;
  animation:picker-step-in .5s cubic-bezier(.22,1.1,.36,1);
}
@keyframes picker-step-in{
  from{opacity:0;transform:translate3d(40px,0,0)}
  to{opacity:1;transform:translate3d(0,0,0)}
}
.picker-step-title{
  font-size:1.3rem;font-weight:700;color:#0f172a;
  letter-spacing:-.01em;margin:0 0 6px;
  transition:color .6s;
}
.picker-stage.brand-active .picker-step-title{color:#fff}
.picker-step-sub{
  font-size:.92rem;color:#64748b;margin:0 0 22px;
  transition:color .6s;
}
.picker-stage.brand-active .picker-step-sub{color:rgba(255,255,255,.65)}

/* ---------- TILE GRID ---------- */
.picker-tiles{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
}
.picker-tiles-brands{
  grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
  gap:18px;
}
.picker-tiles-series{
  grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
  max-height:360px;overflow-y:auto;overflow-x:hidden;
  padding:4px 4px 8px;scrollbar-width:thin;
}
.picker-tiles-model{
  grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
  max-height:360px;overflow-y:auto;overflow-x:hidden;
  padding:4px 4px 8px;scrollbar-width:thin;
}
.picker-tiles-series::-webkit-scrollbar,
.picker-tiles-model::-webkit-scrollbar{width:6px}
.picker-tiles-series::-webkit-scrollbar-thumb,
.picker-tiles-model::-webkit-scrollbar-thumb{
  background:rgba(30,58,95,.2);border-radius:3px;
}
.picker-stage.brand-active .picker-tiles-series::-webkit-scrollbar-thumb,
.picker-stage.brand-active .picker-tiles-model::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.25);
}

/* ---------- TILE ---------- */
.picker-tile{
  --tilt-x:0deg;--tilt-y:0deg;
  --glow-x:50%;--glow-y:50%;
  position:relative;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;
  text-align:left;
  padding:18px 18px 16px;
  min-height:130px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  cursor:pointer;
  overflow:hidden;
  transform:perspective(800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(0);
  transition:transform .5s cubic-bezier(.22,1.1,.36,1), box-shadow .35s, border-color .3s, background .6s;
  box-shadow:0 4px 14px -6px rgba(15,23,42,.08);
  text-decoration:none;
  color:inherit;
  font-family:inherit;
  will-change:transform;
}
.picker-tile::before{
  /* reflective light-sweep following cursor */
  content:"";position:absolute;inset:0;
  background:radial-gradient(420px circle at var(--glow-x) var(--glow-y), rgba(255,255,255,.45), transparent 45%);
  opacity:0;transition:opacity .3s;
  pointer-events:none;mix-blend-mode:overlay;
}
.picker-tile::after{
  /* coloured ambient glow that leaks through on hover */
  content:"";position:absolute;inset:-1px;border-radius:inherit;
  background:linear-gradient(135deg, var(--tile-color, transparent), transparent 55%);
  opacity:0;transition:opacity .4s;pointer-events:none;
}
.picker-tile:hover{
  border-color:rgba(30,58,95,.25);
  box-shadow:0 20px 44px -14px rgba(15,23,42,.22), 0 6px 16px -6px var(--picker-glow);
}
.picker-tile:hover::before{opacity:1}
.picker-tile:hover::after{opacity:.15}
.picker-tile:active{
  transform:perspective(800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(0) scale(.97);
}

/* On dark brand stage, tiles flip to glass */
.picker-stage.brand-active .picker-tile{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.15);
  color:#fff;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 4px 20px -6px rgba(0,0,0,.3);
}
.picker-stage.brand-active .picker-tile:hover{
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.35);
  box-shadow:0 22px 50px -10px rgba(0,0,0,.45), 0 0 32px -4px var(--picker-glow);
}
.picker-stage.brand-active .picker-tile::before{
  background:radial-gradient(420px circle at var(--glow-x) var(--glow-y), rgba(255,255,255,.25), transparent 45%);
}

/* ---------- BRAND TILE ---------- */
.picker-tile-brand{
  min-height:168px;
  padding:22px 20px;
}
.tile-logo{
  width:46px;height:46px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg, var(--tile-color), var(--tile-accent));
  color:#fff;
  flex-shrink:0;
  margin-bottom:auto;
  box-shadow:0 6px 18px -6px var(--tile-color);
}
.tile-logo svg{width:26px;height:26px}
.picker-stage.brand-active .tile-logo{
  box-shadow:0 8px 24px -4px var(--tile-color);
}
.tile-title{
  display:block;
  font-size:1.02rem;font-weight:700;color:#0f172a;
  letter-spacing:-.01em;margin-top:14px;
  transition:color .6s;
}
.picker-stage.brand-active .tile-title{color:#fff}
.tile-sub{
  display:block;
  font-size:.78rem;color:#64748b;
  margin-top:3px;
  transition:color .6s;
}
.picker-stage.brand-active .tile-sub{color:rgba(255,255,255,.6)}
.tile-badge{
  position:absolute;top:14px;right:14px;
  font-size:.68rem;font-weight:700;letter-spacing:.04em;
  padding:4px 9px;border-radius:999px;
  background:linear-gradient(90deg, var(--tile-color), var(--tile-accent));
  color:#fff;
  box-shadow:0 4px 10px -4px var(--tile-color);
  opacity:.95;
}

/* ---------- SERIES TILE ---------- */
.picker-tile-series{
  min-height:84px;padding:14px 16px;
  flex-direction:row;align-items:center;gap:12px;
}
.picker-tile-series .tile-title{margin-top:0;font-size:.95rem}
.picker-tile-series .tile-sub{font-size:.75rem;margin-top:2px}
.tile-arrow{
  margin-left:auto;
  width:26px;height:26px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:rgba(30,58,95,.06);
  color:var(--picker-brand);
  transition:transform .3s, background .3s, color .6s;
  flex-shrink:0;
}
.picker-tile-series:hover .tile-arrow{transform:translateX(3px);background:var(--picker-brand);color:#fff}
.picker-stage.brand-active .tile-arrow{
  background:rgba(255,255,255,.1);color:rgba(255,255,255,.85);
}
.picker-stage.brand-active .picker-tile-series:hover .tile-arrow{
  background:#fff;color:var(--picker-brand);
}

/* ---------- MODEL TILE ---------- */
.picker-tile-model{
  min-height:168px;padding:12px 12px 14px;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  gap:10px;text-align:center;
}
.picker-tile-model .tile-title{
  margin-top:0;font-size:.92rem;line-height:1.25;
  font-weight:600;letter-spacing:-.005em;
  color:#0f172a;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;text-overflow:ellipsis;
}
.picker-stage.brand-active .picker-tile-model .tile-title{color:#fff}
.tile-thumb{
  position:relative;
  display:flex;align-items:center;justify-content:center;
  width:100%;height:112px;
  border-radius:12px;
  background:linear-gradient(135deg, #f8fafc 0%, #eef1f6 100%);
  border:1px solid rgba(15,23,42,.04);
  overflow:hidden;
  flex-shrink:0;
}
.tile-thumb::after{
  /* subtle vignette for contrast */
  content:"";position:absolute;inset:0;
  background:radial-gradient(circle at 50% 100%, rgba(15,23,42,.08), transparent 60%);
  pointer-events:none;
}
.tile-thumb img{
  width:100%;height:100%;
  object-fit:contain;
  padding:6px;
  transition:transform .45s cubic-bezier(.22,1.1,.36,1);
  mix-blend-mode:multiply;
}
/* In donkere brand-active stage het blenden uitzetten — daar worden
   witte telefoon-details anders onzichtbaar. */
.picker-stage.brand-active .tile-thumb img{mix-blend-mode:normal}
.picker-tile-model:hover .tile-thumb img{transform:scale(1.08)}
.picker-stage.brand-active .tile-thumb{
  background:linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border-color:rgba(255,255,255,.08);
}
.picker-stage.brand-active .tile-thumb::after{
  background:radial-gradient(circle at 50% 100%, rgba(0,0,0,.25), transparent 60%);
}
.tile-meta{
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;margin-top:auto;
}
.tile-price{
  display:inline-flex;align-items:center;gap:4px;
  font-size:.8rem;font-weight:700;
  color:var(--picker-brand);
  transition:color .6s;
}
.picker-stage.brand-active .tile-price{color:#fff}
.tile-price-from{font-size:.68rem;font-weight:500;opacity:.7;letter-spacing:.02em}
.tile-repairs{
  font-size:.7rem;color:#94a3b8;
  margin-top:4px;
  transition:color .6s;
}
.picker-stage.brand-active .tile-repairs{color:rgba(255,255,255,.55)}

/* ---------- SEARCH ---------- */
.picker-search{
  position:relative;margin-bottom:14px;
}
.picker-search-input{
  width:100%;
  padding:11px 14px 11px 38px;
  border-radius:10px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  font-size:.9rem;font-family:inherit;
  color:#0f172a;
  transition:border-color .3s, background .6s;
}
.picker-search-input:focus{
  outline:none;border-color:var(--picker-brand);
  box-shadow:0 0 0 3px var(--picker-glow);
}
.picker-stage.brand-active .picker-search-input{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.18);
  color:#fff;
}
.picker-stage.brand-active .picker-search-input::placeholder{color:rgba(255,255,255,.45)}
.picker-search-icon{
  position:absolute;left:13px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;color:#94a3b8;
  pointer-events:none;
  transition:color .6s;
}
.picker-stage.brand-active .picker-search-icon{color:rgba(255,255,255,.55)}

/* ---------- PORTAL (exit transition) ---------- */
.picker-portal{
  position:absolute;inset:0;z-index:10;
  display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at center, var(--picker-brand), #000);
  opacity:0;pointer-events:none;
  border-radius:inherit;
  transition:opacity .5s;
}
.picker-portal.open{opacity:1;pointer-events:auto;animation:portal-enter .8s forwards}
@keyframes portal-enter{
  0%{opacity:0;filter:blur(20px)}
  30%{opacity:1;filter:blur(6px)}
  100%{opacity:1;filter:blur(0)}
}
.portal-ring{
  position:absolute;
  width:60px;height:60px;border-radius:50%;
  border:2px solid rgba(255,255,255,.85);
  animation:portal-ring 1.1s cubic-bezier(.3,.7,.3,1) infinite;
}
.portal-ring:nth-child(2){animation-delay:.25s}
.portal-ring:nth-child(3){animation-delay:.5s}
@keyframes portal-ring{
  0%{transform:scale(1);opacity:.9}
  100%{transform:scale(14);opacity:0}
}
.portal-core{
  position:relative;z-index:2;
  width:72px;height:72px;border-radius:50%;
  background:linear-gradient(135deg, #fff, rgba(255,255,255,.6));
  box-shadow:0 0 80px 20px rgba(255,255,255,.5);
  animation:portal-core 1.4s ease-in-out infinite alternate;
}
@keyframes portal-core{
  0%{transform:scale(.85)}
  100%{transform:scale(1.08)}
}
.portal-label{
  position:absolute;bottom:40px;
  color:rgba(255,255,255,.92);
  font-weight:600;letter-spacing:.05em;
  font-size:.86rem;
  animation:portal-label 2s ease-in-out infinite;
}
@keyframes portal-label{50%{opacity:.5}}
.portal-device{
  position:absolute;
  font-size:1.05rem;font-weight:700;color:#fff;
  top:calc(50% + 80px);
}

/* Tile flying into portal */
.picker-tile.exiting{
  z-index:9;
  animation:tile-fly 0.7s cubic-bezier(.5,0,.3,1) forwards;
}
@keyframes tile-fly{
  0%{transform:scale(1)}
  35%{transform:scale(1.08);box-shadow:0 30px 80px -20px rgba(0,0,0,.4)}
  100%{transform:scale(18);opacity:0;filter:blur(8px)}
}

/* ---------- FOOTER LINK + QUICK SHORTCUTS ---------- */
.picker-shortcuts{
  position:relative;z-index:3;
  margin-top:32px;
  padding-top:22px;
  border-top:1px dashed rgba(15,23,42,.12);
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;
  font-size:.82rem;
  transition:border-color .6s;
}
.picker-stage.brand-active .picker-shortcuts{border-top-color:rgba(255,255,255,.15)}
.picker-shortcuts-label{
  font-weight:700;color:#0f172a;margin-right:6px;
  display:inline-flex;align-items:center;gap:6px;
  transition:color .6s;
}
.picker-stage.brand-active .picker-shortcuts-label{color:#fff}
.picker-shortcuts-label svg{width:14px;height:14px;color:#f59e0b}
.picker-shortcut{
  display:inline-flex;align-items:center;gap:5px;
  padding:5px 12px;border-radius:999px;
  background:rgba(30,58,95,.06);
  color:#1e3a5f;font-weight:600;
  text-decoration:none;font-size:.78rem;
  transition:all .25s;
}
.picker-shortcut:hover{
  background:var(--picker-brand);color:#fff;transform:translateY(-1px);
}
.picker-stage.brand-active .picker-shortcut{
  background:rgba(255,255,255,.12);color:#fff;
}
.picker-stage.brand-active .picker-shortcut:hover{
  background:#fff;color:var(--picker-brand);
}

/* ---------- FOOTER INFO BAR ---------- */
.picker-footer{
  position:relative;z-index:3;
  display:flex;align-items:center;justify-content:space-between;
  margin-top:22px;padding:14px 18px;
  background:rgba(255,255,255,.65);
  border:1px solid rgba(15,23,42,.06);
  border-radius:12px;
  font-size:.85rem;color:#475569;
  backdrop-filter:blur(6px);
  transition:all .6s;
}
.picker-stage.brand-active .picker-footer{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.12);
  color:rgba(255,255,255,.82);
}
.picker-footer-info{display:flex;align-items:center;gap:10px}
.picker-footer-info svg{width:18px;height:18px;color:var(--picker-brand);transition:color .6s}
.picker-stage.brand-active .picker-footer-info svg{color:#fff}
.picker-footer-link{
  color:var(--picker-brand);font-weight:600;text-decoration:none;
  display:inline-flex;align-items:center;gap:4px;
  transition:color .6s;
}
.picker-stage.brand-active .picker-footer-link{color:#fff}
.picker-footer-link:hover{text-decoration:underline}

/* ---------- MOBILE ---------- */
@media (max-width:720px){
  .device-picker-wrap{padding:0 2px;margin-bottom:48px}
  .picker-stage{padding:22px 18px 26px;border-radius:22px;min-height:auto}
  .picker-tiles-brands{grid-template-columns:repeat(2, 1fr);gap:12px}
  .picker-tile-brand{min-height:140px;padding:16px 14px}
  .tile-logo{width:38px;height:38px;border-radius:10px}
  .tile-logo svg{width:22px;height:22px}
  .tile-title{font-size:.92rem}
  .tile-sub{font-size:.72rem}
  .picker-tiles-series{
    grid-template-columns:1fr;max-height:400px;
  }
  .picker-tiles-model{
    grid-template-columns:repeat(2, 1fr);max-height:480px;gap:10px;
  }
  .picker-tile-model{min-height:148px;padding:10px 8px 12px;gap:8px}
  .tile-thumb{height:92px}
  .picker-tile-model .tile-title{font-size:.82rem;line-height:1.25}
  .picker-footer{flex-direction:column;gap:8px;text-align:center}
}

/* Respect reduced-motion */
@media (prefers-reduced-motion:reduce){
  .picker-tile,.picker-step,.picker-stage,.picker-stage::before,
  .picker-orb,.portal-ring,.portal-core,.portal-label{
    animation:none!important;transition:opacity .2s!important;
  }
}
