/* Variables & Theme */
:root {
  --purple-dark: #2A0944;
  --purple-main: #4C1D95;
  --purple-light: #6D28D9;
  --purple-subtle: #F3E8FF;
  
  --orange-main: #FF6B00;
  --orange-hover: #E05D00;
  --orange-light: #FFF0E5;
  
  --yellow-main: #FFC700;
  --yellow-glow: #FFE885;

  --bg-color: #F8F6FC;
  --card-bg: #FFFFFF;
  --text-main: #1F1926;
  --text-muted: #6B7280;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(76, 29, 149, 0.06);
  --shadow-md: 0 8px 24px rgba(76, 29, 149, 0.1);
  --shadow-lg: 0 16px 36px rgba(76, 29, 149, 0.16);

  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-main) 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border-bottom: 2px solid var(--orange-main);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-link:hover .brand-logo {
  transform: scale(1.06) rotate(-2deg);
}

.social-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--orange-main);
  border-color: var(--orange-main);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.35);
}

.social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #3B0764 0%, #4C1D95 50%, #6D28D9 100%);
  color: #FFFFFF;
  padding: 2.5rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
}

.hero-content {
  max-width: 650px;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange-main);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, #FFFFFF, var(--yellow-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--yellow-main);
}

.stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero-persona-wrap {
  position: relative;
  z-index: 2;
}

.persona-img {
  width: 240px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.35));
  animation: floatPersona 4s ease-in-out infinite alternate;
}

@keyframes floatPersona {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(1.5deg); }
}

/* Main Container */
.main-container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  padding: 1.75rem 1.25rem 4rem;
  flex: 1;
}

/* Search & Filter Bar */
.controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: var(--purple-main);
  opacity: 0.6;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1rem 0.95rem 3.2rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  border: 2px solid rgba(76, 29, 149, 0.15);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--orange-main);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.15);
}

.categories-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.category-chip {
  background: var(--card-bg);
  color: var(--purple-main);
  border: 1.5px solid rgba(76, 29, 149, 0.15);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.category-chip:hover {
  border-color: var(--orange-main);
  color: var(--orange-main);
}

.category-chip.active {
  background: var(--orange-main);
  color: #FFFFFF;
  border-color: var(--orange-main);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.results-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

/* Status States */
.status-box {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-muted);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--purple-subtle);
  border-top-color: var(--orange-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Deals Grid */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Deal Card */
.deal-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(76, 29, 149, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.deal-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 0, 0.3);
}

.card-clickable-area {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-image-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background: #F8F6FC;
  overflow: hidden;
  border-bottom: 1px solid #F0F0F0;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.deal-card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #FF6B00 0%, #E00000 100%);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(224, 0, 0, 0.35);
  letter-spacing: 0.3px;
  z-index: 2;
}

.store-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(42, 9, 68, 0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.prices-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.2rem;
}

.price-original {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.price-current {
  font-size: 1.3rem;
  font-weight: 900;
  color: #059669;
  white-space: nowrap;
}

/* Coupon Box */
.coupon-box {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #FFFBEB;
  border: 1.5px dashed #F59E0B;
  border-radius: var(--radius-sm);
  padding: 4px 6px 4px 8px;
  margin-top: 0.25rem;
  min-width: 0; /* Previne estouro flex em telas pequenas */
}

.coupon-code {
  font-size: 0.75rem;
  font-weight: 800;
  color: #B45309;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.coupon-btn {
  background: #F59E0B;
  border: none;
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  min-width: 62px;
  text-align: center;
}

.coupon-btn:hover {
  background: #D97706;
}

.coupon-btn.copied {
  background: #059669;
}

.card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-footer {
  padding: 0 1rem 1rem;
  position: relative;
  z-index: 2;
}

.offer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  background: linear-gradient(135deg, var(--orange-main) 0%, var(--orange-hover) 100%);
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.65rem 0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
  transition: all 0.2s ease;
}

.offer-btn:hover {
  box-shadow: 0 6px 16px rgba(255, 107, 0, 0.4);
  transform: translateY(-1px);
}

/* Footer */
.app-footer {
  background: var(--purple-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 2.5rem 1.25rem;
  border-top: 3px solid var(--orange-main);
  text-align: center;
  font-size: 0.85rem;
}

.footer-content {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: 40px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--yellow-main);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Responsive Rules */
@media (max-width: 868px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content {
    margin: 0 auto;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-persona-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }
  .persona-img {
    width: 180px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 520px) {
  .deals-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .card-body {
    padding: 0.65rem;
  }
  .card-title {
    font-size: 0.8rem;
  }
  .price-current {
    font-size: 1.05rem;
  }
  .price-original {
    font-size: 0.7rem;
  }
  .coupon-box {
    padding: 3px 5px;
    gap: 4px;
  }
  .coupon-code {
    font-size: 0.68rem;
  }
  .coupon-btn {
    font-size: 0.63rem;
    padding: 4px 6px;
    min-width: 56px;
  }
  .card-footer {
    padding: 0 0.65rem 0.65rem;
  }
  .offer-btn {
    font-size: 0.78rem;
    padding: 0.5rem 0;
  }
  .social-btn span {
    display: none;
  }
  .social-btn {
    padding: 6px;
  }
}

/* Institutional & Legal Pages */
.legal-page-card, .contact-page-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(76, 29, 149, 0.08);
  max-width: 900px;
  margin: 0 auto;
}

.legal-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--purple-dark);
  margin-bottom: 0.25rem;
}

.legal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.legal-nav-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid #F0F0F0;
  margin-bottom: 2rem;
}

.tab-link {
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.tab-link:hover, .tab-link.active {
  color: var(--orange-main);
  border-bottom-color: var(--orange-main);
}

.legal-section {
  scroll-margin-top: 100px;
}

.legal-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--purple-main);
  margin-bottom: 1rem;
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.25rem 0 0.5rem;
}

.legal-section p {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.legal-section ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-divider {
  border: 0;
  height: 1px;
  background: #E5E7EB;
  margin: 2.5rem 0;
}

/* Contact Form */
.contact-header {
  margin-bottom: 1.75rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid rgba(76, 29, 149, 0.15);
  border-radius: var(--radius-sm);
  background: #FAFAFA;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--orange-main);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.submit-btn {
  background: linear-gradient(135deg, var(--orange-main) 0%, var(--orange-hover) 100%);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 800;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.3);
  transition: all 0.2s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.4);
}

.contact-feedback {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.contact-feedback.success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

