/* ======================================================
   CSS OTIMIZADO DA PÁGINA DE PRODUTO
   ====================================================== */

body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: #f7f8fa;
    margin: 0;
    padding-bottom: 120px; /* Espaço para o rodapé fixo */
}

/* --- CABEÇALHO (RESTAURADO PARA VERSÃO SÓLIDA) --- */
.product-header {
    background-color: #EA1D2C;
    color: #fff;
    padding: 0px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
    min-height: 60px;
}

.back-button {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    transition: background-color 0.2s !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    z-index: 2 !important;
    position: relative !important;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.back-button:active {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.back-button i {
    font-size: 1rem !important;
}
.header-logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    height: 70px !important;
    width: auto !important;
    z-index: 1 !important;
}

/* Avaliação no header - CENTRALIZADA VERTICALMENTE */
.product-header .avaliacao {
    display: flex !important;
    align-items: center !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    z-index: 2 !important; /* Fica acima da logo */
    position: relative !important;
}

.product-header .avaliacao i {
    color: gold !important;
    font-size: 1rem !important;
}

.product-header .avaliacao .nota {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
}

.product-header .avaliacao .nota-cinza {
    font-size: 0.8rem !important;
    color: #fff !important;
    opacity: 0.9 !important;
}

/* --- INFORMAÇÕES DO PRODUTO (AJUSTADO) --- */
.product-image img {
    width: 100%;
    max-width: 680px;  /* <<< ADICIONE ESTA LINHA */
    height: auto;
    display: block;
    margin: 0 auto;    /* <<< E ADICIONE ESTA LINHA */
}
.product-info {
    background-color: #fff;
    padding: 20px;
    margin-top: -10px;
    position: relative;
}
.product-info h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #2d3748;
}
.product-info .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #00A44B;
}
.product-info .description {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
}

/* --- GRUPOS DE OPÇÕES --- */
.option-group {
    background-color: #fff;
    border-radius: 16px;
    margin: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.group-header {
    padding: 20px 20px 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.group-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #2d3748;
}
.group-description {
    font-size: 0.9rem;
    color: #718096;
    padding: 4px 20px 15px;
}

/* --- TAGS (Obrigatório, Grátis, etc) --- */
.tag-required, .tag-optional {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4a5568;
    background-color: #f7f8fa;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}
.tag-gratis {
    font-size: 0.8rem;
    font-weight: 700;
    color: #00A44B;
    border: 1px solid #00A44B;
    padding: 3px 8px;
    border-radius: 6px;
    margin-left: auto;
}

/* --- ITENS DAS OPÇÕES --- */
.option-list {
    padding: 0 20px;
}
.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
}
.option-item:first-child {
    border-top: none;
}
.option-item img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}
.item-info {
    flex-grow: 1;
}
.item-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
}
.item-info .item-price {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 2px;
}

/* --- PREÇO RISCADO (Regra unificada) --- */
.product-info .price .old-price,
.option-item:has(.tag-gratis) .item-info .item-price {
    text-decoration: line-through;
    color: #a0aec0;
}

/* --- SELETOR DE QUANTIDADE --- */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e0;
    border-radius: 50px;
}
.quantity-selector button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #718096;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quantity-selector span {
    font-size: 1rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    color: #2d3748;
}

/* --- OBSERVAÇÕES E RODAPÉ --- */
.comment-box {
    padding: 10px 20px 20px;
}
.comment-box textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    font-family: 'Nunito Sans', sans-serif;
    resize: vertical;
    box-sizing: border-box;
}
.comment-box textarea:focus {
    border-color: #EA1D2C;
    outline: none;
}
.char-counter {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    padding: 15px 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    box-sizing: border-box;
    z-index: 20;
}

.quantity-selector-main {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.quantity-selector-main button {
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 10px 15px;
    cursor: pointer;
}
.quantity-selector-main span {
    font-size: 1rem;
    font-weight: 600;
}

.add-to-cart-button {
    flex-grow: 1;
    background-color: #EA1D2C;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}
.add-to-cart-button #total-price {
    font-size: 0.9rem;
    font-weight: 600;
}

/* UNIFICADO: Regras para o botão desabilitado agora estão juntas */
.add-to-cart-button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    justify-content: center; /* Centraliza o texto quando o preço some */
}
.add-to-cart-button:disabled #total-price {
    display: none; /* Esconde o preço quando desabilitado */
}

