:root {
    --bg-color: #f7f7f7;
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --primary-color: #3483fa; /* Azul Original Restabelecido */
    --primary-color-hover: #2968c8;
    --price-color: #00a650;
    --border-color: #e6e6e6;
    --whatsapp: #25D366;
    --telegram: #0088cc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

/* Cabeçalho */
header {
    background-color: var(--white);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100; /* Z-index alto para ficar acima de tudo ao rolar */
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    gap: 24px;
}

/* Logo em Texto */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
}

.logo span {
    color: var(--primary-color);
}

.header-center {
    flex-grow: 1;
    display: flex;
    max-width: 600px;
    justify-content: center;
}

.search-bar {
    width: 100%;
    display: flex;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
    transition: 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 12px 24px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.header-right {
    display: flex;
    gap: 12px;
}

.btn-social-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 20px;
    transition: opacity 0.2s;
}

.btn-social-circle:hover {
    opacity: 0.9;
}

.btn-wa-circle {
    background-color: var(--whatsapp);
}

.btn-tg-circle {
    background-color: var(--telegram);
}

/* Categorias Circulares */
.categories-wrapper {
    background-color: var(--white);
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 60; /* Permite o clique nos filtros sem sobreposição */
}

.categories {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: center;
}

.categories::-webkit-scrollbar {
    display: none;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    text-align: center;
    color: var(--text-muted);
    width: 100px;
    flex-shrink: 0;
}

.cat-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.cat-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-item:hover .cat-icon-circle, .cat-item.active .cat-icon-circle {
    background-color: var(--primary-color);
    color: var(--white);
}

.cat-item.active .cat-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Container Principal */
main {
    max-width: 1300px;
    margin: 24px auto;
    padding: 0 24px;
}

.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 60; /* Permite interagir com a seleção de ordem */
}

.filters select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    outline: none;
    font-size: 14px;
}

/* Grid de Produtos */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Card do Produto */
.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Correção das Imagens Cortadas */
.card-img-container {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    overflow: hidden;
}

.card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain !important; /* Impede o corte da imagem */
    width: auto;
    height: auto;
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Preço com De/Por */
.card-price-container {
    margin-bottom: 16px;
}

.card-price-old {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.card-price-new {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-main);
}

.card-price-final {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Bloco de Cupom e Sem Cupom */
.coupon-box {
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 54px;
}

.coupon-text {
    font-size: 12px;
    color: var(--text-muted);
}

.coupon-code {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-main);
}

.btn-copy {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    transition: color 0.2s;
}

.coupon-box.no-coupon {
    background-color: #fff0f0;
    border: 1px dashed #ffcdd2;
    justify-content: center;
}

.coupon-box.no-coupon .coupon-text {
    color: #d32f2f;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

/* Botão de Compra */
.btn-buy {
    margin-top: auto;
    display: block;
    width: 100%;
    text-align: center;
    background-color: rgba(52, 131, 250, 0.1);
    color: var(--primary-color);
    padding: 14px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-buy:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================== */
/* ESTILO DO BOTÃO DE COMPARTILHAR            */
/* ========================================== */
.btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f2f5;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-share:hover {
    background-color: #e4e6e9;
}

.btn-share svg {
    color: var(--primary-color);
}

/* Seção "Não encontrou?" */
.request-section {
    margin-top: 48px;
    background: var(--white);
    padding: 40px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.request-header {
    text-align: center;
    margin-bottom: 24px;
}

.request-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.request-header p {
    color: var(--text-muted);
}

/* Formulário */
.request-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}

.input-group.full-width {
    grid-column: span 2;
}

.request-form input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    font-size: 14px;
    transition: border 0.2s;
}

.request-form input:focus {
    border-color: var(--primary-color);
}

.request-form button {
    grid-column: span 2;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: opacity 0.2s;
}

.request-form button:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .header-right {
        justify-content: center;
    }
    .request-form {
        grid-template-columns: 1fr;
    }
    .input-group.full-width, .request-form button {
        grid-column: 1;
    }

    /* ==========================================
       EFEITO INSTAGRAM STORIES (MOBILE)
    ========================================== */
    
    /* 1. Zera a parede externa para o carrossel encostar no vidro do celular */
    .categories-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 2. Alinha à esquerda, dá respiro interno e ajusta o espaço entre ícones */
    .categories {
        justify-content: flex-start !important; 
        padding-left: 20px; /* Descola o "Todos" da borda esquerda */
        padding-right: 20px; /* Respiro no final da rolagem */
        gap: 16px; /* Diminui o buraco entre ícones para imitar o IG */
        -webkit-overflow-scrolling: touch; /* Rolagem nativa e lisa no iOS */
    }
    
    /* 3. Aniquila qualquer faixa branca invisível que tenha sobrado */
    .categories-wrapper::after {
        display: none !important;
    }
}

/* ==========================================
   AJUSTE E ALINHAMENTO DOS ÍCONES SOCIAIS
========================================== */
.header-right {
    display: flex;
    gap: 12px;
    align-items: center; /* Garante que fiquem perfeitamente alinhados no meio */
}

.btn-social-circle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s;
    background-color: transparent; 
}

/* Efeito de clique/hover profissional */
.btn-social-circle:hover {
    transform: scale(1.05);
}

.btn-social-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 50%; 
    display: block;
}