/* ==============================================
   ALUCON - ESTILOS PREMIUM
   Design harmonioso com efeitos modernos.
   Complementa o Tailwind CSS via CDN.
   ============================================== */

/* ==============================================
   1. FONTE E VARIÁVEIS GLOBAIS
   ============================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Paleta principal - tons harmoniosos */
  --brand: #c0222b;
  --brand-dark: #9a1b22;
  --brand-light: #e8444d;
  --dark: #0c1f28;
  --dark-mid: #132d3a;
  --dark-light: #1b4050;
  --accent: #25d366;
  --accent-dark: #1ebe5b;

  /* Neutros quentes */
  --surface: #fafafa;
  --surface-raised: #ffffff;
  --border: #e8e8e8;
  --text: #1a1a2e;
  --text-secondary: #5a5a72;
  --text-muted: #8e8ea0;

  /* Efeitos */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --shadow-brand: 0 8px 24px rgba(192,34,43,0.25);
  --shadow-accent: 0 8px 24px rgba(37,211,102,0.25);

  /* Foco acessibilidade */
  --focus-ring: #3b82f6;

  /* Transições */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==============================================
   2. RESET E BASE
   ============================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==============================================
   3. ACESSIBILIDADE
   ============================================== */

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  transition: top 0.3s var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

/* Foco global */
*:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}
*:focus:not(:focus-visible) {
  outline: none;
}

/* ==============================================
   4. HEADER - GLASS MORPHISM
   ============================================== */
.header-glass {
  background: rgba(12, 31, 40, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ==============================================
   5. HERO - GRADIENTE ANIMADO
   ============================================== */
.hero-bg {
  background: linear-gradient(135deg, #0c1f28 0%, #1b4050 40%, #132d3a 70%, #0c1f28 100%);
  position: relative;
  overflow: hidden;
}

/* Padrão decorativo sutil no hero */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(192,34,43,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(37,211,102,0.05) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(192,34,43,0.05) 0%, transparent 40%);
  pointer-events: none;
}

/* Partículas decorativas */
.hero-bg::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 5%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,34,43,0.06) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* ==============================================
   6. BARRA DE PESQUISA - EFEITO GLOW
   ============================================== */
.search-input {
  transition: all 0.4s var(--ease);
}

.search-input:focus {
  box-shadow: 0 0 0 3px rgba(192,34,43,0.15), 0 4px 20px rgba(0,0,0,0.1);
}

/* ==============================================
   7. CATEGORIAS - SCROLL HORIZONTAL
   ============================================== */
.nav-scroll::-webkit-scrollbar {
  display: none;
}
.nav-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Garante espaço extra à direita para o último botão não ser cortado */
.nav-scroll::after {
  content: '';
  flex-shrink: 0;
  width: 1px;
}

/* Botão de categoria */
.cat-btn {
  transition: all 0.3s var(--ease);
  position: relative;
}

.cat-btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: all 0.3s var(--ease);
  transform: translateX(-50%);
  border-radius: 1px;
}

.cat-btn:hover::after,
.cat-btn.active::after {
  width: 60%;
}

.cat-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  font-weight: 600;
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}

/* ==============================================
   8. CARDS DE PRODUTO - EFEITOS PREMIUM
   ============================================== */
.product-card {
  transition: all 0.4s var(--ease);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Brilho sutil no hover */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.6s var(--ease);
  z-index: 1;
  pointer-events: none;
}

.product-card:hover::before {
  left: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-card .card-img {
  transition: transform 0.5s var(--ease);
}

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

/* Botões do card */
.btn-details {
  transition: all 0.25s var(--ease);
}
.btn-details:hover {
  background: var(--dark);
  color: white;
  transform: translateY(-1px);
}

.btn-add {
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-add:hover {
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}

/* Feedback ao adicionar */
.btn-added {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-accent) !important;
}

/* ==============================================
   9. MODAIS - DESIGN PREMIUM
   ============================================== */
.modal-backdrop {
  background: rgba(12, 31, 40, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-panel {
  animation: modalIn 0.35s var(--ease-bounce) forwards;
}

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

/* Botão fechar modal */
.modal-close {
  transition: all 0.25s var(--ease);
}
.modal-close:hover {
  background: #fee2e2;
  color: var(--brand);
  transform: rotate(90deg);
}

/* ==============================================
   10. PAGINAÇÃO
   ============================================== */
.page-btn {
  transition: all 0.25s var(--ease);
}
.page-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}
.page-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}

/* ==============================================
   11. BADGE DO CARRINHO
   ============================================== */
@keyframes badgePop {
  0% { transform: scale(0.5); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.badge-pop {
  animation: badgePop 0.3s var(--ease-bounce);
}

/* ==============================================
   12. BOTÃO VOLTAR AO TOPO
   ============================================== */
.btn-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s var(--ease);
}
.btn-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.btn-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-brand);
}

/* ==============================================
   13. FOOTER
   ============================================== */
.footer-link {
  transition: all 0.25s var(--ease);
}
.footer-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ==============================================
   14. ANIMAÇÕES DE ENTRADA
   ============================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.anim-fadeInUp {
  animation: fadeInUp 0.5s var(--ease) forwards;
  opacity: 0;
}

.anim-fadeIn {
  animation: fadeIn 0.4s var(--ease) forwards;
  opacity: 0;
}

/* ==============================================
   15. PÁGINA SOBRE - ESTILOS ESPECÍFICOS
   ============================================== */
.about-card {
  transition: all 0.3s var(--ease);
  border: 1px solid var(--border);
}
.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.about-icon-box {
  transition: all 0.3s var(--ease);
}
.about-card:hover .about-icon-box {
  transform: scale(1.1) rotate(-5deg);
}

/* Timeline */
.timeline-dot {
  transition: all 0.3s var(--ease);
}
.timeline-dot:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(192,34,43,0.15);
}

/* ==============================================
   16. SCROLLBAR GLOBAL
   ============================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d1d1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b1b1b1; }

/* ==============================================
   17. PREFERÊNCIAS DE ACESSIBILIDADE
   ============================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .product-card, button, .cat-btn, .about-card {
    border: 2px solid ButtonText;
  }
}

/* ==============================================
   18. UTILITÁRIOS
   ============================================== */
.text-gradient {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
