/* ═══════════════════════════════════════════════════
   Tirze Pharma — Global Styles
   ═══════════════════════════════════════════════════ */
:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --dark: #0f0a1a;
  --dark-card: #1a1128;
  --dark-surface: #231836;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(124, 58, 237, 0.2);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

a { color: var(--primary-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

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

/* ─── Navbar ─────────────────────────────────── */
.navbar {
  background: rgba(15, 10, 26, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  width: 100%;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  padding: 0 1.5rem;
}
.navbar-brand {
  font-size: 1.2rem; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar-brand span { -webkit-text-fill-color: initial; }

/* Desktop links */
.navbar-links {
  display: flex; align-items: center; gap: 1.2rem;
}
.navbar-links a { color: var(--text); font-weight: 500; font-size: .88rem; }
.navbar-links a:hover { color: var(--primary-light); }

/* Hamburger button */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 8px; flex-direction: column; gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-cart {
  position: relative; background: var(--dark-surface);
  padding: 6px 12px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
}

/* WhatsApp link in navbar */
.nav-whatsapp {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: #25D366;
  transition: all .2s; flex-shrink: 0;
}
.nav-whatsapp:hover {
  background: #1da851; transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(37,211,102,.35);
}
.nav-whatsapp img { width: 22px; height: 22px; display: block; }

/* WhatsApp in mobile menu */
.nav-whatsapp-mobile {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border-radius: 10px;
  background: rgba(37,211,102,.12); color: #25D366;
  font-weight: 600; font-size: .95rem;
  transition: all .2s;
}
.nav-whatsapp-mobile:hover {
  background: rgba(37,211,102,.22);
}
.nav-whatsapp-mobile img {
  width: 20px; height: 20px; flex-shrink: 0;
}
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--primary); color: #fff;
  font-size: .65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Mobile menu overlay */
.nav-overlay {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0, 0.6); z-index: 999;
  backdrop-filter: blur(4px);
}
.nav-overlay.open { display: block; }

/* Mobile slide-in menu */
.nav-mobile {
  display: none;
  position: fixed; top: 64px; right: 0; bottom: 0;
  width: 280px; max-width: 80vw;
  background: var(--dark-card);
  border-left: 1px solid var(--border);
  z-index: 1001;
  flex-direction: column;
  padding: 1.5rem;
  gap: 0;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
}
.nav-mobile.open {
  transform: translateX(0);
}
.nav-mobile a {
  color: var(--text); font-weight: 500; font-size: 1rem;
  padding: 14px 0;
  border-bottom: 1px solid rgba(124,58,237,0.1);
  display: flex; align-items: center; gap: 10px;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--primary-light); }
.nav-mobile .nav-cart {
  background: var(--dark-surface);
  padding: 10px 14px; border-radius: 8px;
  justify-content: center; margin-bottom: 4px;
}
.nav-mobile-divider {
  height: 1px; background: var(--border);
  margin: 8px 0;
}

/* ─── Hero ────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--dark) 0%, #1a0f2e 50%, #0d1b2a 100%);
  padding: 4rem 1.5rem; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(124,58,237,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(14,165,233,0.1) 0%, transparent 50%);
  animation: heroFloat 12s ease-in-out infinite;
}
@keyframes heroFloat { 0%,100%{transform:translate(0,0)} 50%{transform:translate(30px,-20px)} }
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-block; background: rgba(124,58,237,0.2);
  border: 1px solid var(--border); padding: 6px 16px; border-radius: 20px;
  font-size: .8rem; color: var(--primary-light); margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(1.6rem, 5vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.hero h1 .highlight { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { color: var(--text-muted); font-size: clamp(.9rem, 2.5vw, 1.1rem); margin-bottom: 2rem; max-width: 550px; margin-left: auto; margin-right: auto; }

/* ─── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: .95rem;
  border: none; cursor: pointer; transition: all .3s;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(124,58,237,0.6); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ─── Section ─────────────────────────────────── */
.section { padding: 4rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 700; text-align: center; margin-bottom: 2rem; }
.section-subtitle { color: var(--text-muted); text-align: center; margin-top: -1rem; margin-bottom: 2rem; }

/* ─── Product Grid ────────────────────────────── */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; transition: all .3s;
  position: relative;
}
.product-card:hover {
  border-color: var(--primary); transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.2);
}
.product-card-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 6px;
}
.product-card-img {
  width: 100%; height: 160px; object-fit: contain;
  margin-bottom: 1rem; border-radius: 8px;
  background: var(--dark-surface); display: flex; align-items: center; justify-content: center;
}
.product-card-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.product-card-dose { color: var(--text-muted); font-size: .85rem; margin-bottom: 12px; }
.product-card-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.product-card-price .current { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.product-card-price .old { font-size: .9rem; color: var(--text-muted); text-decoration: line-through; }
.product-card-stock { font-size: .75rem; color: var(--success); margin-bottom: 12px; }
.product-card-stock.out { color: var(--danger); }

/* ─── Trust Section ───────────────────────────── */
.trust-section { background: var(--dark-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem;
}
.trust-item { text-align: center; }
.trust-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.trust-item h3 { font-size: 1rem; margin-bottom: 4px; }
.trust-item p { color: var(--text-muted); font-size: .85rem; }

/* ─── FAQ ─────────────────────────────────────── */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden;
}
.faq-q {
  padding: 1.2rem 1.5rem; cursor: pointer; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .2s;
}
.faq-q:hover { background: var(--dark-surface); }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--primary-light); }
.faq-q.active::after { content: '−'; }
.faq-a { padding: 0 1.5rem; max-height: 0; overflow: hidden; transition: all .3s; color: var(--text-muted); }
.faq-a.open { padding: 1rem 1.5rem; max-height: 300px; border-top: 1px solid var(--border); }

