/* Custom Modern Styling for Store KEYRA Storefront & Admin */

:root {
  --bg-light: #f8fafc;
  --text-light: #0f172a;
  --card-light: #ffffff;
  --border-light: #e2e8f0;
  --dot-color: rgba(148, 163, 184, 0.25);
  
  --bg-dark: #090d16;
  --text-dark: #f8fafc;
  --card-dark: #131b2e;
  --border-dark: #1e293b;
  --dot-color-dark: rgba(255, 255, 255, 0.08);
}

html {
  scroll-padding-top: 44px;
}

@media (min-width: 640px) {
  html {
    scroll-padding-top: 48px;
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Custom Key Icon Pattern Background inspired by Store KEYRA (Ultra subtle & compact) */
.dot-grid-bg {
  background-color: var(--bg-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='rgba(37,99,235,0.035)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='3.5'/%3E%3Cpath d='m10 13 9-9'/%3E%3Cpath d='m15.5 7.5 2.5 2.5'/%3E%3Cpath d='m17.5 5.5 2 2'/%3E%3C/svg%3E");
  background-size: 18px 18px;
}

.dark .dot-grid-bg {
  background-color: var(--bg-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='rgba(147,197,253,0.03)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='3.5'/%3E%3Cpath d='m10 13 9-9'/%3E%3Cpath d='m15.5 7.5 2.5 2.5'/%3E%3Cpath d='m17.5 5.5 2 2'/%3E%3C/svg%3E");
  background-size: 18px 18px;
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.dark .glass-panel {
  background: rgba(19, 27, 46, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.glass-tab {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Horizontal scroll without scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Pulse animation for active online dot */
@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.live-dot {
  animation: pulse-green 2s infinite;
}

/* Card hover micro-interaction */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.12);
}

.dark .product-card:hover {
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.6);
}

/* Strikethrough comparison price */
.price-comparison {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Smooth modal transition */
.modal-backdrop {
  backdrop-filter: blur(4px);
  transition: opacity 0.2s ease;
}

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

.ticker-track-container {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  position: relative;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.ticker-scroll {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: marqueeScroll 20s linear infinite !important;
  animation-play-state: running !important;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.ticker-scroll:hover,
.ticker-scroll:focus,
.ticker-scroll:active {
  animation-play-state: running !important;
}

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

.animate-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 16s linear infinite !important;
  animation-play-state: running !important;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.animate-marquee:hover,
.animate-marquee:focus,
.animate-marquee:active {
  animation-play-state: running !important;
}

/* Smooth catalog transitions & prevent layout shift glitch */
#marketplace-catalog-container {
  min-height: 350px;
  transition: opacity 0.15s ease-in-out;
}

.htmx-swapping #marketplace-catalog-container,
#marketplace-catalog-container.htmx-swapping {
  opacity: 0.65;
}

/* Video Anti-Download & Anti-Drag Protection */
video {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}