.required-alert {
    background-color: #ef4444;
    color: #fff;
    padding: 12px 20px;
    margin: 10px 0;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.required-alert i {
    margin-right: 8px;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.option-group.shake {
  position: relative;
  display: block;
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
  will-change: transform;
  box-shadow: 0 0 0 3px rgba(234, 29, 44, 0.2);
}
/* === Tipografia unificada (garantia na página de produto) === */
:root{ --font-ui: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; }

html, body,
h1, h2, h3, h4, h5, h6,
p, span, small, strong, em,
button, input, textarea, select,
.add-to-cart-button, .quantity-selector, .quantity-selector-main {
  font-family: var(--font-ui) !important;
}
/* =================================================================
   👹 CABEÇALHO SUPREMO: PADRONIZADO E CENTRALIZADO (V3) 👹
   Cole no FINAL do produto.css para mandar em tudo.
   ================================================================= */

/* 1. O CONTAINER (A FAIXA VERMELHA - LIBERADA) */
.product-header {
    /* Layout Flexbox com espaço entre elementos */
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    
    /* Define uma altura fixa DECENTE */
    height: 60px !important;
    min-height: 60px !important;
    
    /* Garante a cor */
    background-color: #EA1D2C !important;
    padding: 0 15px !important;
    margin: 0 !important;
    
    /* Posicionamento relativo para logo centralizada */
    position: relative !important;
    
    z-index: 999 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

/* 2. A LOGO (CENTRALIZADA) */
.header-logo {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    height: 70px !important; 
    width: auto !important;
    z-index: 1 !important;
}

/* 3. BOTÃO VOLTAR E AVALIAÇÃO VISÍVEIS */
.product-header .back-button,
.product-header .avaliacao {
    display: flex !important;
    z-index: 2 !important;
}

/* ======================================================
   👹 GATILHOS MENTAIS GOD MODE 👹
   ====================================================== */

/* 1. BARRA DE "PESSOAS VENDO" */
.live-viewers-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff5f5; /* Fundo levemente avermelhado */
    border: 1px dashed #EA1D2C; /* Tracejado de urgência */
    color: #c53030;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 15px 0;
    line-height: 1.3;
}

.pulse-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    background-color: #EA1D2C;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(234, 29, 44, 0.7);
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(234, 29, 44, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(234, 29, 44, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(234, 29, 44, 0); }
}

/* 2. NOTIFICAÇÃO FLUTUANTE (GEOLOCALIZADA) */
.sales-notification {
    position: fixed;
    top: 80px; /* Abaixo do Header Vermelho */
    right: 15px;
    background: #ffffff;
    border-radius: 50px; /* Formato pílula super moderno */
    padding: 8px 16px 8px 8px; /* Padding assimétrico p/ caber a logo */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    max-width: 90%;
    
    /* Estado inicial: Invisível e deslocado */
    transform: translateX(120%); 
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f0f0f0;
}

.sales-notification.show {
    transform: translateX(0); /* Desliza da direita pra esquerda */
}

.sales-notification img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
    background: #ea1d2c;
    padding: 2px;
    border: 2px solid #EA1D2C;
}

.notification-content {
    display: flex;
    flex-direction: column;
    font-family: 'Nunito Sans', sans-serif;
    padding-right: 5px;
}

.notification-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: #00A44B; /* Verde Sucesso */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-msg {
    font-size: 0.8rem;
    color: #2d3748;
    margin: 2px 0 0 0;
    line-height: 1.2;
    white-space: nowrap; /* Tenta manter em uma linha se possível */
}

.notification-msg strong {
    color: #EA1D2C;
}

.notification-time {
    display: none; /* Simplifiquei pra ficar mais limpo no mobile */
}

/* Responsivo para desktop */
@media (min-width: 768px) {
    .sales-notification {
        top: 90px;
        right: 30px;
        border-radius: 12px;
        padding: 12px;
    }
    .sales-notification img {
        width: 45px;
        height: 45px;
    }
    .notification-msg {
        font-size: 0.9rem;
    }
}






