/* MD Post Relacionados - Frontend Styles */

.md-related-posts-wrapper {
    margin: 60px 0;
    padding: 0;
    background: transparent;
}

.md-related-posts-title {
    margin: 0 0 40px 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #000;
    text-align: left;
}

.md-related-posts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.md-related-post-card {
    background: #fff;
    border: 4px solid #d32f2f;
    padding: 30px;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

.md-related-post-card:hover {
    border-color: #b71c1c;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.2);
}

.md-related-post-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.4;
    color: #000;
}

.md-related-post-title a {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 700;
}

.md-related-post-title a:hover {
    color: #b71c1c;
}

.md-related-post-excerpt {
    margin: 0;
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
}

.md-related-post-link {
    display: none;
}

/* Productos Recomendados */

.md-related-products-wrapper {
    margin: 60px 0;
    padding: 0;
    background: transparent;
}

.md-related-products-title {
    margin: 0 0 40px 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #000;
    text-align: left;
}

.md-related-products-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.md-related-product-card {
    background: #fff;
    border: 4px solid #d32f2f;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 0;
    transition: all 0.3s ease;
    text-align: center;
}

.md-related-product-card:hover {
    border-color: #b71c1c;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.md-related-product-image {
    width: 175px;
    height: 175px;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
}

.md-related-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.md-related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.md-related-product-card:hover .md-related-product-image img {
    transform: scale(1.05);
}

.md-product-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.md-related-product-content {
    padding: 0;
    width: 100%;
}

.md-related-product-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.3;
    color: #d32f2f;
}

.md-related-product-title a {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 700;
}

.md-related-product-title a:hover {
    color: #b71c1c;
}

/* Tablet responsiveness - 2 columnas */
@media (max-width: 1024px) {
    .md-related-post-card {
        padding: 25px;
    }

    .md-related-products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .md-related-product-card {
        padding: 18px;
    }

    .md-related-product-image {
        width: 150px;
        height: 150px;
        margin-bottom: 12px;
    }

    .md-related-posts-title,
    .md-related-products-title {
        font-size: 1.5em;
    }

    .md-related-post-title {
        font-size: 1.1em;
    }

    .md-related-product-title {
        font-size: 1em;
    }
}

/* Mobile responsiveness - 1 columna */
@media (max-width: 768px) {
    .md-related-posts-wrapper {
        margin: 50px 0;
    }

    .md-related-products-wrapper {
        margin: 50px 0;
    }

    .md-related-post-card {
        padding: 20px;
        border-width: 3px;
    }

    .md-related-products-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .md-related-product-card {
        padding: 15px;
        border-width: 3px;
    }

    .md-related-product-image {
        width: 140px;
        height: 140px;
        margin-bottom: 10px;
    }

    .md-related-posts-title,
    .md-related-products-title {
        font-size: 1.3em;
        margin-bottom: 25px;
    }

    .md-related-post-title {
        font-size: 1.05em;
    }

    .md-related-product-title {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .md-related-posts-wrapper {
        margin: 40px 0;
    }

    .md-related-products-wrapper {
        margin: 40px 0;
    }

    .md-related-post-card {
        padding: 15px;
        border-width: 3px;
    }

    .md-related-products-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .md-related-product-card {
        padding: 12px;
        border-width: 3px;
    }

    .md-related-product-image {
        width: 120px;
        height: 120px;
        margin-bottom: 8px;
    }

    .md-related-posts-title,
    .md-related-products-title {
        font-size: 1.2em;
        margin-bottom: 20px;
    }

    .md-related-post-title {
        font-size: 0.95em;
    }

    .md-related-product-title {
        font-size: 0.9em;
    }
}
