/**
 * Estilos Optimizados para Plantillas Online
 * Ubicar en: wp-content/plugins/plantillas-online-manager/assets/plantilla-style.css
 */

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.plantilla-container,
.plantilla-archive-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.plantilla-breadcrumbs {
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.plantilla-breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

.plantilla-breadcrumbs a:hover {
    color: #004499;
}

.plantilla-breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

.plantilla-breadcrumbs .current {
    color: #333;
}

/* ============================================
   ADSENSE BANNERS
   ============================================ */
.adsense-banner-top,
.adsense-banner-bottom,
.adsense-mid-content,
.adsense-sidebar-top,
.adsense-sidebar-bottom {
    margin: 20px 0;
    text-align: center;
    min-height: 90px;
}

.adsense-sidebar-top,
.adsense-sidebar-bottom {
    min-height: 250px;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.plantilla-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

/* ============================================
   IMAGEN DESTACADA
   ============================================ */
.plantilla-featured-image {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.plantilla-featured-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}

/* ============================================
   TÍTULO Y TAGS
   ============================================ */
.plantilla-title {
    font-size: 32px;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.plantilla-tags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plantilla-tags .tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.plantilla-tags .tag:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* ============================================
   DESCRIPCIÓN Y CARACTERÍSTICAS
   ============================================ */
.plantilla-description,
.plantilla-features {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.plantilla-description h2,
.plantilla-features h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
    font-weight: 600;
}

.plantilla-description p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.plantilla-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plantilla-features li {
    padding: 12px 0;
    color: #555;
    font-size: 15px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.plantilla-features li:last-child {
    border-bottom: none;
}

/* Icono check minimalista */
.check-icon {
    width: 20px;
    height: 20px;
    color: #00aa00;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================
   SIDEBAR - INFO BOX
   ============================================ */
.plantilla-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.plantilla-info-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item:last-of-type {
    border-bottom: none;
}

/* Iconos minimalistas SVG */
.info-icon {
    width: 20px;
    height: 20px;
    color: #666;
    flex-shrink: 0;
}

.info-item .label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.info-item .value {
    color: #333;
    font-size: 14px;
    margin-left: auto;
    font-weight: 500;
}

/* PRECIO */
.price-box {
    text-align: center;
    border: none;
    padding: 20px 0;
}

.price-tag {
    display: inline-block;
    font-size: 32px;
    font-weight: 700;
    color: #0066cc;
    padding: 12px 30px;
    background: linear-gradient(135deg, #e8f4ff 0%, #d0e8ff 100%);
    border-radius: 8px;
}

.price-tag.free {
    background: linear-gradient(135deg, #e8ffe8 0%, #d0ffd0 100%);
    color: #00aa00;
}

/* ============================================
   BOTONES DE ACCIÓN - ICONOS MINIMALISTAS
   ============================================ */
.action-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
}

.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-download {
    background: #0066cc;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

.btn-download:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.35);
}

.btn-demo {
    background: #fff;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-demo:hover {
    background: #0066cc;
    color: #fff;
}

.btn-demo:hover .btn-icon {
    color: #fff;
}

/* ============================================
   COMPARTIR SOCIAL - ICONOS MINIMALISTAS
   ============================================ */
.social-share {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.share-label {
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    font-size: 14px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 8px;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-btn.facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn.twitter {
    background: #1da1f2;
    color: #fff;
}

.share-btn.whatsapp {
    background: #25d366;
    color: #fff;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   PLANTILLAS RELACIONADAS
   ============================================ */
.plantillas-relacionadas {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.plantillas-relacionadas h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 700;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.related-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.related-info {
    padding: 15px;
}

.related-info h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 600;
}

.related-info .price {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #0066cc;
}

.related-info .price.free {
    color: #00aa00;
}

/* ============================================
   OPTIMIZACIONES DE RENDIMIENTO
   ============================================ */

/* Prevenir CLS (Cumulative Layout Shift) */
.plantilla-featured-image {
    min-height: 300px;
}

.related-item img {
    aspect-ratio: 16 / 9;
}

/* Hardware acceleration para animaciones */
.btn,
.share-btn,
.related-item,
.gallery-thumbnails .thumb {
    will-change: transform;
}

/* Optimizar fuentes */
.plantilla-container {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .plantilla-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .plantilla-sidebar {
        position: static;
        max-width: 600px;
        margin: 30px auto 0;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */
@media (max-width: 768px) {
    .plantilla-container {
        padding: 15px;
    }
    
    .plantilla-title {
        font-size: 24px;
    }
    
    .plantilla-description,
    .plantilla-features {
        padding: 20px 15px;
    }
    
    .plantilla-info-box {
        padding: 20px 15px;
    }
    
    .price-tag {
        font-size: 26px;
        padding: 10px 24px;
    }
    
    .btn {
        font-size: 15px;
        padding: 14px 20px;
        width: 100%;
    }
    
    .btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .action-buttons {
        gap: 12px;
        margin-top: 20px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .adsense-banner-top,
    .adsense-banner-bottom {
        margin: 15px 0;
    }
    
    .plantilla-featured-image {
        min-height: 200px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .plantilla-breadcrumbs {
        font-size: 12px;
    }
    
    .plantilla-title {
        font-size: 20px;
    }
    
    .plantilla-tags .tag {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .action-buttons {
        gap: 12px;
    }
    
    .btn {
        font-size: 16px;
        padding: 16px 20px;
        width: 100%;
        font-weight: 700;
    }
    
    .btn-icon {
        width: 20px;
        height: 20px;
    }
    
    .share-btn {
        width: 44px;
        height: 44px;
        margin-right: 8px;
        margin-bottom: 4px;
    }
    
    .share-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .info-item {
        font-size: 13px;
        padding: 14px 0;
    }
    
    .info-icon,
    .check-icon {
        width: 18px;
        height: 18px;
    }
    
    .price-tag {
        font-size: 28px;
        padding: 12px 28px;
    }
    
    .price-box {
        padding: 24px 0;
    }
}
.share-btn.linkedin {
    background: #0077b5;
    color: #fff;
}


/* ============================================
   MODO OSCURO (Opcional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Puedes descomentar esto si quieres soporte para modo oscuro
    .plantilla-container {
        color: #e0e0e0;
    }
    
    .plantilla-gallery,
    .plantilla-description,
    .plantilla-features,
    .plantilla-info-box,
    .related-item {
        background: #1a1a1a;
        border-color: #333;
    }
    */
}