/*
 * Enter any custom CSS here.
 * This file will not be overwritten by theme updates.
*/

/* =========================================================
   Liwo — site-wide black theme + grid background
   The grid lines run all the way down the page via a
   fixed full-viewport layer behind all content.
   ========================================================= */

html {
  background-color: #000000;
}

/* Fixed grid layer behind everything, visible the full page down */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #000000;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

/* Let the grid show through the page body (disable the old purple grid) */
body {
  background-color: transparent !important;
  background-image: none !important;
}

/* Content sections become transparent so the grid shows through them */
.bg-block-primary,
.bg-block-secondary {
  background-color: transparent !important;
}

/* Search modal: make room for the close (X) button in the header */
.search-modal .modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-modal .modal-header .searchbar {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.search-modal .modal-header .btn-close {
  flex: 0 0 auto;
  margin: 0;
  opacity: 0.85;
}

.search-modal .modal-header .btn-close:hover {
  opacity: 1;
}

/* =========================================================
   Black-theme contrast fixes
   (theme_color is white, so a couple of pro.css rules render
   white-on-white — override them here since custom.css loads
   after pro.css and is not overwritten by theme updates.)
   ========================================================= */

/* Product badges: white bg + white text = invisible. Use black text. */
.products .card .card-img-top .badges div {
  color: #000000;
}

/* Status cards: 50% white panel washed out the white title.
   Use a subtle translucent dark card so the white text reads. */
.status-card {
  background: rgba(255, 255, 255, 0.05);
}

/* Cart count badge: white bg (var(--cl-accent)) + white text = invisible.
   Use black text so the number reads on the white circle. */
.navbar .cart .btn .count {
  color: #000000;
}

/* Product page badges: same white-on-white issue as the cards. */
.product-wrapper .badges div {
  color: #000000;
}

/* Terms / Privacy / policy editor text: ensure it reads on the dark card. */
.editor {
  color: #ffffff;
}

/* Customer dashboard sidebar: the active nav-pill uses the white theme
   accent as its background, and Bootstrap's default active text color is
   also white -> invisible white-on-white. Force dark text on the active
   pill so the current page reads (matches the white-pill / dark-text look
   used elsewhere in the theme). */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #000000;
}

/* =========================================================
   Liwo - interactive effects layer
   Paired with assets/custom.js. Everything here degrades
   gracefully: if JS never runs, content stays fully visible.
   ========================================================= */

@keyframes liwoSkeleton {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes liwoToastIn {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes annMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Scroll reveal ---------- */
.js-anim .reveal-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Spotlight hover on product cards ---------- */
.product-card {
  position: relative;
}
.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 0%),
    rgba(255, 255, 255, 0.14),
    transparent 60%
  );
  z-index: 1;
}
.product-card:hover::after {
  opacity: 1;
}
/* keep the real content above the spotlight overlay */
.product-card .product-image,
.product-card .product-content {
  position: relative;
  z-index: 2;
}

/* ---------- Product image skeleton ---------- */
.product-image.img-loading img {
  opacity: 0;
}
.product-image.img-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: liwoSkeleton 1.2s ease-in-out infinite;
}

/* ---------- Stock urgency pill ---------- */
.stock-urgency {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffd7a1;
  background: rgba(255, 145, 0, 0.12);
  border: 1px solid rgba(255, 165, 0, 0.45);
}
.stock-urgency::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffae42;
  box-shadow: 0 0 0 0 rgba(255, 174, 66, 0.6);
  animation: liwoPulse 1.8s ease-out infinite;
}
@keyframes liwoPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 174, 66, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(255, 174, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 174, 66, 0); }
}

/* ---------- Quick view ---------- */
.quick-view-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  cursor: pointer;
}
.product-card:hover .quick-view-btn,
.quick-view-btn:focus-visible {
  opacity: 1;
  transform: translateY(0);
}
.quick-view-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.55);
}
@media (max-width: 768px) {
  .quick-view-btn {
    opacity: 1;
    transform: none;
  }
}

.quickview-modal .modal-content {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.25rem;
  color: #fff;
  overflow: hidden;
}
.quickview-modal .qv-image {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.quickview-modal .qv-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.quickview-modal .qv-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.quickview-modal .qv-price {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.quickview-modal .qv-stock {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.25rem;
}
.quickview-modal .qv-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  color: #000;
  background: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quickview-modal .qv-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.15);
  color: #000;
}

/* ---------- Announcement marquee + dismiss ---------- */
.announcement {
  position: relative;
  overflow: hidden;
}
.announcement .announcement-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.announcement.announcement-overflow .announcement-inner {
  justify-content: flex-start;
  width: max-content;
  flex-wrap: nowrap;
  gap: 4rem;
  animation: annMarquee 22s linear infinite;
}
.announcement.announcement-overflow:hover .announcement-inner {
  animation-play-state: paused;
}
.announcement .announcement-track {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.announcement-close {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  color: currentColor;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.announcement-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- Recent activity toast ---------- */
.activity-toast {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1080;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  color: #fff;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.activity-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.activity-toast-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: #1edd8a;
  background: rgba(30, 221, 138, 0.15);
}
.activity-toast-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.activity-toast-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-toast-meta {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
}
@media (max-width: 576px) {
  .activity-toast {
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
  }
}

/* ---------- Back to top ---------- */
.liwo-back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: #fff;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, border-color 0.2s ease;
}
.liwo-back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.liwo-back-to-top:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ---------- Feedback rail (reviews) ---------- */
.feedbacks .row {
  scroll-snap-type: x mandatory;
}
.feedbacks .testimonial {
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  scroll-snap-align: start;
}
.feedbacks .testimonial:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Cart page polish (best-effort, class-scoped) ---------- */
.cart-page .card,
.cart-page .cart-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
}

/* Empty-cart state: center it and give it room to breathe */
.cart-page .cart-empty,
.cart-page .empty-cart,
.cart-page .empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  min-height: 40vh;
  padding: 2.5rem 1.25rem;
  color: rgba(255, 255, 255, 0.85);
}

.cart-page .cart-empty svg,
.cart-page .empty-cart svg,
.cart-page .empty svg {
  width: 3.5rem;
  height: 3.5rem;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

/* The "continue shopping" / primary action inside an empty cart */
.cart-page .cart-empty a,
.cart-page .empty-cart a,
.cart-page .empty a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  color: #000;
  background: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cart-page .cart-empty a:hover,
.cart-page .empty-cart a:hover,
.cart-page .empty a.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.15);
  color: #000;
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .product-image.img-loading::after,
  .stock-urgency::before,
  .announcement.announcement-overflow .announcement-inner {
    animation: none !important;
  }
}