/* Productos Digitales - Plantillas UX/UI */

.kb-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0 80px 0;
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    min-height: 300px;
}

.kb-hero h1 {
    font-size: 3.5rem;
    margin-top: 0.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    padding-top: 3rem;
    vertical-align: middle;
}

.kb-hero p {
    font-size: 1.4rem;
    opacity: 0.95;
    padding-top: 10px;
}

.kb-filters {
    background-color: #f8f9fa;
    padding: 30px 0;
    margin-bottom: 50px;
    border-bottom: 2px solid #dee2e6;
}

.kb-filters .form-select,
.kb-filters .form-control {
    border-radius: 8px;
    border: 2px solid #dee2e6;
    padding: 12px;
    font-size: 1rem;
}

.kb-filters .form-select:focus,
.kb-filters .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.kb-filters .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.kb-filters .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.template-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.template-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.template-card:hover .template-image img {
    transform: scale(1.1);
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-overlay .btn-light {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 25px;
}

.template-info {
    padding: 25px;
}

.template-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.template-badge.badge-food {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.template-badge.badge-health {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.template-badge.badge-commerce {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.template-badge.badge-events {
    background: linear-gradient(135deg, #e91e63 0%, #9c27b0 100%);
}

.template-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #2c3e50;
}

.template-info p {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 60px;
}

.template-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.template-features span {
    background: #ecf0f1;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #34495e;
    font-weight: 500;
}

.template-features i {
    color: #27ae60;
    margin-right: 5px;
}

.template-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.template-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.template-footer .btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .kb-hero h1 { font-size: 2.5rem; }
    .templates-grid { grid-template-columns: 1fr; gap: 20px; }
    .template-footer { flex-direction: column; gap: 15px; }
}

/* Animación de puntos suspensivos */
.loading-more {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.dots span {
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-more p {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 500;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =============================================
   Tema Oscuro - Knowledge Base / Productos
   ============================================= */
[data-theme="dark"] .kb-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

[data-theme="dark"] body {
    background-color: #3a3a3a;
}

[data-theme="dark"] main {
    background-color: #3a3a3a;
}

[data-theme="dark"] .kb-filters {
    background-color: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .kb-filters .form-select,
[data-theme="dark"] .kb-filters .form-control {
    background-color: #2a2a2a;
    border-color: #444;
    color: #f0f0f0;
}

[data-theme="dark"] .template-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
}

[data-theme="dark"] .template-info h3 {
    color: #fff;
}

[data-theme="dark"] .template-info p {
    color: #b0b0b0;
}

[data-theme="dark"] .template-features span {
    background-color: #2a2a2a;
    color: #ccc;
}

[data-theme="dark"] .template-features {
    border-color: #333;
}

[data-theme="dark"] .template-price {
    color: #6b8e23;
}

[data-theme="dark"] main {
    background-color: #000;
}

[data-theme="dark"] .loading-more p {
    color: #b0b0b0;
}
