/* ──────────────────────────────────────────────────────────────
   BASE / LAYOUT
   ────────────────────────────────────────────────────────────── */
:root {
  width: 100%;
  --vh: 1dvh; /* fallback value, overwritten by JS */
}


body {
  min-height: calc(var(--vh, 1dvh) * 100); /* stable viewport on iOS */
  overflow-y: auto;                         /* always scrollable */
  overscroll-behavior-y: contain;           /* reduce pull-to-refresh bounce */
  position: static !important;
  padding-top: 65px;
  width: 100%;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ---- Parallax background utility for a section ---- */
.mobileBackground {
  position: relative;
  min-height: 100vh;
  z-index: 0;
  --parallax-y: 0px; /* updated by JS */
}
.mobileBackground::before {
  content: "";
  position: fixed;       /* stays put while content scrolls */
  inset: 0;
  z-index: -1;
  background-image: var(--bg-image, url('./img/background.jpg'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translate3d(0, calc(var(--parallax-y) * -1), 0);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .mobileBackground::before { transform: none !important; }
}

/* Desktop: reserve scrollbar gutter so content doesn't shift */
@media (hover: hover) and (pointer: fine) {
  html { overflow-y: scroll; }
}

/* Hide vertical scrollbar (still scrolls) */
body::-webkit-scrollbar { display: none; }  /* Chrome/Safari/Edge */
body { scrollbar-width: none; }             /* Firefox */

/* iOS: prevent zoom-on-focus */
input, select, textarea { font-size: 16px; }

/* ──────────────────────────────────────────────────────────────
   FONTS & TEXT
   ────────────────────────────────────────────────────────────── */
@font-face {
  font-family: EmberBold;
  src: url(../../assets/fonts/emberbold.ttf);
  font-display: swap;
}
@font-face {
  font-family: EmberReg;
  src: url(../../assets/fonts/emberreg.ttf);
  font-display: swap;
}

.EmberBoldHero { font-family: EmberBold; font-size: 25px; text-decoration: none; }
.EmberBold     { font-family: EmberBold; text-decoration: none; }
.EmberReg      { font-family: EmberReg;  text-decoration: none; }

/* White links (note: removes focus styles; consider accessibility) */
a,
a:visited,
a:hover,
a:active,
a:focus {
  color: #fff !important;
  text-decoration: none !important;
  outline: none !important;
}

/* ──────────────────────────────────────────────────────────────
   NAVBAR
   ────────────────────────────────────────────────────────────── */
.navbar {
  --bs-navbar-toggler-padding-y: 0;
  --bs-navbar-toggler-padding-x: 0;
  --bs-navbar-toggler-font-size: 1.5rem;
  --bs-navbar-toggler-border-radius: 0;
  --bs-navbar-toggler-focus-width: 0;
  --bs-navbar-toggler-transition: none;
  --bs-navbar-toggler-border-color: rgba(0, 0, 0, 0.1);
}
.navbar-dark { --bs-navbar-toggler-border-color: none; }

/* Keep navbar height consistent on every page */
.navbar {
  --bs-navbar-padding-y: .75rem; /* default .5rem; bump if you want taller */
  padding-top: var(--bs-navbar-padding-y) !important;
  padding-bottom: var(--bs-navbar-padding-y) !important;
}

/* Lock the title sizing so theme sheets can’t shrink it */
.navbar .EmberBoldHero,
.navbar .navbar-text {
  font-size: clamp(1.4rem, 3.2vw, 1.5rem) !important;
  line-height: 1.2 !important;
}

/* ──────────────────────────────────────────────────────────────
   CARDS & GRID
   ────────────────────────────────────────────────────────────── */
.card { border-radius: 20px !important; }

.grid-tile,
.grid-tile-mini {
  border-radius: 24px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.grid-tile img {
  max-width: 65%;
  max-height: 65%;
  object-fit: contain;
}

.grid-tile-lg {
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.grid-tile-lg img {
  max-width: 65%;
  max-height: 65%;
  object-fit: contain;
}

/* Utilities */
.iconSmall      { font-size: 12px; font-weight: bold; }
.standardshadow { filter: drop-shadow(0px 4px 5px rgba(0, 0, 0, 0.1)) !important; }
.imgwhite       { filter: grayscale(1) contrast(100) brightness(1) !important; }
.imgblack       { filter: grayscale(1) contrast(1)   brightness(0) !important; }
.disabledIcon { 
  filter: grayscale(1) brightness(0.5) opacity(0.3) !important;
  pointer-events: none;           /* optional */
  cursor: not-allowed;            /* optional */
}

/* ──────────────────────────────────────────────────────────────
   BRAND COLORS (helpers)
   ────────────────────────────────────────────────────────────── */
.internal      { background-color: #000000; }
.wiser         { background-color: #0071bd; }
.bestbuy       { background-color: #0a4abf; }
.adapp         { background-color: #c3c3c3; }
.bestbuyyellow { background-color: #f6eb16; }
.ring          { background-color: #1c9ad6; }
.slack         { background-color: #1e1c21; }
.lowes         { background-color: #004792; }
.staples       { background-color: #ce0000; }
.target        { background-color: #cc0000; }
.homedepot     { background-color: #f96302; }

.btn-amazon { font-family: EmberReg; color: #000000; background-color: #ff9900; }
.btn-black  { font-family: EmberReg; color: #ffffff; background-color: #000000; }
.bg-radar   { background-color: #00000028!important; }
.btn-action { border-radius: 27px; font-family: EmberReg; }

/* ──────────────────────────────────────────────────────────────
   RESPONSIVE VISIBILITY
   ────────────────────────────────────────────────────────────── */
@media screen and (max-width: 900px) {
  .desktopwarning { display: none; }
  .mobileAppView  { display: inherit; }
}
@media screen and (min-width: 768px) { .mobileAppView  { display: none; } }
@media screen and (max-width: 768px) { .desktopAppView { display: none; } }

/* ──────────────────────────────────────────────────────────────
   ANIMATION DELAYS (leading zeros)
   ────────────────────────────────────────────────────────────── */
.adelay1 { animation-delay: 0.03s; }
.adelay2 { animation-delay: 0.06s; }
.adelay3 { animation-delay: 0.09s; }
.adelay4 { animation-delay: 0.12s; }
.adelay5 { animation-delay: 0.15s; }
.adelay6 { animation-delay: 0.18s; }
.adelay7 { animation-delay: 0.21s; }
.adelay8 { animation-delay: 0.24s; }
.adelay9 { animation-delay: 0.27s; }

/* ──────────────────────────────────────────────────────────────
   PRELOADER
   ────────────────────────────────────────────────────────────── */
#preloader { transition: opacity 0.5s ease; }
#preloader.fade-out { opacity: 0; pointer-events: none; }

/* AddToHomeScreen (adhs) */
.adhs-container { font-family: EmberReg !important; color: #ffffff; }
.adhs-container.visible { background-color: rgba(0, 0, 0, 0.444); opacity: 1; }
.adhs-container .adhs-modal {
  background-color: #222529;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  left: 50%;
  margin: auto;
  max-width: 400px;
  padding: 49px 19px 32px 19px;
  position: absolute;
  transition: opacity 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  line-height: normal;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
}

/* ──────────────────────────────────────────────────────────────
   OFFCANVAS
   ────────────────────────────────────────────────────────────── */
.offcanvas {
  background-color: #22252963;
  backdrop-filter: blur(7px);
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in-out;
  will-change: transform;
  border: none;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}
.offcanvas-start.show {
  transform: translateX(0);
  transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* ──────────────────────────────────────────────────────────────
   MODAL
   ────────────────────────────────────────────────────────────── */
.modal-content {
  background-color: #222529ca;
  backdrop-filter: blur(7px) !important;
  border-radius: 27px !important;
}
.modal.fade .modal-dialog {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
  will-change: opacity, transform;
  backdrop-filter: blur(4px) !important;
}
.modal.fade.show .modal-dialog { opacity: 1; transform: scale(1); }
.modal-header, .modal-footer { border: 0 none; }
.modalItem { background-color: #c0c5ca2e; border-radius: 27px; }

/* ──────────────────────────────────────────────────────────────
   MISC
   ────────────────────────────────────────────────────────────── */
.standardshadow { filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.1)); }

#btn-back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 1030;          /* make sure it sits above content */
  pointer-events: auto;
}

/* Only do the simple press shrink when NOT running the bounce */
#btn-back-to-top i:not(.press-bounce):active {
  transform: scale(0.9);
  transition: transform 0.1s ease;
}

/* Smooth restore + perf hint */
#btn-back-to-top i {
  transition: transform 0.15s ease;
  will-change: transform;
}

/* Quick custom bounce */
@keyframes press-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.85); }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.press-bounce {
  animation: press-bounce 0.18s ease;
}

/* Predictable columns + no horizontal jiggle */
#skuTable { table-layout: fixed; width: 100%; }

/* Prevent horizontal overflow entirely */
#skuTable,
#skuTable td,
#skuTable th { overflow: hidden; }

/* Name column: one line with ellipsis */
#skuTable td.name-cell .product-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SKU column: right align, stable height, hide overflow */
#skuTable td.sku-cell {
  padding: 0.5rem 0.75rem;
  min-height: 60px;           /* ~40px barcode + padding */
  vertical-align: middle;
  text-align: right;
  overflow: hidden;
}

/* Barcode SVG scales to its cell; never pushes layout wider */
#skuTable td.sku-cell .sku-barcode {
  display: inline-block;
  width: 100%;                /* scale to cell width */
  height: auto;
  max-height: 40px;
  vertical-align: middle;
}

/* --- Barcode mode adjustments --- */
/* When the global toggle is ON, tighten name font and give SKU a bit more room */
.barcode-mode #skuTable td.name-cell .product-name {
  font-size: 0.90rem;         /* shrink name to fit alongside barcode */
  line-height: 1.1;
}

/* Nudge column ratio in barcode mode to reduce wrapping/overflow */
.barcode-mode #skuTable col.col-name { width: 62% !important; }
.barcode-mode #skuTable col.col-sku  { width: 38% !important; }

/* Compact filter button */
#filterBtn {
  padding: .25rem .5rem;       /* tighter */
  line-height: 1.2;
}
#filterBtn .bi-funnel { font-size: .9rem; }

/* Dropdown items: bold name, regular count */
#filterMenu .name { font-family: EmberBold, sans-serif; }
#filterMenu .count { font-family: EmberReg, sans-serif; color: #adb5bd; }

/* Optional: slimmer caret on the button (keeps Bootstrap’s native caret) */
#filterBtn::after { margin-left: .35rem; }

/* Give content room so fixed dots never cover it */
.homescreen {
  padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px));
}

/* The horizontal pager must be scrollable + touch friendly */
.hs-viewport {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto !important;            /* force horizontal scrolling */
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;      /* momentum on iOS */
  scroll-behavior: smooth;
  touch-action: pan-x pinch-zoom;         /* tell browsers this is a horizontal pan */
  overscroll-behavior-x: contain;         /* avoid back-swipe nav conflicts */
  gap: 0;
}

.hs-viewport::-webkit-scrollbar { height: 0; }
.hs-viewport { scrollbar-width: none; }

/* Each page must occupy full viewport width */
.hs-page {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  padding-inline: 4px;
}

/* Fixed dots bar — but don't steal swipe gestures */
.hs-dots {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 9999;
  padding: 6px 10px;

  /* Important: let horizontal pans pass THROUGH the bar,
     only the buttons themselves accept taps */
  pointer-events: none;
}
.hs-dots .hs-dot { pointer-events: auto; }

/* Dots */
.hs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  padding: 0;
}
.hs-dot[aria-selected="true"] {
  background: rgba(255,255,255,0.9);
  transform: scale(1.15);
}

@media (prefers-color-scheme: dark) {
  .hs-dot { background: rgba(255,255,255,0.22); }
  .hs-dot[aria-selected="true"] { background: rgba(255,255,255,0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .hs-viewport { scroll-behavior: auto; }
}

/* Hide dots when a modal is open so they don't overlap dialogs */
body.modal-open .hs-dots { display: none; }


.badge-container {
  position: relative;
  display: inline-block;
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: red;
  color: white;
  font-size: 0.9rem;
  font-weight:bold;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 22px;
  height: 22px;
  line-height: 17px;
  text-align: center;
  display: none; /* hidden by default */
  font-family: EmberBold
}

/* Generic pressable wrapper */
.pressable {
  display: inline-block;
  border-radius: inherit;   /* inherit whatever the element has */
  outline: none;
  cursor: pointer;          /* feels tappable */
}

/* Smooth press animation on the element itself */
.pressable {
  transition: transform 120ms cubic-bezier(.2,.8,.2,1),
              box-shadow 120ms cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

.pressable.is-pressing {
  transform: scale(0.97);  /* adjust as desired */
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

/* Accessible focus ring */
.pressable:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,255,255,.25),
              0 0 0 6px rgba(0,123,255,.5);
}