/* ==========================================
   JE CROCHET — Design tokens
   Fundo: Orchid Noir (violeta escuro)
   Cards: Nude Cashmere
   ========================================== */
:root {
    --bg: #3A0940;
    --bg-darker: #250529;
    --card-bg: #D9C5B4;
    --card-bg-hover: #e6d7c9;
    --text-light: #F6EEE7;
    --text-muted: #cbb8c4;
    --text-dark: #2B1730;
    --accent: #8C5E86;      /* violeta médio, ponte entre as duas cores */
    --gold: #C9A66B;        /* detalhe quente, linhas/badges */
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body {
    background-color: var(--bg);
    color: var(--text-light);
    padding-top: 90px;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.25s; }
h1, h2, h3, .logo { font-family: 'Playfair Display', serif; }

/* ==========================================
   HEADER
   ========================================== */
.header {
    background-color: var(--bg-darker);
    height: 78px;
    width: 100%;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-left { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.logo { font-size: 26px; font-weight: 700; letter-spacing: 3px; color: var(--text-light); }
.logo span { color: var(--gold); }
.nav-link { font-size: 14px; font-weight: 600; letter-spacing: 0.5px; color: var(--text-light); white-space: nowrap; }
.nav-link:hover { color: var(--gold); }

.search-box {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.08);
    padding: 9px 16px;
    border-radius: 25px 8px 8px 25px;
    width: 190px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .header { padding: 0 4%; gap: 10px; }
    .nav-left { gap: 14px; }
    .logo { font-size: 21px; letter-spacing: 1.5px; }
    .nav-link { font-size: 12.5px; }
    .nav-icons { gap: 14px; }
    .acoes-direita { gap: 8px; }
    .search-box { width: 120px; padding: 8px 12px; }
}
@media (max-width: 380px) {
    .nav-link { display: none; }
}
.search-box input {
    border: none; background: transparent;
    font-size: 0.85rem; margin-left: 10px; width: 100%;
    color: var(--text-light);
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { outline: none; }
.search-icon { width: 16px; height: 16px; opacity: 0.7; flex-shrink: 0; }

.acoes-direita { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.nav-icons { display: flex; align-items: center; gap: 20px; }
.icon-btn { position: relative; display: flex; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--text-light); stroke-width: 1.8; }
.icon-btn:hover svg { stroke: var(--gold); }
.icon-btn .badge {
    position: absolute; top: -7px; right: -9px;
    background: var(--gold); color: var(--text-dark);
    font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 10px;
    min-width: 16px; text-align: center;
}

/* ==========================================
   SLIDER (topo)
   ========================================== */
.slider-section { padding: 30px 5% 10px; max-width: 1500px; margin: 0 auto; }
.slider-frame { position: relative; }
.slider-wrapper { display: flex; gap: 15px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.slider-wrapper::-webkit-scrollbar { display: none; }
.slide-item { flex: 0 0 260px; width: 260px; height: 340px; border-radius: var(--radius); overflow: hidden; position: relative; scroll-snap-align: start; }
.slide-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.slide-item:hover img { transform: scale(1.06); }
.slide-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(37,5,41,0.95), transparent);
    padding: 45px 16px 14px;
    font-weight: 600; font-size: 16px;
}
.slider-seta {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(37,5,41,0.55); border: none; color: var(--text-light);
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); z-index: 5; transition: 0.25s;
}
.slider-seta:hover { background: var(--gold); color: var(--text-dark); }
.slider-seta-esq { left: 10px; }
.slider-seta-dir { right: 10px; }
@media (max-width: 600px) {
    .slide-item { flex-basis: 190px; width: 190px; height: 250px; }
    .slider-seta { width: 34px; height: 34px; font-size: 14px; }
}

/* ==========================================
   CONTAINER / SECTIONS
   ========================================== */
.container { padding: 0 5%; max-width: 1500px; margin: 0 auto; }
.section-title {
    font-size: 24px; margin: 45px 0 22px;
    border-left: 3px solid var(--gold);
    padding-left: 14px;
    display: flex; align-items: center; justify-content: space-between;
}
.section-title .ver-tudo { font-size: 13px; font-weight: 600; color: var(--gold); font-family: 'Inter', sans-serif; }

/* ==========================================
   GRID DE PRODUTOS — 8 colunas x 5 linhas no PC
   ========================================== */
.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(8, 1fr);
}
@media (max-width: 480px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
@media (min-width: 481px) and (max-width: 768px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
@media (min-width: 769px) and (max-width: 1024px) { .grid { grid-template-columns: repeat(6, 1fr); gap: 14px; } }
@media (min-width: 1025px) { .grid { grid-template-columns: repeat(8, 1fr); gap: 18px; } }

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    display: flex; flex-direction: column;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px) scale(1.035); box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
.card:active { transform: scale(0.97); }
.card-img-wrap { width: 100%; aspect-ratio: 2 / 3; background: #c7b5a4; overflow: hidden; position: relative; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.card:hover .card-img-wrap img { transform: scale(1.12); }
.card-badge {
    position: absolute; top: 8px; right: 8px;
    background-color: var(--bg); color: var(--text-light);
    font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 4px;
    letter-spacing: 0.5px;
}
.fav-btn {
    position: absolute; top: 8px; left: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(43,7,48,0.55); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.25s;
}
.fav-btn svg { fill: none; stroke: var(--text-light); stroke-width: 1.8; transition: 0.25s; }
.fav-btn:hover { background: rgba(43,7,48,0.8); transform: scale(1.1); }
.fav-btn.ativo svg { fill: var(--gold); stroke: var(--gold); }
.card-info { padding: 10px 12px; flex-grow: 1; }
.card-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-cat { font-size: 11px; color: #6b5763; margin-top: 2px; }

/* Zoom-click: classe aplicada por JS no clique, antes de abrir o modal */
.card.zoom-click { animation: zoomPulse 0.28s ease; }
@keyframes zoomPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); box-shadow: 0 14px 30px rgba(0,0,0,0.45); }
    100% { transform: scale(1); }
}

