/* ========== RESET & VARIÁVEIS ========== */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #27397c;
  --primary-light: #2f3f7e;
  --primary-dark: #121f44;
  --secondary: #e8b13e;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05);
  --shadow-md: 0 8px 24px rgba(0,20,60,.08);
  --shadow-lg: 0 20px 32px rgba(0,20,60,.12);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* ========== LOADER ========== */
.loader-overlay {
  position: fixed; inset: 0; background: var(--bg-light);
  z-index: 9999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity .35s ease, visibility .35s ease;
}
.loader-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 5px solid rgba(39,57,124,.15);
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-overlay p { color: var(--primary-dark); font-weight: 600; }

/* ========== TOP BAR ========== */
.topbar { background: var(--primary-dark); color: rgba(255,255,255,.9); font-size: .8rem; padding: 8px 0; }
.topbar-inner { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; text-align: center; }
@media (min-width: 640px) {
  .topbar { font-size: .85rem; }
  .topbar-inner { justify-content: space-between; text-align: left; }
}
.topbar-contacts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.topbar-contacts span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-contacts .sep { opacity: .3; margin: 0 2px; }
.topbar-access a {
  color: #fff; text-decoration: none; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: color .2s;
}
.topbar-access a:hover { color: var(--secondary); }

/* ========== HEADER / NAV ========== */
.header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-height: 52px;
}
.logo-img img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: none; min-width: 0; }
@media (min-width: 640px) { .brand-text { display: block; } }
.brand-text h2 { color: var(--primary); font-size: 1.05rem; font-weight: 800; line-height: 1.2; }
.brand-text span { display: block; font-size: .65rem; font-weight: 500; color: var(--text-light); }

.nav-menu {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex: 1;
  list-style: none;
}
.nav-menu > li > a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  transition: color .2s;
}
.nav-menu > li > a:hover { color: var(--primary); }

.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; }
.dropdown-toggle svg { width: 12px; height: 12px; transition: transform .25s ease; }
.dropdown.open .dropdown-toggle svg { transform: rotate(180deg); }
@media (min-width: 1024px) {
  .dropdown:hover .dropdown-toggle svg { transform: rotate(180deg); }
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,20,60,.14);
  min-width: 220px;
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  z-index: 60;
}
@media (min-width: 1024px) {
  .dropdown:hover .dropdown-menu,
  .dropdown.open .dropdown-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}
.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: .88rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.dropdown-menu a:hover { background: #f1f5ff; color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 14px; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 1024px) { .header-actions { margin-left: 0; } }
.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--secondary); color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }
.badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--danger);
  color: #fff;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-pill);
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  border: 2px solid #fff;
}

.nav-cta { display: none; }
@media (min-width: 1024px) { .nav-cta { display: block; } }
.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--primary-dark);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border: 2px solid var(--secondary);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.btn-nav-cta:hover { background: transparent; color: var(--secondary); }

.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  color: var(--primary);
  border-radius: 8px;
}
.mobile-menu-btn svg { width: 24px; height: 24px; }
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }

/* ========== CORREÇÃO: esconder CTA mobile no desktop ========== */
.mobile-cta-wrap { display: none !important; }

/* ========== NAV MOBILE ========== */
@media (max-width: 1023.98px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px; right: -16px;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    box-shadow: 0 12px 28px rgba(0,20,60,.12);
    border-top: 1px solid var(--border);
    gap: 0;
    z-index: 40;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-menu.active { display: flex; }
  .nav-menu > li { width: 100%; }
  .nav-menu > li > a:not(.btn-nav-cta) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 4px;
    border-bottom: 1px solid #eef2f7;
    font-size: .95rem;
  }
  .nav-menu .dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 0 0 16px;
    background: #f9fafb;
    min-width: auto;
  }
  .nav-menu .dropdown.open .dropdown-menu { display: block; }
  .nav-menu .dropdown-menu a {
    padding: 11px 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: .85rem;
    white-space: normal;
  }
  .nav-menu .dropdown-divider { display: none; }

  /* Mostra o CTA mobile só no mobile */
  .mobile-cta-wrap {
    display: block !important;
    width: 100%;
    margin-top: 10px;
    padding: 0;
  }
  .mobile-cta-wrap .btn-nav-cta {
    display: flex;
    width: 100%;
    padding: 12px 20px;
  }
}

