/* Effects the client chose in the design demo (22.11.2026: "all the plugins, a little", "the menu in one row").
   Ported from the app project's theme-demo/effects.js, without its settings panel. Each effect is on when <html>
   has its class (qb-fx-glitter, -glow, -tilt, -menu, -onecol, -ripple, -magnet, -progress): the page header sets
   them from Admin > Extensions > Modules > Photo zoom (all on until that module says otherwise).
   The JavaScript is catalog/view/javascript/qb-effects.js. Zoom and dark mode are in qb-white.css / qb-theme.js. */

#qb-fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 2147483600; overflow: hidden; }
.qb-spark { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.qb-ring { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  border: 2px solid var(--qb-accent, #555); background: radial-gradient(circle, color-mix(in srgb, var(--qb-accent, #555) 22%, transparent), transparent 70%); }

/* Cursor glow (soft light that follows the mouse) */
#qb-fx-glow { position: fixed; left: 0; top: 0; width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%;
  pointer-events: none; z-index: 2147483599; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(circle, color-mix(in srgb, var(--qb-accent, #555) 14%, transparent) 0%, transparent 62%); }
html.qb-fx-glow #qb-fx-glow.on { opacity: 1; }
html.qb-dark #qb-fx-glow { mix-blend-mode: screen; }

/* 3D cards: the tilt itself is set from JavaScript (no lift, no growing: only the picture zooms, as the client asked). */
/* No transform-style: preserve-3d: in a 3D space the browser sometimes found the mouse on the card instead of the
   picture, so the zoomed picture went in and out (it shook) with every mouse move. */
html.qb-fx-tilt .product:not(.product-transparent) { transform: var(--qb-tilt, none) !important; }
html.qb-fx-tilt .product.qb-tilting { transition: transform .12s ease-out !important; }
html.qb-fx-tilt .product.qb-untilt { transition: transform .6s cubic-bezier(.2,.8,.2,1) !important; }
.qb-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--qb-gx, 50%) var(--qb-gy, 50%), rgba(255,255,255,.32), transparent 55%); mix-blend-mode: soft-light; }
html.qb-fx-tilt .product.qb-tilting .qb-glare { opacity: 1; }

/* Menu animation: the list slides down, its items fade in from the side one by one. "backwards": after the animation
   nothing stays on the items (a left-over transform would cut off the one-column menu's side lists). */
@keyframes qb-drop-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes qb-item-in { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes qb-nav-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
/* Computer: the menu fades and slides in, and also out again when the mouse leaves (the site's own CSS only
   switched it on and off, so it vanished at once). The items come in one after another each time it opens. */
@media (min-width: 992px) {
  html.qb-fx-menu .header-content .nav-li > .dropdown { display: block !important; visibility: hidden; opacity: 0;
    transform: translateY(10px); pointer-events: none;
    transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s; }
  html.qb-fx-menu .header-content .nav-li:hover > .dropdown { visibility: visible; opacity: 1; transform: none; pointer-events: auto;
    transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  html.qb-fx-menu .header-content .nav-li:hover > .dropdown li { animation: qb-item-in .45s cubic-bezier(.2,.8,.2,1) backwards;
    animation-delay: calc(min(var(--qb-i, 0), 24) * 22ms + 60ms); }
}
@media (max-width: 991px) {
  html.qb-fx-menu .header-content .nav-li:hover > .dropdown { animation: qb-drop-in .4s cubic-bezier(.2,.8,.2,1) backwards; }
  html.qb-fx-menu .header-content .dropdown li { animation: qb-item-in .45s cubic-bezier(.2,.8,.2,1) backwards;
    animation-delay: calc(min(var(--qb-i, 0), 24) * 22ms + 80ms); }
}
/* An item slides a little to the right while the mouse is on it, and slides back smoothly. In the one-list menu
   the whole row counts, so it does not snap back in the gap between two items. */
html.qb-fx-menu .header-content .dropdown li a { transition: transform .25s ease, color .2s ease !important; }
html.qb-fx-menu .header-content .dropdown li a:hover,
html.qb-fx-menu.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li:hover > a { transform: translateX(6px); }
html.qb-fx-menu .header-content .navigation .nav-li { animation: qb-nav-in .55s cubic-bezier(.2,.8,.2,1) backwards;
  animation-delay: calc(var(--qb-i, 0) * 60ms); }

/* Magnetic buttons move a little with the cursor (set from JavaScript) */
html.qb-fx-magnet .qb-magnet { transition: transform .18s ease-out, translate .18s ease-out !important; }
html.qb-fx-magnet .qb-magnet-off { transition: transform .5s cubic-bezier(.2,.8,.2,1), translate .5s cubic-bezier(.2,.8,.2,1) !important; }

/* Scroll progress bar (top) and back-to-top button (bottom left) */
#qb-fx-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 2147483601; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0); opacity: 0; transition: opacity .3s ease;
  background: var(--qb-accent-grad, linear-gradient(90deg, #555, #888)); }
html.qb-fx-progress #qb-fx-progress { opacity: 1; }
#qb-fx-top { position: fixed; left: 22px; bottom: 22px; width: 50px; height: 50px; border: 0; border-radius: 50%; cursor: pointer;
  z-index: 2147483601; color: var(--qb-accent-text, #fff); font-size: 22px; line-height: 50px; text-align: center; padding: 0;
  background: var(--qb-accent-grad, linear-gradient(135deg, #555, #888)); box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: opacity .3s ease, transform .4s cubic-bezier(.2,.8,.2,1); }
html.qb-fx-progress #qb-fx-top.on { opacity: 1; transform: none; pointer-events: auto; }
#qb-fx-top:hover { transform: translateY(-3px) !important; }
#qb-fx-top:focus-visible { outline: 2px solid var(--qb-accent, #555); outline-offset: 3px; }

/* Menus. With several columns a sub-list opens under its item (click the arrow), as before. With the one-column
   menu ("one row", the client's choice) each menu is one straight list that scrolls, and a sub-list opens on the
   list's border: on the right, or on the left when there is no room. */
@keyframes qb-fly-right { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes qb-fly-left { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
html.qb-themed .header-content .dropdown .ul-lvl-2 > li > a { color: var(--qb-text, #5a5a5a) !important; }
html.qb-fx-onecol .header-content .dropdown .dropdown-content { display: block !important; }
html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 { width: auto !important; margin: 0 !important; border: 0 !important; }
@media (min-width: 992px) {
  html:not(.qb-fx-onecol) .header-content .dropdown .ul-lvl-2 { margin: 6px 0 0 2px !important;
    padding: 2px 0 2px 12px !important; border-left: 2px solid var(--qb-accent, #555); }
  html.qb-fx-onecol .header-content .nav-li > .dropdown { padding: 8px 0 !important; width: max-content !important;
    min-width: 270px; max-width: 340px; border-radius: 16px !important; overflow: visible !important; }
  html.qb-fx-onecol .header-content .dropdown .dropdown-content { max-height: min(70vh, 560px); overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; scrollbar-color: var(--qb-accent, #555) transparent; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 { padding: 0 !important; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li { display: flex !important; align-items: center; flex-wrap: nowrap !important; gap: 12px;
    margin: 0 !important; padding: 10px 18px 10px 22px; cursor: pointer; transition: background-color .2s ease; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li:hover, html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li.qb-open {
    background-color: var(--qb-accent-soft, rgba(0,0,0,.06)); }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li > a { flex: 1; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li.qb-open > a { color: var(--qb-accent, #555) !important; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li > .dropdown-trigger--sub { margin: 0 !important; width: 10px !important; flex-shrink: 0;
    pointer-events: none; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li > .dropdown-trigger--sub img { transform: rotate(-90deg) !important; opacity: .75; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li.qb-flip > .dropdown-trigger--sub img { transform: rotate(90deg) !important; }
  /* the sub-list, placed on the list's border from JavaScript (fixed, so the scrolling list cannot cut it off) */
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li > .ul-lvl-2 { display: none !important; position: fixed !important; width: max-content !important;
    min-width: 230px; max-width: 320px; max-height: min(70vh, 520px); overflow-y: auto; margin: 0 !important;
    padding: 0 0 8px !important; list-style: none; z-index: 2147483000; background: var(--qb-surface, #fff);
    border-radius: 0 16px 16px 16px; border-left: 3px solid var(--qb-accent, #555);
    box-shadow: 0 24px 50px -18px rgba(0,0,0,.4); }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li.qb-flip > .ul-lvl-2 { border-radius: 16px 0 16px 16px; border-left: 0;
    border-right: 3px solid var(--qb-accent, #555); }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li.qb-open > .ul-lvl-2 { display: block !important; animation: qb-fly-right .26s cubic-bezier(.2,.8,.2,1) both; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li.qb-open.qb-flip > .ul-lvl-2 { animation-name: qb-fly-left; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-2 > li { margin: 0 !important; padding: 9px 22px !important; opacity: 1 !important;
    transition: background-color .2s ease; }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-2 > li:hover { background-color: var(--qb-accent-soft, rgba(0,0,0,.06)); }
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-2 > li > a { white-space: nowrap; }
}
@media (max-width: 991px) {
  html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 { width: 100% !important; padding: 0 16px !important; }
}

/* Visitors who asked their device for less motion get no moving effects. */
@media (prefers-reduced-motion: reduce) {
  html.qb-fx-menu .header-content .nav-li > .dropdown { transition: none !important; transform: none !important; }
  html.qb-fx-menu .header-content .nav-li:hover > .dropdown, html.qb-fx-menu .header-content .dropdown li,
  html.qb-fx-menu .header-content .navigation .nav-li, html.qb-fx-onecol .header-content .dropdown .ul-lvl-1 > li.qb-open > .ul-lvl-2 { animation: none !important; }
  #qb-fx-glow, #qb-fx-layer { display: none !important; }
}
