/* =========================================================
   BRIDGE PAGE - VITRINE DE ACHADINHOS SHOPEE
   Estilo Mobile-First, Ultra Rápido e de Alta Conversão
   ========================================================= */

:root {
  --bg-primary: #0A0E17;
  --bg-secondary: #121826;
  --card-bg: rgba(26, 34, 52, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --shopee-orange: #EE4D2D;
  --shopee-gradient: linear-gradient(135deg, #FF5722 0%, #EE4D2D 100%);
  --shopee-glow: rgba(238, 77, 45, 0.35);
  
  --green-badge: #10B981;
  --yellow-badge: #F59E0B;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px var(--shopee-glow);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* Background Ambient Glows */
.bg-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.22;
  z-index: 0;
}
.top-glow {
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: #FF5722;
}
.bottom-glow {
  bottom: 0;
  right: -50px;
  background: #10B981;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 480px;
  padding: 20px 16px 40px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Header Perfil */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.avatar-wrapper {
  position: relative;
  width: 88px;
  height: 88px;
  margin-bottom: 12px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--shopee-orange);
  box-shadow: 0 0 20px var(--shopee-glow);
  background-color: var(--bg-secondary);
}

.online-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background-color: #10B981;
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
}

.channel-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  background: linear-gradient(180deg, #FFFFFF 0%, #E2E8F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.channel-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 90%;
  margin-bottom: 12px;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 14px;
}

/* Botão Grupo VIP WhatsApp no Header */
.btn-vip-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: pulseGlow 2.5s infinite;
}

.btn-vip-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(37, 211, 102, 0.5);
}

.vip-icon-wrap {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vip-text-wrap {
  flex: 1;
  text-align: left;
}

.vip-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.vip-sub {
  display: block;
  font-size: 0.72rem;
  opacity: 0.9;
}

.vip-badge-pill {
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Floating Action Button (FAB) WhatsApp */
.fab-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.5);
  z-index: 90;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.fab-whatsapp:hover {
  transform: scale(1.1);
}

.fab-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: fabRipple 2s infinite;
  pointer-events: none;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.6); }
}

@keyframes fabRipple {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Banner Dica */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(238, 77, 45, 0.15) 0%, rgba(255, 87, 34, 0.08) 100%);
  border: 1px solid rgba(238, 77, 45, 0.3);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}
.alert-icon {
  font-size: 1.3rem;
}
.alert-text {
  font-size: 0.8rem;
  color: #F8FAFC;
  line-height: 1.35;
}

/* Barra de Pesquisa */
.search-section {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(18, 24, 38, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--shopee-orange);
  box-shadow: 0 0 16px var(--shopee-glow);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 10px;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.92rem;
  padding: 14px 0;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

/* Barra de Categorias */
.categories-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  background: rgba(26, 34, 52, 0.6);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
}

.cat-pill:hover, .cat-pill.active {
  background: var(--shopee-gradient);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--shopee-glow);
}

/* Resultados Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding: 0 4px;
}

/* Grade de Produtos (2 colunas no celular / moderno) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

/* Card do Produto */
.product-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(238, 77, 45, 0.4);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #FFFFFF;
  overflow: hidden;
}

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

.product-card:hover .card-img {
  transform: scale(1.05);
}

/* Badges sobre a foto */
.badge-num {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--shopee-orange);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.badge-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--green-badge);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

/* Detalhes do Card */
.card-details {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 0.68rem;
  color: var(--shopee-orange);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.3em;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
  margin-top: auto;
}

.card-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: #F8FAFC;
}

/* Botão de Compra Direta */
.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--shopee-gradient);
  color: #FFFFFF;
  border: none;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px var(--shopee-glow);
}

.btn-cta:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 15px var(--shopee-glow);
}

/* Estado Vazio */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--card-border);
  margin-bottom: 30px;
}
.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.btn-reset {
  background: var(--shopee-gradient);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
}

/* Rodapé */
.app-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.footer-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.footer-copy {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Modal de Detalhes */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: #151D2C;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #FFF;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.modal-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-badge-num {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--shopee-orange);
  color: #FFF;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.modal-info {
  padding: 20px;
}

.modal-category {
  font-size: 0.75rem;
  color: var(--shopee-orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFF;
  margin: 6px 0 12px;
  line-height: 1.35;
}

.modal-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: #10B981;
}

.modal-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 22px;
}

.btn-cta-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--shopee-gradient);
  color: #FFFFFF;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px var(--shopee-glow);
  transition: var(--transition-fast);
}

.btn-cta-modal:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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