/* ==========================================================
   Saberzinho — Design System
   Paleta: verde-petróleo profundo + coral energético + menta
   Tipografia: pilha de sistema, peso variável para hierarquia
   Assinatura visual: waveform (barras de onda sonora) + selo redondo
   ========================================================== */

:root {
    --bg: #0d1b1a;
    --surface: #122624;
    --surface-2: #1a3532;
    --border: #1e3a37;
    --text: #eef7f5;
    --text-muted: #9db8b3;
    --accent: #ff8a5c;
    --accent-2: #3ddc97;
    --amber: #ffcf5c;
    --danger: #ff5d6c;
    --success: #3ddc97;
    --radius: 14px;
    --radius-sm: 8px;
    --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", "Space Mono", "Courier New", monospace;
    --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 15px; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.muted { color: var(--text-muted); font-size: 14px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }

/* ---------- Botões ---------- */
.btn-primary, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .15s ease, opacity .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(13,27,26,.88); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-mark { color: var(--accent); }

.search-form { position: relative; flex: 1; max-width: 420px; display: flex; }
.search-form input {
    width: 100%; padding: 10px 40px 10px 14px; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 999px; color: var(--text);
}
.search-form button { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 32px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; }
.search-suggestions {
    position: absolute; top: 46px; left: 0; right: 0; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; display: none; z-index: 60;
}
.search-suggestions a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; }
.search-suggestions a:hover { background: var(--surface); }
.search-suggestions img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.search-suggestions a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestions a em {
    flex-shrink: 0; font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; padding: 3px 8px;
}

.main-nav { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: 14px; font-weight: 500; }

.user-menu { position: relative; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
    border: none; font-weight: 700; cursor: pointer;
}
.user-dropdown {
    position: absolute; right: 0; top: 46px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); min-width: 160px; padding: 8px; display: none; flex-direction: column; z-index: 60;
}
.user-dropdown.open { display: flex; }
.user-dropdown-name { padding: 8px 10px; font-weight: 600; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.user-dropdown a { padding: 8px 10px; border-radius: 6px; }
.user-dropdown a:hover { background: var(--surface); }

/* ---------- Flash messages ---------- */
.flash { padding: 12px 0; font-size: 14px; }
.flash-success { background: rgba(53,201,143,.12); color: var(--success); }
.flash-error { background: rgba(255,93,108,.12); color: var(--danger); }
.flash-info { background: rgba(124,92,255,.12); color: var(--accent); padding: 12px 16px; border-radius: var(--radius-sm); }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: inherit; font-family: inherit; }
.btn-link:hover { opacity: .8; }

/* ---------- Hero + waveform (elemento assinatura) ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; }
.hero-waveform {
    position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 4px; opacity: .35; z-index: 0;
}
.hero-waveform span {
    flex: 1; background: linear-gradient(180deg, var(--accent), transparent);
    border-radius: 3px; animation: waveform 2.4s ease-in-out infinite alternate;
}
@keyframes waveform { from { transform: scaleY(.4); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .hero-waveform span { animation: none; } }

.hero-text { position: relative; z-index: 1; max-width: 640px; }
.hero-text h1 { font-size: 40px; line-height: 1.15; margin-bottom: 16px; }
.hero-text p { color: var(--text-muted); font-size: 17px; margin-bottom: 28px; }

/* ---------- Chips / categorias ---------- */
.category-chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 20px 24px; }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 500; }
.chip:hover { border-color: var(--accent); }
.chip-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 40px 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 22px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    font-size: 13px; color: var(--text-muted); margin-bottom: 20px;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text); font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.empty-hint { color: var(--text-muted); font-size: 14px; }

