/* ==========================================================================
   PORTAL NPS - REDE CUESTA SUPERMERCADOS (CSS DESIGN SYSTEM)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors - Brand Palette */
  --primary-color: #007f59;
  --primary-hover: #006043;
  --primary-light: rgba(0, 127, 89, 0.08);
  --primary-glow: rgba(0, 127, 89, 0.25);
  
  --secondary-color: #c5a059;
  --secondary-hover: #b28e46;
  --secondary-light: rgba(197, 160, 89, 0.1);
  
  --bg-primary: #f8faf7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f4ef;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #ffffff;
  
  --border-color: #e2e8f0;
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 20px -3px rgba(0, 127, 89, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 25px -5px rgba(0, 127, 89, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 20px 30px -10px rgba(0, 127, 89, 0.15);
  
  /* Fonts */
  --font-headings: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}

body {
  background: radial-gradient(circle at top right, rgba(0, 127, 89, 0.05) 0%, rgba(248, 250, 247, 0) 50%),
              radial-gradient(circle at bottom left, rgba(197, 160, 89, 0.04) 0%, rgba(248, 250, 247, 0) 50%),
              var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 60px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   CONTAINER & LAYOUT
   ========================================================================== */
.portal-container {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.portal-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.logo-wrapper {
  background-color: var(--bg-secondary);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  transition: transform var(--transition-fast);
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.logo-wrapper:hover {
  transform: translateY(-2px) scale(1.02);
}

.logo-img {
  height: 60px;
  width: auto;
}

.portal-title {
  font-family: var(--font-headings);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.portal-subtitle {
  font-family: var(--font-headings);
  font-size: 0.95rem;
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.portal-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ==========================================================================
   SEARCH & FILTERS
   ========================================================================== */
.search-filter-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--bg-primary);
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary-color);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none; /* Firefox */
}

.filter-pills::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.filter-btn {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 4px 10px rgba(0, 127, 89, 0.2);
}

/* ==========================================================================
   STORE LIST / CARDS
   ========================================================================== */
.stores-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 150px;
}

.store-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.store-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-color);
}

/* Store Image thumbnail */
.store-thumb-wrapper {
  width: 100px;
  height: 100px;
  min-width: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.store-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.store-card:hover .store-thumb {
  transform: scale(1.08);
}

/* Store details */
.store-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.store-city-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary-color);
  background-color: var(--secondary-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 2px;
}

.store-name {
  font-family: var(--font-headings);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.store-address {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.store-address-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--secondary-color);
}

/* Action button style inside card */
.btn-evaluate {
  background-color: var(--primary-color);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 127, 89, 0.15);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-evaluate svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.store-card:hover .btn-evaluate {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 12px rgba(0, 127, 89, 0.25);
}

.store-card:hover .btn-evaluate svg {
  transform: translateX(3px);
}

.btn-evaluate:active {
  transform: scale(0.97);
}

/* Empty search state */
.no-results {
  text-align: center;
  padding: 40px 20px;
  background-color: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.no-results-icon {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* Animating cards in/out */
.store-card.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

.store-card.fade-in {
  animation: cardFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* ==========================================================================
   MASCOT CORNER (ACOLHIMENTO)
   ========================================================================== */
.mascot-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-top: 10px;
  position: relative;
  overflow: visible;
}

.mascot-img-box {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-avatar {
  max-height: 80px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  margin-top: -15px; /* Makes mascot pop out of the card slightly */
}

.mascot-bubble {
  position: relative;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-main);
  flex: 1;
}

.mascot-bubble::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 10px 6px 0;
  border-style: solid;
  border-color: transparent var(--bg-tertiary) transparent transparent;
}

/* ==========================================================================
   EXTRA LINKS SECTION (LINKTREE PILLS)
   ========================================================================== */
.extra-links-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.extra-links-title {
  font-family: var(--font-headings);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 2px;
}

.btn-linktree {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border-color);
  transition: all var(--transition-fast);
}

.btn-linktree-white {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-linktree-white:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-linktree-gold {
  background-color: var(--secondary-color);
  color: var(--text-light);
  border-color: var(--secondary-color);
  box-shadow: 0 4px 6px -1px rgba(197, 160, 89, 0.2);
}

.btn-linktree-gold:hover {
  background-color: var(--secondary-hover);
  border-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(197, 160, 89, 0.3);
}

.btn-linktree-gold:active, .btn-linktree-white:active {
  transform: translateY(0);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.portal-footer {
  text-align: center;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.social-icon-btn svg {
  width: 20px;
  height: 20px;
}

.social-icon-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.social-icon-btn.instagram:hover {
  color: #e1306c;
  border-color: #fccc63;
  background-color: rgba(225, 48, 108, 0.05);
}

.social-icon-btn.facebook:hover {
  color: #1877f2;
  border-color: #1877f2;
  background-color: rgba(24, 119, 242, 0.05);
}

.social-icon-btn.whatsapp:hover {
  color: #25d366;
  border-color: #25d366;
  background-color: rgba(37, 211, 102, 0.05);
}

.copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.developer-credit {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.developer-credit img {
  height: 12px;
  width: auto;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.developer-credit:hover img {
  opacity: 0.9;
}

/* ==========================================================================
   MEDIA QUERIES (ADJUSTMENTS FOR VERY SMALL SCREENS)
   ========================================================================== */
@media (max-width: 480px) {
  body {
    padding: 24px 16px 40px;
  }
  
  .portal-container {
    gap: 20px;
  }
  
  .logo-wrapper {
    padding: 12px 18px;
    margin-bottom: 16px;
  }
  
  .logo-img {
    height: 48px;
  }
  
  .portal-title {
    font-size: 1.5rem;
  }
  
  .search-filter-wrapper {
    padding: 16px;
    gap: 12px;
  }
  
  .search-input {
    padding: 12px 12px 12px 40px;
    font-size: 0.9rem;
  }
  
  .search-icon {
    left: 12px;
    width: 18px;
    height: 18px;
  }
  
  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .store-card {
    padding: 12px;
    gap: 12px;
  }
  
  .store-thumb-wrapper {
    width: 75px;
    height: 75px;
    min-width: 75px;
  }
  
  .store-name {
    font-size: 0.95rem;
  }
  
  .store-address {
    font-size: 0.72rem;
  }
  
  .btn-evaluate {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .mascot-wrapper {
    padding: 12px;
    gap: 12px;
  }
  
  .mascot-avatar {
    max-height: 65px;
    margin-top: -10px;
  }
  
  .mascot-bubble {
    font-size: 0.8rem;
    padding: 8px 12px;
  }
  
  .btn-linktree {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}