/* ==========================================
   BOTÃO MOSTRAR MAIS
   ========================================== */
.btn-mostrar-mais-wrap { display: flex; justify-content: center; margin: 40px 0 20px; }
.btn-mostrar-mais {
    background: transparent; color: var(--text-light);
    border: 1px solid var(--gold);
    padding: 12px 34px; border-radius: 30px;
    font-weight: 600; letter-spacing: 0.5px; cursor: pointer;
    transition: 0.3s;
}
.btn-mostrar-mais:hover { background: var(--gold); color: var(--text-dark); }
.btn-mostrar-mais:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================
   MODAL DE PRODUTO (zoom + detalhe)
   ========================================== */
#overlay-modal {
    position: fixed; inset: 0; background: rgba(20,3,23,0.75);
    backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    z-index: 3000; padding: 20px;
}
#overlay-modal.aberto { display: flex; }
.modal-card {
    background: var(--card-bg); color: var(--text-dark);
    max-width: 720px; width: 100%; border-radius: 14px;
    display: flex; overflow: hidden; max-height: 85vh;
    animation: modalIn 0.28s ease;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-img { width: 45%; flex-shrink: 0; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 30px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.modal-body h3 { font-size: 22px; }
.modal-cat-tag { display: inline-block; background: var(--bg); color: var(--text-light); font-size: 11px; padding: 4px 10px; border-radius: 20px; width: fit-content; }
.modal-desc { font-size: 14px; line-height: 1.6; color: #4a3a45; }
.modal-actions { margin-top: auto; display: flex; gap: 10px; }
.btn-whatsapp {
    background: var(--bg); color: var(--text-light);
    border: none; padding: 12px 20px; border-radius: 8px;
    font-weight: 600; cursor: pointer; flex: 1; text-align: center;
}
.btn-whatsapp:hover { background: var(--accent); }
.btn-fechar-modal {
    position: absolute; top: 14px; right: 18px;
    background: rgba(0,0,0,0.15); border: none; color: var(--text-dark);
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px;
}
@media (max-width: 600px) {
    .modal-card { flex-direction: column; max-height: 90vh; }
    .modal-img { width: 100%; height: 220px; }
}

/* ==========================================
   PAGINAÇÃO (catálogo — mecânica AniOrbita)
   ========================================== */
.paginacao { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 50px 0; flex-wrap: wrap; }
.btn-pag { background-color: rgba(255,255,255,0.06); color: var(--text-light); border: 1px solid rgba(255,255,255,0.08); padding: 10px 15px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-pag:hover:not(:disabled) { background-color: rgba(255,255,255,0.14); }
.btn-pag.ativo { background-color: var(--gold); color: var(--text-dark); border-color: var(--gold); cursor: default; }
.btn-pag:disabled { opacity: 0.35; cursor: not-allowed; }

/* ==========================================
   RESULTADOS DE PESQUISA
   ========================================== */
#secao-pesquisa { display: none; }

/* ==========================================
   FOOTER
   ========================================== */
.footer { background-color: var(--bg-darker); border-top: 1px solid rgba(255,255,255,0.06); padding: 50px 5% 30px; margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-logo { font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.footer-logo span { color: var(--gold); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.footer-link { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.footer-link:hover { color: var(--gold); }
.footer-copyright { color: #6b5763; font-size: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); width: 100%; }

/* ==========================================
   PÁGINA DE ARTIGO (detalhe do produto)
   ========================================== */
.artigo-container { padding: 40px 5% 20px; max-width: 1100px; margin: 0 auto; }
.artigo-voltar { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.artigo-voltar:hover { color: var(--gold); }
.artigo-grid { display: flex; gap: 46px; align-items: flex-start; }
.artigo-img-wrap { flex: 1 1 420px; max-width: 460px; border-radius: 16px; overflow: hidden; aspect-ratio: 2/3; background: var(--card-bg); }
.artigo-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.artigo-info { flex: 1 1 360px; padding-top: 10px; }
.artigo-cat-tag { display: inline-block; background: rgba(255,255,255,0.08); color: var(--text-light); font-size: 12px; padding: 5px 14px; border-radius: 20px; margin-bottom: 16px; }
.artigo-titulo { font-family: 'Playfair Display', serif; font-size: 32px; margin-bottom: 18px; }
.artigo-desc { font-size: 15px; line-height: 1.8; color: var(--text-muted); margin-bottom: 30px; }
.artigo-acoes { display: flex; flex-wrap: wrap; gap: 12px; }
.fav-btn-grande {
    position: static; width: auto; height: auto;
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; border: 1px solid rgba(255,255,255,0.25); color: var(--text-light);
    padding: 12px 22px; border-radius: 30px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.fav-btn-grande svg { width: 17px; height: 17px; fill: none; stroke: var(--text-light); }
.fav-btn-grande.ativo { border-color: var(--gold); }
.fav-btn-grande.ativo svg { fill: var(--gold); stroke: var(--gold); }
.artigo-acoes .btn-whatsapp { flex: 1 1 220px; text-align: center; padding: 12px 22px; border-radius: 30px; font-size: 14px; }
@media (max-width: 760px) {
    .artigo-grid { flex-direction: column; }
    .artigo-img-wrap { max-width: 100%; }
}

/* ==========================================
   FAVORITOS — estado vazio
   ========================================== */
#favoritos-vazio {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
#favoritos-vazio a { color: var(--gold); font-weight: 600; }

/* ==========================================
   FUNDO DECORATIVO — usado na página de boas-vindas
   e no ecrã de login do painel de admin
   ========================================== */
.fundo-decor {
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(circle at 15% 20%, #C9A66B 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, #8C5E86 0%, transparent 45%),
        radial-gradient(circle at 75% 80%, #D9C5B4 0%, transparent 35%),
        radial-gradient(circle at 10% 85%, #5c1a63 0%, transparent 45%),
        linear-gradient(160deg, #2b0630 0%, #4a0f52 55%, #2b0630 100%);
}
.fundo-decor-foto {
    position: fixed; inset: 0; z-index: -1;
    width: 100%; height: 100%; object-fit: cover;
    display: none;
}
.fundo-decor-foto.ativa { display: block; }
.fundo-decor-overlay {
    position: fixed; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(43,7,48,0.25) 0%, rgba(43,7,48,0.55) 100%);
}
.fio-decor {
    position: fixed; z-index: -2;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
}
.fio-decor.fio-1 { width: 420px; height: 420px; top: -100px; left: -80px; background: #C9A66B; }
.fio-decor.fio-2 { width: 320px; height: 320px; bottom: -80px; right: -60px; background: #8C5E86; }
.fio-decor.fio-3 { width: 260px; height: 260px; top: 55%; left: 8%; background: #D9C5B4; opacity: 0.3; }
.fio-decor.fio-4 { width: 200px; height: 200px; top: 8%; right: 20%; background: #ffffff; opacity: 0.08; }
.textura-pontos {
    position: fixed; inset: 0; z-index: -2;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    pointer-events: none;
}

/* ==========================================
   PAINEL DE ADMINISTRAÇÃO
   ========================================== */
.admin-body { background: var(--bg); min-height: 100vh; padding: 0; }
.admin-login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.admin-login-card {
    background: rgba(58, 9, 64, 0.45);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px; padding: 40px; width: 100%; max-width: 380px; color: var(--text-light);
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}
.admin-login-card h1 { font-size: 22px; margin-bottom: 6px; }
.admin-login-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.admin-campo { margin-bottom: 16px; }
.admin-campo label { display: block; font-size: 12px; margin-bottom: 6px; color: var(--text-muted); }
.admin-campo input, .admin-campo select, .admin-campo textarea {
    width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.2); color: var(--text-light); font-size: 14px;
}
.admin-campo textarea { resize: vertical; min-height: 80px; }
.admin-btn {
    width: 100%; padding: 12px; border-radius: 8px; border: none;
    background: var(--gold); color: var(--text-dark); font-weight: 700; cursor: pointer; font-size: 14px;
}
.admin-btn:hover { background: #e0bd80; }
.admin-btn.secundario { background: transparent; border: 1px solid rgba(255,255,255,0.25); color: var(--text-light); width: auto; padding: 10px 18px; }
.admin-erro { color: #ff9a9a; font-size: 13px; margin-top: 10px; min-height: 16px; }

.admin-painel { display: none; padding: 30px 4%; max-width: 1300px; margin: 0 auto; color: var(--text-light); }
.admin-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 12px; }
.admin-topo h1 { font-family: 'Playfair Display', serif; }
.admin-grid-form {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 26px; margin-bottom: 30px;
}
.admin-form-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form-linha.full { grid-template-columns: 1fr; }
@media (max-width: 700px) { .admin-form-linha { grid-template-columns: 1fr; } }
.admin-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.admin-tabela-wrap { overflow-x: auto; }
.admin-tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-tabela th, .admin-tabela td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-tabela th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; }
.admin-tabela img { width: 42px; height: 56px; object-fit: cover; border-radius: 4px; }
.admin-acoes { display: flex; gap: 8px; }
.admin-acoes button {
    background: transparent; border: 1px solid rgba(255,255,255,0.2); color: var(--text-light);
    padding: 5px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.admin-acoes button.excluir:hover { background: #7a2323; border-color: #7a2323; }
.admin-acoes button.editar:hover { background: var(--gold); color: var(--text-dark); border-color: var(--gold); }
.admin-status { font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ==========================================
   CANVAS DE PARTÍCULAS
   ========================================== */
#particulas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