/* ─── Forms ───────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; font-size: .9rem; }
.form-control {
  width: 100%; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--dark-card);
  color: var(--text); font-size: .95rem; transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.2); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-error { color: var(--danger); font-size: .8rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ─── Alerts ──────────────────────────────────── */
.alert {
  padding: 12px 20px; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem;
}
.alert-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-danger { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.15); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info { background: rgba(14,165,233,0.15); border: 1px solid rgba(14,165,233,0.3); color: #7dd3fc; }

/* ─── Footer ──────────────────────────────────── */
.footer {
  background: var(--dark-card); border-top: 1px solid var(--border);
  padding: 2rem 1.5rem; text-align: center; color: var(--text-muted); font-size: .8rem;
  word-wrap: break-word;
}
.footer a { color: var(--primary-light); }

/* ─── Cards / Auth ────────────────────────────── */
.auth-container { max-width: 440px; margin: 3rem auto; padding: 0 1rem; }
.auth-card {
  background: var(--dark-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
}
.auth-card h2 { text-align: center; margin-bottom: 1.5rem; }
.auth-links { text-align: center; margin-top: 1rem; font-size: .9rem; }
.auth-links a { color: var(--primary-light); }

/* ─── Page Header ─────────────────────────────── */
.page-header {
  background: var(--dark-card); border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem; text-align: center;
}
.page-header h1 { font-size: clamp(1.2rem, 4vw, 1.6rem); font-weight: 700; }

/* ─── Tables ──────────────────────────────────── */
.table-responsive {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
table {
  width: 100%; border-collapse: collapse;
  min-width: 500px;
}
table th, table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
table th {
  background: var(--dark-surface); color: var(--primary-light);
  font-weight: 600; white-space: nowrap;
}
table td { color: var(--text); }
table tr:hover td { background: rgba(124,58,237,0.05); }

/* ─── Utilities ───────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; } .justify-between { justify-content: space-between; } .items-center { align-items: center; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.d-none { display: none; }
.w-100 { width: 100%; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .navbar-inner { padding: 0 1rem; height: 56px; }
  .navbar-brand { font-size: 1rem; }
  .hero { padding: 2rem 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .section { padding: 2rem 1rem; }
  .products-grid { grid-template-columns: 1fr; gap: 1rem; }
  .product-card { padding: 1rem; }
  .product-card-img { height: 120px; }
  .trust-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 1rem; }
  .auth-container { margin: 1.5rem auto; }
  .auth-card { padding: 1.5rem; }
  .btn { padding: 10px 20px; font-size: .9rem; }
  .btn-lg { padding: 14px 28px; font-size: .95rem; }
  .form-control { padding: 10px 14px; font-size: .9rem; }
  table th, table td { padding: 8px 10px; font-size: .8rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .navbar-inner { padding: 0 1rem; }
  .hero { padding: 3rem 1.5rem; }
  .section { padding: 3rem 1.5rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { padding: 1.5rem 1rem; }
}

@media (min-width: 769px) {
  .nav-mobile { display: none !important; }
  .nav-overlay { display: none !important; }
}

/* ─── Frete Badge ─────────────────────────────── */
.frete-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(124,58,237,0.1) 100%);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6ee7b7;
  font-size: .7rem; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  white-space: nowrap;
}
.frete-badge-card {
  margin-bottom: 10px;
  font-size: .68rem;
}
