/**
 * JR Center - Custom Styles
 * Projeto: JR Rural Center Atacadista
 * Versão: 1.0
 * Última atualização: 2026-01-17
 */

/* ==========================================================================
   Animações Personalizadas
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.6); }
}

/* ==========================================================================
   Classes de Animação
   ========================================================================== */

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-scale-up {
    animation: scaleUp 0.3s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ==========================================================================
   Componentes de UI
   ========================================================================== */

/* Custom scrollbar for modal */
.modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Estilos modernos para cards de produto */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, box-shadow;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6);
    border-radius: 8px 8px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

/* Efeito de vidro (glassmorphism) */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Efeito de brilho nas imagens */
.image-glow {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

/* ==========================================================================
   Proteção de Imagens e Conteúdo
   ========================================================================== */

/* Impedir seleção de texto e imagens */
img, 
picture, 
video, 
canvas, 
svg {
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -ms-user-drag: none;
    pointer-events: auto;
}

/* Impedir arrastar imagens */
img[draggable="false"] {
    -webkit-user-drag: none;
    user-drag: none;
}

/* Impedir contexto em elementos protegidos */
.protected-content,
.protected-content img,
.protected-content picture {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ==========================================================================
   Gradientes por Produto (Gerados Dinamicamente)
   ========================================================================== */

/* Gradientes para produtos específicos - gerados via PHP */
.product-gradient {
    position: relative;
    overflow: hidden;
}

.product-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.product-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

/* ==========================================================================
   Loading Skeleton
   ========================================================================== */

.image-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 768px) {
    .product-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .product-card .h-48 {
        height: 12rem;
    }
    
    #modal-content {
        max-width: 95%;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .product-card .h-48 {
        height: 10rem;
    }
    
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .product-card .text-2xl {
        font-size: 1.25rem;
    }
    
    .product-card .text-sm {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   Utilidades
   ========================================================================== */

/* Removido .hidden-modal class em favor da utility 'hidden' do Tailwind 
   para evitar conflitos */