/* ---------- Cards de podcast ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }

/* ---------- Em destaque: grade de cards + vídeo em destaque ---------- */
.featured-layout { display: grid; grid-template-columns: 1fr minmax(380px, 640px); gap: 32px; align-items: start; }
.featured-layout .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.featured-video-card {
    /* Sem fundo/borda/padding: o vídeo ocupa o card inteiro, maior e sem moldura. */
    background: transparent; border: 0; border-radius: var(--radius);
    padding: 0; align-self: start;
}
.featured-video-card .video-embed { margin: 0; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.featured-video-caption { margin: 12px 0 0; font-size: 14px; color: var(--text-muted); text-align: center; }
@media (max-width: 900px) {
    .featured-layout { grid-template-columns: 1fr; }
    .featured-video-card { max-width: 640px; margin: 0 auto; width: 100%; }
}

/* ---------- Em destaque: 3 no desktop, 4 no celular ----------
   O servidor manda 4 podcasts aleatórios; no desktop o 4º fica oculto
   (mantém o layout ao lado do vídeo em 3 colunas), no celular os 4
   aparecem. */
.featured-layout .card-grid > .podcast-card:nth-child(4) { display: none; }
@media (max-width: 900px) {
    .featured-layout .card-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-layout .card-grid > .podcast-card:nth-child(4) { display: block; }
}
.podcast-card { display: block; }
.podcast-cover { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin-bottom: 10px; }
.podcast-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.podcast-card:hover .podcast-cover img { transform: scale(1.05); }
.cover-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--accent); background: var(--surface-2);
}
.cover-placeholder.lg { font-size: 64px; }
.podcast-card-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.podcast-card-meta { color: var(--text-muted); font-size: 12px; }

/* ----------------------------------------------------------
   Cards estilo "polaroid" — usados nas grades da Loja (Drop),
   Podcasts e Cursos. Escopados em .polaroid-grid pra não afetar
   os cards padrão usados na home, conta e busca. */
.polaroid-grid { gap: 30px 26px; }
.polaroid-grid .podcast-card {
    position: relative;
    background: #fdfdfa;
    border: 3px solid #171310;
    border-radius: 3px;
    padding: 12px 12px 18px;
    box-shadow: 7px 7px 0 rgba(10, 8, 6, .92);
    transform: rotate(-1.3deg);
    transition: transform .18s ease, box-shadow .18s ease;
}
.polaroid-grid .podcast-card:nth-child(3n+2) { transform: rotate(1.4deg); }
.polaroid-grid .podcast-card:nth-child(3n)   { transform: rotate(-0.5deg); }
.polaroid-grid .podcast-card:nth-child(4n+1) { transform: rotate(0.9deg); }
.polaroid-grid .podcast-card:hover {
    transform: rotate(0deg) translateY(-5px);
    box-shadow: 9px 9px 0 rgba(10, 8, 6, .92);
    z-index: 2;
}
.polaroid-grid .podcast-cover {
    aspect-ratio: 1; border-radius: 0; overflow: hidden;
    background: #e7e3da; border: 2px solid #171310; margin-bottom: 14px;
}
.polaroid-grid .podcast-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.polaroid-grid .podcast-card:hover .podcast-cover img { transform: scale(1.05); }
.polaroid-grid .cover-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 40px; font-weight: 700; color: #171310; background: #e7e3da;
}
.polaroid-grid .podcast-card-meta,
.polaroid-grid .product-eyebrow {
    display: block; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em;
    font-size: 11px; font-weight: 700; color: #756c5e; margin-bottom: 6px;
}
.polaroid-grid .podcast-card-title {
    font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: #171310;
    line-height: 1.35; margin-bottom: 4px;
}
.polaroid-grid .product-price,
.polaroid-grid .course-price {
    font-family: var(--font-mono); color: #171310;
}
.polaroid-grid .product-price-old { color: #948b7d; }
.polaroid-grid .empty-hint { color: var(--text-muted); }
@media (max-width: 640px) {
    .polaroid-grid .podcast-card,
    .polaroid-grid .podcast-card:nth-child(3n+2),
    .polaroid-grid .podcast-card:nth-child(3n),
    .polaroid-grid .podcast-card:nth-child(4n+1) { transform: rotate(0deg); }
}

/* ---------- Lista de episódios ---------- */
.episode-list { display: flex; flex-direction: column; gap: 4px; }
.episode-row {
    display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: var(--radius-sm);
}
.episode-row:hover { background: var(--surface); }
.episode-row-cover { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--surface-2); flex-shrink: 0; }
.episode-row-cover img { width: 100%; height: 100%; object-fit: cover; }
.episode-row-cover .play-icon {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.35); color: #fff; opacity: 0; transition: opacity .15s ease;
}
.episode-row:hover .play-icon { opacity: 1; }
.episode-row-info { flex: 1; min-width: 0; }
.episode-row-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode-row-podcast { font-size: 12px; color: var(--accent); }
.episode-row-desc { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode-row-duration { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Rankings ---------- */
.ranking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ranking-list li { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: var(--radius-sm); }
.ranking-list li:hover { background: var(--surface); }
.rank-number { font-family: var(--font-display); font-weight: 700; color: var(--accent); width: 24px; text-align: center; }
.ranking-list a { flex: 1; display: flex; flex-direction: column; font-size: 14px; }
.ranking-list a span { font-size: 12px; color: var(--text-muted); }
.rank-count { font-size: 12px; color: var(--text-muted); }

/* ---------- Comentários ---------- */
.comment-feed, .comment-thread { display: flex; flex-direction: column; gap: 18px; }
.comment-feed-item, .comment-item { display: flex; gap: 12px; }
.avatar-sm {
    width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.comment-feed-text { color: var(--text-muted); font-size: 14px; }
.comment-body p { margin: 2px 0; font-size: 14px; }
.comment-form { margin-bottom: 24px; }
.comment-form textarea {
    width: 100%; padding: 12px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); resize: vertical; margin-bottom: 10px;
}
.js-edit-comment-toggle {
    background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 0; margin-left: 6px;
}
.comment-edit-form { margin-top: 8px; }
.comment-edit-form textarea {
    width: 100%; padding: 10px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); resize: vertical; margin-bottom: 8px; font-size: 13px;
}

/* ---------- Autenticação ---------- */
.auth-section { display: flex; justify-content: center; padding: 64px 24px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; color: var(--accent); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.checkbox-row input { width: auto; }

form label { display: block; font-size: 13px; color: var(--text-muted); margin: 14px 0 6px; }
form input[type=text], form input[type=email], form input[type=password],
form input[type=url], form input[type=number], form input[type=file],
form select, form textarea {
    width: 100%; padding: 11px 12px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
}
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--accent); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.row-fields { display: flex; gap: 14px; }
.row-fields > div { flex: 1; }

/* ---------- Página do podcast ---------- */
.podcast-hero { position: relative; border-bottom: 1px solid var(--border); padding: 48px 0; }
.podcast-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.podcast-hero-inner { position: relative; display: flex; gap: 32px; align-items: flex-end; flex-wrap: wrap; }
.podcast-hero-cover { width: 200px; height: 200px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.podcast-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.podcast-hero-info { flex: 1; min-width: 260px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.podcast-hero-info h1 { font-size: 30px; margin: 6px 0; }
.podcast-author { color: var(--text-muted); font-size: 14px; margin: 0 0 12px; }
.podcast-desc { font-size: 14px; color: var(--text-muted); max-width: 620px; margin: 0 0 16px; }
.podcast-stats { display: flex; gap: 18px; font-size: 13px; color: var(--text-muted); margin-bottom: 18px; flex-wrap: wrap; }
.podcast-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.rating-widget { display: flex; gap: 2px; cursor: pointer; }
.rating-widget .star { color: var(--border); font-size: 20px; transition: color .1s ease; }
.rating-widget .star-filled, .rating-widget .star:hover, .rating-widget .star:hover ~ .star { color: var(--amber); }

.share-row { display: flex; gap: 8px; margin-left: auto; }
.share-row a, .share-row button {
    width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text);
}

/* ---------- Página de episódio ---------- */
.back-link { color: var(--text-muted); font-size: 13px; display: inline-block; margin-bottom: 16px; }
.episode-detail h1 { font-size: 26px; margin-bottom: 6px; }
.episode-video { width: 100%; border-radius: var(--radius); margin: 20px 0; background: #000; }
.video-embed { position: relative; padding-top: 56.25%; margin: 20px 0; border-radius: var(--radius); overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.spotify-embed, .apple-embed { margin: 20px 0; border-radius: var(--radius); overflow: hidden; }
.spotify-embed iframe, .apple-embed iframe { display: block; border-radius: var(--radius); }
.episode-actions { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.chapters, .episode-description, .transcript { margin: 28px 0; font-size: 14px; }
.chapters ul { list-style: none; padding: 0; }
.chapters li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.chapters li span { color: var(--accent); font-family: var(--font-display); width: 60px; }
.transcript summary { cursor: pointer; color: var(--accent); font-weight: 600; }

/* ---------- Player fixo (dock) ---------- */
.player-dock {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: var(--surface); border-top: 1px solid var(--border);
}
.player-progress { height: 3px; background: var(--border); cursor: pointer; }
.player-progress-fill { height: 100%; width: 0%; background: var(--accent); }
.player-inner { display: flex; align-items: center; gap: 20px; padding: 10px 24px; }
.player-meta { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.player-meta img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.player-title { font-size: 13px; font-weight: 600; }
.player-podcast { font-size: 12px; color: var(--text-muted); }
.player-controls { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.player-controls button, .player-controls select { background: transparent; border: none; color: var(--text); cursor: pointer; }
.player-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
#player-toggle { font-size: 18px; }
#player-volume { width: 90px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 100px; }
.footer-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 28px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.footer-column h4 { font-family: var(--font-display); font-size: 14px; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.footer-column ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-column a { color: var(--text-muted); font-size: 14px; }
.footer-column a:hover { color: var(--accent); }
.footer-inner { display: flex; gap: 10px; font-size: 13px; color: var(--text-muted); }
@media (max-width: 640px) { .footer-columns { grid-template-columns: 1fr; gap: 20px; } }
.logo-img { height: 28px; max-width: 160px; object-fit: contain; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 32px 0; }
.pagination-info { font-size: 13px; color: var(--text-muted); }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
    .two-col { grid-template-columns: 1fr; }
    .search-form { display: none; }
    .hero-text h1 { font-size: 30px; }
}
@media (max-width: 600px) {
    .player-controls { gap: 8px; }
    .player-controls select, #player-volume { display: none; }
    .podcast-hero-inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================
   Cursos
   ========================================================== */
.course-price { font-family: var(--font-display); font-weight: 600; color: var(--accent); font-size: 13px; margin-top: 4px; }
.course-price-big { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin: 4px 0 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.course-hero { border-bottom: 1px solid var(--border); padding: 48px 0; }
.course-hero-inner { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.course-hero-cover { width: 220px; height: 220px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.course-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-hero-info { flex: 1; min-width: 280px; }
.course-hero-info h1 { font-size: 28px; margin: 4px 0; }

.access-badge { display: inline-block; padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin: 10px 0; }
.access-ok { background: rgba(53,201,143,.12); color: var(--success); }
.access-pending { background: rgba(255,182,72,.12); color: var(--amber); }

.pix-checkout { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-top: 18px; max-width: 420px; }
.pix-checkout h3 { margin-bottom: 4px; }
.pix-qr { display: flex; justify-content: center; padding: 12px 0; }
.pix-qr img { border-radius: var(--radius-sm); background: #fff; padding: 8px; }
.pix-key-box {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 14px; margin: 12px 0 6px; word-break: break-all;
}
.pix-key-box code { font-size: 13px; color: var(--accent); }

.course-module { margin-bottom: 24px; }
.course-module h3 { font-size: 16px; margin-bottom: 10px; }
.episode-row-locked { opacity: .55; cursor: not-allowed; }

.lesson-layout { display: grid; grid-template-columns: 1fr 280px; gap: 32px; align-items: start; }
.lesson-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: sticky; top: 84px; }
.lesson-sidebar h3 { font-size: 14px; margin-bottom: 10px; }
.lesson-sidebar-module-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 14px 0 4px; }
.lesson-sidebar-item { display: block; padding: 7px 8px; border-radius: 6px; font-size: 13px; color: var(--text-muted); }
.lesson-sidebar-item:hover { background: var(--surface-2); color: var(--text); }
.lesson-sidebar-item.active { background: var(--accent); color: #fff; }

@media (max-width: 860px) {
    .lesson-layout { grid-template-columns: 1fr; }
    .lesson-sidebar { position: static; }
}

/* ---------- Minha conta: shell com menu lateral de abas ---------- */
.form-section {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 20px;
}
.form-section h3 { font-size: 15px; margin-bottom: 4px; }
.form-section .section-hint { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }

.account-shell { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }

.account-sidebar {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px; position: sticky; top: 84px;
}
.account-sidebar-header { padding: 6px 10px 14px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.account-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 8px;
}
.account-sidebar-name { font-weight: 600; font-size: 14px; word-break: break-word; }
.account-sidebar-email { font-size: 12px; color: var(--text-muted); word-break: break-word; }

.account-nav { display: flex; flex-direction: column; gap: 2px; }
.account-nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; color: var(--text-muted);
}
.account-nav a:hover { background: var(--surface-2); color: var(--text); }
.account-nav a.nav-active { background: var(--accent); color: #fff; }
.account-nav .nav-icon { width: 18px; text-align: center; flex-shrink: 0; }

.account-content { min-width: 0; }
.account-tab-panel { display: none; }
.account-tab-panel.active { display: block; animation: account-tab-fade .15s ease; }
@keyframes account-tab-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 860px) {
    .account-shell { grid-template-columns: 1fr; }
    .account-sidebar { position: static; padding: 10px; }
    .account-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
    .account-nav a { white-space: nowrap; }
    .account-sidebar-header { display: none; }
}

/* ==========================================================
   Loja — catálogo, produto, carrinho e checkout
   ========================================================== */
.shop-search-form { display: flex; gap: 8px; }
.shop-search-form input {
    padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px; color: var(--text); min-width: 220px;
}

.product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.product-card { position: relative; }
.product-eyebrow {
    text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .09em;
    color: var(--accent); margin-bottom: 6px;
}
.product-badge {
    position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    padding: 6px 12px; border-radius: 8px;
}
.product-badge-out { left: auto; right: 10px; top: 10px; background: var(--danger); color: #fff; }
.product-price { font-family: var(--font-display); font-weight: 800; font-size: 19px; margin-top: 4px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.product-price-old { color: var(--text-muted); text-decoration: line-through; font-weight: 400; font-size: 13px; }

.product-show-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .product-show-grid { grid-template-columns: 1fr; } }
.product-gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 1/1; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.product-gallery-thumb {
    width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer;
    border: 1px solid var(--border); opacity: .75;
}
.product-gallery-thumb:hover { opacity: 1; border-color: var(--accent); }
.product-info h1 { font-size: 26px; margin-bottom: 6px; }
.product-add-form { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
form input[type=number].product-qty-input, input.product-qty-input {
    width: 70px; padding: 10px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); text-align: center;
}

.cart-link { position: relative; display: inline-flex; align-items: center; }
.cart-count {
    position: absolute; top: -8px; right: -12px; background: var(--accent); color: #fff;
    font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 6px; min-width: 16px; text-align: center;
}
.cart-qty-form { display: inline-block; }

/* Carrinho — lista de itens */
.cart-list {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; margin-top: 8px;
}
.cart-list-head, .cart-item {
    display: grid;
    grid-template-columns: 1fr 100px 90px 100px 40px;
    gap: 12px; align-items: center; padding: 14px 18px;
}
.cart-list-head {
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.cart-list-head span:nth-child(2), .cart-list-head span:nth-child(4) { text-align: right; }
.cart-item { border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item-product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cart-item-thumb {
    width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
    background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.cart-item-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-price, .cart-item-subtotal { color: var(--text-muted); font-size: 14px; text-align: right; }
.cart-item-subtotal { color: var(--text); font-weight: 600; }
.cart-item-qty { display: flex; justify-content: center; }
.cart-item-qty .product-qty-input { width: 56px; padding: 7px 6px; font-size: 13px; }
.cart-item-remove { display: flex; justify-content: flex-end; }
.cart-remove-btn {
    width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: transparent;
    color: var(--text-muted); cursor: pointer; font-size: 13px; line-height: 1; transition: all .15s;
}
.cart-remove-btn:hover { background: rgba(255,93,108,.12); border-color: var(--danger); color: var(--danger); }

.cart-summary {
    display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; margin-top: 18px; padding-right: 4px;
}
.cart-summary-label { color: var(--text-muted); font-size: 14px; }
.cart-summary-total { font-size: 22px; font-weight: 800; }
.cart-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; justify-content: flex-end; }

@media (max-width: 640px) {
    .cart-list-head { display: none; }
    .cart-item {
        grid-template-columns: 1fr; row-gap: 8px; position: relative; padding: 16px;
    }
    .cart-item-product { grid-column: 1 / -1; }
    .cart-item-price, .cart-item-subtotal { text-align: left; }
    .cart-item-price::before { content: "Preço: "; color: var(--text-muted); }
    .cart-item-subtotal::before { content: "Subtotal: "; color: var(--text-muted); font-weight: 400; }
    .cart-item-qty { justify-content: flex-start; }
    .cart-item-remove { position: absolute; top: 14px; right: 14px; }
    .cart-actions, .cart-summary { justify-content: flex-start; }
}

/* Loja — sidebar de categorias */
.shop-shell { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.shop-sidebar {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; position: sticky; top: 16px;
}
.shop-search-form-sidebar { display: flex; gap: 6px; margin-bottom: 18px; }
.shop-search-form-sidebar input {
    flex: 1; min-width: 0; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px; color: var(--text); font-size: 13px;
}
.shop-search-form-sidebar button {
    width: 34px; flex-shrink: 0; border-radius: 999px; border: 1px solid var(--border); background: transparent;
    color: var(--text-muted); cursor: pointer;
}
.shop-search-form-sidebar button:hover { border-color: var(--accent); color: var(--text); }
.shop-sidebar-title { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 0 10px 8px; }
.shop-cat-nav { display: flex; flex-direction: column; gap: 2px; }
.shop-cat-nav a {
    padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; text-decoration: none;
}
.shop-cat-nav a:hover { background: var(--surface-2); color: var(--text); }
.shop-cat-nav a.nav-active { background: var(--accent); color: #fff; }
@media (max-width: 860px) {
    .shop-shell { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
    .shop-cat-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
    .shop-cat-nav a { white-space: nowrap; }
}

/* ==========================================================
   Saberzinho — Home: kicker, pillars, stats do hero
   ========================================================== */
.sz-kicker {
    display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--accent-2); background: rgba(61,220,151,.12); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.sz-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.sz-hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.sz-hero-stats div { display: flex; flex-direction: column; }
.sz-hero-stats strong { font-family: var(--font-display); font-size: 22px; }
.sz-hero-stats span { color: var(--text-muted); font-size: 12px; }

.sz-pillars {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
    padding: 28px 24px 8px;
}
.sz-pillar-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; transition: transform .15s ease, border-color .15s ease;
}
.sz-pillar-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.sz-pillar-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.sz-pillar-card h3 { font-size: 17px; margin-bottom: 6px; }
.sz-pillar-card p { color: var(--text-muted); font-size: 13px; margin: 0; }
.sz-pillar-podcasts:hover { border-color: var(--accent); }
.sz-pillar-courses:hover { border-color: var(--accent-2); }
.sz-pillar-shop:hover { border-color: var(--amber); }

.sz-section-tint { background: var(--surface); border-radius: var(--radius); }

/* ==========================================================
   Pedidos (cliente) — página "Meus pedidos" e detalhe do pedido
   ========================================================== */
.badge {
    display: inline-block; padding: 4px 12px; border-radius: 999px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
}
.badge-lg { padding: 7px 16px; font-size: 12px; }
.badge-pending   { background: rgba(255,182,72,.15); color: var(--amber); }
.badge-paid      { background: rgba(53,201,143,.15); color: var(--success); }
.badge-shipped   { background: rgba(91,169,255,.15); color: #5ba9ff; }
.badge-completed { background: rgba(53,201,143,.15); color: var(--success); }
.badge-cancelled { background: rgba(255,93,108,.15); color: var(--danger); }

.access-danger { background: rgba(255,93,108,.15); color: var(--danger); }

.cell-title { font-weight: 600; }
.cell-muted { color: var(--text-muted); font-size: 13px; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: transparent; color: var(--text); font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: border-color .15s ease, color .15s ease;
}
.btn-icon:hover { border-color: var(--accent); }
.btn-icon.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.order-code {
    font-family: var(--font-mono); font-size: 13px; font-weight: 700;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 3px 9px; letter-spacing: .02em; color: var(--accent);
}
.order-code-lg { font-size: 16px; padding: 5px 12px; vertical-align: middle; }

.order-breadcrumb { color: var(--text-muted); font-size: 13px; margin-bottom: 6px; }
.order-breadcrumb a { color: var(--text-muted); text-decoration: underline; }
.order-breadcrumb a:hover { color: var(--text); }

.order-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.order-header h1 { font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-header .muted { margin-top: 4px; }

.tracking-box {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 18px; margin: 12px 0;
}
.tracking-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 3px; }
.tracking-box code { font-family: var(--font-mono); font-size: 14px; color: var(--text); }

.confirm-receipt-box { border: 1px solid var(--success); background: rgba(53,201,143,.06); }

.order-items-list { display: flex; flex-direction: column; }
.order-item-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.order-item-row:last-child { border-bottom: none; }
.order-total-row {
    display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--border); font-size: 15px; color: var(--text-muted);
}
.order-total-row strong { color: var(--text); font-size: 18px; font-family: var(--font-display); }

.orders-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.orders-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders-table th {
    text-align: left; padding: 12px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--surface);
}
.orders-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; background: var(--surface); }
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: var(--surface-2); }

@media (max-width: 720px) {
    .orders-table thead { display: none; }
    .orders-table, .orders-table tbody, .orders-table tr, .orders-table td { display: block; width: 100%; }
    .orders-table tr { border-bottom: 1px solid var(--border); padding: 10px 4px; }
    .orders-table td {
        display: flex; justify-content: space-between; align-items: center; gap: 12px;
        border-bottom: none; padding: 6px 12px;
    }
    .orders-table td[data-label]::before {
        content: attr(data-label); color: var(--text-muted); font-size: 12px; font-weight: 600;
    }
    .orders-table td[data-label=""]::before { content: none; }
    .order-header { flex-direction: column; }
}
