body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #fcf2f8;
    color: #2d3748;
    margin: 0;
    padding: 0;
}

/* ================= HEADER ================= */

h1 {
    text-align: center;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.nav {
    text-align: center;
    padding-top: 70px; /* espaço para o hambúrguer fixo no topo */
}

.nav p {
    color: #4a5565;
    font-size: clamp(14px, 2vw, 18px);
}

/* ================= BARRA DE PESQUISA ================= */

.busca {
    display: flex;
    justify-content: center;
    margin-top: clamp(15px, 2.5vw, 25px);
    padding: 0 15px;
}

.busca-input {
    width: min(100%, 480px);
    padding: clamp(12px, 2.5vw, 15px) clamp(18px, 3vw, 25px);
    font-size: clamp(14px, 2.5vw, 16px);
    font-family: inherit;
    color: #2d3748;
    background-color: #fff;
    border: 2px solid #f6339a;
    border-radius: 30px;
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.busca-input::placeholder {
    color: #a0aec0;
}

.busca-input:focus {
    border-color: #e60073;
    box-shadow: 0 0 0 3px rgba(246, 51, 154, 0.2);
}

/* ================= SEM RESULTADOS ================= */

.sem-resultados {
    width: 100%;
    text-align: center;
    color: #4a5565;
    font-size: clamp(16px, 3vw, 20px);
    padding: 40px 20px;
    display: none;
}

.sem-resultados.visivel {
    display: block;
}

/* ================= MENU / HAMBÚRGUER / SIDEBAR ================= */

/* Botão hambúrguer fixo */
.hamburger {
    position: fixed;
    top: 15px;
    left: 05%;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background-color: #f6339a;
    border: none;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.ativo span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.ativo span:nth-child(2) {
    opacity: 0;
}
.hamburger.ativo span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.hamburger:hover {
    background-color: #e60073;
}

/* Overlay escuro atrás da sidebar */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.aberto {
    opacity: 1;
    visibility: visible;
}

/* Sidebar que desliza da esquerda */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(300px, 85vw);
    height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1003;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.sidebar.aberto {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: #2d3748;
}

.btn-fechar {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #e60073;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-fechar:hover {
    transform: rotate(90deg);
}

.sidebar .botoes {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0;
    flex-wrap: nowrap;
    gap: 10px;
}

.sidebar .botoes .botao {
    width: 100%;
}

.sidebar .botoes .botao button {
    width: 100%;
    margin: 0;
}

.sidebar .btn-voltar-menu {
    display: block;
    text-align: center;
    margin-top: 25px;
}

/* ================= BOTÕES ================= */

.botoes {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 20px);
    margin-top: clamp(15px, 2vw, 20px);
    flex-wrap: wrap;
}

.botao button {
    text-decoration: none;
    color: #f6339a;
    padding: clamp(12px, 2.5vw, 15px) clamp(20px, 4vw, 30px);
    border-radius: 5px;
    border: 1px solid #f6339a;
    cursor: pointer;
    
    margin: 0 auto;
    background: transparent;
    transition: 0.3s ease;
}

.botao button:hover {
    background-color: #e600733a;
    transform: scale(1.05);
}






/* botão todos */
#todos {
    display: none;
}

#todos button {
    background-color: #f6339a;
    color: #000000;
}

#todos button:hover {
    background-color: #e60073;
}

/* ================= PRODUTOS ================= */

.main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(20px, 4vw, 40px);
    padding: clamp(20px, 4vw, 40px);
}

/* CARD (único e corrigido) */
.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: clamp(200px, 30%, 300px);
    text-align: center;
    padding-bottom: 15px;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* IMAGEM */
/* Moldura única para TODOS os cards: mesma altura (420px) e mesma largura
   (a do card). A foto aparece INTEIRA (contain), centralizada na horizontal
   e na vertical, sobre fundo branco — mesma cor do card — então as bordas
   nem aparecem. Nada é cortado */
.card img {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center;
    background-color: #fff;
    border-radius: 5px 5px 0 0;
    transition: transform 0.3s ease;
}
.card img:hover {
    transform: scale(1.03);
}

/* DESCRIÇÃO */
.desc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5px 5px;
}

.price {
    color: #e60073;
    font-weight: bold;
    font-size: clamp(16px, 2.5vw, 20px);
}

.card p {
    margin-top: clamp(10px, 2vw, 15px);
    color: #4a5565;
}

/* BOTÃO CARD */
.card .btn {
    display: inline-block;
    margin-top: clamp(15px, 3vw, 20px);
    background-color: #f6339a;
    color: #fff;
    text-decoration: none;
    padding: clamp(10px, 2.5vw, 15px) clamp(20px, 4vw, 30px);
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
}

.card .btn:hover {
    background-color: #e60073;
    transform: scale(1.05);
}

/* ================= LAZY LOAD ================= */

.lazy {
    opacity: 0;
    transform: scale(1.02);
    /* fundo igual ao skeleton: sem "flash" branco enquanto a foto baixa */
    background-color: #eceff3;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
    transform: scale(1);
    /* depois de carregada, o fundo vira branco: com fotos contidas (contain),
       as bordas somem no card em vez de aparecer como barras cinzas */
    background-color: #fff;
}

/* ================= SKELETON LOADING ================= */
/* Cards placeholder exibidos enquanto os produtos carregam do Supabase,
   evitando página vazia e o pulo de layout (CLS) quando os cards aparecem */

.skeleton-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: clamp(200px, 30%, 300px);
    padding-bottom: 15px;
    overflow: hidden;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #eceff3;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.4s infinite;
}

.skeleton-img {
    width: 100%;
    height: 420px; /* mesma moldura das fotos reais (sem pulo de layout) */
    border-radius: 5px 5px 0 0;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    margin: 14px 16px 0;
}

.skeleton-line.titulo {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.skeleton-btn {
    height: 44px;
    width: 60%;
    margin: 20px auto 0;
    border-radius: 5px;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* Respeita usuários que preferem menos animação */
@media (prefers-reduced-motion: reduce) {
    .skeleton::after {
        animation: none;
    }
    .lazy,
    .card,
    .card .btn {
        transition: none;
    }
}

/* ================= FOOTER ================= */

footer {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer p {
    margin: 0 auto;
    max-width: 90vw;
    margin-top: 10px;
    padding: 1%;
}

footer h2 {
    text-align: center;
}

hr {
    border: none;
    border-top: 1px solid #fff;
    margin: 10px auto;
    width: 80%;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer span {
    font-size: clamp(12px, 2vw, 14px);
}
#btn-voltar{
    text-decoration: none;
    border: 1px solid #e60073;
    padding: 10px;
    border-radius: 5px;
    color: #e60073;
}
#btn-voltar:hover {
  
    border: 1px solid #e60073;
    transition: 0.5s;
transform: scale(1.05);
    color: #ff148a;
    background-color: #ff008038;
    
}


/* Badge para produtos "Sob encomenda" (catálogo dinâmico) */
.badge-encomenda {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    color: #ff148a;
    background-color: #ff008038;
    border-radius: 1rem;
}

/* Badge para produtos em destaque (catálogo dinâmico) */
.badge-destaque {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    color: #a07200;
    background-color: #ffd7004d;
    border-radius: 1rem;
}
/* Categoria selecionada na sidebar */
.sidebar .botoes .botao.selecionado button {
    color: #ff148a;
    background-color: #ff008038;
}

