/* =====================================================================
   hxh-pro-final.css  —  LOADED LAST (see shell.php)
   UI-only refinements. No logic / workflow is touched.

   1. Light Purple ("violet") is the default theme; Ivory Garden (green)
      and the other themes stay selectable from Profile & Themes.
   2. Top bar: one clean cylinder (pill) on desktop AND mobile.
   3. Side menu open / collapse no longer squeezes or stretches the page.
   4. Mobile bottom bar rebuilt: floating cylinder, equal slots, no blank space.
   5. Product cards: professional hover (lift, glow, art zoom, light sweep).
   6. Loading screen: circular store logo (assets/main.jpg) instead of the "H".
   ===================================================================== */

/* ---------------------------------------------------------------------
   0. Light Purple tokens (default theme)
   --------------------------------------------------------------------- */
html[data-theme="violet"]{
  --hxp-accent:#6d3bf5;
  --hxp-accent-2:#8a63ff;
  --hxp-deep:#5427d6;
  --hxp-soft:#f1ecff;
  --hxp-soft-2:#e7defe;
  --hxp-line:#e3dbf7;
  --hxp-ink:#1b1530;
  --hxp-glow:rgba(109,59,245,.30);
  --rx-accent:#6d3bf5;
  --rx-soft:#f1ecff;
  --rx-line:#e3dbf7;
  --rx-ring:#c9b6ff;
}
html:not([data-theme="violet"]){
  --hxp-accent:var(--rx-accent,#0e7c5a);
  --hxp-accent-2:var(--rx-accent,#17a67a);
  --hxp-deep:var(--rx-accent,#0a6e4f);
  --hxp-soft:var(--rx-soft,#edf7f1);
  --hxp-soft-2:var(--rx-soft,#e2f3ea);
  --hxp-line:var(--rx-line,#e7e2d5);
  --hxp-ink:var(--rx-ink,#15211b);
  --hxp-glow:rgba(14,124,90,.26);
}

/* Remaining green leftovers while the violet theme is active */
html[data-theme="violet"] body #app .hero .eyebrow{background:rgba(109,59,245,.09)!important;border-color:rgba(109,59,245,.22)!important;color:#5427d6!important}
html[data-theme="violet"] body #app .sidebar .badge{background:rgba(109,59,245,.10)!important;border-color:rgba(109,59,245,.28)!important;color:#6d3bf5!important}
html[data-theme="violet"] body #app .sidebar .nav-item.active{border-color:rgba(109,59,245,.24)!important;background:var(--hxp-soft)!important;color:#5427d6!important}
html[data-theme="violet"] body #app .sidebar .brand img{border-color:rgba(109,59,245,.2)!important}
html[data-theme="violet"] body #app .topbar .top-link.active{color:#5427d6!important;background:var(--hxp-soft)!important}
html[data-theme="violet"] body #app .sidebar-install{
  background:linear-gradient(135deg,#7a4cf7 0%,#5427d6 100%)!important;
  border-color:rgba(255,255,255,.22)!important;
  box-shadow:0 14px 28px -16px rgba(84,39,214,.7)!important;
}
html[data-theme="violet"] body #app .sidebar-install .install-dl{background:rgba(255,255,255,.2)!important;color:#fff!important}
html[data-theme="violet"] body #app .product .product-art{
  background:radial-gradient(ellipse at 50% 28%,#ffffff 0%,#f3eeff 55%,#e9e1fd 100%)!important;
}
html[data-theme="violet"] body #app .hero .hx-glow{background:radial-gradient(circle,rgba(138,99,255,.34),transparent 62%)!important}
html[data-theme="violet"] body #app .hero .hx-scene-css i{background:radial-gradient(circle,rgba(167,139,255,.28),transparent 66%)!important}
html[data-theme="violet"] body #app .hero{
  background:
    radial-gradient(at 85% 12%,rgba(197,170,255,.38),transparent 55%),
    radial-gradient(at 12% 92%,rgba(138,99,255,.16),transparent 55%),
    linear-gradient(180deg,#ffffff 0%,#f6f2ff 100%)!important;
}
html[data-theme="violet"] body #app .hero-notes span svg{color:#6d3bf5!important}

/* ---------------------------------------------------------------------
   1. Desktop (>=1001px): cylinder top bar, stable layout
   --------------------------------------------------------------------- */
@media (min-width:1001px){
  html body #app .topbar.topbar{
    border-radius:999px!important;
    background:var(--rx-card,#fff)!important;
    border:1px solid var(--hxp-line)!important;
    box-shadow:0 16px 36px -26px rgba(40,24,90,.45),0 2px 6px rgba(40,24,90,.05)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    overflow:visible;
  }
  html body #app .topbar .top-nav a{border-radius:999px!important}
  html body #app .topbar .top-nav a.active{background:var(--hxp-soft)!important}
  html body #app .topbar .header-search{border-radius:999px!important;min-width:0}
  html body #app .topbar .top-brand{display:none!important}

  /* Side menu: open/close glides (same easing for menu + page) and the page keeps its shape */
  html body .sidebar{
    transition:width .3s cubic-bezier(.22,1,.36,1),padding .3s cubic-bezier(.22,1,.36,1)!important;
    will-change:width;
  }
  html body .workspace{
    transition:margin-left .3s cubic-bezier(.22,1,.36,1)!important;
  }
  html body #app .content{min-width:0}
  /* hero keeps its layout instead of wrapping/clipping when the menu takes 146px */
  html body #app .hero .hero-copy{min-width:0}
  html body #app .hero .hero-notes{display:flex;flex-wrap:nowrap;gap:clamp(10px,1.6vw,26px)}
  html body #app .hero .hero-notes span{min-width:0;white-space:nowrap}
  html body #app .hero .hero-notes span b,
  html body #app .hero .hero-notes span i{white-space:nowrap}
}
/* While the menu animates, freeze expensive effects so it stays smooth */
html body #app .workspace{contain:layout style}

/* Sidebar logo: circular */
html body #app .sidebar .brand img,
html body #app .topbar .top-brand img{
  border-radius:50%!important;
  object-fit:cover;
  aspect-ratio:1/1;
  background:#6d3bf5;
}
html body #app .sidebar .brand img{box-shadow:0 6px 14px -8px rgba(60,30,150,.55)}

/* ---------------------------------------------------------------------
   2. Mobile / tablet (<=1000px): cylinder top bar
   --------------------------------------------------------------------- */
@media (max-width:1000px){
  html body #app .topbar.topbar{
    position:sticky!important;top:8px!important;z-index:60;
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-areas:"tog brand act" "search search search";
    align-items:center;
    gap:8px 8px!important;
    width:auto!important;max-width:none!important;
    height:auto!important;min-height:0!important;
    margin:8px 10px 0!important;
    padding:8px 8px 8px 8px!important;
    border:1px solid var(--hxp-line)!important;
    border-radius:30px!important;
    background:var(--rx-card,#fff)!important;
    box-shadow:0 16px 34px -22px rgba(40,24,90,.5),0 2px 6px rgba(40,24,90,.05)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  html body #app .topbar .mobile-toggle{grid-area:tog;display:inline-flex!important;width:44px;height:44px;border-radius:50%!important}
  html body #app .topbar .top-brand{grid-area:brand;display:flex!important;align-items:center;gap:8px;min-width:0;margin:0!important;padding:0!important;justify-self:start}
  html body #app .topbar .top-brand img{width:42px!important;height:42px!important;flex:0 0 42px;border-radius:50%!important;border:2px solid #fff;box-shadow:0 0 0 1px var(--hxp-line),0 8px 16px -10px rgba(60,30,150,.6)}
  html body #app .topbar .top-brand span{display:none!important}
  html body #app .topbar .top-nav,
  html body #app .topbar .breadcrumb{display:none!important}
  html body #app .topbar .top-actions{grid-area:act;display:flex;align-items:center;gap:8px;margin:0!important}
  html body #app .topbar .top-actions .divider,
  html body #app .topbar .top-actions .quick-search{display:none!important}
  html body #app .topbar .top-actions .icon-btn{width:44px;height:44px;border-radius:50%!important}
  html body #app .topbar .top-actions .btn{height:44px;border-radius:999px!important;padding:0 18px!important}
  html body #app .topbar .header-search{
    grid-area:search;
    width:100%!important;max-width:none!important;flex:none!important;margin:0!important;
    height:46px;border-radius:999px!important;
    background:var(--hxp-soft)!important;
    border:1px solid var(--hxp-line)!important;
  }
  html body #app .topbar .header-search kbd{display:none!important}
  html body #app .content{padding-top:14px!important}
}

/* ---------------------------------------------------------------------
   3. Mobile bottom bar: floating cylinder, 5 equal slots
   --------------------------------------------------------------------- */
@media (max-width:1000px){
  html body #app .mobile-nav.mobile-nav{
    position:fixed!important;
    left:12px!important;right:12px!important;
    bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;top:auto!important;
    width:auto!important;max-width:520px;margin:0 auto!important;
    height:64px!important;min-height:0!important;
    padding:6px!important;gap:2px!important;
    align-items:stretch!important;justify-content:space-between!important;
    border:1px solid var(--hxp-line)!important;
    border-radius:999px!important;
    background:var(--rx-card,#fff)!important;
    box-shadow:0 18px 36px -18px rgba(40,24,90,.55),0 2px 8px rgba(40,24,90,.08)!important;
    overflow:hidden!important;
    z-index:70;
  }
  html body #app .mobile-nav .mobile-nav-pill{display:none!important}
  html body #app .mobile-nav a{
    flex:1 1 0!important;min-width:0!important;
    height:auto!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
    gap:3px!important;
    padding:0 2px!important;margin:0!important;
    border:0!important;border-radius:999px!important;
    background:transparent!important;
    color:var(--rx-ink-2,#5f5873)!important;
    text-decoration:none;
    -webkit-tap-highlight-color:transparent;
    transition:background .22s ease,color .22s ease!important;
  }
  html body #app .mobile-nav a svg{width:22px!important;height:22px!important;margin:0!important;flex:0 0 22px}
  html body #app .mobile-nav a .mn-label{display:block;font-size:10.5px!important;line-height:1!important;font-weight:650;letter-spacing:0;white-space:nowrap;margin:0!important}
  html body #app .mobile-nav a.active{
    background:var(--hxp-soft)!important;
    color:var(--hxp-accent)!important;
    box-shadow:inset 0 0 0 1px var(--hxp-soft-2);
  }
  html body #app .mobile-nav a.active .mn-label,
  html body #app .mobile-nav a.active svg{color:var(--hxp-accent)!important}
  html body #app .mobile-nav a:active{background:var(--hxp-soft)!important}

  /* floating helpers sit above the bar */
  .hxh-install-chip{bottom:calc(88px + env(safe-area-inset-bottom,0px))!important}
  .scroll-to-top-btn{bottom:calc(88px + env(safe-area-inset-bottom,0px))!important}
  html body #app .content{padding-bottom:110px!important}
}

/* ---------------------------------------------------------------------
   4. Product cards: professional hover
   --------------------------------------------------------------------- */
html body #app .products-grid>.product,
html body #app .product{
  position:relative;
  transition:transform .32s cubic-bezier(.22,1,.36,1),box-shadow .32s cubic-bezier(.22,1,.36,1),border-color .25s ease!important;
}
html body #app .product .product-art{position:relative;overflow:hidden;isolation:isolate}
html body #app .product .product-art .brand-tile,
html body #app .product .product-art>svg,
html body #app .product .product-art .product-image-mark,
html body #app .product .product-art img,
html body #app .product .product-art .custom-product-svg,
html body #app .product .product-art .generic-product-mark{
  transition:transform .42s cubic-bezier(.22,1,.36,1),filter .42s ease!important;
}
/* soft light sweep across the artwork */
html body #app .product .product-art::after{
  content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.65) 50%,transparent 65%);
  transform:translateX(-130%);
  transition:transform .75s cubic-bezier(.22,1,.36,1);
}
/* accent glow under the card */
html body #app .product::before{
  content:"";position:absolute;left:12%;right:12%;bottom:-14px;height:26px;z-index:-1;pointer-events:none;
  border-radius:50%;
  background:var(--hxp-glow);
  filter:blur(16px);
  opacity:0;transform:scale(.85);
  transition:opacity .32s ease,transform .32s ease;
}
html body #app .product .product-title,
html body #app .product .product-title-trigger{transition:color .22s ease!important}
html body #app .product .product-actions-wrap .btn{transition:transform .22s cubic-bezier(.22,1,.36,1),box-shadow .22s ease,background .22s ease!important}

