@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');

:root {
  --background: 72 33% 97%;
  --foreground: 227 37% 24%;
  --card: 72 33% 97%;
  --card-foreground: 227 37% 24%;
  --popover: 0 0% 100%;
  --popover-foreground: 227 37% 24%;
  --primary: 227 37% 24%;
  --primary-foreground: 72 33% 97%;
  --secondary: 227 15% 90%;
  --secondary-foreground: 227 37% 24%;
  --muted: 72 15% 93%;
  --muted-foreground: 227 10% 50%;
  --accent: 227 20% 85%;
  --accent-foreground: 227 37% 24%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 100%;
  --border: 227 15% 88%;
  --input: 227 15% 88%;
  --ring: 227 37% 24%;
  --radius: 0.25rem;
  --gold: 40 60% 50%;
  --gold-foreground: 0 0% 100%;
}

.dark {
  --background: 227 37% 10%;
  --foreground: 72 33% 97%;
  --card: 227 37% 14%;
  --card-foreground: 72 33% 97%;
  --popover: 227 37% 14%;
  --popover-foreground: 72 33% 97%;
  --primary: 72 33% 97%;
  --primary-foreground: 227 37% 24%;
  --secondary: 227 20% 20%;
  --secondary-foreground: 72 33% 97%;
  --muted: 227 20% 20%;
  --muted-foreground: 227 10% 60%;
  --accent: 227 20% 25%;
  --accent-foreground: 72 33% 97%;
  --border: 227 20% 20%;
  --input: 227 20% 20%;
  --ring: 72 33% 97%;
  --gold: 40 60% 50%;
  --gold-foreground: 0 0% 100%;
}

* {
  border-color: hsl(var(--border));
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  overflow-x: clip;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Josefin Sans", sans-serif;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utilidad para toast notifications (si implementamos uno custom) */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 12px 24px;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  animation: fade-in-down 0.5s ease-out forwards;
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Dropdown for Brands */
/* Hero Home Background */
.hero-home {
  background-image: url('../public/assets/fumhub_white.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 768px) {
  .hero-home {
    background-image: url('../public/assets/landingpage_mobile.png');
    background-position: center top;
  }
}

/* Filter Controls Logic */
.search-priority {
  flex: 1 1 auto;
  min-width: 0;
}

.filter-fixed-width {
  width: 100%;
}

@media (min-width: 768px) {
  .search-priority {
    flex: 10 1 0%;
    min-width: 350px !important;
  }
  
  .filter-fixed-width {
    width: 160px !important;
    flex-shrink: 0 !important;
  }
}

/* Custom Animation for Hero elements */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  opacity: 0;
  animation: fade-in-up 0.8s ease-out forwards;
}

.brands-suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: hsl(var(--card) / 0.95);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  transition: all 0.2s ease;
  border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.suggestion-item:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  padding-left: 18px;
}

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

/* Medal Colors */
.text-gold {
  color: #FFD700;
}

.text-silver {
  color: #C0C0C0;
}

.text-bronze {
  color: #CD7F32;
}

/* Promo Announcement Bar */
.promo-bar {
  background: linear-gradient(90deg, #b8860b 0%, #daa520 50%, #b8860b 100%);
  color: white;
  text-align: center;
  padding: 8px 16px;
  /* Añadido padding lateral */
  font-size: 0.7rem;
  font-family: "Josefin Sans", sans-serif;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  z-index: 100;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
  animation: shimmer-gold 3s infinite linear;
  background-size: 200% auto;
}

@keyframes shimmer-gold {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.promo-bar p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #25D366;
  color: #fff;
  padding: 12px 20px 12px 14px;
  border-radius: 50px;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.40), 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
  max-width: calc(100vw - 56px);
}

.whatsapp-float:hover {
  background-color: #20ba5a;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.50), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-float svg {
  flex-shrink: 0;
  animation: whatsapp-pulse 2.5s infinite;
}

@keyframes whatsapp-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 20px;
    right: 16px;
    padding: 11px 16px 11px 12px;
    font-size: 0.65rem;
  }
}

/* Hardcoded Overrides for Brave/Safari Forced Dark Mode Contrast */
/* We use Hex here because algorithmic dark modes handle it better than HSL variables */
.bg-primary {
  background-color: #263154 !important;
}

.text-primary-foreground {
  color: #f7f8f2 !important;
}

.bg-background {
  background-color: #f7f8f2 !important;
}

.text-foreground {
  color: #263154 !important;
}

.border-primary {
  border-color: #263154 !important;
}

/* Ensure selected buttons in components.js always show text */
.variant-btn.bg-primary {
  color: #f7f8f2 !important;
}

.dark .bg-primary {
  background-color: #f7f8f2 !important;
}

.dark .text-primary-foreground {
  color: #263154 !important;
}

.dark .bg-background {
  background-color: #101524 !important;
}

.dark .text-foreground {
  color: #f7f8f2 !important;
}