/* ==========================================================================
   RRRgadget (NexusTech) - Production Design System & Storefront Stylesheet
   ========================================================================== */

/* 1. Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* 2. CSS Custom Properties / Root Tokens */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Theme Accents */
  --color-brand-cyan: #06b6d4;
  --color-brand-cyan-hover: #0891b2;
  --color-deal-rose: #f43f5e;
  --color-success-emerald: #10b981;
  --color-warning-amber: #f59e0b;
}

/* 3. Base Elements */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: #ffffff;
  color: #171717;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.dark body {
  background-color: #0c0e14;
  color: #f3f4f6;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

code, kbd, samp, pre, .font-mono {
  font-family: var(--font-mono);
}

/* 4. Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f7f7f5;
}

html.dark ::-webkit-scrollbar-track {
  background: #0c0e14;
}

::-webkit-scrollbar-thumb {
  background: #d4d4d4;
  border-radius: 9999px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #282d3d;
}

::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #3c435a;
}

/* Hide scrollbar utility for horizontal sliders / chips */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Thin variant */
.scrollbar-thin::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

/* 5. Keyframe Animations */

/* Toast Slide In / Out */
@keyframes toastSlideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toastFadeOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(12px);
    opacity: 0;
  }
}

.toast-animate {
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-leave {
  animation: toastFadeOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Continuous Marquee Animation */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

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

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marqueeScroll 25s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

.animate-marquee-reverse {
  display: flex;
  width: max-content;
  animation: marqueeScrollReverse 25s linear infinite;
}

.animate-marquee-reverse:hover {
  animation-play-state: paused;
}

.animate-marquee-fast {
  animation-duration: 15s;
}

.animate-marquee-slow {
  animation-duration: 40s;
}

/* Pulse Glow & Shimmer */
@keyframes pulseSubtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

.animate-pulse-subtle {
  animation: pulseSubtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.shimmer-wrapper {
  position: relative;
  overflow: hidden;
}

.shimmer-wrapper::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: shimmer 2s infinite;
  content: '';
}

/* 6. Drawer & Modal Transitions */
.drawer-backdrop {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-panel {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Slide over helpers */
.slide-over-enter {
  transform: translateX(100%);
}
.slide-over-enter-active {
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 7. Card Hover Effects & Micro-interactions */
.card-hover-glow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.card-hover-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.08), 0 6px 12px -4px rgba(0, 0, 0, 0.04);
}

.card-hover-glow-cyan:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -6px rgba(6, 182, 212, 0.25), 0 6px 12px -4px rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
}

.card-hover-glow-rose:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -6px rgba(244, 63, 94, 0.25), 0 6px 12px -4px rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
}

/* 8. Badge Styles & Utility Tokens */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-default {
  background-color: #171717;
  color: #ffffff;
}

.badge-deal {
  background-color: #e11d48;
  color: #ffffff;
}

.badge-new {
  background-color: #ecfeff;
  color: #0e7490;
  border: 1px solid #cffafe;
}

.badge-bestseller {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-instock {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-outstock {
  background-color: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.badge-sku {
  font-family: var(--font-mono);
  background-color: #f5f5f4;
  color: #57534e;
  border: 1px solid #e7e5e4;
  font-weight: 500;
}

/* 9. Utility Classes */
.border-subtle {
  border-color: rgba(0, 0, 0, 0.08);
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.backdrop-blur-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Payment selector active states */
.payment-option-card {
  transition: all 0.2s ease-in-out;
}

.payment-option-card.active {
  border-color: #171717;
  background-color: #fafafa;
  box-shadow: 0 0 0 2px #171717;
}

/* Clickable copy element feedback */
.copy-trigger {
  position: relative;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.copy-trigger:active {
  transform: scale(0.97);
}

/* Glassmorphism helpers */
.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-panel-dark {
  background: rgba(23, 23, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   Ottghor-Style Universal Searchbar & Autocomplete Dropdown
   ========================================================================== */
.search-input-wrapper {
  position: relative !important;
  width: 100% !important;
}

.search-clear-btn {
  position: absolute !important;
  right: 36px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: #e2e8f0;
  color: #64748b;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all 0.15s ease;
  z-index: 20 !important;
}

html.dark .search-clear-btn {
  background: #282d3d;
  color: #94a3b8;
}

.search-clear-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

html.dark .search-clear-btn:hover {
  background: #3b4259;
  color: #ffffff;
}

.search-submit-btn {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 20 !important;
}

/* Dropdown Container */
.search-autocomplete-dropdown {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.06);
  z-index: 1000 !important;
  overflow: hidden;
  display: none;
  max-height: 420px;
  animation: searchDropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark .search-autocomplete-dropdown {
  background: #141721;
  border: 1px solid #282d3d;
  box-shadow: 0 20px 40px -6px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

@keyframes searchDropdownFade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-results-header {
  padding: 10px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #f1f5f9;
}

html.dark .search-results-header {
  border-color: #282d3d;
  color: #64748b;
}

.search-results-list {
  max-height: 330px;
  overflow-y: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.15s ease;
}

html.dark .search-result-item {
  border-color: #1b1f2d;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item.active-item {
  background: #f8fafc;
}

html.dark .search-result-item:hover, html.dark .search-result-item.active-item {
  background: #1b1f2d;
}

.search-result-thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

html.dark .search-result-thumb {
  background: #1b1f2d;
  border-color: #282d3d;
}

.search-result-thumb-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(249, 87, 12, 0.15) 0%, rgba(249, 87, 12, 0.05) 100%);
  color: #f9570c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid rgba(249, 87, 12, 0.2);
}

.search-result-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark .search-result-title {
  color: #f3f4f6;
}

.search-result-category {
  font-size: 11px;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark .search-result-category {
  color: #94a3b8;
}

.search-result-price {
  font-size: 12px;
  font-weight: 700;
  color: #f9570c;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.search-result-empty {
  padding: 24px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

html.dark .search-result-empty {
  color: #94a3b8;
}

.search-result-loading {
  padding: 18px 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

html.dark .search-result-loading {
  color: #94a3b8;
}

.search-view-all-btn {
  display: block;
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #f9570c;
  background: #fff7ed;
  border-top: 1px solid #ffedd5;
  transition: background 0.15s ease;
  text-decoration: none;
}

html.dark .search-view-all-btn {
  background: rgba(249, 87, 12, 0.1);
  border-color: rgba(249, 87, 12, 0.2);
  color: #fb923c;
}

.search-view-all-btn:hover {
  background: #ffedd5;
}

html.dark .search-view-all-btn:hover {
  background: rgba(249, 87, 12, 0.2);
}