@media (hover:hover) and (pointer:fine){
  html body #app .products-grid>.product:hover,
  html body #app .product:hover,
  html body #app .product:focus-within{
    transform:translateY(-7px)!important;
    border-color:var(--hxp-accent)!important;
    box-shadow:0 26px 48px -24px var(--hxp-glow),0 10px 24px -16px rgba(40,24,90,.28)!important;
  }
  html body #app .product:hover::before,
  html body #app .product:focus-within::before{opacity:.9;transform:scale(1)}
  html body #app .product:hover .product-art::after{transform:translateX(130%)}
  html body #app .product:hover .product-art .brand-tile,
  html body #app .product:hover .product-art>svg,
  html body #app .product:hover .product-art .product-image-mark,
  html body #app .product:hover .product-art img,
  html body #app .product:hover .product-art .custom-product-svg,
  html body #app .product:hover .product-art .generic-product-mark{
    transform:scale(1.1) translateY(-2px)!important;
    filter:drop-shadow(0 12px 18px rgba(40,24,90,.25));
  }
  html body #app .product:hover .product-title,
  html body #app .product:hover .product-title-trigger{color:var(--hxp-accent)!important}
  html body #app .product:hover .product-price{color:var(--hxp-deep)}
  html body #app .product:hover .product-actions-wrap .btn:not(.secondary){
    transform:translateY(-2px);
    box-shadow:0 12px 22px -12px var(--hxp-glow);
  }
  html body #app .product .product-card-top-actions .icon-btn{transition:transform .2s ease,background .2s ease,color .2s ease}
  html body #app .product .product-card-top-actions .icon-btn:hover{transform:scale(1.12);color:var(--hxp-accent)}
}
html body #app .product:active{transform:scale(.99)!important}

/* ---------------------------------------------------------------------
   5. Loading screen: circular store logo
   --------------------------------------------------------------------- */
#app>.boot .boot-orbit{display:none!important}
#app>.boot .app-splash-logo{
  position:relative;display:block;
  width:104px;height:104px;border-radius:50%;
  padding:4px;
  background:linear-gradient(145deg,#ffffff,#efe8ff);
  box-shadow:0 0 0 1px rgba(109,59,245,.18),0 18px 38px -14px rgba(84,39,214,.55);
  animation:hxpBootIn .6s cubic-bezier(.34,1.56,.64,1) both;
}
#app>.boot .app-splash-logo img{
  display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;
  background:#6d3bf5;
}
#app>.boot .app-splash-logo::before{
  content:"";position:absolute;inset:-9px;border-radius:50%;
  border:2px solid transparent;
  border-top-color:rgba(109,59,245,.55);border-right-color:rgba(109,59,245,.18);
  animation:hxpBootSpin 1.5s linear infinite;
}
#app>.boot .app-splash-name{color:#2a1c5e}
html[data-theme="ivory"] #app>.boot .app-splash-logo,
html[data-theme="ocean"] #app>.boot .app-splash-logo,
html[data-theme="sand"] #app>.boot .app-splash-logo,
html[data-theme="rose"] #app>.boot .app-splash-logo{box-shadow:0 0 0 1px rgba(14,124,90,.2),0 18px 38px -14px rgba(10,110,79,.5);background:linear-gradient(145deg,#fff,#e6f6ee)}
html[data-theme="ivory"] #app>.boot .app-splash-logo::before{border-top-color:rgba(14,124,90,.55);border-right-color:rgba(14,124,90,.18)}
html[data-theme="midnight"] #app>.boot .app-splash-logo{background:linear-gradient(145deg,#1b2630,#0e151c);box-shadow:0 0 0 1px rgba(55,221,163,.25),0 18px 38px -14px rgba(55,221,163,.35)}
html[data-theme="midnight"] #app>.boot .app-splash-logo::before{border-top-color:rgba(55,221,163,.7);border-right-color:rgba(55,221,163,.2)}
html[data-theme="midnight"] #app>.boot .app-splash-name{color:#e9f4ef}
/* progress bar follows the active theme */
html[data-theme="violet"] #app>.boot .app-splash-line span,
html[data-theme="violet"] #app>.boot .boot-progress i{background:linear-gradient(90deg,#c9b6ff,#6d3bf5,#9b6bff)!important}
@keyframes hxpBootIn{from{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}
@keyframes hxpBootSpin{to{transform:rotate(360deg)}}

/* ---------------------------------------------------------------------
   6. Motion safety
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  html body #app .product,html body #app .product *,
  #app>.boot .app-splash-logo,#app>.boot .app-splash-logo::before{transition:none!important;animation:none!important}
  html body #app .product:hover{transform:none!important}
}

/* --- fixes after visual QA --- */
html body #app .topbar .top-brand{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:50%!important;overflow:visible}
html[data-theme="violet"] body #app .sidebar a.sidebar-install,
html[data-theme="violet"] body #app .sidebar .sidebar-install.sidebar-install{
  background-image:linear-gradient(135deg,#7a4cf7 0%,#5427d6 100%)!important;
  background-color:#6d3bf5!important;
}
html[data-theme="violet"] #app>.boot,
html[data-theme="violet"] body #app>.boot{
  background:radial-gradient(ellipse at 50% 38%,rgba(167,139,255,.42),transparent 48%),radial-gradient(ellipse at 50% 100%,rgba(109,59,245,.08),transparent 60%),#f6f4fc!important;
}
html[data-theme="violet"] #app>.boot::before,html[data-theme="violet"] #app>.boot::after{background:none!important}
html[data-theme="violet"] #app>.boot .app-splash-name{color:#2a1c5e!important}
html[data-theme="violet"] #app>.boot .app-splash-note{color:#6a5f8c!important}