/* ========== HERO ========== */
.hero-section {
  padding: 20px 0 12px;
  background: linear-gradient(180deg, #eef3ff 0%, #f8fafc 100%);
}
.hero-slider {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid #dbe3f8;
  min-height: 340px;
}
.hero-slide {
  display: none;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 24px;
  color: #fff;
  min-height: 340px;
  align-items: center;
}
.hero-slide.active { display: grid; animation: heroFade .35s ease; }
@keyframes heroFade { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@media (min-width: 1024px) {
  .hero-slide { grid-template-columns: 1.1fr .9fr; padding: 34px; }
}
.hero-slide-bg1 { background: radial-gradient(circle at 18% 16%, #5676df 0%, #27397c 55%, #121f44 100%); }
.hero-slide-bg2 { background: radial-gradient(circle at 78% 10%, #edbf5d 0%, #9d6d12 48%, #3e2a06 100%); }
.hero-slide-bg3 { background: radial-gradient(circle at 80% 20%, #4dc6b8 0%, #146b62 52%, #08342f 100%); }

.hero-kicker {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.35);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero-title { font-size: 1.35rem; line-height: 1.15; font-weight: 800; margin-bottom: 12px; }
@media (min-width: 640px) { .hero-title { font-size: 1.8rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 2.3rem; } }
.hero-copy { font-size: .95rem; opacity: .95; margin-bottom: 16px; max-width: 560px; }
.hero-price { font-size: 1.7rem; font-weight: 900; margin-bottom: 16px; }
@media (min-width: 640px) { .hero-price { font-size: 2rem; } }
.hero-price small { font-size: .9rem; font-weight: 500; opacity: .88; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn-primary, .hero-btn-ghost {
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-weight: 800;
  font-size: .88rem;
  transition: background .2s, color .2s;
}
.hero-btn-primary { background: #fff; color: var(--primary-dark); border: 2px solid #fff; }
.hero-btn-primary:hover { background: transparent; color: #fff; }
.hero-btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.9); }
.hero-btn-ghost:hover { background: rgba(255,255,255,.15); }

.hero-media { display: none; }
@media (min-width: 1024px) { .hero-media { display: block; } }
.hero-media img {
  width: 100%; max-width: 460px; height: 260px;
  object-fit: cover; border-radius: 16px;
  border: 2px solid rgba(255,255,255,.45);
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.hero-dots {
  position: absolute;
  left: 16px; bottom: 16px;
  display: flex; gap: 7px; z-index: 5;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transition: background .2s;
}
.hero-dot.active { background: #fff; }

.hero-controls {
  position: absolute;
  right: 12px; bottom: 12px;
  display: flex; gap: 8px; z-index: 5;
}
.hero-arrow {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.hero-arrow:hover { background: rgba(0,0,0,.45); }
.hero-arrow svg { width: 18px; height: 18px; }

/* ========== PAGE TITLE ========== */
.page-title { padding: 24px 0 8px; }
.page-title h1 { font-size: 1.6rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; }
@media (min-width: 640px) { .page-title h1 { font-size: 2rem; } }
@media (min-width: 1024px) { .page-title h1 { font-size: 2.2rem; } }
.page-title p { color: var(--text-light); font-size: .95rem; }
@media (min-width: 640px) { .page-title p { font-size: 1.05rem; } }

/* ========== FILTERS ========== */
.filters-section { padding: 16px 0; }
.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
@media (min-width: 640px) { .filter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .filter-grid { grid-template-columns: repeat(4, 1fr); } }
.filter-item label {
  font-weight: 600;
  font-size: .85rem;
  display: block;
  margin-bottom: 6px;
  color: var(--text-dark);
}
.filter-item select, .filter-item input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: .9rem;
  color: var(--text-dark);
  transition: border-color .2s, box-shadow .2s;
}
.filter-item select:focus, .filter-item input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39,57,124,.1);
}

.modalidade-tabs {
  display: flex;
  gap: 22px;
  margin: 18px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.modalidade-tabs::-webkit-scrollbar { display: none; }
.modalidade-tabs span {
  cursor: pointer;
  padding: 6px 0;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-dark);
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.modalidade-tabs span.active { border-bottom-color: var(--secondary); color: var(--primary); }

.ordenar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ordenar span { font-size: .85rem; color: var(--text-light); }
.ordenar select {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #fff;
  font-size: .85rem;
}

/* ========== COURSES GRID ========== */
.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 24px 0;
  scroll-margin-top: 90px;
}
@media (min-width: 640px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .courses-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.course-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-card.highlight-focus {
  animation: cardPulse .5s ease-in-out 2;
  box-shadow: 0 0 0 3px var(--secondary), 0 14px 28px rgba(0,20,60,.14);
  border-color: var(--secondary);
}
@keyframes cardPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }

.card-image { width: 100%; height: 176px; object-fit: cover; }
.card-header { padding: 16px 20px 8px; }
.card-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; line-height: 1.3; }
.card-header p { color: var(--text-light); font-size: .78rem; }

.card-body { padding: 0 20px; flex: 1; }
.modalidade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.badge-modalidade {
  display: inline-block;
  background: #e0e7ff;
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 600;
}
.btn-grade {
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: .72rem;
  font-weight: 700;
  transition: background .2s, color .2s;
}
.btn-grade:hover { background: var(--primary); color: #fff; }

.curso-nome { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.curso-detalhes { color: var(--text-light); font-size: .85rem; margin-bottom: 10px; line-height: 1.4; }
.selo-gratis {
  display: inline-block;
  background: var(--success);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.preco { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.preco small { font-size: .82rem; font-weight: 400; color: var(--text-light); }

.card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 640px) {
  .card-footer { flex-direction: row; justify-content: space-between; align-items: center; }
}
.btn-ver-mais {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .85rem;
  transition: background .2s, color .2s;
}
.btn-ver-mais:hover { background: var(--primary); color: #fff; }
.card-actions { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
@media (min-width: 640px) { .card-actions { justify-content: flex-start; } }
.btn-add-cart {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .85rem;
  transition: background .2s, color .2s;
}
.btn-add-cart:hover { background: transparent; color: var(--primary); }
.btn-wishlist {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  transition: color .2s, transform .2s;
}
.btn-wishlist svg { width: 20px; height: 20px; }
.btn-wishlist:hover { color: var(--secondary); transform: scale(1.1); }
.btn-wishlist.active { color: var(--danger); }
.btn-wishlist.active svg { fill: currentColor; }

.courses-counter-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 40px;
  border-top: 1px solid var(--border);
}
.courses-counter { color: var(--text-light); font-size: .85rem; }

/* ========== CERTIFICADOS ========== */
.certificates-section { margin-top: 40px; }
.cert-title { display: block; margin-bottom: 12px; font-weight: 600; color: var(--text-dark); }
.certificados { display: flex; gap: 16px; flex-wrap: wrap; }
.certificado-item { flex: 1 1 280px; text-align: center; }
.certificado-item img {
  width: 100%; height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.certificado-item span { display: block; margin-top: 8px; font-size: .8rem; color: var(--text-light); }

/* ========== FOOTER ========== */
.footer { background: var(--primary-dark); color: #fff; padding: 48px 0 20px; margin-top: 56px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h4 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #b0c0d0; text-decoration: none; font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--secondary); }
.footer-payment { margin-bottom: 32px; display: flex; justify-content: center; }
@media (min-width: 640px) { .footer-payment { justify-content: flex-start; } }
.footer-payment img { max-width: 400px; width: 100%; height: auto; }
.footer-socials {
  display: flex;
  gap: 18px;
  font-size: 1.35rem;
  margin-bottom: 24px;
  justify-content: center;
}
@media (min-width: 640px) { .footer-socials { justify-content: flex-start; } }
.footer-socials a { color: #fff; transition: color .2s; }
.footer-socials a:hover { color: var(--secondary); }
.footer-socials svg { width: 22px; height: 22px; }
.footer-copyright {
  text-align: center;
  border-top: 1px solid var(--primary-light);
  padding-top: 20px;
  color: #b0c0d0;
  font-size: .8rem;
}
.footer-copyright a { color: var(--secondary); }

/* ========== SIDE PANEL ========== */
.side-panel {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background: #fff;
  box-shadow: -8px 0 28px rgba(0,0,0,.16);
  z-index: 110;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.side-panel.open { transform: translateX(0); }
.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.side-panel-header h3 { color: var(--primary-dark); font-size: 1.1rem; }
.side-panel-close {
  font-size: 1.8rem;
  color: var(--text-light);
  line-height: 1;
  padding: 4px 8px;
}
.side-panel-close:hover { color: var(--primary); }
.side-panel-list {
  list-style: none;
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.side-panel-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.side-panel-item img { width: 60px; height: 46px; object-fit: cover; border-radius: 8px; }
.side-panel-item strong { display: block; color: var(--primary-dark); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-panel-item span { color: var(--text-light); font-size: .78rem; }
.item-remove { color: var(--danger); font-weight: 600; font-size: .78rem; }
.item-remove:hover { text-decoration: underline; }
.side-panel-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 16px rgba(0,0,0,.06);
}
.panel-total { font-weight: 800; color: var(--primary-dark); margin-bottom: 12px; }
.panel-empty { padding: 16px 4px; color: var(--text-light); font-size: .9rem; }

.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.panel-overlay.show { opacity: 1; visibility: visible; }

/* ========== MODAIS ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.modal.show { display: flex; }
.modal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 22px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideDown .3s ease;
}
@media (min-width: 640px) { .modal-content { padding: 32px; } }
.detail-modal { max-width: 980px; padding: 22px; }
@media (min-width: 640px) { .detail-modal { padding: 28px; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.modal-close {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-light);
  padding: 4px 8px;
  z-index: 2;
}
.modal-close:hover { color: var(--primary); }
.modal h3 { color: var(--primary-dark); font-size: 1.15rem; margin-bottom: 18px; padding-right: 32px; }
.modal-sub { color: var(--text-light); font-size: .88rem; margin-bottom: 14px; }

.modal input, .modal select, .modal textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  color: var(--text-dark);
}
.modal input:focus, .modal select:focus, .modal textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39,57,124,.1);
}
.btn-submit {
  width: 100%;
  background: var(--secondary);
  color: var(--primary-dark);
  border: 2px solid var(--secondary);
  padding: 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .95rem;
  transition: background .2s, color .2s;
  margin-top: 4px;
}
.btn-submit:hover { background: transparent; color: var(--secondary); }

/* ========== DETALHE CURSO ========== */
.course-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) { .course-detail-grid { grid-template-columns: 320px 1fr; } }
.detail-cover img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.detail-meta {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  font-size: .88rem;
  color: var(--text-dark);
}
.detail-meta p { margin-bottom: 8px; }
.detail-meta p:last-child { margin-bottom: 0; }
.detail-title { color: var(--primary-dark); font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; line-height: 1.25; }
@media (min-width: 640px) { .detail-title { font-size: 1.5rem; } }
.detail-subtitle { color: var(--text-light); margin-bottom: 14px; font-size: .9rem; }
.detail-description { color: var(--text-dark); margin-bottom: 14px; font-size: .92rem; }
.detail-modules { display: grid; gap: 12px; margin-top: 12px; }
.detail-module {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.detail-module h5 { color: var(--primary-dark); font-size: .92rem; font-weight: 600; margin-bottom: 8px; }
.detail-module ul { padding-left: 18px; color: var(--text-light); font-size: .85rem; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.detail-actions button {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .85rem;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-detail-primary { background: var(--secondary); color: var(--primary-dark); border: 2px solid var(--secondary); }
.btn-detail-primary:hover { background: transparent; color: var(--secondary); }
.btn-detail-cart { background: var(--primary); color: #fff; border: 2px solid var(--primary); }
.btn-detail-cart:hover { background: transparent; color: var(--primary); }
.btn-detail-fav { background: #fff; color: var(--text-dark); border: 2px solid var(--border); }
.btn-detail-fav:hover { border-color: var(--danger); }
.btn-detail-fav.active { border-color: var(--danger); color: var(--danger); }

/* ========== VIDEO MODAL ========== */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4,10,28,.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.video-modal.show { display: flex; }
.video-modal-content {
  width: min(440px, 96vw);
  border-radius: 20px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 24px 50px rgba(0,0,0,.42);
}
.video-modal-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 82vh;
  background: #000;
}
.video-modal-player { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.video-modal-top-actions {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.video-modal-bottom-actions {
  position: absolute;
  left: 10px; bottom: 10px;
  z-index: 2;
}
.video-action-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(15,23,42,.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.video-action-btn:hover { background: rgba(39,57,124,.95); }
.video-action-btn svg { width: 18px; height: 18px; }

/* ========== HELPERS ========== */
.text-center { text-align: center; }
.p-8 { padding: 2rem; }