/* ==============================================================================
   ARQUIVO: assets/css/style.css
   STATUS: LIMPO E BLINDADO (Com correção de preenchimento de imagem object-cover)
   ============================================================================== */

body { font-family: 'Inter', sans-serif; background-color: #fff; overflow-x: hidden; -webkit-user-select: none; user-select: none; }
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
input, textarea, select { -webkit-user-select: text !important; user-select: text !important; }
.btn-primary { background-color: var(--primary); color: white; transition: 0.3s; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* CORREÇÃO NOS CARTÕES DO CATÁLOGO: Força a imagem a preencher o quadrado (object-cover) */
.product-card .aspect-square img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

.product-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); }
.modal { transition: opacity 0.3s, visibility 0.3s; opacity: 0; visibility: hidden; pointer-events: none; z-index: 1000; position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, 0.9); backdrop-blur: 8px; }
.modal.active { opacity: 1; visibility: visible; pointer-events: auto; }
.user-menu { display: none; position: absolute; top: 100%; right: 0; margin-top: 1rem; background: white; min-width: 260px; border-radius: 1.5rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border: 1px solid #f1f5f9; z-index: 150; }
.user-menu.active { display: block; animation: slideDown 0.2s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.slider-wrapper { display: flex; width: max-content; animation: scroll 60s linear infinite; }
.slider-track { display: flex; }
.slider-track img { height: 500px; width: auto; object-fit: cover; margin-right: 0; display: block; min-width: 50vw; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.chat-widget { position: fixed; bottom: 30px; right: 30px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; }
.chat-btn { width: 64px; height: 64px; background: linear-gradient(135deg, #3b82f6, #1d4ed8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; cursor: pointer; box-shadow: 0 15px 30px rgba(37, 99, 235, 0.3); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.chat-btn:hover { transform: scale(1.1) translateY(-5px); box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4); }
.chat-window { width: 360px; height: 550px; background: white; border-radius: 24px; box-shadow: 0 30px 60px -10px rgba(0,0,0,0.3); display: none; flex-direction: column; overflow: hidden; margin-bottom: 20px; border: 1px solid rgba(0,0,0,0.05); }
.chat-window.active { display: flex; animation: popup 0.4s ease-out; }
.chat-header { background: linear-gradient(135deg, #0f172a, #1e293b); color: white; padding: 20px; display: flex; justify-content: space-between; align-items: center; }
.chat-body { flex: 1; padding: 20px; overflow-y: auto; background: #f8fafc; display: flex; flex-direction: column; gap: 12px; }
.chat-footer { padding: 15px; background: white; border-top: 1px solid #f1f5f9; display: flex; align-items: center; gap: 10px; }
.msg { padding: 12px 16px; border-radius: 16px; max-width: 85%; font-size: 13px; line-height: 1.5; -webkit-user-select: text; user-select: text; box-shadow: 0 2px 5px rgba(0,0,0,0.05); position: relative; }
.msg.admin { align-self: flex-start; background: white; color: #334155; border-bottom-left-radius: 4px; border: 1px solid #f1f5f9; }
.msg.client { align-self: flex-end; background: #3b82f6; color: white; border-bottom-right-radius: 4px; }
.disclaimer { font-size: 11px; background: #fffbeb; color: #b45309; padding: 12px; border-radius: 12px; margin-bottom: 15px; border: 1px solid #fcd34d; text-align: center; font-weight: 700; line-height: 1.4; box-shadow: 0 2px 4px rgba(252, 211, 77, 0.2); }
@keyframes popup { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.gallery-thumb { pointer-events: auto; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; object-fit: cover; flex-shrink: 0; }
.gallery-thumb:hover { border-color: var(--primary); transform: translateY(-2px); }

/* Animações dos popups de vendas fakes */
@keyframes slideInUpSales { from { transform: translateY(150%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOutSales { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.95); } }
.sales-popup-anim { animation: slideInUpSales 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.sales-popup-fade { animation: fadeOutSales 0.4s ease forwards; }

/* CORREÇÕES DE RESPONSIVIDADE */
@media (max-width: 768px) {
    #modal-view > .bg-white { border-radius: 0 !important; }
    
    /* Área da imagem no modal */
    #modal-view .bg-slate-50 { height: 35vh !important; min-height: 250px !important; flex-shrink: 0; }
    
    /* CORREÇÃO NO MODAL DE VISUALIZAÇÃO: Força a imagem principal a expandir e preencher (object-cover) */
    #view-main-img img { width: 100% !important; height: 100% !important; object-fit: cover !important; max-width: none !important; max-height: none !important; }
    
    /* Garante que o carrossel mobile também preencha */
    #view-gallery-mobile img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

    #view-thumbs { height: 70px !important; padding: 0 10px 10px !important; }
    #view-thumbs img { width: 50px !important; height: 50px !important; object-fit: cover !important; }
    #view-content-info { padding: 15px !important; }
    #view-content-info h2 { font-size: 1.3rem !important; }
    #view-content-info .text-4xl { font-size: 2rem !important; }
    #view-btn-add { padding: 12px !important; font-size: 14px !important; }
    .grid { gap: 10px !important; }
    .product-card { padding: 12px !important; }
    .product-card .text-2xl { font-size: 1.2rem !important; }
    .product-card .p-3 { padding: 8px !important; }
    #cart { width: 100% !important; }
    #cart .p-10 { padding: 15px !important; }
    #cart-items .flex { padding: 12px !important; }
    #cart-items .w-20 { width: 60px !important; height: 60px !important; }
    #modal-payment .bg-white { padding: 20px !important; }
    #modal-payment .text-4xl { font-size: 2rem !important; }
    #img-qr { width: 150px !important; height: 150px !important; }
    #catalogo .container { padding: 0 10px !important; }
    #catalogo button { padding: 8px 15px !important; font-size: 9px !important; }
    .chat-window { width: 300px !important; height: 450px !important; right: 10px !important; bottom: 80px !important; }
    .chat-widget { bottom: 15px !important; right: 15px !important; }
    .chat-btn { width: 50px !important; height: 50px !important; }
    .chat-btn i { width: 20px !important; height: 20px !important; }
}

@media (max-width: 480px) {
    .product-card .text-2xl { font-size: 1rem !important; }
    .product-card button { padding: 6px !important; }
    #view-content-info h2 { font-size: 1.1rem !important; }
    #view-content-info .text-4xl { font-size: 1.6rem !important; }
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.transition-all { transition: all 0.3s ease; }

/* Estilização da barra de rolagem interna */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }