/**
 * Sublipop - Estilos adicionales para el portal
 * Complemento de Tailwind CSS
 */

/* ============================================
   ANIMACIONES PERSONALIZADAS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ============================================
   EFECTOS DE HOVER MEJORADOS
   ============================================ */

.card-3d {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BOTONES PREMIUM
   ============================================ */

.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-premium:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   INPUTS MEJORADOS
   ============================================ */

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #FFC107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
    transition: all 0.3s ease;
}

/* ============================================
   CANVAS PERSONALIZADO
   ============================================ */

#designCanvas {
    transition: all 0.3s ease;
    background: #fff;
    background-image: 
        linear-gradient(45deg, #f9f9f9 25%, transparent 25%),
        linear-gradient(-45deg, #f9f9f9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f9f9f9 75%),
        linear-gradient(-45deg, transparent 75%, #f9f9f9 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

#designCanvas:hover {
    border-color: #FFB300;
}

/* ============================================
   GALERÍA CON EFECTO OVERLAY
   ============================================ */

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.8) 0%, rgba(220, 53, 69, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ============================================
   LOADER PERSONALIZADO
   ============================================ */

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(33, 37, 41, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 193, 7, 0.2);
    border-top-color: #FFC107;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   PROGRESS BAR (para subir archivos)
   ============================================ */

.progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFC107 0%, #FFB300 100%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* ============================================
   TOOLTIPS PERSONALIZADOS
   ============================================ */

.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #212529;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #212529;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
}

/* ============================================
   BADGES Y ETIQUETAS
   ============================================ */

.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #DC3545;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

/* ============================================
   PRECIO CON TACHADO
   ============================================ */

.price-old {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9em;
}

.price-new {
    color: #DC3545;
    font-weight: bold;
    font-size: 1.2em;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .section-padding {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* ============================================
   PRINT STYLES (para PDF)
   ============================================ */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
    }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #FFC107;
    color: #212529;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus visible para teclado */
*:focus-visible {
    outline: 3px solid #FFC107;
    outline-offset: 2px;
}

/* ============================================
   IMAGEN PLACEHOLDER MIENTRAS CARGA
   ============================================ */

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

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   LISTA DE VERIFICACIÓN ESTILIZADA
   ============================================ */

.checklist li {
    position: relative;
    padding-left: 30px;
}

.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
}

/* ============================================
   SEPARADOR DECORATIVO
   ============================================ */

.divider-fancy {
    position: relative;
    text-align: center;
    margin: 3rem 0;
}

.divider-fancy::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFC107, transparent);
}

.divider-fancy span {
    position: relative;
    background: white;
    padding: 0 20px;
    color: #DC3545;
    font-weight: bold;
}

/* ============================================
   CARD CON RIBBON
   ============================================ */

.card-ribbon {
    position: relative;
    overflow: visible;
}

.ribbon {
    position: absolute;
    top: 15px;
    right: -5px;
    background: #DC3545;
    color: white;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
}

.ribbon::before {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    border-left: 5px solid #a71d2a;
    border-bottom: 5px solid transparent;
}

/* ============================================
   FIN DE ESTILOS
   ============================================ */
