/* Layout widgets: WhatsApp float, page loader, spotlight popup */

/* --- Floating WhatsApp --- */
/* Stack: dock 10590 < WA < sliding-menu 10600 < cart drawer 10650 < spotlight/loader */
.lw-wa-float {
  --lw-wa-bg: #25d366;
  --lw-wa-shadow: rgba(37, 211, 102, 0.45);
  --lw-wa-shadow-hover: rgba(37, 211, 102, 0.55);
  position: fixed;
  bottom: 85px;
  inset-inline-start: 10px;
  inset-inline-end: auto;
  z-index: 10595;
  width: 45px;
  height: 45px;
  border-radius: 49%;
  background: var(--lw-wa-bg);
  color: #fff;
  box-shadow: 0 4px 18px var(--lw-wa-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

@media (min-width: 992px) {
  .lw-wa-float {
    bottom: 10px;
  }
}

.lw-wa-float:hover {
  transform: scale(1.06);
  color: #fff;
  box-shadow: 0 6px 22px var(--lw-wa-shadow-hover);
}

.lw-wa-float__svg {
  display: block;
  flex-shrink: 0;
}

.lw-wa-float__label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
}

/* Color modes */
.lw-wa-float--color-theme {
  --lw-wa-bg: var(--primary-color, #4b2a31);
  --lw-wa-shadow: color-mix(in srgb, var(--primary-color, #4b2a31) 45%, transparent);
  --lw-wa-shadow-hover: color-mix(in srgb, var(--primary-color, #4b2a31) 55%, transparent);
}

.lw-wa-float--color-custom {
  --lw-wa-shadow: color-mix(in srgb, var(--lw-wa-bg, #25d366) 45%, transparent);
  --lw-wa-shadow-hover: color-mix(in srgb, var(--lw-wa-bg, #25d366) 55%, transparent);
}

/* Sizes — circle */
.lw-wa-float--size-sm.lw-wa-float--circle {
  width: 38px;
  height: 38px;
}

.lw-wa-float--size-lg.lw-wa-float--circle {
  width: 56px;
  height: 56px;
}

/* Pill */
.lw-wa-float--pill {
  width: auto;
  height: 48px;
  padding-inline: 0.85rem 0.7rem;
  border-radius: 999px;
}

.lw-wa-float--size-sm.lw-wa-float--pill {
  height: 40px;
  padding-inline: 0.7rem 0.55rem;
  gap: 0.3rem;
}

.lw-wa-float--size-sm.lw-wa-float--pill .lw-wa-float__label {
  font-size: 0.8125rem;
}

.lw-wa-float--size-lg.lw-wa-float--pill {
  height: 56px;
  padding-inline: 1.05rem 0.85rem;
  gap: 0.5rem;
}

.lw-wa-float--size-lg.lw-wa-float--pill .lw-wa-float__label {
  font-size: 1rem;
}

/* Side */
.lw-wa-float--side-end {
  inset-inline-start: auto;
  inset-inline-end: 10px;
}

/* Attention pulse */
@keyframes lw-wa-pulse {
  0%,
  100% {
    box-shadow: 0 4px 18px var(--lw-wa-shadow);
  }
  50% {
    box-shadow:
      0 4px 18px var(--lw-wa-shadow),
      0 0 0 8px color-mix(in srgb, var(--lw-wa-bg, #25d366) 18%, transparent);
  }
}

.lw-wa-float--pulse {
  animation: lw-wa-pulse 2.2s ease-in-out infinite;
}

.lw-wa-float--pulse:hover {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .lw-wa-float--pulse {
    animation: none;
  }
}

/* --- Spotlight reopen tab — vertical edge tab on all screen sizes --- */
.lw-spotlight-pill {
  position: fixed;
  top: 42%;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 10594;
  margin: 0;
  padding: 1.15rem 0.7rem;
  border: none;
  /*
   * rotate(180deg) flips corners — set radius OPPOSITE of visual intent:
   * after rotate → flat on screen edge, 8px round facing content.
   */
  border-radius: 8px 0 0 8px;
  background: var(--lw-pill-bg, #c5a059);
  color: var(--lw-pill-fg, #ffffff);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  white-space: nowrap;
  max-height: min(52vh, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(-50%) rotate(180deg);
  /* shadow also flips with rotate → negative X becomes inward (right) */
  box-shadow: -2px 0 14px rgba(0, 0, 0, 0.16);
  touch-action: manipulation;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.lw-spotlight-pill:hover,
.lw-spotlight-pill:focus-visible {
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.22);
  filter: brightness(1.06);
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.lw-spotlight-pill:active {
  filter: brightness(0.96);
}

.lw-spotlight-pill[hidden] {
  display: none !important;
}

body.lw-spotlight-open .lw-spotlight-pill {
  visibility: hidden;
  pointer-events: none;
}

/* --- Page loader --- */
.lw-page-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lw-pl-bg, #ffffff);
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lw-page-loader--hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.lw-page-loader__inner {
  padding: 24px;
  max-width: min(420px, 92vw);
  width: 100%;
  transition:
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s ease;
}

.lw-page-loader--hide .lw-page-loader__inner {
  transform: translateY(-20px) scale(0.9);
  opacity: 0;
}

.lw-page-loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

/* Logo / image with dots directly underneath */
.lw-page-loader__content:has(.lw-page-loader__image) {
  gap: 18px;
}

.lw-page-loader__image {
  display: block;
  margin: 0 auto;
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: lw-image-zoom 1.85s ease-in-out infinite;
  transform-origin: center;
}

@keyframes lw-image-zoom {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

.lw-page-loader__animation {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

/* Five small dots — staggered pulse (~3 “lit” at a time) */
.lw-page-loader__animation--dots {
  gap: 5px;
  min-height: 20px;
  width: auto;
  background: none;
  clip-path: none;
  animation: none;
}

.lw-pl-dot {
  display: block;
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lw-pl-loader-color, var(--primary-color, #3d0b17));
  animation: lw-pl-dot-wave 1s ease-in-out infinite;
  opacity: 0.35;
  transform: scale(0.65);
}

.lw-pl-dot:nth-child(1) {
  animation-delay: 0ms;
}
.lw-pl-dot:nth-child(2) {
  animation-delay: 80ms;
}
.lw-pl-dot:nth-child(3) {
  animation-delay: 160ms;
}
.lw-pl-dot:nth-child(4) {
  animation-delay: 240ms;
}
.lw-pl-dot:nth-child(5) {
  animation-delay: 320ms;
}

@keyframes lw-pl-dot-wave {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.65);
  }
  35%,
  65% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Bouncing ball loader */
.lw-page-loader__animation--bouncing-ball {
  height: 60px;
  aspect-ratio: 2;
  border-bottom: 3px solid var(--lw-pl-loader-color, #524656);
  position: relative;
  overflow: hidden;
}

.lw-page-loader__animation--bouncing-ball::before {
  content: "";
  position: absolute;
  inset: auto 42.5% 0;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lw-pl-loader-color, #cf4647);
  animation:
    lw-bounce-vertical 0.5s cubic-bezier(0, 900, 1, 900) infinite,
    lw-bounce-horizontal 2s linear infinite;
}

@keyframes lw-bounce-vertical {
  0%,
  2% {
    bottom: 0%;
  }
  98%,
  to {
    bottom: 0.1%;
  }
}

@keyframes lw-bounce-horizontal {
  0% {
    translate: -500%;
  }
  to {
    translate: 500%;
  }
}

/* --------------------------------------------------------------------------
   Truck loader (Uiverse — by vinodjangid07, scoped & themed).
   The truck cab uses --lw-pl-loader-color (which is bound to the
   "Loader color" setting in the editor). If no color is set, it falls back
   to the theme's --primary-color, then to the original red.
   -------------------------------------------------------------------------- */
.lw-page-loader__animation--truck {
  width: 200px;
  height: 100px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Cab color resolves through CSS variables for full theming. */
  --lw-pl-truck-cab: var(--lw-pl-loader-color, var(--primary-color, #F83D3D));
}

.lw-pl-truck {
  width: fit-content;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lw-pl-truck__wrap {
  width: 200px;
  height: 100px;
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: center;
  justify-content: flex-end;
  overflow-x: hidden;
}

.lw-pl-truck__body {
  width: 130px;
  height: fit-content;
  margin-bottom: 6px;
  animation: lw-pl-truck-motion 1s linear infinite;
}
.lw-pl-truck__svg { width: 100%; height: auto; display: block; }

/* The themed cab — overrides the hardcoded red in the SVG path. */
.lw-pl-truck__cab { fill: var(--lw-pl-truck-cab, #F83D3D); }

@keyframes lw-pl-truck-motion {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(3px); }
  100% { transform: translateY(0); }
}

.lw-pl-truck__tires {
  width: 130px;
  height: fit-content;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 15px;
  position: absolute;
  bottom: 0;
}
.lw-pl-truck__tire { width: 24px; }

.lw-pl-truck__road {
  width: 100%;
  height: 1.5px;
  background-color: #282828;
  position: relative;
  bottom: 0;
  align-self: flex-end;
  border-radius: 3px;
}
.lw-pl-truck__road::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 100%;
  background-color: #282828;
  right: -50%;
  border-radius: 3px;
  animation: lw-pl-truck-road 1.4s linear infinite;
  border-left: 10px solid var(--lw-pl-bg, #fff);
}
.lw-pl-truck__road::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 100%;
  background-color: #282828;
  right: -65%;
  border-radius: 3px;
  animation: lw-pl-truck-road 1.4s linear infinite;
  border-left: 4px solid var(--lw-pl-bg, #fff);
}

.lw-pl-truck__lamp {
  position: absolute;
  bottom: 0;
  right: -90%;
  height: 90px;
  animation: lw-pl-truck-road 1.4s linear infinite;
}

@keyframes lw-pl-truck-road {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-350px); }
}

@media (prefers-reduced-motion: reduce) {
  .lw-pl-truck__body,
  .lw-pl-truck__road::before,
  .lw-pl-truck__road::after,
  .lw-pl-truck__lamp { animation: none; }
}

/* --- Spotlight popup (Figma 136:3854 — same controls as deal-days banner) --- */
body.lw-spotlight-open {
  overflow: hidden;
}

.lw-spotlight-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99995;
  display: block;
  background: rgba(0, 0, 0, 0.75);
  animation: lw-fade-in 0.3s ease;
}

.lw-spotlight-backdrop[hidden] {
  display: none !important;
}

.lw-spotlight {
  position: fixed;
  z-index: 99996;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100vw - 24px), 393px);
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: block;
  animation: lw-pop-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
}

.lw-spotlight[hidden] {
  display: none !important;
}

.lw-spotlight__close {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.4rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lw-spotlight__close:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.lw-spotlight__banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--lw-radius, 12px);
  background: var(--lw-fallback, #000);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Color-only → compact height. Image → fixed wide ratio. */
.lw-spotlight--height-auto .lw-spotlight__banner {
  aspect-ratio: auto;
  min-height: 0;
}

.lw-spotlight--height-ratio .lw-spotlight__banner {
  aspect-ratio: 393 / 411;
  min-height: 411px;
}

.lw-spotlight--height-ratio .lw-spotlight__banner--no-img {
  min-height: 411px;
}

.lw-spotlight__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.lw-spotlight__aspect {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lw-spotlight__aspect--desk {
  display: none;
}

.lw-spotlight__aspect--mob {
  display: block;
}

.lw-spotlight__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: var(--lw-img-opacity, 0.4);
  display: block;
}

.lw-spotlight__bg--mob {
  object-position: center 22%;
}

.lw-spotlight__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    #000 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.lw-spotlight__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  box-sizing: border-box;
}

.lw-spotlight--height-auto .lw-spotlight__content {
  min-height: 0;
  padding: 3rem 1.25rem;
  gap: 1.5rem;
}

.lw-spotlight--height-ratio .lw-spotlight__content {
  min-height: 100%;
  padding: 2.625rem 1rem;
  gap: 1.125rem;
}

.lw-spotlight__icon {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  margin-inline: auto;
}

.lw-spotlight__kicker {
  margin: 0;
  padding: 0;
  font-family: var(--ath-body-font-family, inherit);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--lw-kicker-color, var(--lw-accent, #c5a059));
}

.lw-spotlight__title {
  margin: 0;
  padding: 0;
  font-family: var(--ath-body-font-family, inherit);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--lw-title-color, #fff);
  max-width: 100%;
  text-wrap: balance;
}

.lw-spotlight--title-compact .lw-spotlight__title {
  font-size: 1.375rem;
  line-height: 1.35;
}

.lw-spotlight--title-medium .lw-spotlight__title {
  font-size: 1.5rem;
  line-height: 1.35;
}

.lw-spotlight--title-large .lw-spotlight__title {
  font-size: 1.75rem;
  line-height: 1.5;
  text-shadow: 0 3px 3px rgba(0, 0, 0, 0.12);
}

.lw-spotlight__description {
  margin: 0;
  padding: 0;
  max-width: 22rem;
  font-family: var(--ath-body-font-family, inherit);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.48;
  color: var(--lw-desc-color, #fff);
  opacity: 0.9;
  white-space: pre-line;
}

.lw-offer-countdown {
  width: 100%;
  margin-top: 0;
}

.lw-offer-countdown__grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  direction: ltr;
  width: 100%;
  max-width: 20.75rem;
  margin-inline: auto;
}

.lw-spotlight--height-ratio .lw-offer-countdown__grid {
  padding: 24px 0 0;
}

.lw-offer-countdown__ended {
  margin: 0;
  padding: 24px 0;
  font-family: var(--ath-body-font-family, inherit);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--lw-cd-lbl, #ffffff);
  text-align: center;
}

.lw-offer-countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 74px;
  width: 74px;
  height: 80px;
  padding: 8.8px;
  background: var(--lw-cd-bg, rgba(255, 255, 255, 0.1));
  border: 0.8px solid var(--lw-cd-border, rgba(255, 255, 255, 0.2));
  border-radius: 10px;
  box-sizing: border-box;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lw-offer-countdown__num {
  display: block;
  font-family: var(--ath-body-font-family, inherit);
  font-size: 26px;
  font-weight: 400;
  line-height: 40px;
  margin: 0 0 4px;
  color: var(--lw-cd-digit, var(--lw-accent, #c5a059));
  font-variant-numeric: tabular-nums;
}

.lw-offer-countdown__unit {
  font-family: var(--ath-body-font-family, inherit);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--lw-cd-lbl, #ffffff);
  text-align: center;
}

.lw-spotlight__cta-wrap {
  margin-top: 0;
  padding-top: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.lw-spotlight--height-ratio .lw-spotlight__cta-wrap {
  margin-top: 1.5rem;
}

.lw-spotlight__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10.6875rem;
  min-height: 2.75rem;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  background: var(--lw-btn-bg, var(--lw-accent, #c5a059));
  color: var(--lw-btn-fg, #f3f4f6);
  font-family: var(--ath-body-font-family, inherit);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lw-spotlight__btn:hover,
.lw-spotlight__btn:focus-visible {
  opacity: 0.92;
  color: var(--lw-btn-fg, #f3f4f6);
  text-decoration: none;
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .lw-spotlight {
    width: min(calc(100vw - 48px), 1349px);
    max-height: calc(100dvh - 32px);
  }

  .lw-spotlight--height-ratio .lw-spotlight__banner {
    aspect-ratio: 1600 / 775;
    min-height: 0;
  }

  .lw-spotlight--height-ratio .lw-spotlight__banner--no-img {
    min-height: 28rem;
  }

  .lw-spotlight__aspect--desk {
    display: block;
  }

  .lw-spotlight__aspect--mob {
    display: none;
  }

  .lw-spotlight--height-auto .lw-spotlight__content {
    padding: 6.5rem 1rem;
    gap: 1.5rem;
  }

  .lw-spotlight--height-ratio .lw-spotlight__content {
    padding: clamp(3rem, 8vw, 8rem) 1rem;
    gap: 0.125rem;
  }

  .lw-spotlight__icon {
    width: 3rem;
    height: 3rem;
  }

  .lw-spotlight__kicker {
    font-size: 1rem;
  }

  .lw-spotlight--height-ratio .lw-spotlight__kicker {
    margin-top: 1.5rem;
  }

  .lw-spotlight--title-compact .lw-spotlight__title {
    font-size: 2rem;
    line-height: 1.3;
  }

  .lw-spotlight--title-medium .lw-spotlight__title {
    font-size: clamp(2rem, 3.2vw, 2.5rem);
    line-height: 1.25;
  }

  .lw-spotlight--title-large .lw-spotlight__title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    line-height: 1;
  }

  .lw-spotlight--height-ratio .lw-spotlight__title {
    margin-top: 1rem;
  }

  .lw-spotlight__description {
    max-width: 42rem;
    font-size: 1.375rem;
    line-height: 1.48;
  }

  .lw-spotlight--height-ratio .lw-spotlight__description {
    margin-top: 1.5rem;
  }

  .lw-spotlight--height-ratio .lw-offer-countdown__grid {
    gap: 24px;
    padding: 48px 0 0;
    max-width: none;
  }

  .lw-offer-countdown__ended {
    padding: 48px 0;
    font-size: 1.5rem;
  }

  .lw-offer-countdown__item {
    flex: 0 0 112px;
    width: 112px;
    height: auto;
    min-height: 101px;
    padding: 16.8px;
  }

  .lw-offer-countdown__num {
    font-size: 36px;
    line-height: 40px;
    margin-bottom: 4px;
  }

  .lw-spotlight--height-ratio .lw-spotlight__cta-wrap {
    margin-top: 3rem;
  }

  .lw-spotlight__btn {
    min-width: 14.5rem;
    min-height: 3.25rem;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.25rem;
    line-height: 1;
  }
}

@keyframes lw-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lw-pop-in {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lw-spotlight,
  .lw-spotlight-backdrop,
  .lw-spotlight__btn,
  .lw-spotlight-pill {
    animation: none !important;
    transition: none !important;
  }
}
